From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 193DF15808B for ; Fri, 16 Feb 2024 18:38:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 094E9E29CF; Fri, 16 Feb 2024 18:38:11 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DE3B9E29CF for ; Fri, 16 Feb 2024 18:38:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D8903341B52 for ; Fri, 16 Feb 2024 18:38:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1C0761239 for ; Fri, 16 Feb 2024 18:38:08 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1708108685.f580c35947fac3dc7d48795941be7e61660699f1.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/vcrpy/files/, dev-python/vcrpy/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/vcrpy/files/vcrpy-6.0.1-httpbin-compat.patch dev-python/vcrpy/vcrpy-6.0.1.ebuild X-VCS-Directories: dev-python/vcrpy/ dev-python/vcrpy/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: f580c35947fac3dc7d48795941be7e61660699f1 X-VCS-Branch: master Date: Fri, 16 Feb 2024 18:38:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1442da2a-a61a-4cd6-a9b7-a1c51f2f7dcb X-Archives-Hash: 85bb044f1758bfb36f99a22cd17c6aa3 commit: f580c35947fac3dc7d48795941be7e61660699f1 Author: Michał Górny gentoo org> AuthorDate: Fri Feb 16 18:37:29 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Feb 16 18:38:05 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f580c359 dev-python/vcrpy: Fix compatibility with patched httpbin Signed-off-by: Michał Górny gentoo.org> .../vcrpy/files/vcrpy-6.0.1-httpbin-compat.patch | 40 ++++++++++++++++++++++ dev-python/vcrpy/vcrpy-6.0.1.ebuild | 5 +++ 2 files changed, 45 insertions(+) diff --git a/dev-python/vcrpy/files/vcrpy-6.0.1-httpbin-compat.patch b/dev-python/vcrpy/files/vcrpy-6.0.1-httpbin-compat.patch new file mode 100644 index 000000000000..4e2a91cb4bac --- /dev/null +++ b/dev-python/vcrpy/files/vcrpy-6.0.1-httpbin-compat.patch @@ -0,0 +1,40 @@ +From e60dafb8dce589e7deb63fec552f5c05bd19ac6d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Fri, 16 Feb 2024 19:33:41 +0100 +Subject: [PATCH] Improve test compatibility with legacy httpbin index + +Make the tests slightly more flexible to match both the flasgger-based +and legacy httpbin index. This is needed for compatibility with +https://github.com/psf/httpbin/pull/44 when flasgger is not installed +(e.g. on architectures that are not supported by Rust). +--- + tests/integration/test_basic.py | 2 +- + tests/integration/test_register_persister.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/integration/test_basic.py b/tests/integration/test_basic.py +index bfad6153..99121456 100644 +--- a/tests/integration/test_basic.py ++++ b/tests/integration/test_basic.py +@@ -39,7 +39,7 @@ def test_basic_json_use(tmpdir, httpbin): + test_fixture = str(tmpdir.join("synopsis.json")) + with vcr.use_cassette(test_fixture, serializer="json"): + response = urlopen(httpbin.url).read() +- assert b"A simple HTTP Request & Response Service." in response ++ assert b"HTTP Request & Response Service" in response + + + def test_patched_content(tmpdir, httpbin): +diff --git a/tests/integration/test_register_persister.py b/tests/integration/test_register_persister.py +index e904197c..375f14be 100644 +--- a/tests/integration/test_register_persister.py ++++ b/tests/integration/test_register_persister.py +@@ -66,7 +66,7 @@ def test_load_cassette_with_custom_persister(tmpdir, httpbin): + + with my_vcr.use_cassette(test_fixture, serializer="json"): + response = urlopen(httpbin.url).read() +- assert b"A simple HTTP Request & Response Service." in response ++ assert b"HTTP Request & Response Service" in response + + + def test_load_cassette_persister_exception_handling(tmpdir, httpbin): diff --git a/dev-python/vcrpy/vcrpy-6.0.1.ebuild b/dev-python/vcrpy/vcrpy-6.0.1.ebuild index 6e8afec2a509..257bac69d0b4 100644 --- a/dev-python/vcrpy/vcrpy-6.0.1.ebuild +++ b/dev-python/vcrpy/vcrpy-6.0.1.ebuild @@ -38,6 +38,11 @@ BDEPEND=" distutils_enable_tests pytest +PATCHES=( + # https://github.com/kevin1024/vcrpy/pull/823 + "${FILESDIR}/${P}-httpbin-compat.patch" +) + python_test() { local EPYTEST_DESELECT=( # these tests are failing with recent dev-python/werkzeug; losely related: