diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2023-10-22 18:23:30 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2023-10-22 18:23:30 +0000 |
| commit | 73694eda0d51d20cdb2e4dab7e99046cfb2be485 (patch) | |
| tree | d2ad075832550ba8c0ffb65fcdb0fa13240de99d /dev-python/vcrpy | |
| parent | d5bd0bc983c2713b66c2c0a6044a3968b14459b1 (diff) | |
| download | baldeagleos-repo-73694eda0d51d20cdb2e4dab7e99046cfb2be485.tar.gz baldeagleos-repo-73694eda0d51d20cdb2e4dab7e99046cfb2be485.tar.xz baldeagleos-repo-73694eda0d51d20cdb2e4dab7e99046cfb2be485.zip | |
Adding metadata
Diffstat (limited to 'dev-python/vcrpy')
| -rw-r--r-- | dev-python/vcrpy/files/vcrpy-5.1.0-py312.patch | 35 | ||||
| -rw-r--r-- | dev-python/vcrpy/vcrpy-5.1.0.ebuild | 8 |
2 files changed, 43 insertions, 0 deletions
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 e3b6e175a476..87820e188d36 100644 --- a/dev-python/vcrpy/vcrpy-5.1.0.ebuild +++ b/dev-python/vcrpy/vcrpy-5.1.0.ebuild @@ -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) |
