-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
bpo-30565: Add PYTHONCOERCECLOCALE=warn runtime flag #2260
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
bpo-30565: Add PYTHONCOERCECLOCALE=warn runtime flag #2260
Conversation
ncoghlan
commented
Jun 17, 2017
- legacy locale warnings are now silent by default
- build time configuration setting is removed
- set PYTHONCOERCECLOCALE=warn to enable them
- updates test cases accordingly
- legacy locale warnings are now silent by default - build time configuration setting is removed - set PYTHONCOERCECLOCALE=warn to enable them - updates test cases accordingly
@ncoghlan, thanks for your PR! By analyzing the history of the files in this pull request, we identified @ericsnowcurrently, @vadmium and @zooba to be potential reviewers. |
Marking as WIP, as we shouldn't merge this until after we get custom build results back from the BuildBot fleet. |
Custom build link for one of the currently failing buildbots that this change is expected to fix: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%20custom/builds/8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but it seems that tests fail :-)
Let's try that again with a test case setup that doesn't immediately fail when no coercion targets are available: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%20custom/builds/9 |
The previous custom build succeeded (with warnings), but I realised that there were several test cases that could actually be run even when no coercion target locales are available, as long as their expectations were adjusted accordingly. So I've updated the PR to do that, and initiated another custom build run: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%20custom/builds/10 |
One of the checks for "No coercion target locales available" was incorrect, so: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%20custom/builds/11 |
Making a note so I don't forget: the other reason this is marked WIP is because I haven't updated the What's New entry and the |
Ah, looks like the updated logic still isn't quite right - for the cases where the tests currently expect a warning (regardless of which warning they expect), they need to be updated to expect to see the legacy locale warning when there aren't any coercion target locales available. |
Skipping UTF-8 as a coercion target for now has got the FreeBSD buildbots back to their pre-PEP-538 state: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%20custom/builds/13/steps/test/logs/stdio I've also made the required docs and help changes, so assuming CI completes successfully, I'll merge this, and we can work out the details of the actual expected behaviour on *BSD systems (including Mac OS X) before re-enabling PEP 538 there. |