summaryrefslogtreecommitdiff
path: root/dev-python/pyserial
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-08 00:08:11 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-08 00:08:11 +0100
commitadc09cc4e6ebf7931735c02c0c272b4b885c2b30 (patch)
treed1e752b60c2ed90ae9e427cbe2b07061e3879191 /dev-python/pyserial
parent941687623283212199cbe6e36f7d61b89d6222b2 (diff)
gentoo auto-resync : 08:06:2024 - 00:08:11
Diffstat (limited to 'dev-python/pyserial')
-rw-r--r--dev-python/pyserial/Manifest3
-rw-r--r--dev-python/pyserial/files/pyserial-3.5-unittest-fix.patch28
-rw-r--r--dev-python/pyserial/pyserial-3.5-r2.ebuild8
3 files changed, 36 insertions, 3 deletions
diff --git a/dev-python/pyserial/Manifest b/dev-python/pyserial/Manifest
index efd1f6628642..22364ade9640 100644
--- a/dev-python/pyserial/Manifest
+++ b/dev-python/pyserial/Manifest
@@ -1,3 +1,4 @@
+AUX pyserial-3.5-unittest-fix.patch 1101 BLAKE2B 6c6c03f93b031bd01642edc90ac26116f436424bcf570a45e9fb77e3dc3c7117b569b82fd15e07863441dc06777749bfb725fd3c1231ddb5f30d9488efd96bf5 SHA512 e920edf48a927b5df1c830567a251aff3b7738d081063726caf1ce10e6466681aed35638531e2c3dc7113f792ac8ce280d44a56979b8989ce5bfb1d843672c57
DIST pyserial-3.5.tar.gz 159125 BLAKE2B 6be1930afc6cfecad54cd7a116a0e93085d166907acb4c2fa5b7b9485ec28cfb6dc9e7ffc13ae5628c344ef0f78c15bdd828b8d51048a484548538cf14b9da20 SHA512 c8df5e50d952d5a6dcf1d9253a6ba953e9763c545a867da66c22c90dfa015aba0194f2a8f29a229d0a5f4dc8bfeeaaab8bcfda4066ed78a18b151bc05e6ae327
-EBUILD pyserial-3.5-r2.ebuild 851 BLAKE2B 346610e95637981db7c423866b125a226a0705170bf5e10e3712da1840eae3dfd8d54acd9d0873b2595a7e7a466d008697ffc1f97f144858ac91247ffce74de7 SHA512 7d0d571d45bc89a6c71e8c86028e8af0d01912413a42f614a90d847e30cdce433f811d0a48e4fa9d503805ae3c48c0208534366312bb86a5e09b6d2128ba1bf1
+EBUILD pyserial-3.5-r2.ebuild 903 BLAKE2B 788293c51eceaae2a757810d2474075d0f92cdc8fa87d3c23186183f417bba18d23a89e040a23d17367c1e9cee7ef72a29f2173bdfffdc4226775727a09dadad SHA512 796447135c7133cb8a54e6938fac9d9890340851df2636851a82f6db006ff12f02c59c3bdba42681d26c03fd744d61dd886eaa2d36d4131708e16123ee24df25
MISC metadata.xml 446 BLAKE2B 9242526e2474443c6bb0cc1849dcbd28ae0eaa6ce835b28c99059ef40b3bde19486e6bbc68793b1edffae5e12029b4cb613fe6446df11b976eb49c0ee6889ca4 SHA512 d05a16f86a16a3f6a7d53117f5497fdc9d792171fde7af865b3a126494794251b8b9feddb80e221f21ac66443a90b3ae9d4ea64fae24f1c27dd269299714ba2e
diff --git a/dev-python/pyserial/files/pyserial-3.5-unittest-fix.patch b/dev-python/pyserial/files/pyserial-3.5-unittest-fix.patch
new file mode 100644
index 000000000000..1576cedcf00c
--- /dev/null
+++ b/dev-python/pyserial/files/pyserial-3.5-unittest-fix.patch
@@ -0,0 +1,28 @@
+From 239f840076bf9da76906dc029f26a423fef4a698 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
+Date: Fri, 7 Jun 2024 16:45:15 +0200
+Subject: [PATCH] Replace deprecated unittest.findTestCases function
+
+The unittest.findTestCases function was deprecated in Python 3.11 and
+later removed in Python 3.13. The TestLoader methods should be used
+instead [1].
+
+[1] https://docs.python.org/3.13/whatsnew/3.13.html#unittest
+
+Upstream-Issue: https://github.com/pyserial/pyserial/issues/754
+Upstream-PR: https://github.com/pyserial/pyserial/issues/757
+
+diff --git a/test/run_all_tests.py b/test/run_all_tests.py
+index e0797e7e..f09fe9bb 100644
+--- a/test/run_all_tests.py
++++ b/test/run_all_tests.py
+@@ -37,7 +37,8 @@
+ print("skipping {}".format(modulename))
+ else:
+ module.PORT = PORT
+- testsuite = unittest.findTestCases(module)
++ loader = unittest.TestLoader()
++ testsuite = loader.loadTestsFromModule(module)
+ print("found {} tests in {!r}".format(testsuite.countTestCases(), modulename))
+ mainsuite.addTest(testsuite)
+
diff --git a/dev-python/pyserial/pyserial-3.5-r2.ebuild b/dev-python/pyserial/pyserial-3.5-r2.ebuild
index a8e14ce8e27f..76c7aed077f9 100644
--- a/dev-python/pyserial/pyserial-3.5-r2.ebuild
+++ b/dev-python/pyserial/pyserial-3.5-r2.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
+PYTHON_COMPAT=( python3_{10..13} pypy3 )
inherit distutils-r1 pypi
@@ -21,6 +21,10 @@ IUSE="examples"
DOCS=( CHANGES.rst README.rst )
+PATCHES=(
+ "${FILESDIR}/${P}-unittest-fix.patch"
+)
+
distutils_enable_sphinx documentation --no-autodoc
python_test() {