Commit Graph

2 Commits

Author SHA1 Message Date
Victor Stinner 023564bf7d bpo-30635: Fix refleak in test_c_locale_coercion (#2126)
When checking for reference leaks, test_c_locale_coercion is run
multiple times and so _LocaleCoercionTargetsTestCase.setUpClass() is
called multiple times. setUpClass() appends new value at each call,
so it looks like a reference leak.

Moving the setup from setUpClass() to setUpModule() avoids
this, eliminating the false alarm.
2017-06-13 21:32:31 +10:00
Nick Coghlan 6ea4186de3 bpo-28180: Implementation for PEP 538 (#659)
- new PYTHONCOERCECLOCALE config setting
- coerces legacy C locale to C.UTF-8, C.utf8 or UTF-8 by default
- always uses C.UTF-8 on Android
- uses `surrogateescape` on stdin and stdout in the coercion
  target locales
- configure option to disable locale coercion at build time
- configure option to disable C locale warning at build time
2017-06-11 13:16:15 +10:00