Conversation
zsedem
approved these changes
Jul 8, 2024
Owner
|
Thanks for the contribution |
This was referenced Jul 8, 2024
sternenseemann
pushed a commit
to NixOS/nixpkgs
that referenced
this pull request
Jul 15, 2024
With the cpython 3.9.0 release, the breaking changes in the C-API for python's unicode are handeled correctly via an upstream fix, see zsedem/haskell-cpython#22
flandweber
pushed a commit
to flandweber/nixpkgs
that referenced
this pull request
Aug 28, 2024
With the cpython 3.9.0 release, the breaking changes in the C-API for python's unicode are handeled correctly via an upstream fix, see zsedem/haskell-cpython#22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After we've reenabled cpython for Python >= 3.8 in #21 , Python 3.12 deprecated the Unicode API (https://docs.python.org/3.11/c-api/unicode.html#c.PyUnicode_FromUnicode and https://docs.python.org/3.11/c-api/unicode.html#c.PyUnicode_AsUnicode) and CPython failed to build, consequently. This PR ports the relevant functions to the new C-API, namely using CWchar (https://docs.python.org/3.11/c-api/unicode.html#c.PyUnicode_AsWideChar and https://docs.python.org/3.11/c-api/unicode.html#c.PyUnicode_FromWideChar). This allows a uniform handling of the platform specific casts using C Wide Strings from base without preprocessor stuff.
It would be great if we could have a new hackage release with those changes 🐑