Title: Use `.. program::` and `.. option::` directives for modules with a documented CLI · Issue #130160 · python/cpython · GitHub
Open Graph Title: Use `.. program::` and `.. option::` directives for modules with a documented CLI · Issue #130160 · python/cpython
X Title: Use `.. program::` and `.. option::` directives for modules with a documented CLI · Issue #130160 · python/cpython
Description: This is something (#129607 (comment)) I thought of when reviewing #129607. It's usually fine not to have links, but once we begin adding new command-line options to specific modules (e.g., http.server), I think it'd be nice to be able to...
Open Graph Description: This is something (#129607 (comment)) I thought of when reviewing #129607. It's usually fine not to have links, but once we begin adding new command-line options to specific modules (e.g., http.ser...
X Description: This is something (#129607 (comment)) I thought of when reviewing #129607. It's usually fine not to have links, but once we begin adding new command-line options to specific modules (e.g., http...
Opengraph URL: https://github.com/python/cpython/issues/130160
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Use `.. program::` and `.. option::` directives for modules with a documented CLI","articleBody":"This is something (https://github.com/python/cpython/pull/129607#discussion_r1957162894) I thought of when reviewing #129607. It's usually fine not to have links, but once we begin adding new command-line options to specific modules (e.g., `http.server`), I think it'd be nice to be able to reference them using Sphinx.\n\nUsing the `.. program::` directive also improves readability. For instance, compare https://docs.python.org/3/library/dis.html#command-line-interface with https://docs.python.org/3/library/http.server.html where the CLI documentation is at the end of the page, without even a dedicated section.\n\nI suggest going through the modules in https://github.com/python/cpython/issues/109435 and select those whose documentation page can be improved. By looking at the list, I found the following that can be improved:\n\n- [x] https://docs.python.org/dev/library/ensurepip.html#command-line-interface ([gh-130253](https://github.com/python/cpython/pull/130253))\n- [x] https://docs.python.org/dev/library/idle.html#command-line-usage ([gh-130278](https://github.com/python/cpython/pull/130278))\n- [x] https://docs.python.org/3/library/pdb.html (roughly at 10% of the page)\n- [x] https://docs.python.org/dev/library/profile.html#instant-user-s-manual (roughly at 20% of the page) ([gh-130314](https://github.com/python/cpython/pull/130314))\n- [x] https://docs.python.org/dev/library/venv.html#creating-virtual-environments ([gh-130699](https://github.com/python/cpython/pull/130699))\n- [x] https://docs.python.org/3.14/library/webbrowser.html (section before https://docs.python.org/3.14/library/webbrowser.html#webbrowser.Error)\n\n`quopri` is both missing a documentation for its CLI so we can also add it. `base64` as well, but I think it's meant to be undocumented. More modules can be found in https://github.com/python/cpython/issues/93096 as well.\n\nFor now, I suggest focusing on only those who already have a documented command-line interface and just improving them. Whether a module should have its `main()` function documented or not is out-of-scope for this issue.\n\n\u003e [!IMPORTANT]\n\u003e For those who want to work on the issue, please:\n\u003e\n\u003e - Read https://devguide.python.org/getting-started/pull-request-lifecycle/ before anything else.\n\u003e - Read https://www.sphinx-doc.org/en/master/usage/domains/standard.html#directive-program to understand how to use the `program` directive.\n\u003e - Select **one** module for which the documentation will be improved. It's easier to review and backport.\n\u003e - Open a pull request with the following title: \u003ccode\u003egh-130160: use \\`.. program::\\` directive for documenting \\`MODULE_NAME\\` CLI\u003c/code\u003e\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-130253\n* gh-130258\n* gh-130259\n* gh-130255\n* gh-130264\n* gh-130265\n* gh-130278\n* gh-130314\n* gh-130494\n* gh-130495\n* gh-130497 (closed to allow newcomers to pick it up)\n* gh-130699\n* gh-130745\n* gh-130746\n* gh-130995\n* gh-130996\n* gh-131003\n* gh-131004\n* gh-131010\n* gh-131013\n* gh-131014\n* gh-131034\n* gh-131293\n* gh-131294\n* gh-131320\n* gh-131321\n* gh-133182\n* gh-133335\n* gh-133341\n* gh-136550\n* gh-136551\n* gh-141664\n* gh-141667\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/picnixz","@type":"Person","name":"picnixz"},"datePublished":"2025-02-15T17:49:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/130160/cpython/issues/130160"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d5b17b3a-714f-3f4d-5f4f-df602b0b66cd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B7E:2BFBB8:20910EF:2C752EB:696ACA10 |
| html-safe-nonce | 2061ac0b3254392362e726238546808e471a54060c7f7d45b165cc4370e8cbd7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjdFOjJCRkJCODoyMDkxMEVGOjJDNzUyRUI6Njk2QUNBMTAiLCJ2aXNpdG9yX2lkIjoiMzA0NjgxMzI2ODU1OTE4NjQ0OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f46807dfeb5e7955d1d3e8051b556e1e7aebc77585d9050e6157c675b21bba7f |
| hovercard-subject-tag | issue:2855628352 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/130160/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8f74e903e2a5a05f8b7efa6580532458458d0871a182a225d5c31e5c594fb58c/python/cpython/issues/130160 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8f74e903e2a5a05f8b7efa6580532458458d0871a182a225d5c31e5c594fb58c/python/cpython/issues/130160 |
| og:image:alt | This is something (#129607 (comment)) I thought of when reviewing #129607. It's usually fine not to have links, but once we begin adding new command-line options to specific modules (e.g., http.ser... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | picnixz |
| hostname | github.com |
| expected-hostname | github.com |
| None | c785f4ce187e9e7331257791b36ddee01625bb8e292a9b4fe2c16d4c006abf5d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c718a376fcf780eb22089171adb84a543f660bf7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width