-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GzipFile.flush doesn't flush compressor in 3.12 beta #105808
Labels
Comments
bdarnell
added a commit
to bdarnell/tornado
that referenced
this issue
Jun 15, 2023
Current betas have a bug in GzipFile we can't easily work around. python/cpython#105808
Yhg1s
added a commit
to Yhg1s/cpython
that referenced
this issue
Jun 19, 2023
GzipFile.flush() to not flush the compressor (nor pass along the zip_mode argument).
Thanks! #105910 should fix the issue. |
gpshead
pushed a commit
that referenced
this issue
Jun 19, 2023
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jun 19, 2023
…onGH-105910) Fix a regression introduced in pythonGH-101251, causing GzipFile.flush() to not flush the compressor (nor pass along the zip_mode argument). (cherry picked from commit 1858db7) Co-authored-by: T. Wouters <[email protected]>
thanks for the report and PR! |
github-project-automation
bot
moved this from Todo
to Done
in Release and Deferred blockers 🚫
Jun 19, 2023
bdarnell
added a commit
to bdarnell/tornado
that referenced
this issue
Jun 22, 2023
Now that python/cpython#105808 is fixed in beta 3.
Thanks for the fix! I can confirm that things are working again with 3.12 beta 3: tornadoweb/tornado#3288 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug report
The change to add buffering to
GzipFile.write
(gh-89550, #101251) broke theGzipFile.flush
method. The flush method previously calledself.compress.flush
, but now it only flushes the IO objects and not the compressor (as a side effect, the zlib_mode argument is now ignored, although in my case I only use the default). Flushing the compressor is necessary to create synchronization points that can be used to decompress part of the stream.Here is a test script, reduced from Tornado's use of GzipFile (see tornadoweb/tornado#3278 for the way this manifests in Tornado's test suite):
Your environment
Linked PRs
The text was updated successfully, but these errors were encountered: