`test_ssl` is too verbose
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- testing-qa
Direzione di ricerca
Inizia in Lib/test/test_ssl.py, soprattutto nei percorsi di interazione tra server e client mostrati nell’issue, e verifica come test.test_ssl segnala attualmente i traceback e il dialogo. Esegui i casi rilevanti di test.test_ssl per stabilire quale sia l’output rumoroso; il lavoro è completato quando gli errori del server ignorati raggiungono il thread principale per le assertions e gli scambi client-server non stampano più l’avanzamento, mentre il PR collegato dovrebbe essere verificato per primo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 36k
- Merge medio
- 1g 9h
- PR unite (30g)
- 558
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di python/cpython
-
docs pending
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
stdlib type-feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
stdlib type-feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
build type-bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
stdlib topic-email type-feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Tutte le issue di python/cpython
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
OpenHands/extensions#626 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
CSCfi/sd-search-api#39 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
please add to porn list Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
StevenBlack/hosts#3255 ·