gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / python-aionotify-0.2.0-py3.8.patch
1 Compatibility with Python 3.8, see upstream issue
2 https://github.com/rbarrois/aionotify/pull/15
3
4 diff --git a/setup.py b/setup.py
5 index 21a554f..094de64 100755
6 --- a/setup.py
7 +++ b/setup.py
8 @@ -40,7 +40,7 @@ setup(
9 setup_requires=[
10 ],
11 tests_require=[
12 - 'asynctest',
13 + 'asynctest; python_version<"3.8"',
14 ],
15 classifiers=[
16 "Development Status :: 4 - Beta",
17 diff --git a/tests/test_usage.py b/tests/test_usage.py
18 index f156291..0476ff1 100644
19 --- a/tests/test_usage.py
20 +++ b/tests/test_usage.py
21 @@ -8,7 +8,11 @@ import os.path
22 import tempfile
23 import unittest
24
25 -import asynctest
26 +try:
27 + testBase = unittest.IsolatedAsyncioTestCase
28 +except AttributeError:
29 + import asynctest
30 + testBase = asynctest.TestCase
31
32 import aionotify
33
34 @@ -25,11 +29,13 @@ if AIODEBUG:
35 TESTDIR = os.environ.get('AIOTESTDIR') or os.path.join(os.path.dirname(__file__), 'testevents')
36
37
38 -class AIONotifyTestCase(asynctest.TestCase):
39 +class AIONotifyTestCase(testBase):
40 forbid_get_event_loop = True
41 timeout = 3
42
43 def setUp(self):
44 + if not getattr (self, 'loop', None):
45 + self.loop = asyncio.get_event_loop()
46 if AIODEBUG:
47 self.loop.set_debug(True)
48 self.watcher = aionotify.Watcher()