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
{{ message }}
This repository was archived by the owner on May 6, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on May 6, 2026. It is now read-only.
Import the custom decoder class: _GzipDecoder from google.resumable_media.requests.download.
Call the decompress() method on the instance, passing the max_length=1024 keyword argument.
The script fails, throwing a TypeError because the unpatched method signature does not accept the max_length argument.
Code example
fromgoogle.resumable_media.requests.downloadimport_GzipDecoder# Instantiate the decoder.decoder=_GzipDecoder()
# Try calling the decompress method with the unexpected 'max_length' argument.# This simulates the call made by urllib3 v2.6+print("Attempting to call decoder.decompress(data, max_length=1024)...")
# The bug causes this line to immediately raise a TypeErrordecoder.decompress(b"", max_length=1024)
print("Test passed (Bug not reproduced).")
# If the code reaches this point, the fix is in place or urllib3 is too old.
Stack trace
_GzipDecoder.decompress() got an unexpected keyword argument 'max_length'
Activity
Pin urllib3 for now (#12362)
Pin urllib3 for now (#12362)
Pin urllib3 for now (#12362)
fix: add max_length support to Gzip/Brotli decoders for urllib3 2.6+ …
fix: add max_length support to Gzip/Brotli decoders for urllib3 2.6+ …
fix: add max_length support to Gzip/Brotli decoders for urllib3 2.6+ (#…
adam-sikora commentedon Mar 2, 2026
@chalmerlowe is there a plan to release a new version with this fix?
chalmerlowe commentedon Mar 2, 2026
@adam-sikora a fix was merged to
mainfour days ago.#495
It will go out with the next release. I do not have a time/date for when the next release will be, yet, but it is definitely on my radar.