-
Notifications
You must be signed in to change notification settings - Fork 49
fix: add max_length support to Gzip/Brotli decoders for urllib3 v2.6+ compatibility #492
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
base: main
Are you sure you want to change the base?
fix: add max_length support to Gzip/Brotli decoders for urllib3 v2.6+ compatibility #492
Conversation
|
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. |
3d7a3b2 to
0b38722
Compare
|
thanks @benijaichenco for contributing :) |
|
All set @chandra-siri :) |
|
Thank you for contributing! We are missing test coverage for lines 692 and 743, do you think that is something you could add @benijaichenco? |
|
Also the linter is failing
|
| @property | ||
| def has_unconsumed_tail(self) -> bool: | ||
| # Checks for buffered, unread bytes | ||
| return self._decoder.has_unconsumed_tail |
There was a problem hiding this comment.
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.
|
It'd also be good to add an explicit test against the latest |
Fixes #491
Adds the required
max_length=Noneparameter to decoder methods to maintain compatibility withurllib3 >= 2.6.0.