mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
bpo-20443: No longer make sys.argv[0] absolute for script (GH-17534)
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.
This commit is contained in:
parent
d219cc4180
commit
a1a99b4bb7
4 changed files with 8 additions and 9 deletions
|
@ -858,10 +858,9 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
|
|||
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'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue