Skip to content

Remove option "-J" from cmdline docs #133336

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

Closed
vasily-v-ryabov opened this issue May 3, 2025 · 5 comments
Closed

Remove option "-J" from cmdline docs #133336

vasily-v-ryabov opened this issue May 3, 2025 · 5 comments
Labels
docs Documentation in the Doc dir

Comments

@vasily-v-ryabov
Copy link

vasily-v-ryabov commented May 3, 2025

Documentation

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.

Linked PRs

@vasily-v-ryabov vasily-v-ryabov added the docs Documentation in the Doc dir label May 3, 2025
@sobolevn
Copy link
Member

sobolevn commented May 3, 2025

I support this idea.

@StanFromIreland
Copy link
Contributor

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
Copy link
Author

Current message already looks like a deprecation for me:

C:\Python3_14a7\python.exe -J
-J is reserved for Jython
usage: C:\Python3_14a7\python.exe [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.

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
Copy link
Contributor

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
Copy link
Contributor

jeff5 commented 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

@picnixz picnixz closed this as completed May 10, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 10, 2025
…pythonGH-133821)

(cherry picked from commit dc191d248456855d228b09f0e0206e0b656f113c)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
Status: Todo
Development

No branches or pull requests

5 participants