Merge pull request #4609 from StevenHessing/noddos
[feed/packages.git] / lang / python / python3 / patches / 004-do-not-write-bytes-codes.patch
1 --- a/Python/pylifecycle.c
2 +++ b/Python/pylifecycle.c
3 @@ -88,7 +88,7 @@ int Py_BytesWarningFlag; /* Warn on str(
4 int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */
5 int Py_FrozenFlag; /* Needed by getpath.c */
6 int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */
7 -int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.pyc) */
8 +int Py_DontWriteBytecodeFlag = 1; /* Suppress writing bytecode files (*.pyc) */
9 int Py_NoUserSiteDirectory = 0; /* for -s and site.py */
10 int Py_UnbufferedStdioFlag = 0; /* Unbuffered binary std{in,out,err} */
11 int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */
12 @@ -329,7 +329,7 @@ _Py_InitializeEx_Private(int install_sig
13 if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0')
14 Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p);
15 if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0')
16 - Py_DontWriteBytecodeFlag = add_flag(Py_DontWriteBytecodeFlag, p);
17 + Py_DontWriteBytecodeFlag = atoi(p);
18 /* The variable is only tested for existence here; _PyRandom_Init will
19 check its value further. */
20 if ((p = Py_GETENV("PYTHONHASHSEED")) && *p != '\0')