Skip to content

Conversation

@benijaichenco
Copy link

@benijaichenco benijaichenco commented Dec 7, 2025

Fixes #491

Adds the required max_length=None parameter to decoder methods to maintain compatibility with urllib3 >= 2.6.0.

@benijaichenco benijaichenco requested review from a team as code owners December 7, 2025 23:06
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Dec 7, 2025
@google-cla
Copy link

google-cla bot commented Dec 7, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/google-resumable-media-python API. label Dec 7, 2025
@benijaichenco benijaichenco force-pushed the fix-urllib3-max-length-compat branch from 3d7a3b2 to 0b38722 Compare December 8, 2025 00:11
@BrennaEpp BrennaEpp assigned chandra-siri and unassigned cojenco Dec 8, 2025
@chandra-siri
Copy link

thanks @benijaichenco for contributing :)

@benijaichenco
Copy link
Author

All set @chandra-siri :)

@BrennaEpp
Copy link

Thank you for contributing! We are missing test coverage for lines 692 and 743, do you think that is something you could add @benijaichenco?

@BrennaEpp
Copy link

Also the linter is failing

Run nox -s lint
google/resumable_media/requests/download.py:739:1: W293 blank line contains whitespace

Comment on lines +689 to +692
@property
def has_unconsumed_tail(self) -> bool:
# Checks for buffered, unread bytes
return self._decoder.has_unconsumed_tail

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this property is not required for _GzipDecoder . It's needed only for _BrotliDecoder.

Please remove these lines.

@gpshead
Copy link

gpshead commented Dec 23, 2025

It'd also be good to add an explicit test against the latest urllib3 version in the .github/workflows/unittest.yml test matrix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/google-resumable-media-python API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_GzipDecoder.decompress() TypeError: unexpected keyword argument 'max_length'

5 participants