Skip to content
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

Fix #292: disuse HTTPResponse.strict #301

Merged
merged 5 commits into from
May 25, 2023

Conversation

dairiki
Copy link
Contributor

@dairiki dairiki commented May 24, 2023

This is an alternative PR to #294. It is more-or-less functionally equivalent to that PR. This alternative is being provided in case it turns out that the only reason #294 isn't being merged is that it includes formatting changes, etc. There are a couple of comments that indicate that might be the case. It seems that #292 affects a sufficiently wide collection of users that a timely fix is important.

Fixes #292
Fixes #293

What is here

  • Omit the strict attribute from the HTTPRequest (de)serialization.
  • A minimal set of test changes/fixes so that the tests run (and pass):
    • Fix bitrot in the CI workflow so that the tests actually run.
    • Fix bitrot in test_etag.py for requests>=2.29.

Notes

As noted in this comment on #294, the strict parameter only has an effect if running under Python 2. Since cachecontrol no longer supports Python 2 there is no reason not to remove support for strict altogether (as is done here).

@dairiki dairiki force-pushed the fix.292-disuse-strict branch from 1880ae3 to 79e3091 Compare May 24, 2023 03:48
dairiki added 3 commits May 23, 2023 21:23
The `strict` attribute of `HTTPResponse` is gone in `urllib3>=2.0`.
In addition it has no effect, at least when running under Python 3.
This prevents issues when deserializing responses serialized
by an earlier version of cachecontrol.
Patch all the possible methods that might be used to generate a
response.
@dairiki dairiki force-pushed the fix.292-disuse-strict branch from 79e3091 to b91b7eb Compare May 24, 2023 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants