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

Attempt to avoid error with _read_utf8_with_fallback by moving code in pkg_resources #4422

Merged
merged 6 commits into from
Jun 19, 2024

Conversation

abravalheri
Copy link
Contributor

@abravalheri abravalheri commented Jun 17, 2024

Summary of changes

In #4399 there is a strange error when pkg_resources/__init__.py tries to reach _read_utf8_with_fallback.

Unfortunately, still there is no minimal reproducer for this problem, so I am not sure what is the root cause of the problem. However, there is some indication that simply re-ordering the definition of the function before the calls with _call_aside, may help with the problem.

Since there is no change in implementation (just re-ordering), we might as well try.

Other changes in this PR:

  • Rename LOCALE_ENCODING => _LOCALE_ENCODING: that is an oversight of the previous PR, it is better to keep the member private while the change is too new for people to start depending on it (Hyrum's law).

Closes

Pull Request Checklist

@abravalheri abravalheri merged commit 8cc50d4 into pypa:main Jun 19, 2024
20 of 22 checks passed
@abravalheri abravalheri deleted the issue-4399 branch June 19, 2024 12:26
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.

1 participant