vcrpy: vcrpy throws an error if latest urllib3 is installed
vcrpy won’t import with latest urllib.
root@ef153dd6180d:/# python --version
Python 3.11.3
root@ef153dd6180d:/# pip install urllib3 vcrpy
Collecting urllib3
Downloading urllib3-2.0.0-py3-none-any.whl (123 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.2/123.2 kB 10.0 MB/s eta 0:00:00
Collecting vcrpy
Downloading vcrpy-4.2.1-py2.py3-none-any.whl (40 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 kB 45.4 MB/s eta 0:00:00
Collecting PyYAML
Downloading PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (757 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 757.9/757.9 kB 51.1 MB/s eta 0:00:00
Collecting wrapt
Downloading wrapt-1.15.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (78 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.9/78.9 kB 80.8 MB/s eta 0:00:00
Collecting six>=1.5
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting yarl
Downloading yarl-1.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (282 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 282.8/282.8 kB 161.6 MB/s eta 0:00:00
Collecting multidict>=4.0
Downloading multidict-6.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (117 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.4/117.4 kB 136.7 MB/s eta 0:00:00
Collecting idna>=2.0
Downloading idna-3.4-py3-none-any.whl (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 82.9 MB/s eta 0:00:00
Installing collected packages: wrapt, urllib3, six, PyYAML, multidict, idna, yarl, vcrpy
Successfully installed PyYAML-6.0 idna-3.4 multidict-6.0.4 six-1.16.0 urllib3-2.0.0 vcrpy-4.2.1 wrapt-1.15.0 yarl-1.9.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip
root@ef153dd6180d:/# python
Python 3.11.3 (main, Apr 12 2023, 14:31:14) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vcr
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.11/site-packages/vcr/__init__.py", line 2, in <module>
from .config import VCR
File "/usr/local/lib/python3.11/site-packages/vcr/config.py", line 11, in <module>
from .cassette import Cassette
File "/usr/local/lib/python3.11/site-packages/vcr/cassette.py", line 12, in <module>
from .patch import CassettePatcherBuilder
File "/usr/local/lib/python3.11/site-packages/vcr/patch.py", line 41, in <module>
_VerifiedHTTPSConnection = cpool.VerifiedHTTPSConnection
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'urllib3.connectionpool' has no attribute 'VerifiedHTTPSConnection'
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 14
- Comments: 15 (2 by maintainers)
Commits related to this issue
- requests <=2.30 fixes https://github.com/kevin1024/vcrpy/issues/688 — committed to polyswarm/polyswarm-api by mjbradford89 a year ago
- chore(tests): fix test failure caused by vcrpy vcrpy does not use urllib3 correctly. Pin urllib3 until https://github.com/kevin1024/vcrpy/issues/688 is fixed. — committed to GitGuardian/ggshield by agateau-gg a year ago
- chore(tests): fix test failure caused by vcrpy vcrpy does not use urllib3 correctly. Pin urllib3 until https://github.com/kevin1024/vcrpy/issues/688 is fixed. — committed to GitGuardian/py-gitguardian by agateau-gg a year ago
- pin urllib3 version to match vrcpy imports See kevin1024/vcrpy#688 — committed to burnash/gspread by lavigne958 a year ago
- test(deps): constrain urllib3 to < 2 to work around vcrpy issue Refs https://github.com/kevin1024/vcrpy/issues/688 — committed to scop/pytekukko by scop a year ago
- test(deps): constrain urllib3 to < 2 to work around vcrpy issue Refs https://github.com/kevin1024/vcrpy/issues/688 — committed to scop/pytekukko by scop a year ago
- test(deps): constrain urllib3 to < 2 to work around vcrpy issue Refs https://github.com/kevin1024/vcrpy/issues/688 — committed to scop/pytekukko by scop a year ago
- Download urllib3 until bug is fixed See https://github.com/kevin1024/vcrpy/issues/688 — committed to PennyDreadfulMTG/Penny-Dreadful-Tools by bakert a year ago
- chore(tests): fix test failure caused by vcrpy vcrpy does not use urllib3 correctly. Pin urllib3 until https://github.com/kevin1024/vcrpy/issues/688 is fixed. Needed a hack in the "Install dependenc... — committed to GitGuardian/ggshield by agateau-gg a year ago
- chore(tests): fix test failure caused by vcrpy vcrpy does not use urllib3 correctly. Pin urllib3 until https://github.com/kevin1024/vcrpy/issues/688 is fixed. Needed a hack in the "Install dependenc... — committed to GitGuardian/ggshield by agateau-gg a year ago
- build(poetry): limit requests version to avoid urllib errors https://github.com/kevin1024/vcrpy/issues/688 — committed to vzhd1701/enex2notion by vzhd1701 a year ago
- Temporarily pin urllib3 version to fix failing tests Tests are currently failing due to https://github.com/kevin1024/vcrpy/issues/688. This PR temporarily pins the urllib3 version to <2 until there i... — committed to ansible/ansible-rulebook by ttuffin a year ago
- Temporarily pin urllib3 version to fix failing tests (#504) Tests are currently failing due to https://github.com/kevin1024/vcrpy/issues/688. This PR temporarily pins the urllib3 version to <2 unti... — committed to ansible/ansible-rulebook by ttuffin a year ago
- Fix build tests failing This PR fixes the issue mentioned here kevin1024/vcrpy#688 and should be removed after next stable release of vcrpy — committed to pubnub/python by seba-aln a year ago
- pin urllib to < 2 as vcrpy is not compatible with 2.x see https://github.com/kevin1024/vcrpy/issues/688 for details — committed to theforeman/foreman-ansible-modules by evgeni a year ago
- pin urllib to < 2 as vcrpy is not compatible with 2.x see https://github.com/kevin1024/vcrpy/issues/688 for details — committed to theforeman/foreman-ansible-modules by evgeni a year ago
- Updated requirements. Pinned urllib3 to a version bellow 2.0.0, currently there is an issue with urllib3 >- 2.0.0 in vcrpy https://github.com/kevin1024/vcrpy/issues/688 — committed to Amsterdam/signals-gisib-ams by vanbuiten a year ago
- fix: use urllib3.connection where needed. Since urllib3 v2 the re-export of connection.HTTPConnection in urllib3.connectionpool was removed. In this commit we use urllib3.connection where needed. So... — committed to shifqu/vcrpy by shifqu a year ago
- pin urllib3 version to match vrcpy imports See kevin1024/vcrpy#688 — committed to burnash/gspread by lavigne958 a year ago
- Fix build tests failing (#157) * Update requirements-dev.txt This PR fixes the issue mentioned here kevin1024/vcrpy#688 and should be removed after next stable release of vcrpy — committed to pubnub/python by seba-aln a year ago
VerifiedHTTPSConnectionis still here in urllib3 2.0. We stopped importing it from connectionpool.py but it still defined in connection.py. The vcrpy import was only working by accident here: this was always documented to be in urllib3.connection.You can use
from urllib3.connection import VerifiedHTTPSConnectioninstead but at this point I think it would be better to use the new name withfrom urllib3.connection import HTTPSConnection.@fiendish I only considered combinations that would pass
pip3 check, true.Also, thank you both for the fair consideration. I do appreciate the responses.
New ticket specifically about urllib3 v2 with Python ❤️.10 makes sense to me
@kevin1024 can this issue stay open until the python<3.10 problem is worked out?