elastic / elastic/apm-agent-python
Investigate test_send_remote_failover_sync_non_transport_exception_error unraisable exceptions warning
- Langage dominant
- Python
- Étoiles
- 431
- Forks
- 239
- Merge moyen
- 5 j 10 h
- PR mergées (30 j)
- 7
Description
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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par tests/client/client_tests.py et exécutez test_send_remote_failover_sync_non_transport_exception_error seul avec Python 3.13, ou avec Python 3.12 en utilisant -X dev, afin de reproduire l’avertissement. Suivez le chemin de fermeture de gzip impliqué par la traceback et confirmez que le test se termine sans PytestUnraisableExceptionWarning.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- testing
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100