We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e2ec660 commit e37a662Copy full SHA for e37a662
library/python/runtime_py3/main/main.c
@@ -9,6 +9,7 @@ void Py_InitArgcArgv(int argc, wchar_t **argv);
9
char* GetPyMain();
10
11
static const char* env_entry_point = "Y_PYTHON_ENTRY_POINT";
12
+static const char* env_bytes_warning = "Y_PYTHON_BYTES_WARNING";
13
14
#ifdef _MSC_VER
15
extern char** environ;
@@ -98,6 +99,11 @@ static int pymain(int argc, char** argv) {
98
99
PyConfig_InitPythonConfig(&config);
100
config.pathconfig_warnings = 0; /* Suppress errors from getpath.c */
101
102
+ const char* bytes_warning = getenv(env_bytes_warning);
103
+ if (bytes_warning) {
104
+ config.bytes_warning = atoi(bytes_warning);
105
+ }
106
+
107
oldloc = _PyMem_RawStrdup(setlocale(LC_ALL, NULL));
108
if (!oldloc) {
109
fprintf(stderr, "out of memory\n");
0 commit comments