mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
[3.13] gh-143135: Fix sys.flags.inspect when PYTHONINSPECT=0 (GH-143136) (GH-143168)
(cherry picked from commit 3509fa5a12)
This commit is contained in:
parent
a9e068f0be
commit
e132893cc7
2 changed files with 5 additions and 1 deletions
|
|
@ -0,0 +1,2 @@
|
|||
Set :data:`sys.flags.inspect` to ``1`` when :envvar:`PYTHONINSPECT` is ``0``.
|
||||
Previously, it was set to ``0`` in this case.
|
||||
|
|
@ -1576,7 +1576,9 @@ config_read_env_vars(PyConfig *config)
|
|||
_Py_get_env_flag(use_env, &config->parser_debug, "PYTHONDEBUG");
|
||||
_Py_get_env_flag(use_env, &config->verbose, "PYTHONVERBOSE");
|
||||
_Py_get_env_flag(use_env, &config->optimization_level, "PYTHONOPTIMIZE");
|
||||
_Py_get_env_flag(use_env, &config->inspect, "PYTHONINSPECT");
|
||||
if (!config->inspect && _Py_GetEnv(use_env, "PYTHONINSPECT")) {
|
||||
config->inspect = 1;
|
||||
}
|
||||
|
||||
int dont_write_bytecode = 0;
|
||||
_Py_get_env_flag(use_env, &dont_write_bytecode, "PYTHONDONTWRITEBYTECODE");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue