8000 bpo-45445: Fail if an invalid X-option is provided in the command line by pablogsal · Pull Request #28823 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-45445: Fail if an invalid X-option is provided in the command line #28823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixup! Update Misc/NEWS.d/next/Core and Builtins/2021-10-12-14-41-39.b…
…po-45445._F5cMf.rst
  • Loading branch information
pablogsal committed Oct 13, 2021
commit 19598b5e8b0cdb83117bd00ba34c0f8f413140c6
4 changes: 2 additions & 2 deletions Doc/library/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1725,13 +1725,13 @@ always available.

.. code-block:: shell-session

$ ./python -Xa=b -Xc
$ ./python -Xpycache_prefix=some_path -Xdev
Python 3.2a3+ (py3k, Oct 16 2010, 20:14:50)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys._xoptions
{'a': 'b', 'c': True}
{'pycache_prefix': 'some_path', 'dev': True}

.. impl-detail::

Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_cmd_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def get_xoptions(*args):
opts = get_xoptions()
self.assertEqual(opts, {})

opts = get_xoptions('-Xno_debug_ranges')
self.assertEqual(opts, {'no_debug_ranges': True})
opts = get_xoptions('-Xno_debug_ranges', '-Xdev=1234')
self.assertEqual(opts, {'no_debug_ranges': True, 'dev': '1234'})

@unittest.skipIf(interpreter_requires_environment(),
'Cannot run -E tests when PYTHON env vars are required.')
Expand Down
0