File Doc/using/cmdline.rst mentions Options you shouldn’t use:
Options you shouldn't use
~~~~~~~~~~~~~~~~~~~~~~~~~
.. option:: -J
Reserved for use by Jython_.
.. _Jython: https://www.jython.org/
Option -J was added in Python 2.6. Since all Jython related things are being removed, I'd suggest to remove reference to this option from the docs as well.
Should we not deprecate it (similarly to this), it currently serves no purpose and 3.X is not supported by Jython? Jython3 seems to have halted (8 months of inactivity).
It does not seem to be deprecated currently, it is also not on the pending deprecation list. I think hard depreciation for 3.16 (too late for 3.15 now) would be good, it can always be added back.
-J is a pass-through for communicating arguments to the JVM. I think it would not matter in a hoped-for Jython 3 how that was done, if for some reason -J were recycled.
For context, it is often used to provide sizing information when starting the JVM, to set options (Java properties) read by libraries, or to configure the debugging hook. Of necessity then, -J option values are stripped out and used by the wrapper script, which is what a jython command has to be, not by the implementation class that it launches.
-X seems to be a standard way to provide implementation-specific configuration. The fly in the ointment is that CPython makes free with the whole namespace. I think implementations could share the -X namespace given a succinct and script-friendly convention.
Activity
sobolevn commented on May 3, 2025
I support this idea.
StanFromIreland commented on May 3, 2025
Should we not deprecate it (similarly to this), it currently serves no purpose and 3.X is not supported by Jython? Jython3 seems to have halted (8 months of inactivity).
vasily-v-ryabov commented on May 5, 2025
Current message already looks like a deprecation for me:
Also both default message Unknown option: -J and current one are combined with the same exit code 2.
@jeff5 do you have plans to use command line option -J for Jython3 ?
StanFromIreland commented on May 5, 2025
It does not seem to be deprecated currently, it is also not on the pending deprecation list. I think hard depreciation for 3.16 (too late for 3.15 now) would be good, it can always be added back.
jeff5 commented on May 5, 2025
-J is a pass-through for communicating arguments to the JVM. I think it would not matter in a hoped-for Jython 3 how that was done, if for some reason -J were recycled.
For context, it is often used to provide sizing information when starting the JVM, to set options (Java properties) read by libraries, or to configure the debugging hook. Of necessity then, -J option values are stripped out and used by the wrapper script, which is what a jython command has to be, not by the implementation class that it launches.
-X seems to be a standard way to provide implementation-specific configuration. The fly in the ointment is that CPython makes free with the whole namespace. I think implementations could share the -X namespace given a succinct and script-friendly convention.
Ping: @Stewori
GH-133336: Remove reserved ``-J`` flag for Jython (#133444)
gh-133336: Remove comment about reserved -J in ``initconfig.c`` (#133821
pythongh-133336: Remove comment about reserved -J in ``initconfig.c`` (…
[3.14] gh-133336: Remove comment about reserved -J in ``initconfig.c`` (
pythonGH-133336: Remove reserved ``-J`` flag for Jython (python#133444)
pythongh-133336: Remove comment about reserved -J in ``initconfig.c`` (…
pythongh-133336: Remove comment about reserved -J in ``initconfig.c`` (…