X Tutup
Skip to content

Commit 82aecfb

Browse files
committed
Remove PYTHONEXECUTABLE from --help-env.
1 parent d4f0bf1 commit 82aecfb

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

Lib/test/test_cmd_line.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -934,21 +934,14 @@ def test_python_dump_refs_file(self):
934934
contents = file.read()
935935
self.assertIn('Remaining objects', contents)
936936

937-
@unittest.skipUnless(sys.platform == 'darwin', 'PYTHONEXECUTABLE only works on macOS')
938-
def test_python_executable(self):
939-
code = 'import sys; print(sys.executable)'
940-
expected = "/busr/bbin/bpython"
941-
rc, out, err = assert_python_ok('-c', code, PYTHONEXECUTABLE=expected)
942-
self.assertIn(expected.encode(), out)
943-
944-
@unittest.skipUnless(sys.platform == 'win32', 'Test only applicable on Windows')
937+
@unittest.skipUnless(support.MS_WINDOWS, 'Test only applicable on Windows')
945938
def test_python_legacy_windows_fs_encoding(self):
946939
code = "import sys; print(sys.getfilesystemencoding())"
947940
expected = 'mbcs'
948941
rc, out, err = assert_python_ok('-c', code, PYTHONLEGACYWINDOWSFSENCODING='1')
949942
self.assertIn(expected.encode(), out)
950943

951-
@unittest.skipUnless(sys.platform == 'win32', 'Test only applicable on Windows')
944+
@unittest.skipUnless(support.MS_WINDOWS, 'Test only applicable on Windows')
952945
def test_python_legacy_windows_stdio(self):
953946
code = "import sys; print(sys.stdin.encoding, sys.stdout.encoding)"
954947
expected = 'cp'

Python/initconfig.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,6 @@ static const char usage_envvars[] =
266266
"PYTHONDUMPREFS : dump objects and reference counts still alive after shutdown\n"
267267
"PYTHONDUMPREFSFILE: dump objects and reference counts to the specified file\n"
268268
#endif
269-
#ifdef __APPLE__
270-
"PYTHONEXECUTABLE: set sys.argv[0] to this value (macOS only)\n"
271-
#endif
272269
#ifdef MS_WINDOWS
273270
"PYTHONLEGACYWINDOWSFSENCODING: use legacy \"mbcs\" encoding for file system\n"
274271
"PYTHONLEGACYWINDOWSSTDIO: use legacy Windows stdio\n"

0 commit comments

Comments
 (0)
X Tutup