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

Adopt UTF-8 for .pth files on Python 3.13 #4306

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

abravalheri
Copy link
Contributor

We should wait until a compatible version of Python3.13 is released (probably a beta).

Summary of changes

  • Use UTF-8 to write .pth files on Python 3.13
  • When reading .pth on Python 3.13 tries first UTF-8 and then fallback to locale (this is done to avoid errors caused by mixing installations created by different versions of setuptools in the same environment)

See reasoning in python/cpython#77102

Closes

Pull Request Checklist

@abravalheri
Copy link
Contributor Author

abravalheri commented May 22, 2024

The implementation in CPython was merged in 16 Apr and a new beta was released on 8 May (which I suppose includes the changes).

Maybe we can start to consider merging now.

There is a backport planned for 3.12, but I think if we try to consider it, it may make conditions more difficult: python/cpython#117917.

@abravalheri abravalheri marked this pull request as ready for review May 22, 2024 10:19
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.

None yet

1 participant