bpo-20443: No longer make sys.argv[0] absolute for script by vstinner · Pull Request #17534 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Lib/test/test_cmd_line_script.py
5 changes: 2 additions & 3 deletions Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,10 +858,9 @@ def test_preinit_parse_argv(self):
preconfig = {
'allocator': PYMEM_ALLOCATOR_DEBUG,
}
script_abspath = os.path.abspath('script.py')
config = {
'argv': [script_abspath],
'run_filename': script_abspath,
'argv': ['script.py'],
'run_filename': os.path.abspath('script.py'),
'dev_mode': 1,
'faulthandler': 1,
'warnoptions': ['default'],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
In Python 3.9.0a1, sys.argv[0] was made an asolute path if a filename was
specified on the command line. Revert this change, since most users expect
sys.argv to be unmodified.
4 changes: 0 additions & 4 deletions Python/initconfig.c