unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob ebeef34720adf27fe7300ac166721324a9120c54 1275 bytes (raw)
name: gnu/packages/patches/python-aionotify-0.2.0-py3.8.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
 
Compatibility with Python 3.8, see upstream issue
https://github.com/rbarrois/aionotify/pull/15

diff --git a/setup.py b/setup.py
index 21a554f..094de64 100755
--- a/setup.py
+++ b/setup.py
@@ -40,7 +40,7 @@ setup(
     setup_requires=[
     ],
     tests_require=[
-        'asynctest',
+        'asynctest; python_version<"3.8"',
     ],
     classifiers=[
         "Development Status :: 4 - Beta",
diff --git a/tests/test_usage.py b/tests/test_usage.py
index f156291..0476ff1 100644
--- a/tests/test_usage.py
+++ b/tests/test_usage.py
@@ -8,7 +8,11 @@ import os.path
 import tempfile
 import unittest
 
-import asynctest
+try:
+    testBase = unittest.IsolatedAsyncioTestCase
+except AttributeError:
+    import asynctest
+    testBase = asynctest.TestCase
 
 import aionotify
 
@@ -25,11 +29,13 @@ if AIODEBUG:
 TESTDIR = os.environ.get('AIOTESTDIR') or os.path.join(os.path.dirname(__file__), 'testevents')
 
 
-class AIONotifyTestCase(asynctest.TestCase):
+class AIONotifyTestCase(testBase):
     forbid_get_event_loop = True
     timeout = 3
 
     def setUp(self):
+        if not getattr (self, 'loop', None):
+            self.loop = asyncio.get_event_loop()
         if AIODEBUG:
             self.loop.set_debug(True)
         self.watcher = aionotify.Watcher()

debug log:

solving ebeef34720 ...
found ebeef34720 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).