Skip to content

fix: HTTPResponse object has no attribute 'chunked' (#137)#436

Closed
princ0301 wants to merge 1 commit into
psf:masterfrom
princ0301:fix-137-httpresponse-object-has-no-attribute-chu
Closed

fix: HTTPResponse object has no attribute 'chunked' (#137)#436
princ0301 wants to merge 1 commit into
psf:masterfrom
princ0301:fix-137-httpresponse-object-has-no-attribute-chu

Conversation

@princ0301

Copy link
Copy Markdown

Fixes #137

Summary

The chunked attribute on urllib3.response.HTTPResponse is not present in older versions of the library, which can be used by older versions of requests. This change uses getattr to safely access the attribute, preventing an AttributeError.

Validation

Tests passing after 1 attempt(s).

tests/test_expires_heuristics.py ................                        [ 59%]
tests/test_max_age.py ..                                                 [ 61%]
tests/test_redirects.py ....                                             [ 65%]
tests/test_regressions.py ..                                             [ 67%]
tests/test_serialization.py ..........                                   [ 77%]
tests/test_server_http_version.py .                                      [ 78%]
tests/test_storage_filecache.py ..................                       [ 96%]
tests/test_storage_redis.py ...                                          [ 99%]
tests/test_vary.py .                                                     [100%]
============================= 101 passed in 3.18s ==============================

@woodruffw woodruffw closed this Jun 16, 2026
@psf psf locked as spam and limited conversation to collaborators Jun 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTPResponse object has no attribute 'chunked'

2 participants