public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: dev-python/system_hotkey/files/, dev-python/system_hotkey/
@ 2024-09-13 19:53 Devrin Talen
  0 siblings, 0 replies; only message in thread
From: Devrin Talen @ 2024-09-13 19:53 UTC (permalink / raw
  To: gentoo-commits

commit:     4a203f22c223c0ad2c22c1e119f5cd8e475bb1cb
Author:     Devrin Talen <devrin <AT> fastmail <DOT> com>
AuthorDate: Fri Sep 13 19:36:31 2024 +0000
Commit:     Devrin Talen <devrin <AT> fastmail <DOT> com>
CommitDate: Fri Sep 13 19:52:29 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4a203f22

dev-python/system_hotkey: disable py3.8, py3.9

- Fixed broken test
  - Added virtualx eclass to test with a valid display
  - Added patch to fix Python compatibility issue
- Added missing dependencies to RDEPEND
- Added missing PYTHON_USEDEP to RDEPEND

Signed-off-by: Devrin Talen <devrin <AT> fastmail.com>

 ...system_hotkey-1.0.3-fix-collections-iterable.patch | 15 +++++++++++++++
 dev-python/system_hotkey/system_hotkey-1.0.3.ebuild   | 19 +++++++++++++++----
 2 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/dev-python/system_hotkey/files/system_hotkey-1.0.3-fix-collections-iterable.patch b/dev-python/system_hotkey/files/system_hotkey-1.0.3-fix-collections-iterable.patch
new file mode 100644
index 000000000..265c32a5f
--- /dev/null
+++ b/dev-python/system_hotkey/files/system_hotkey-1.0.3-fix-collections-iterable.patch
@@ -0,0 +1,15 @@
+system_hotkey was written for a previous version of Python that had
+collections.Iterable available. That moved under collections.abc in a
+later release.
+
+--- a/system_hotkey/system_hotkey.py
++++ b/system_hotkey/system_hotkey.py
+@@ -281,7 +281,7 @@ class MixIn():
+ 
+         thread safe
+         '''
+-        assert isinstance(hotkey, collections.Iterable) and type(hotkey) not in (str, bytes)
++        assert isinstance(hotkey, collections.abc.Iterable) and type(hotkey) not in (str, bytes)
+         if self.consumer == 'callback' and not callback:
+             raise TypeError('Function register requires callback argument in non sonsumer mode')
+ 

diff --git a/dev-python/system_hotkey/system_hotkey-1.0.3.ebuild b/dev-python/system_hotkey/system_hotkey-1.0.3.ebuild
index 1050af632..cfe6a5771 100644
--- a/dev-python/system_hotkey/system_hotkey-1.0.3.ebuild
+++ b/dev-python/system_hotkey/system_hotkey-1.0.3.ebuild
@@ -4,8 +4,8 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..13} )
-inherit distutils-r1
+PYTHON_COMPAT=( python3_{10..13} )
+inherit distutils-r1 virtualx
 
 DESCRIPTION="Multi-platform system-wide hotkeys"
 HOMEPAGE="https://github.com/timeyyy/system_hotkey"
@@ -17,6 +17,17 @@ SLOT="0"
 KEYWORDS="~amd64"
 
 # TODO this depends on xpybutil
-RDEPEND=">=dev-python/xcffib-1.5.0"
+RDEPEND=">=dev-python/xcffib-1.5.0[${PYTHON_USEDEP}]
+		 >=dev-python/xpybutil-0.0.6[${PYTHON_USEDEP}]
+		 >=dev-python/pytest-xvfb-3.0.0[${PYTHON_USEDEP}]"
 
-distutils_enable_tests unittest
+PATCHES=(
+	# Fix for unit test
+	"${FILESDIR}/${P}-fix-collections-iterable.patch"
+)
+
+distutils_enable_tests pytest
+
+src_test() {
+	virtx distutils-r1_src_test
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-13 19:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-13 19:53 [gentoo-commits] repo/proj/guru:dev commit in: dev-python/system_hotkey/files/, dev-python/system_hotkey/ Devrin Talen

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