dev-python/python-daemon: enable py3.10

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
Arthur Zamarin
2021-11-06 21:44:52 +02:00
parent aff1cc5b91
commit 3bec2f93f9
2 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
https://pagure.io/python-daemon/c/0c67a3c6407fbf4483ccfc94a7a0d78cf3379296
From: Miro Hrončok <miro@hroncok.cz>
Date: Sep 29 2021 10:05:27 +0000
Subject: Remove incorrect double-patch of objects in test cases.
The specific test cases relying on the patches, already are decorated
to patch the specific attributes needed. We don't need a general patch
of the attributes in the test case setup.
Signed-off-by: Ben Finney <ben+python@benfinney.id.au>
--- a/test/test_pidfile.py
+++ b/test/test_pidfile.py
@@ -367,12 +367,6 @@ class TimeoutPIDLockFile_TestCase(scaffold.TestCase):
pidlockfile_scenarios = make_pidlockfile_scenarios()
self.pidlockfile_scenario = pidlockfile_scenarios['simple']
- for func_name in ['__init__', 'acquire']:
- func_patcher = unittest.mock.patch.object(
- lockfile.pidlockfile.PIDLockFile, func_name)
- func_patcher.start()
- self.addCleanup(func_patcher.stop)
-
self.scenario = {
'pidfile_path': self.pidlockfile_scenario['pidfile_path'],
'acquire_timeout': self.getUniqueInteger(),

View File

@@ -4,7 +4,7 @@
EAPI=7
DISTUTILS_USE_SETUPTOOLS=rdepend
PYTHON_COMPAT=( python3_{8..9} pypy3 )
PYTHON_COMPAT=( python3_{8..10} pypy3 )
inherit distutils-r1
@@ -29,6 +29,10 @@ BDEPEND="
)
"
PATCHES=(
"${FILESDIR}/${P}-fix-py3.10.patch"
)
distutils_enable_tests unittest
src_prepare() {