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

build: pin urllib3<2.3 to accommodate our old fork of vcrpy #2647

Merged
merged 2 commits into from
Jan 26, 2025
Merged

Conversation

dgw
Copy link
Member

@dgw dgw commented Jan 2, 2025

Description

I had the itch to work on a feature for 8.1, but noticed that unrelated tests were failing when I started validating my changes…

urllib3 2.3.0, released 22 December 2024, broke compatibility with vcrpy 5.x by using a response.version_string attribute that's missing from the mocked-up response objects. (The diff looks pretty innocuous, but every change has the potential to break someone's workflow, right?.)

Upstream has fixed this for vcrpy 7.x, but we're on an old fork of vcrpy 5.x due to incompatibilities with mixed urllib versions across older versions of Python (see #2456).

I'll add a note to #2456 with an update on the current state of this. We can remove the pin again when py3.9 support drops in October 2025. Original hope was to get a PR merged upstream in vcrpy that fixes the urllib version issues with Python < 3.10, but that hasn't gone anywhere.

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make lint and make test)
  • I have tested the functionality of the things this change touches

Notes

Milestoned for 8.0.2 because it'll need backporting to the maintenance branch (otherwise CI there will be broken).

dgw added 2 commits January 24, 2025 14:46
We can unpin this when py3.9 support drops in October 2025. Original
hope was to get a PR merged upstream in vcrpy that fixes the urllib
version issues with Python < 3.10, but that hasn't gone anywhere.
@dgw
Copy link
Member Author

dgw commented Jan 24, 2025

Sorry, have to request re-review. 😅

I needed to also fix stricter checks from flake8-type-checking 3.0.0:

2025-01-24T20:24:04.1057541Z flake8 sopel/ test/
2025-01-24T20:24:07.7217923Z sopel/tools/time.py:97:17: TC006 Annotation 'str' in typing.cast() should be a string literal
2025-01-24T20:24:07.7219141Z sopel/trigger.py:232:13: TC006 Annotation 'Match' in typing.cast() should be a string literal
2025-01-24T20:24:07.7405276Z make: *** [Makefile:8: lint-style] Error 1

@dgw dgw requested a review from Exirel January 24, 2025 20:49
@dgw dgw merged commit 99c4a00 into master Jan 26, 2025
17 checks passed
@dgw dgw deleted the urllib3-cap branch January 26, 2025 00:48
dgw added a commit that referenced this pull request Jan 26, 2025
build: pin urllib3<2.3 to accommodate our old fork of vcrpy

Also includes slight `typing.cast()` changes to accommodate new version
of flake8-type-checking.
@SnoopJ SnoopJ mentioned this pull request Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants