-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
api: storageIssues related to the googleapis/google-resumable-media-python API.Issues related to the googleapis/google-resumable-media-python API.
Description
Environment details
- OS type and version: Windows 10/11, macOS
- Python version: Python 3.8.x or higher
- pip version: 25.3
google-resumable-mediaversion: 2.8.0
Steps to reproduce
-
Import the custom decoder class:
_GzipDecoderfromgoogle.resumable_media.requests.download. -
Call the
decompress()method on the instance, passing themax_length=1024keyword argument. -
The script fails, throwing a
TypeErrorbecause the unpatched method signature does not accept themax_lengthargument.
Code example
from google.resumable_media.requests.download import _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 TypeError
decoder.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'
adam-sikora
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the googleapis/google-resumable-media-python API.Issues related to the googleapis/google-resumable-media-python API.