`test_ssl` is too verbose
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- testing-qa
調査の方向性
Lib/test/test_ssl.py から始め、特に issue に示されているサーバーとクライアントのインタラクションパスを確認し、test.test_ssl が現在どのように traceback とダイアログを報告しているかを調べます。関連する test.test_ssl のケースを実行して、ノイズの多い出力を確認します。完了条件は、無視されたサーバーの失敗がアサーションのためにメインスレッドへ到達し、クライアントとサーバー間のやり取りで進捗が出力されなくなることです。ただし、リンクされた PR を最初に確認する必要があります。
索引モデルが issue の本文から書いたものです。
説明
Feature or enhancement
-
turn loud but ignored server tracebacks into silent exceptions passed straight to a main thread for
assertRaiseschecks. An example of how it's currently (note "ok" in the last line):test_connect_ex (test.test_ssl.SimpleBackgroundTests.test_connect_ex) ... server: new connection from ('127.0.0.1', 51236) server: bad connection attempt from ('127.0.0.1', 51236): Traceback (most recent call last): File "D:\a\cpython\cpython\Lib\test\test_ssl.py", line 2371, in wrap_conn self.sslconn = self.server.context.wrap_socket( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\a\cpython\cpython\Lib\ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\a\cpython\cpython\Lib\ssl.py", line 1013, in _create self.do_handshake() ^^^^^^^^^^^^^^^^^^^ File "D:\a\cpython\cpython\Lib\ssl.py", line 1284, in do_handshake self._sslobj.do_handshake() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine ok -
stop printing a dialog between a client and a server; use the same assertion mechanism instead. An example:
test_alpn_protocols (test.test_ssl.ThreadedTests.test_alpn_protocols) ... server: new connection from ('127.0.0.1', 51305) client: sending b'FOO\n'... server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256) client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. server: new connection from ('127.0.0.1', 51307) client: sending b'FOO\n'... server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256) client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. server: new connection from ('127.0.0.1', 51309) client: sending b'FOO\n'... server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256) client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. server: new connection from ('127.0.0.1', 51311) client: sending b'FOO\n'... server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256) client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. ok
Pitch
While (almost) all tests keep silence, test_ssl reports every nit into a console making the log bloated (>1200 lines) to the degree of being unusable for failure tracking.
In addition, all these reports must be looked through manually. Assertions should be used instead.
Linked PRs
- gh-92475
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 558
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python/cpython のほかの issue
-
docs pending
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
stdlib type-feature
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
stdlib type-feature
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
build type-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
stdlib topic-email type-feature
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
zostera/django-bootstrap4#894 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
use-agent-os/agent-os#3276 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NousResearch/hermes-agent#117848 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
zilliztech/memsearch#759 ·