.. versionchanged:: 3.10
Removed the ``-X oldparser`` option.
+.. versionremoved:: next
+
+ :option:`!-J` is no longer reserved for use by Jython_,
+ and now has no special meaning.
+
+ .. _Jython: https://www.jython.org/
+
.. _using-on-controlling-color:
Controlling color
precedence over ``NO_COLOR``, which in turn takes precedence over
``FORCE_COLOR``.
-Options you shouldn't use
-~~~~~~~~~~~~~~~~~~~~~~~~~
-
-.. option:: -J
-
- Reserved for use by Jython_.
-
-.. _Jython: https://www.jython.org/
-
.. _using-on-envvars:
-------------------------------
Two command-line options have been reserved for use by other Python
-implementations. The :option:`-J` switch has been reserved for use by
+implementations. The :option:`!-J` switch has been reserved for use by
Jython for Jython-specific options, such as switches that are passed to
the underlying JVM. :option:`-X` has been reserved for options
specific to a particular implementation of Python such as CPython,
:keyword:`async with`).
(Contributed by Bénédikt Tran in :gh:`128398`.)
+* :option:`!-J` is no longer a reserved flag for Jython_,
+ and now has no special meaning.
+ (Contributed by Adam Turner in :gh:`133336`.)
+
+ .. _Jython: https://www.jython.org/
.. _whatsnew314-pep765:
--- /dev/null
+:option:`!-J` is no longer reserved for use by Jython.
+Patch by Adam Turner.
/* Python command line short and long options */
-#define SHORT_OPTS L"bBc:dEhiIJm:OPqRsStuvVW:xX:?"
+#define SHORT_OPTS L"bBc:dEhiIm:OPqRsStuvVW:xX:?"
static const _PyOS_LongOption longopts[] = {
/* name, has_arg, val (used in switch in initconfig.c) */
return opt->val;
}
- if (option == 'J') {
- if (_PyOS_opterr) {
- fprintf(stderr, "-J is reserved for Jython\n");
- }
- return '_';
- }
-
if ((ptr = wcschr(SHORT_OPTS, option)) == NULL) {
if (_PyOS_opterr) {
fprintf(stderr, "Unknown option: -%c\n", (char)option);