PEP(Python Enhancement Proposal)はPythonを改良する案、リリーススケジュール、コーディングスタイルなど開発を円滑に進める上で重要なことを文書にまとめておく場所。ここには、Pythonをコーディングするすべての人にとって重要な内容がきっと入っているはず。ビギナーが言うようにもちろん、英語。よって、これをできるだけ毎日、翻訳しながら読み解きまとめていくことで備忘録としていきたいと思います。英語は非常に苦手なので誤訳はご指摘ください。
※以下、アイコンが出てくる箇所は私のコメントになります。それ以外は、翻訳または翻訳のまとめです。
Contents
基本情報
Python 2.0 Release Schedule
PEP: | 200 | |
---|---|---|
Title: | Python 2.0 Release Schedule | |
Python2.0リリーススケジュール | ||
Author: | Jeremy Hylton <jeremy at alum.mit.edu> | |
Status: | Final | |
Type: | Informational | |
Created: | ||
Python-Version: | 2.0 | |
Post-History: |
イントロ
このPEPでは、Python2.0のリリーススケジュール、主要な新機能の状況と所有権の追跡、メーリングリストフォーラムでの議論のまとめ、さらなる情報、パッチ、その他未解決の問題へのURLを提供します。このファイルのCVS改訂履歴には、決定履歴が含まれています。
リリーススケジュール
[2000年10月5日改訂]
- 26-Sep-2000: 2.0 beta 2
- 9-Oct-2000: 2.0 release candidate 1 (2.0c1)
- 16-Oct-2000: 2.0 final
以前のマイルストーン
- 14-Aug-2000: All 2.0 PEPs finished / feature freeze
- 5-Sep-2000: 2.0 beta 1
RC1とは何ですか?
RC1は、2.0の最終リリースで修正予定の既知のバグをすべて修正するものと考えています。このリリースは、ベータ版よりも少し安定しているはずです。最終リリースの前にもっと広範囲なテストをするために、このRCを作成しています。 最終リリースは、RCテストの担当者によって、重大なバグが発見されない限り、同じものになります。
パッチを送信して変更を加えるためのガイドライン
変更をコミットするときは良い意味で使ってください。私たちが何を意図とするのかをよく理解しておくべきです。そうでなければ、あなたにコミット特権を与えないでしょう<0.5 wink>。良い意味のいくつかの具体例は次のとおりです。
- ディレクターがあなたに言うことなら何でもしなさい。
- まずpython-devで物議を醸している変更について討論してください。あなたがたくさんの+1票を獲得し、-1票を獲得しない場合、変更を加えます。あなたがいくらかの-1票を得たら、もう一度考えなさい。Guidoに彼の考えを尋ねることを検討してください。
- あなたが貢献したコードに対する変更であれば、それを修正することはおそらく意味があります。
- その変更が他の誰かが書いたコードに影響を与えるのであれば、最初に当事者に依頼するのが理にかなっています。
- SFパッチマネージャを使ってパッチを送信し、確認のために誰かに割り当てることができます。
重要な新機能は、チェックインする前にPEPに記述して承認する必要があります。
新しいモジュールや大きなパッチなど、コードを大幅に追加する場合は、回帰テストとドキュメントのテストケースを含める必要があります。テストとドキュメントの準備ができるまでパッチをチェックインしないでください。
バグを修正したら、そのバグを確認できるテストケースを書くべきです。
SF Patch Managerからパッチをコミットする場合、またはJitterbugデータベースからバグを修正する場合は、必ずCVSログメッセージでパッチ/バグ番号を参照してください。また、パッチマネージャまたはバグデータベースのステータスを変更してください(バグデータベースにアクセスできる場合)。
チェックインされたコードが回帰テストを失敗させることは許されません。チェックインが失敗した場合は、24時間以内に修正する必要があります。そうしないとバックアウトされます。
提供されたC
コードはすべてANSI C
でなければなりません。可能であれば、2つの異なるコンパイラで確認してください。gccとMSVC
寄稿されたすべてのPythonコードは、GuidoのPythonスタイルガイドに従う必要があります。http://www.python.org/doc/essays/styleguide.html
提供されたコードはすべてオープンソースライセンスの下でリリースされることが理解されています。この方法でリリースできない場合は、コードを寄稿しないでください。
失敗したテストケースは修正する必要がある
回帰テストのエラーは迅速に解決する必要があります。変更が適用された状態で回帰テストが正しく実行されない場合、変更をCVSツリーにコミットしないでください。失敗した場合、コードにバグが潜んでいるかもしれません。(そもそもバグがあるかもしれませんが、それはまた別の問題です。)テストケースが失敗することがわかっているならば、それらは有用な目的を果たしません。
test case platform date reported --------- -------- ------------- test_mmap Win ME 03-Sep-2000 Windows 2b1p2 prelease [04-Sep-2000 tim reported by Audun S. Runde mailto:audun@mindspring.com the mmap constructor fails w/ WindowsError: [Errno 6] The handle is invalid since there are no reports of this failing on other flavors of Windows, this looks like to be an ME bug ]
未解決事項 – 2.0の最終リリース前に解決が必要
cycle-gc
をデフォルトで有効にするかどうかを決めます。
core XMLパッケージとXML-SIG XMLパッケージの間の互換性の問題を解決します。
リスト内包表記、import as
、およびその他の新しい言語機能と互換性があるように、ツール類/コンパイラを更新します。
テストスイートのコードカバレッジを改善しました。
2.0b1で出てきた機能のためのPEPを書き終えてください(!悲しい、しかし現実的です – 訓練をすればもっと良くなるでしょう)。
バグデータベースのサイズを縮小するための大きな努力が必要です。私(ティム)はこれを以前に見ました:あなたがすべての未解決のバグを1つのスクリーンに収めることができるならば、人々は一般にそのようにそれを保つでしょう。しかし、それを一ヶ月間続けることは地獄に行くようなものです(「目に見える進歩」ではありません!)。
承認され進行中
- 現在何も残っていません。 [2000年9月4日 guido]
オープン:提案されたが承認または却下されなかった
- オープンパッチがいくつかあります。私達はこれらをすぐに解決する必要があります。
過去、失敗したテストケース
このセクションと前のセクションとの間で不渡りを起こすテストを見つけた場合は、それがテストしているコードに問題があります!
test case platform date reported --------- -------- ------------- test_fork1 Linux 26-Jul-2000 [28-aug-2000 fixed by cgw; solution is to create copies of lock in child process] [19-Aug-2000 tim Charles Waldman whipped up a patch to give child processes a new "global lock": http://sourceforge.net/patch/?func=detailpatch&patch_id=101226&group_id=5470 While this doesn't appear to address the symptoms we *saw*, it *does* so far appear to be fixing the failing cases anyway ] test_parser all 22-Aug-2000 test_posixpath all 22-Aug-2000 test_popen2 Win32 26-Jul-2000 [31-Aug-2000 tim This died again, but for an entirely different reason: it uses a dict to map file pointers to process handles, and calls a dict access function during popen.close(). But .close releases threads, which left the internal popen code accessing the dict without a valid thread state. The dict implementation changed so that's no longer accepted. Fixed by creating a temporary thread state in the guts of popen's close routine, and grabbing the global lock with it for the duration] [20-Aug-2000 tim changed the popen2.py _test function to use the "more" cmd when os.name == "nt". This makes test_popen2 pass under Win98SE. HOWEVER, the Win98 "more" invents a leading newline out of thin air, and I'm not sure that the other Windows flavors of "more" also do that. So, somebody please try under other Windows flavors! ] [still fails 15-Aug-2000 for me, on Win98 - tim test test_popen2 crashed -- exceptions.AssertionError : The problem is that the test uses "cat", but there is no such thing under Windows (unless you install it). So it's the test that's broken here, not (necessarily) the code. ] test_winreg Win32 26-Jul-2000 [works 15-Aug-2000 for me, on Win98 - tim] test_mmap Win32 26-Jul-2000 [believe that was fixed by Mark H.] [works 15-Aug-2000 for me, on Win98 - tim] test_longexp Win98+? 15-Aug-2000 [fails in release build, passes in release build under verbose mode but doesn't look like it should pass, passes in debug build, passes in debug build under verbose mode and looks like it should pass ] [18-Aug-2000, tim: can't reproduce, and nobody else saw it. I believe there *is* a subtle bug in regrtest.py when using -v, and I'll pursue that, but can't provoke anything wrong with test_longexp anymore; eyeballing Fred's changes didn't turn up a suspect either 19-Aug-2000, tim: the "subtle bug" in regrtest.py -v is actually a feature: -v masks *some* kinds of failures, since it doesn't compare test output with the canned output; this is what makes it say "test passed" even in some cases where the test fails without -v ] test_winreg2 Win32 26-Jul-2000 [20-Aug-2000 tim - the test has been removed from the project] [19-Aug-2000 tim This test will never work on Win98, because it's looking for a part of registry that doesn't exist under W98. The module (winreg.py) and this test case will be removed before 2.0 for other reasons, though. ] [still fails 15-Aug-2000 for me, on Win98 - tim test test_winreg2 failed -- Writing: 'Test Failed: testHives', expected: 'HKEY_PERFORMANCE_DATA\012' ]
未解決事項 – 完了/修正済み
[4-Sep-2000 guido: Fredrik finished this on 1-Sep] * PyErr_Format - Fredrik Lundh Make this function safe from buffer overflows. [4-Sep-2000 guido: Fred has added popen2, popen3 on 28-Sep] Add popen2 support for Linux -- Fred Drake [4-Sep-2000 guido: done on 1-Sep] Deal with buffering problem with SocketServer [04-Sep-2000 tim: done; installer runs; w9xpopen not an issue] [01-Sep-2000 tim: make a prerelease availabe] Windows ME: Don't know anything about it. Will the installer even run? Does it need the w9xpopen hack? [04-Sep-2000 tim: done; tested on several Windows flavors now] [01-Sep-2000 tim: completed but untested except on Win98SE] Windows installer: If HKLM isn't writable, back off to HKCU (so Python can be installed on NT & 2000 without admin privileges). [01-Sep-200 tim - as Guido said, runtime code in posixmodule.c doesn't call this on NT/2000, so no need to avoid installing it everywhere. Added code to the installer *to* install it, though.] Windows installer: Install w9xpopen.exe only under Win95/98. [23-Aug-2000 jeremy - tim reports "completed recently"] Windows: Look for registry info in HKCU before HKLM - Mark Hammond. [20-Aug-2000 tim - done] Remove winreg.py and test_winreg2.py. Paul Prescod (the author) now wants to make a registry API more like the MS .NET API. Unclear whether that can be done in time for 2.0, but, regardless, if we let winreg.py out the door we'll be stuck with it forever, and not even Paul wants it anymore. [24-Aug-2000 tim+guido - done] Win98 Guido: popen is hanging on Guido, and even freezing the whole machine. Was caused by Norton Antivirus 2000 (6.10.20) on Windows 9x. Resolution: disable virus protection.
受領かつ完了
- xエスケープの意味を変更 – PEP223 – Fredrik Lundh
u""
の文字列にU1234678
エスケープを追加 – Fredrik Lundh- オペコード引数
2 ** 16
のサポート – Charles Waldman SF Patch 100893 - “
import as
” – Thomas Woutersシンボルを別の名前でインポートできるようにするために’import
‘および’from ... import
‘メカニズムを拡張(新しいキーワードを追加せずに) - リスト内包表記 – Skip Montanaro Tim PetersはまだPEPが必要
os.path.commonprefix
の古い動作を復元するすべてのプラットフォームで動作するテストケースはありますか?- Tim O’Malleyの優れたライセンスを持つ
Cookie
モジュール - ロックステップ反復(「
zip
」関数)- Barry Warsaw SRE
– Fredrik Lundh [少なくとも2000年8月15日現在には行われた – tim]xrange
のprint
時の挙動を修正 – Fred Drakexrange
タイプのtp_print
ハンドラを削除しました。’xrange(...)
‘の代わりにリスト表示を生成していました。新しいコードは、N!= 1
のとき、(... * N)
で囲まれたxrange()
への最小限を呼び出します。これにより、repr()
の可読性を高め、repr
をアドバタイズします。対話的なインタプリタで作業するとき、xrange
オブジェクトを明確にします。- 拡張
print
ステートメント – Barry WarsawPEP214 http://www.python.org/dev/peps/pep-0214/ SF Patch #100970 http://sourceforge.net/patch/?func=detailpatch&patch_id=100970&group_id=5470 - システムコールをポーリングするためのインタフェース – Andrew Kuchling SF Patch 100852
- 拡張された割り当て – Thomas Wouters+=とその家族、PythonとCのフック、API関数の追加
gettext.py
モジュール – Barry Warsaw
延期
- リスト上の拡張スライス – Michael Hudson Makeリスト(および他の組み込み型)は拡張スライスを処理
- Unicodeデータベースの圧縮 – Fredrik LundhSF Patch 100899:少なくとも2.0b1用。バグ修正として2.0に含まれるかもしれません。
- 範囲リテラル – Thomas Wouters SF Patch 100902:私たちはその提案について多くの疑問を抱いてしまいました。
SET_LINENO
命令コードの削除 – Vladimir MarangozovSET_LINENO命令の代わりにコードオブジェクトのlnotab
を使用することで小さな最適化が達成されました。SET_LINENO
を使用するデバッガをサポートするために、コード書き換え技術(Guidoの反対意見)を使用します。
http://starship.python.net/~vlad/lineno/パッチ(当時の作業用)
python-devに関する議論:- http://www.python.org/pipermail/python-dev/2000-April/subject.htmlSubject: “なぜTraceback Objectsが必要なのですか?”
- http://www.python.org/pipermail/python-dev/1999-August/002252.html
- Cコード用テストハーネス – Trent Mick
リジェクト
- ‘
indexing-for
‘ – Thomas WoutersPythonコードが’for
‘ループ内のループカウンターにアクセスできるようにするための特別な構文。(新しいキーワードを追加せずに)