elastic / elastic/apm-agent-python

Investigate test_send_remote_failover_sync_non_transport_exception_error unraisable exceptions warning

Open
#2,260 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
431
Forks
239
Avg merge
5d 10h
Merged PRs (30d)
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.