Skip to content

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

Merged

Conversation

ncoghlan
Copy link
Contributor

  • 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 ncoghlan requested review from vstinner and methane June 17, 2017 06:42
@mention-bot
Copy link

@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.

@ncoghlan ncoghlan changed the title bpo-30565: Add PYTHONCOERCECLOCALE=warn runtime flag WIP: bpo-30565: Add PYTHONCOERCECLOCALE=warn runtime flag Jun 17, 2017
@ncoghlan
Copy link
Contributor Author

Marking as WIP, as we shouldn't merge this until after we get custom build results back from the BuildBot fleet.

@ncoghlan
Copy link
Contributor Author

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

Copy link
Member

@vstinner vstinner left a 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 :-)

@ncoghlan
Copy link
Contributor Author

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

@ncoghlan
Copy link
Contributor Author

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

@ncoghlan
Copy link
Contributor Author

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

@ncoghlan
Copy link
Contributor Author

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 PYTHONCOERCECLOCALE documentation yet.

@ncoghlan
Copy link
Contributor Author

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.

@ncoghlan ncoghlan self-assigned this Jun 17, 2017
@ncoghlan
Copy link
Contributor Author

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.

@ncoghlan ncoghlan changed the title WIP: bpo-30565: Add PYTHONCOERCECLOCALE=warn runtime flag bpo-30565: Add PYTHONCOERCECLOCALE=warn runtime flag Jun 18, 2017
@ncoghlan ncoghlan merged commit eb81795 into python:master Jun 18, 2017
@ncoghlan ncoghlan deleted the bpo-30565-silence-locale-warnings-by-default branch March 30, 2018 07:49
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.

4 participants