summaryrefslogtreecommitdiff
path: root/dev-python/vcrpy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-22 14:44:10 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-10-22 14:44:10 +0100
commit63627de4936707c40b5c4dca4f23e9fe1e9c4837 (patch)
tree0882ba9f0e330ae7e1f2f3306a6683000060355d /dev-python/vcrpy
parent940cec7afea0fff03b206c62a512335e6f9d2d00 (diff)
gentoo auto-resync : 22:10:2023 - 14:44:09
Diffstat (limited to 'dev-python/vcrpy')
-rw-r--r--dev-python/vcrpy/Manifest3
-rw-r--r--dev-python/vcrpy/files/vcrpy-5.1.0-py312.patch35
-rw-r--r--dev-python/vcrpy/vcrpy-5.1.0.ebuild10
3 files changed, 46 insertions, 2 deletions
diff --git a/dev-python/vcrpy/Manifest b/dev-python/vcrpy/Manifest
index e3a888997584..894fecf926eb 100644
--- a/dev-python/vcrpy/Manifest
+++ b/dev-python/vcrpy/Manifest
@@ -1,3 +1,4 @@
+AUX vcrpy-5.1.0-py312.patch 1227 BLAKE2B 774de5c873ca17b5a08d9c38c743402ead83efc4ca98d90ebba3ae54faf3e482047b1078815b981da1cdfbed9cd9474657e08021a27104ab064220d81d3c52ed SHA512 08fb62ca1dc79bf0e90ef7845e3ca77d37d5537558db68591d203dc2eea1e3cf2f0638b0c153a9a26539f7a08ea42bcb15d57a077de5a9fea52fe4f3440340c6
DIST vcrpy-5.1.0.gh.tar.gz 337183 BLAKE2B 76805db7c034fe4f6e0d6fb18340ad24a25a28ece4576d97958d689e46667a8ab2fb6cdc8186f635a7c4f4833d4ea541573bf6c5e0f775f842e60683336ad87e SHA512 dfb2e02027ed2e37f4c2201b410847cf1f03b1999853e3f838e49abf1e93641d58addb18f6144c484f9d4618693b9a99d73dc7fb55eb1de2c383109e054e3713
-EBUILD vcrpy-5.1.0.ebuild 1677 BLAKE2B 39dbc3018309a25639df46762e999643e699ec130bd7795b612c8c0e4bdc07dd594acb3a77e0b20b7b712a0b3a712250f59dd78628200e152eb0f53a6ba53917 SHA512 7c1fe673a2cde4274f6031f7767213446088f77d1bedc4c87cc58ed91aa04f4d44be8a3c3c3647301542c179b3a52e5f759c06b7906f9f8737a0695a4892801e
+EBUILD vcrpy-5.1.0.ebuild 1938 BLAKE2B 1df91b6165faa1438322cf7227731d04b533083fdd0326651a3c6eb50f598f1ad62ee9ed48c25e1609681f54459c793bc33687e5a5b2425da3914438b71a1c3f SHA512 306564cf80f58a35e957c2f515f32e85e5a1b706d7d587bef5abcf58c8e4e3d352c75efdf5bf2df5dd250f835174501f8500a438be394d2c9e03266c7567991c
MISC metadata.xml 388 BLAKE2B fd31293bd6085e6a93816a1813a8c3a9d046ed3d932fba5b32b454a71e7535606ba92815699b7ca10fc837b07a5335df54d5fae8c860a7ea88c6ea72891d0620 SHA512 0360ac6f113035ffd1991d2a42000f290c9d0a3fa8c4dac9abfde0eecafd23e1ff9929d8ee521f83a924c523992fabc5cb4353079bf7c52dac9f906a31d4da55
diff --git a/dev-python/vcrpy/files/vcrpy-5.1.0-py312.patch b/dev-python/vcrpy/files/vcrpy-5.1.0-py312.patch
new file mode 100644
index 000000000000..2dc9fdf09e88
--- /dev/null
+++ b/dev-python/vcrpy/files/vcrpy-5.1.0-py312.patch
@@ -0,0 +1,35 @@
+From 69621c67fb29dedd9ece4a7bdbf50380fbe4c5ee Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 3 Aug 2023 06:51:45 +0200
+Subject: [PATCH] Copy `debuglevel` and `_http_vsn` attrs into response classes
+
+Copy the `debuglevel` and `_http_vsn` attributes from base connection
+class into response classes, in order to fix compatibility with
+Python 3.12. For reasons I don't comprehend, these end up being called
+on the class rather than instance, so regular proxying logic does not
+work.
+
+Fixes #707
+---
+ vcr/stubs/__init__.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/vcr/stubs/__init__.py b/vcr/stubs/__init__.py
+index dafaec71..4d4bb39d 100644
+--- a/vcr/stubs/__init__.py
++++ b/vcr/stubs/__init__.py
+@@ -389,6 +389,8 @@ class VCRHTTPConnection(VCRConnection):
+
+ _baseclass = HTTPConnection
+ _protocol = "http"
++ debuglevel = _baseclass.debuglevel
++ _http_vsn = _baseclass._http_vsn
+
+
+ class VCRHTTPSConnection(VCRConnection):
+@@ -397,3 +399,5 @@ class VCRHTTPSConnection(VCRConnection):
+ _baseclass = HTTPSConnection
+ _protocol = "https"
+ is_verified = True
++ debuglevel = _baseclass.debuglevel
++ _http_vsn = _baseclass._http_vsn
diff --git a/dev-python/vcrpy/vcrpy-5.1.0.ebuild b/dev-python/vcrpy/vcrpy-5.1.0.ebuild
index daa52ed9d3d6..0cc7495e8266 100644
--- a/dev-python/vcrpy/vcrpy-5.1.0.ebuild
+++ b/dev-python/vcrpy/vcrpy-5.1.0.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit distutils-r1
@@ -36,6 +36,10 @@ BDEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}/${P}-py312.patch"
+)
+
distutils_enable_tests pytest
python_test() {
@@ -52,6 +56,10 @@ python_test() {
# broken by simplejson, doesn't seem important
# https://github.com/kevin1024/vcrpy/issues/751
tests/unit/test_serialize.py::test_serialize_binary_request
+ # new httpbin, sigh
+ # https://github.com/kevin1024/vcrpy/issues/761
+ tests/integration/test_basic.py::test_basic_json_use
+ tests/integration/test_register_persister.py::test_load_cassette_with_custom_persister
)
local -x REQUESTS_CA_BUNDLE=$("${EPYTHON}" -m pytest_httpbin.certs)