[Python-checkins] [python/cpython] f051cc: bpo-30647: Check nl_langinfo(CODESET) in locale co...

GitHub noreply at github.com
Sat Jun 24 04:25:57 EDT 2017


  Branch: refs/heads/buildbot-custom
  Home:   https://github.com/python/cpython
  Commit: f051cc56a7cc9b040b4eb1a11582cf017521f51f
      https://github.com/python/cpython/commit/f051cc56a7cc9b040b4eb1a11582cf017521f51f
  Author: Nick Coghlan <ncoghlan at gmail.com>
  Date:   2017-06-24 (Sat, 24 Jun 2017)

  Changed paths:
    M Lib/test/test_c_locale_coercion.py
    M Python/pylifecycle.c

  Log Message:
  -----------
  bpo-30647: Check nl_langinfo(CODESET) in locale coercion

- On some versions of FreeBSD, setting the "UTF-8" locale
  succeeds, but a subsequent "nl_langinfo(CODESET)" fails
- adding a check for this in the coercion logic means that
  coercion will happen on systems where this check succeeds,
  and will be skipped otherwise
- that way CPython should automatically adapt to changes in
  platform behaviour, rather than needing a new release to
  enable coercion at build time
- this also allows UTF-8 to be re-enabled as a coercion
  target, restoring the locale coercion behaviour on Mac OS X




More information about the Python-checkins mailing list