-
Notifications
You must be signed in to change notification settings - Fork 75
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
MNT: (deps): Bump requests from 2.28.1 to 2.32.3 in /ci #780
Conversation
@dependabot rebase |
7b3058a
to
03d8bad
Compare
@dependabot rebase |
03d8bad
to
22b5eeb
Compare
8ecd83e
to
dd3440b
Compare
dd3440b
to
7cd65ea
Compare
So the breakage here isn't with requests, but urlllib3, which changed internally how it handles compressed responses starting in v2. The upshot is that broke vcrpy loading our recorded responses. Thankfully, this issue pointed me to how to rewrite, which I did with: #!/usr/bin/env python3
import pathlib
import yaml
import zlib
try:
# use the same dumper config as vcr to minimize entropy in the diffs
from yaml import CDumper as Dumper, CLoader as Loader
except ImportError:
from yaml import Dumper, Loader
for fname in pathlib.Path('.').glob('**/fixtures/*'):
print(fname)
with fname.open('r') as file:
data = yaml.load(file, Loader=Loader)
changed = False
for interaction in data['interactions']:
response = interaction.get('response', {})
headers = response.get('headers', {})
contentType = headers.get('content-encoding') or headers.get('Content-Encoding')
compressed_string = response['body']['string']
if contentType and contentType[0] == 'gzip' and compressed_string:
changed = True
response['body']['string'] = zlib.decompress(compressed_string, zlib.MAX_WBITS | 16)
if changed:
with fname.open('w') as file:
yaml.dump(data, file, Dumper=Dumper) This also then requires bumping to vcrpy 4.3.1. The downside is that the requests/vcrpy updates take us to about an 18 month window. We do have the option (I think) of pinning urllib3 < 2 for now, but I'm not sure it's worth it since those other packages are pure Python. @dcamron @lesserwhirls Any thoughts? |
As discussed on the MetPy call, I think the consensus is that this is reasonable enough. I'll also add that moving to requests 2.30 is a requirement to use Sphinx 8.1.3. |
Bumps [requests](https://github.com/psf/requests) from 2.28.1 to 2.32.3. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](psf/requests@v2.28.1...v2.32.3) --- updated-dependencies: - dependency-name: requests dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
urllib3 2.x changed how it handles compressed responses, which breaks our existing cassettes. This updates the files to contain the decompressed responses for compatibilty going forward, and also notes our constraint in our test requirements in CI.
Definitely don't need these showing up in diffs.
This is needed to get to urllib 2.x, which we now rely on to test properly. As a result, we also have to bump VCRPy to 4.3.1.
7cd65ea
to
dba1e91
Compare
Bumps requests from 2.28.1 to 2.32.3.
Release notes
Sourced from requests's releases.
... (truncated)
Changelog
Sourced from requests's changelog.
... (truncated)
Commits
0e322af
v2.32.3e188799
Don't create default SSLContext if ssl module isn't present (#6724)145b539
Merge pull request #6716 from sigmavirus24/bug/6715b1d73dd
Don't use default SSLContext with custom poolmanager kwargs6badbac
Update HISTORY.mda62a2d3
Allow for overriding of specific pool key params88dce9d
v2.32.2c98e4d1
Merge pull request #6710 from nateprewitt/api_rename92075b3
Add deprecation warningaa1461b
Move _get_connection to get_connection_with_tls_contextYou can trigger a rebase of this PR by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)