mirror of
https://github.com/python/cpython.git
synced 2025-12-21 08:01:36 +00:00
GH-133711: Enable UTF-8 mode by default (PEP 686) (#133712)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
f320c951c3
commit
c89a66feb1
14 changed files with 93 additions and 85 deletions
|
|
@ -543,7 +543,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
|
|||
'configure_locale': True,
|
||||
'coerce_c_locale': False,
|
||||
'coerce_c_locale_warn': False,
|
||||
'utf8_mode': False,
|
||||
'utf8_mode': True,
|
||||
}
|
||||
if MS_WINDOWS:
|
||||
PRE_CONFIG_COMPAT.update({
|
||||
|
|
@ -560,7 +560,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
|
|||
configure_locale=False,
|
||||
isolated=True,
|
||||
use_environment=False,
|
||||
utf8_mode=False,
|
||||
utf8_mode=True,
|
||||
dev_mode=False,
|
||||
coerce_c_locale=False,
|
||||
)
|
||||
|
|
@ -805,12 +805,6 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
|
|||
'stdio_encoding', 'stdio_errors'):
|
||||
expected[key] = self.IGNORE_CONFIG
|
||||
|
||||
if not expected_preconfig['configure_locale']:
|
||||
# UTF-8 Mode depends on the locale. There is no easy way
|
||||
# to guess if UTF-8 Mode will be enabled or not if the locale
|
||||
# is not configured.
|
||||
expected_preconfig['utf8_mode'] = self.IGNORE_CONFIG
|
||||
|
||||
if expected_preconfig['utf8_mode'] == 1:
|
||||
if expected['filesystem_encoding'] is self.GET_DEFAULT_CONFIG:
|
||||
expected['filesystem_encoding'] = 'utf-8'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue