mirror of
https://github.com/python/cpython
synced 2026-09-28 08:08:17 +03:00
Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)" (GH-9430)
* Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)" This reverts commitdbdee0073c. * Revert "bpo-34589: C locale coercion off by default (GH-9073)" This reverts commit7a0791b699. * Revert "bpo-34589: Make _PyCoreConfig.coerce_c_locale private (GH-9371)" This reverts commit188ebfa475.
This commit is contained in:
parent
76531e2e82
commit
06e7608207
17 changed files with 87 additions and 242 deletions
|
|
@ -63,6 +63,8 @@ typedef struct {
|
|||
int show_alloc_count; /* -X showalloccount */
|
||||
int dump_refs; /* PYTHONDUMPREFS */
|
||||
int malloc_stats; /* PYTHONMALLOCSTATS */
|
||||
int coerce_c_locale; /* PYTHONCOERCECLOCALE, -1 means unknown */
|
||||
int coerce_c_locale_warn; /* PYTHONCOERCECLOCALE=warn */
|
||||
|
||||
/* Python filesystem encoding and error handler:
|
||||
sys.getfilesystemencoding() and sys.getfilesystemencodeerrors().
|
||||
|
|
@ -295,30 +297,6 @@ typedef struct {
|
|||
If set to -1 (default), inherit Py_FrozenFlag value. */
|
||||
int _frozen;
|
||||
|
||||
/* C locale coercion (PEP 538).
|
||||
|
||||
The option is enabled by the PYTHONCOERCECLOCALE environment
|
||||
variable. The option is also enabled if the LC_CTYPE locale is "C"
|
||||
and a target locale (ex: "C.UTF-8") is supported by the platform.
|
||||
|
||||
Py_Initialize() and Py_Main() must not enable C locale coercion: it is
|
||||
always disabled. The option can only be enabled by the Python program
|
||||
("python3).
|
||||
|
||||
See also the _coerce_c_locale_warn option. */
|
||||
int _coerce_c_locale;
|
||||
|
||||
/* C locale coercion warning (PEP 538).
|
||||
|
||||
Enabled by the PYTHONCOERCECLOCALE=warn environment variable.
|
||||
|
||||
Py_Initialize() and Py_Main() must not enable C locale coercion warning:
|
||||
it is always disabled. The warning can only be enabled by the Python
|
||||
program ("python3).
|
||||
|
||||
See also the _coerce_c_locale option. */
|
||||
int _coerce_c_locale_warn;
|
||||
|
||||
} _PyCoreConfig;
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
|
|
@ -336,8 +314,7 @@ typedef struct {
|
|||
.use_hash_seed = -1, \
|
||||
.faulthandler = -1, \
|
||||
.tracemalloc = -1, \
|
||||
._coerce_c_locale = 0, \
|
||||
._coerce_c_locale_warn = 0, \
|
||||
.coerce_c_locale = -1, \
|
||||
.utf8_mode = -1, \
|
||||
.argc = -1, \
|
||||
.nmodule_search_path = -1, \
|
||||
|
|
|
|||
|
|
@ -83,11 +83,7 @@ PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *);
|
|||
/* Bootstrap __main__ (defined in Modules/main.c) */
|
||||
PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv);
|
||||
#ifdef Py_BUILD_CORE
|
||||
# ifdef MS_WINDOWS
|
||||
PyAPI_FUNC(int) _Py_WindowsMain(int argc, wchar_t **argv);
|
||||
# else
|
||||
PyAPI_FUNC(int) _Py_UnixMain(int argc, char **argv);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* In getpath.c */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue