summaryrefslogtreecommitdiffstats
path: root/Python/initconfig.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2019-12-09 16:34:02 (GMT)
committerGitHub <noreply@github.com>2019-12-09 16:34:02 (GMT)
commita1a99b4bb7cbe2dbc55a1d92c3c509b4466d3c3b (patch)
treeffc1e3e7fc999d447331fb9cfd9d1cebf10177b2 /Python/initconfig.c
parentd219cc4180e7589807ebbef7421879f095e72a98 (diff)
downloadcpython-a1a99b4bb7cbe2dbc55a1d92c3c509b4466d3c3b.zip
cpython-a1a99b4bb7cbe2dbc55a1d92c3c509b4466d3c3b.tar.gz
cpython-a1a99b4bb7cbe2dbc55a1d92c3c509b4466d3c3b.tar.bz2
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.
Diffstat (limited to 'Python/initconfig.c')
-rw-r--r--Python/initconfig.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/Python/initconfig.c b/Python/initconfig.c
index caa9bf5..74c9ca0 100644
--- a/Python/initconfig.c
+++ b/Python/initconfig.c
@@ -2198,10 +2198,6 @@ config_update_argv(PyConfig *config, Py_ssize_t opt_index)
/* Force sys.argv[0] = '-m'*/
arg0 = L"-m";
}
- else if (config->run_filename != NULL) {
- /* run_filename is converted to an absolute path: update argv */
- arg0 = config->run_filename;
- }
if (arg0 != NULL) {
arg0 = _PyMem_RawWcsdup(arg0);