elastic / elastic/apm-agent-python

Investigate test_send_remote_failover_sync_non_transport_exception_error unraisable exceptions warning

Abierto
#2,260 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
431
Forks
239
Merge medio
5 d 10 h
PR fusionados (30 d)
7

Descripción

Sometimes we have this warning when running tests. I checked that this happens also when running just this test alone.

```
tests/client/client_tests.py::test_send_remote_failover_sync_non_transport_exception_error
/home/rm/src/apm-agent-python/venv313/lib/python3.13/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in:

Traceback (most recent call last):
File "/usr/lib/python3.13/gzip.py", line 362, in close
fileobj.write(self.compress.flush())
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
ValueError: I/O operation on closed file.

warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
```

In order to see the warning you need to run python 3.13 or python 3.12with } `-X dev`.

This is a followup to #2213

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con tests/client/client_tests.py y ejecuta test_send_remote_failover_sync_non_transport_exception_error de forma aislada con Python 3.13, o con Python 3.12 usando -X dev, para reproducir la advertencia. Sigue la ruta de cierre de gzip implicada por el traceback y confirma que la prueba se completa sin una PytestUnraisableExceptionWarning.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
testing
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.