File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -301,10 +301,8 @@ static const char *_C_LOCALE_WARNING =
301
301
static void
302
302
_emit_stderr_warning_for_legacy_locale (const _PyCoreConfig * core_config )
303
303
{
304
- if (core_config -> coerce_c_locale_warn ) {
305
- if (_Py_LegacyLocaleDetected ()) {
306
- fprintf (stderr , "%s" , _C_LOCALE_WARNING );
307
- }
304
+ if (core_config -> coerce_c_locale_warn && _Py_LegacyLocaleDetected ()) {
305
+ PySys_FormatStderr ("%s" , _C_LOCALE_WARNING );
308
306
}
309
307
}
310
308
@@ -567,10 +565,6 @@ _Py_InitializeCore_impl(PyInterpreterState **interp_p,
567
565
*/
568
566
_PyRuntime .finalizing = NULL ;
569
567
570
- #ifndef MS_WINDOWS
571
- _emit_stderr_warning_for_legacy_locale (core_config );
572
- #endif
573
-
574
568
err = _Py_HashRandomization_Init (core_config );
575
569
if (_Py_INIT_FAILED (err )) {
576
570
return err ;
@@ -867,6 +861,11 @@ _Py_InitializeMainInterpreter(PyInterpreterState *interp,
867
861
return err ;
868
862
}
869
863
}
864
+
865
+ #ifndef MS_WINDOWS
866
+ _emit_stderr_warning_for_legacy_locale (core_config );
867
+ #endif
868
+
870
869
return _Py_INIT_OK ();
871
870
}
872
871
You can’t perform that action at this time.
0 commit comments