[Bug 2051512] Re: apport ftbfs with Python 3.12 as the default
Simon Chopin
2051512 at bugs.launchpad.net
Fri Feb 9 10:13:59 UTC 2024
After further investigations into the gzip issue in python 3.12, it
turns out there was an undocumented change: it is now a buffered writer.
So the fire&forget pattern used in the snippet above doesn't work
anymore, we now need to use it as a proper IO object instead.
I still think this should be reported upstream because of the
documentation issue, but I'll work on changing the apport code to Do The
Right Thing.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python3-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/2051512
Title:
apport ftbfs with Python 3.12 as the default
Status in apport package in Ubuntu:
Confirmed
Status in python3-defaults package in Ubuntu:
New
Status in python3.12 package in Ubuntu:
New
Status in apport source package in Noble:
Confirmed
Status in python3-defaults source package in Noble:
New
Status in python3.12 source package in Noble:
New
Bug description:
[Description]
Python 3.12 gzip.GZipFile.write() outputs truncated data in some cases
(maybe all?)
[Test Plan]
Run the following script:
import gzip
import io
out = io.BytesIO()
gzip.GzipFile("foo", mode="wb", fileobj=out, mtime=0).write(b"FooFoo")
# print(out.getvalue())
print(gzip.decompress(out.getvalue()))
Expected output (as on Python 3.11):
FooFoo
Buggy output (tail end of the stack trace):
EOFError: Compressed file ended before the end-of-stream marker was reached
[Original report]
debian/rules override_dh_auto_test
make[1]: Entering directory '/<<PKGBUILDDIR>>'
tests/run-linters --errors-only
Skipping mypy tests, mypy is not installed
Running pylint...
************* Module apport-retrace
bin/apport-retrace:577:44: E0601: Using variable 'crashid' before assignment (used-before-assignment)
make[1]: *** [debian/rules:23: override_dh_auto_test] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:4: binary] Error 2
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/2051512/+subscriptions
More information about the foundations-bugs
mailing list