Title: GitHub · Where software is built
Open Graph Title: python/cpython
X Title: python/cpython
Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.
Open Graph Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.
X Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.
Opengraph URL: https://github.com/python/cpython
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Decide the fate of undocumented script behavior of some modules","articleBody":"There are three dozens of standard modules that can be called via `python -m` and their documentation doesn't mention it. They can be grouped into five categories:\n\n- kind of smoke tests:\n - [x] codecs: ~~performs *stdin:latin1 → utf-8 → latin1 → stdout* passthrough~~ edit: it just wraps stdin and stdout then just exits the script (gh-94233)\n - [ ] curses.has_key: \"Compare the output of this implementation and the ncurses has_key, on platforms where has_key is already available\"\n - [x] pprint: measures performance (gh-94613 → https://github.com/python/pyperformance/pull/222)\n - [ ] random: evaluates output statistics of supported generators\n\n- full-fledged crossplatform utils for admin-like users and small automation:\n - [ ] asyncio: like `python` but allows to use `await` in top-level script code\n - [ ] cProfile, profile: runs a script under the profiler\n - [ ] encodings.rot_13: a stream converter\n - [ ] filecmp: a crossplatform file comparison utility\n - [ ] fileinput: prints specified files one by another annotating lines with their source\n - [ ] http.server: makes a directory available as a site; useful to quickly test a static site with relative links\n - [x] mimetypes: useful for batch processing of files (maybe) (gh-93097)\n - [ ] modulefinder: the objdump but for Python source files\n - [ ] netrc: prints content of `.netrc` for a current user\n - [ ] pdb\n - [ ] platform: returns a single line like `Windows-10-10.0.19044-SP0`; can be useful in automation\n - [ ] quopri: a stream converter\n - [ ] tabnanny\n - [ ] wsgiref.simple_server - the same as http.server but for APIs; pases a single request and exits\n\n- both:\n - base64:\n - [ ] a stream converter\n - [x] `base64 -t` encodes/decodes `Aladdin:open sesame` and tests if the result is the same as the original (gh-94230)\n\n- demos with no real world application:\n - [ ] curses.textpad: shows an input area; when a user closes it, prints the text back\n - [ ] ftplib: a simple one-pass FTP downloader (uses ~/.netrc for login)\n - [ ] ~getopt: just passes arguments to `getopt()`~ The module is no longer maintained after gh-105735\n - [ ] imaplib: sending emails to a dead end has no sence but can be used to check if a email client works or got broken\n - [ ] shlex: parses stdin using `shlex()` and prints the list into stdout\n - [ ] smtplib: a simple e-mail client\n - [ ] xmlrpc.server: serves a datetime service\n\n- complex matter; better leave untouched:\n - idlelib.\\*\n - tkinter.\\*\n - turtledemo.\\*\n - pstats\n\n*Eggs and to-be-removed modules aren't listed.*\n\nWe need to decide what to do with all these undocumented categories.\n\nI propose the following:\n\n- move smoke tests into `test` module with deduplication\n- for full-fledged utils, add `Command-Line Usage` into the docs like in https://docs.python.org/3/library/ast.html#command-line-usage or https://docs.python.org/3/library/trace.html#command-line-usage\n- move demos into the docs of the corresponding module\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-131039\n* gh-131068\n* gh-131069\n* gh-131080\n* gh-131081\n* gh-131097\n* gh-131099\n* gh-131130\n* gh-131133\n* gh-131136\n* gh-131137\n* gh-131144\n* gh-131273\n* gh-131408\n* gh-132266\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/arhadthedev","@type":"Person","name":"arhadthedev"},"datePublished":"2022-05-23T08:50:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/93096/cpython/issues/93096"}
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:75f99a26-3ad5-cbf0-629b-e342f95c0837 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D824:199660:9FCAA5:DF13A5:696A25FE |
| html-safe-nonce | 1f52dfef7c307ae0aa5a3968dd939d27edb77421e56f61677dfafda40e7b9e94 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODI0OjE5OTY2MDo5RkNBQTU6REYxM0E1OjY5NkEyNUZFIiwidmlzaXRvcl9pZCI6Ijg3MTgyMTYyMjE2OTg5NTg4NDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4e684f58718ddbd32bc12fd8f95dd22ed1a9c383674e54ac2debf5c169f13a80 |
| hovercard-subject-tag | repository:81598961 |
| 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/python/cpython/issues/93096 |
| twitter:image | https://opengraph.githubassets.com/5fc909639c47d50b0bce8519b496a329d74d223db89cac163cbae4fe09045013/python/cpython |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5fc909639c47d50b0bce8519b496a329d74d223db89cac163cbae4fe09045013/python/cpython |
| og:image:alt | The Python programming language. Contribute to python/cpython development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a1022f03e4f0d91ea173e4e5dac892c982e0588c62f1ce56121d755a320a3569 |
| turbo-cache-control | no-cache |
| 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 | f472b8e6c7b3fdd5d0354972a3f4c516289bf0be |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width