Nick Coghlan <ncogh...@gmail.com> added the comment:

Huh, it appears the tests for these features are relying solely on the command 
line options, and not checking that the environment variables are also setting 
the flags properly. We should be able to account for that omission with a 
single new test in `test_cmd_line` that sets every relevant environment 
variable and checks for the expected `sys.flags` contents.

As far as what's actually going wrong goes, it's this sequence of events in 
Py_Main:

    _Py_InitializeCore(&core_config);
    ... other code ...
    apply_command_line_and_environment(&cmdline);

_Py_InitializeCore is setting the internal flags appropriately based on the 
runtime environment, but then Py_Main is stomping over those environmental 
settings with the settings from the command line.

Historically, these operations happened the other way around, so it was solely 
up to the code reading the environment variables to ensure they played nice 
with each other. Now the command line processing logic needs to be updated to 
also ensure that it only ever increases these values and never reduces them.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31845>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to