`test_ssl` is too verbose
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- testing-qa
Línea de trabajo
Empieza en Lib/test/test_ssl.py, especialmente en las rutas de interacción entre servidor y cliente mostradas en el issue, e inspecciona cómo test.test_ssl informa actualmente de los tracebacks y el diálogo. Ejecuta los casos relevantes de test.test_ssl para establecer la salida ruidosa; se considera terminado cuando los fallos de servidor ignorados llegan al hilo principal para las assertions y los intercambios entre cliente y servidor dejan de imprimir progreso, aunque primero debe revisarse el PR enlazado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 36k
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 558
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de python/cpython
-
docs pending
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
stdlib type-feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
stdlib type-feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
build type-bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
stdlib topic-email type-feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Todos los issues de python/cpython
Issues similares
-
area/auth bug comp/agent P3 platform/discord type/security
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
NousResearch/hermes-agent#117848 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
bancolombia/sentinel#23 ·
-
test md AbiertoCI
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100