public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/vcrpy/, dev-python/vcrpy/files/
@ 2018-06-20 21:46 Mike Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Gilbert @ 2018-06-20 21:46 UTC (permalink / raw
  To: gentoo-commits

commit:     7559106d73eb9f57fdee1e50bfca158be6eba6a5
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 20 21:46:20 2018 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Jun 20 21:46:35 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7559106d

dev-python/vcrpy: skip test requiring network access

Closes: https://bugs.gentoo.org/645514
Package-Manager: Portage-2.3.40_p15, Repoman-2.3.9_p247

 .../vcrpy/files/vcrpy-skip-network-tests.patch      | 21 +++++++++++++++++++++
 dev-python/vcrpy/vcrpy-1.11.1.ebuild                |  6 +++++-
 dev-python/vcrpy/vcrpy-1.12.0.ebuild                |  4 ++++
 3 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/dev-python/vcrpy/files/vcrpy-skip-network-tests.patch b/dev-python/vcrpy/files/vcrpy-skip-network-tests.patch
new file mode 100644
index 00000000000..a1f00aa7785
--- /dev/null
+++ b/dev-python/vcrpy/files/vcrpy-skip-network-tests.patch
@@ -0,0 +1,21 @@
+diff --git a/tests/unit/test_stubs.py b/tests/unit/test_stubs.py
+index 7eb0684..a4bc7a1 100644
+--- a/tests/unit/test_stubs.py
++++ b/tests/unit/test_stubs.py
+@@ -1,7 +1,7 @@
+ from vcr.stubs import VCRHTTPSConnection
+ from vcr.compat import mock
+ from vcr.cassette import Cassette
+-
++import pytest
+ 
+ class TestVCRConnection(object):
+ 
+@@ -11,6 +11,7 @@ class TestVCRConnection(object):
+         assert vcr_connection.real_connection.ssl_version == 'example_ssl_version'
+ 
+     @mock.patch('vcr.cassette.Cassette.can_play_response_for', return_value=False)
++    @pytest.mark.skip('requires network access')
+     def testing_connect(*args):
+         vcr_connection = VCRHTTPSConnection('www.google.com')
+         vcr_connection.cassette = Cassette('test', record_mode='all')

diff --git a/dev-python/vcrpy/vcrpy-1.11.1.ebuild b/dev-python/vcrpy/vcrpy-1.11.1.ebuild
index b50e9d02784..0bc4604553e 100644
--- a/dev-python/vcrpy/vcrpy-1.11.1.ebuild
+++ b/dev-python/vcrpy/vcrpy-1.11.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -36,6 +36,10 @@ DEPEND="
 		dev-python/pytest-httpbin[${PYTHON_USEDEP}]
 	)"
 
+PATCHES=(
+	"${FILESDIR}"/vcrpy-skip-network-tests.patch
+)
+
 python_test() {
 	py.test -vv -x tests/unit || die
 }

diff --git a/dev-python/vcrpy/vcrpy-1.12.0.ebuild b/dev-python/vcrpy/vcrpy-1.12.0.ebuild
index adfcee1807d..2676c410973 100644
--- a/dev-python/vcrpy/vcrpy-1.12.0.ebuild
+++ b/dev-python/vcrpy/vcrpy-1.12.0.ebuild
@@ -36,6 +36,10 @@ DEPEND="
 		dev-python/pytest-httpbin[${PYTHON_USEDEP}]
 	)"
 
+PATCHES=(
+	"${FILESDIR}"/vcrpy-skip-network-tests.patch
+)
+
 python_test() {
 	py.test -vv -x tests/unit || die
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/vcrpy/, dev-python/vcrpy/files/
@ 2023-10-22  8:50 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2023-10-22  8:50 UTC (permalink / raw
  To: gentoo-commits

commit:     cad319b71be04dbcca31b448392e7e226602157d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 22 08:44:28 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Oct 22 08:49:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cad319b7

dev-python/vcrpy: Enabe py3.12, fix tests

Closes: https://bugs.gentoo.org/912195
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/vcrpy/files/vcrpy-5.1.0-py312.patch | 35 ++++++++++++++++++++++++++
 dev-python/vcrpy/vcrpy-5.1.0.ebuild            | 10 +++++++-
 2 files changed, 44 insertions(+), 1 deletion(-)

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)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-22  8:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-20 21:46 [gentoo-commits] repo/gentoo:master commit in: dev-python/vcrpy/, dev-python/vcrpy/files/ Mike Gilbert
  -- strict thread matches above, loose matches on Subject: below --
2023-10-22  8:50 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox