diff options
author | 2024-10-02 17:24:23 -0700 | |
---|---|---|
committer | 2024-10-02 17:27:20 -0700 | |
commit | 1318b57781b14c91c7ebba456fe85f190c688277 (patch) | |
tree | 3ae4119a0b8a6b2430a6c93b1a5e37b0fa7fb8d7 /dev-python/pyrqlite | |
parent | net-firewall/nftables: Update 9999 with libnftnl dep (diff) | |
download | gentoo-1318b57781b14c91c7ebba456fe85f190c688277.tar.gz gentoo-1318b57781b14c91c7ebba456fe85f190c688277.tar.bz2 gentoo-1318b57781b14c91c7ebba456fe85f190c688277.zip |
dev-python/pyrqlite: Elminate non-public test.support usage
Closes: https://bugs.gentoo.org/940579
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'dev-python/pyrqlite')
-rw-r--r-- | dev-python/pyrqlite/files/pyrqlite-2.2.3-test-support.patch | 50 | ||||
-rw-r--r-- | dev-python/pyrqlite/pyrqlite-2.2.3.ebuild | 1 |
2 files changed, 51 insertions, 0 deletions
diff --git a/dev-python/pyrqlite/files/pyrqlite-2.2.3-test-support.patch b/dev-python/pyrqlite/files/pyrqlite-2.2.3-test-support.patch new file mode 100644 index 000000000000..06559446ef12 --- /dev/null +++ b/dev-python/pyrqlite/files/pyrqlite-2.2.3-test-support.patch @@ -0,0 +1,50 @@ +From cb5ba83c0ba95eae0026afdc8ae0312b8e51f647 Mon Sep 17 00:00:00 2001 +From: Zac Medico <zmedico@gmail.com> +Date: Wed, 2 Oct 2024 16:48:38 -0700 +Subject: [PATCH] Eliminate non-public test.support usage + +This fixes the "No module named test" issue reported here: + +https://bugs.gentoo.org/940579 +--- + src/test/test_dbapi.py | 17 ++++++----------- + 1 file changed, 6 insertions(+), 11 deletions(-) + +diff --git a/src/test/test_dbapi.py b/src/test/test_dbapi.py +index df32f2f..cb756d2 100644 +--- a/src/test/test_dbapi.py ++++ b/src/test/test_dbapi.py +@@ -24,13 +24,6 @@ + from __future__ import print_function + + import sys +-try: +- import test.support.warnings_helper as test_support +-except ImportError: +- try: +- import test.support as test_support +- except ImportError: +- from test import test_support + import unittest + + import pyrqlite.dbapi2 as sqlite +@@ -571,10 +564,12 @@ class ConstructorTests(unittest.TestCase): + ts = sqlite.TimestampFromTicks(42) + + def test_CheckBinary(self): +- with (test_support.check_warnings() if sys.version_info[0] >= 3 +- else test_support.check_py3k_warnings()): +- b = sqlite.Binary(chr(0).encode() + b"'" +- if sys.version_info[0] >= 3 else chr(0) + b"'") ++ self.assertEqual( ++ b"\0'", ++ sqlite.Binary( ++ chr(0).encode() + b"'" if sys.version_info[0] >= 3 else chr(0) + b"'" ++ ), ++ ) + + class ExtensionTests(unittest.TestCase): + @classmethod +-- +2.45.2 + diff --git a/dev-python/pyrqlite/pyrqlite-2.2.3.ebuild b/dev-python/pyrqlite/pyrqlite-2.2.3.ebuild index ec12bed1b7aa..133e7efb299b 100644 --- a/dev-python/pyrqlite/pyrqlite-2.2.3.ebuild +++ b/dev-python/pyrqlite/pyrqlite-2.2.3.ebuild @@ -26,5 +26,6 @@ BDEPEND=" >=dev-db/rqlite-6.7.0 ) " +PATCHES=("${FILESDIR}/pyrqlite-2.2.3-test-support.patch") distutils_enable_tests pytest |