python / python/cpython

Decide the fate of undocumented script behavior of some modules

オープン
#93,096 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

docs tests type-feature
主要言語
Python
スター
77.2k
フォーク
36k
PR マージ指標
PR 指標を取得中

説明

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:

  • kind of smoke tests:

    • codecs: performs stdin:latin1 → utf-8 → latin1 → stdout passthrough edit: it just wraps stdin and stdout then just exits the script (gh-94233)
    • curses.has_key: "Compare the output of this implementation and the ncurses has_key, on platforms where has_key is already available"
    • pprint: measures performance (gh-94613 → https://github.com/python/pyperformance/pull/222)
    • random: evaluates output statistics of supported generators
  • full-fledged crossplatform utils for admin-like users and small automation:

    • asyncio: like python but allows to use await in top-level script code
    • cProfile, profile: runs a script under the profiler
    • encodings.rot_13: a stream converter
    • filecmp: a crossplatform file comparison utility
    • fileinput: prints specified files one by another annotating lines with their source
    • http.server: makes a directory available as a site; useful to quickly test a static site with relative links
    • mimetypes: useful for batch processing of files (maybe) (gh-93097)
    • modulefinder: the objdump but for Python source files
    • netrc: prints content of .netrc for a current user
    • pdb
    • platform: returns a single line like Windows-10-10.0.19044-SP0; can be useful in automation
    • quopri: a stream converter
    • tabnanny
    • wsgiref.simple_server - the same as http.server but for APIs; pases a single request and exits
  • both:

    • base64:
      • a stream converter
      • base64 -t encodes/decodes Aladdin:open sesame and tests if the result is the same as the original (gh-94230)
  • demos with no real world application:

    • curses.textpad: shows an input area; when a user closes it, prints the text back
    • ftplib: a simple one-pass FTP downloader (uses ~/.netrc for login)
    • getopt: just passes arguments to getopt() The module is no longer maintained after gh-105735
    • imaplib: sending emails to a dead end has no sence but can be used to check if a email client works or got broken
    • shlex: parses stdin using shlex() and prints the list into stdout
    • smtplib: a simple e-mail client
    • xmlrpc.server: serves a datetime service
  • complex matter; better leave untouched:

    • idlelib.*
    • tkinter.*
    • turtledemo.*
    • pstats

Eggs and to-be-removed modules aren't listed.

We need to decide what to do with all these undocumented categories.

I propose the following:

Linked PRs
  • gh-131039
  • gh-131068
  • gh-131069
  • gh-131080
  • gh-131081
  • gh-131097
  • gh-131099
  • gh-131130
  • gh-131133
  • gh-131136
  • gh-131137
  • gh-131144
  • gh-131273
  • gh-131408
  • gh-132266

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、列挙されているモジュールカテゴリと、ast および trace のドキュメントにある既存の「Command-Line Usage」セクションを確認します。リンクされている PR を確認して、どの項目がすでに対応中かを把握し、そのうえで、残っている各挙動がテストモジュールに属するのか、対応するモジュールのドキュメントに属するのかを判断します。列挙されたすべてのカテゴリについて対応方針が決まり、その結果として生じるドキュメントまたはテストの変更が追跡されていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
cli, documentation
issue の種類
ドキュメント
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
15/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。