You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
elasticapm: properly cleanup buffer and data views
With Python 3.13 our pattern of buffering revealed some issues because
the underlying BytesIO fileobj may get released before gzip.GzipFile.
This requires a fix in CPython but also some improvements on our side by
properly closing the GzipFile in case of error and also releasing the
memoryview we can from the BytesIO buffer.
These problems manifests as following warnings from unraisable exceptions
running tests:
The closing of the gzip buffer helps with:
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.
Exception ignored in: <_io.BytesIO object at 0x7fbc4335fbf0>
Traceback (most recent call last):
File "/venv313/lib/python3.13/site-packages/ecs_logging/_stdlib.py", line 272, in _record_attribute
def _record_attribute(
BufferError: Existing exports of data: object cannot be re-sized
Python 3.12 shows the same warnings with the `-X dev` flag.
0 commit comments