Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline a copy of _PyUnicode_Copy #62

Merged
merged 1 commit into from
Dec 28, 2024

Conversation

movermeyer
Copy link
Owner

What are you trying to accomplish?

Silences compiler errors in Python 3.13. Fixes #61.

python/cpython#106382 moved the _PyUnicode API functions elsewhere.

What approach did you choose and why?

Instead of backporting the current Python 3.13 datetimemodule.c code, I simply inlined the _PyUnicode_Copy method. Much easier.

I also changed the example pip install command in the README to include the ; python_version < '3.11' version specifier, to hopefully encourage correct usage.

What should reviewers focus on?

🤷

The impact of these changes

Silences compiler errors in Python 3.13.

While no one should bother using backports.datetime_fromisoformat with Python 3.13, people still do (presumably since they don't know to use ; python_version < '3.11' in their dependencies).

Testing

Build once again work in Python 3.13:

env_313/bin/python -m build

Silences compiler errors in Python 3.13
@movermeyer movermeyer force-pushed the movermeyer/inline__PyUnicode_Copy branch from 279ed23 to fb85e47 Compare December 28, 2024 18:16
@movermeyer movermeyer merged commit e8b16a9 into main Dec 28, 2024
7 checks passed
@movermeyer movermeyer mentioned this pull request Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pip install backports-datetime-fromisoformat no longer works
1 participant