summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/eventlet')
-rw-r--r--dev-python/eventlet/Manifest2
-rw-r--r--dev-python/eventlet/eventlet-0.30.0.ebuild (renamed from dev-python/eventlet/eventlet-0.29.1.ebuild)7
-rw-r--r--dev-python/eventlet/files/eventlet-0.29.1-tests.patch71
-rw-r--r--dev-python/eventlet/files/eventlet-0.30.0-tests-socket.patch13
4 files changed, 18 insertions, 75 deletions
diff --git a/dev-python/eventlet/Manifest b/dev-python/eventlet/Manifest
index 9ba86992d664..d60a7b85c864 100644
--- a/dev-python/eventlet/Manifest
+++ b/dev-python/eventlet/Manifest
@@ -1,2 +1,2 @@
DIST eventlet-0.26.1.tar.gz 398200 BLAKE2B f14024d0825fb5530929766c63dceea7446057d9ad5dfb98ab013e96cab9b0eef5440f2d4d7ceeef17691c8a2a9055cac2b93fb23653a6facba4967c4e7cb0b3 SHA512 55b9b214130d0482ea005ea570a5aa3eafdf66e6d315a95c5ba60186a2d9a9df5c2638c86d886968954ce39e5ac2153e1f9e11631e6aef237078c3776af7d6c5
-DIST eventlet-0.29.1.tar.gz 400673 BLAKE2B 2b317e0c445a7b9c7f96147c033b1a6b4b4d27eeaebe0d40102b4e25d7825861db15e9d77cf6c9e6795e1bc946b1a613d5bb4ffa60a7077c39d575f01bdd8506 SHA512 194544e8fafeb0847673abd84c8fbc876bb407bb76cb86c5a8a92fdb7571d3585e895f0063375e43b74de81b47e49cd6002f5b7a4f266d37bacc1b23e9ce4ef3
+DIST eventlet-0.30.0.tar.gz 401035 BLAKE2B 94a272ce810b28c00fc8a468f160e38f3c58c98750455e5eb096c266c46257a7e30e0278a6a8f509e47e6ab40297129ccf52b347a723037f9cc9b85a3e06a203 SHA512 c2ba283063333e9e74536dcda33276f98f74051ea0e9c8669506d2e3b11715f37cd5963af6130f14761a42cc6c8346e59c756efe2cef0ea3547dc30ccb8bf0fb
diff --git a/dev-python/eventlet/eventlet-0.29.1.ebuild b/dev-python/eventlet/eventlet-0.30.0.ebuild
index c1a6a203dce2..bce0a6cda427 100644
--- a/dev-python/eventlet/eventlet-0.29.1.ebuild
+++ b/dev-python/eventlet/eventlet-0.30.0.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_9 )
+PYTHON_COMPAT=( python3_{6,7,8,9} )
inherit distutils-r1
DESCRIPTION="Highly concurrent networking library"
@@ -27,8 +27,8 @@ DEPEND="doc? ( >=dev-python/python-docs-2.7.6-r1:2.7 )
dev-python/nose[${PYTHON_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/eventlet-0.25.1-tests.patch"
- "${FILESDIR}/${P}-tests.patch"
+ "${FILESDIR}/${PN}-0.25.1-tests.patch"
+ "${FILESDIR}/${PN}-0.30.0-tests-socket.patch"
)
distutils_enable_sphinx doc
@@ -51,6 +51,7 @@ python_prepare_all() {
python_test() {
unset PYTHONPATH
+ export TMPDIR="${T}"
nosetests -v || die
}
diff --git a/dev-python/eventlet/files/eventlet-0.29.1-tests.patch b/dev-python/eventlet/files/eventlet-0.29.1-tests.patch
deleted file mode 100644
index 3cd20823899d..000000000000
--- a/dev-python/eventlet/files/eventlet-0.29.1-tests.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-https://github.com/eventlet/eventlet/issues/646
-From 087ba743c7af8a40ac1e4e2ec89409eee3b4233e Mon Sep 17 00:00:00 2001
-From: Tim Burke <tim.burke@gmail.com>
-Date: Mon, 2 Nov 2020 16:09:46 -0800
-Subject: [PATCH] py39: Add _at_fork_reinit method to Semaphores
-
-CPython expects to be able to call such a method on RLocks, Conditions,
-and Events in threading; since we may monkey-patch threading to use
-Semaphores as locks, they need the method, too.
-
-Addresses #646
----
- eventlet/semaphore.py | 5 +++++
- tests/semaphore_test.py | 21 +++++++++++++++++++++
- 2 files changed, 26 insertions(+)
-
-diff --git a/eventlet/semaphore.py b/eventlet/semaphore.py
-index 18b5b05f4..5e2b5e32f 100644
---- a/eventlet/semaphore.py
-+++ b/eventlet/semaphore.py
-@@ -39,6 +39,7 @@ def __init__(self, value=1):
- if value < 0:
- msg = 'Semaphore() expect value >= 0, actual: {0}'.format(repr(value))
- raise ValueError(msg)
-+ self._original_value = value
- self.counter = value
- self._waiters = collections.deque()
-
-@@ -51,6 +52,10 @@ def __str__(self):
- params = (self.__class__.__name__, self.counter, len(self._waiters))
- return '<%s c=%s _w[%s]>' % params
-
-+ def _at_fork_reinit(self):
-+ self.counter = self._original_value
-+ self._waiters.clear()
-+
- def locked(self):
- """Returns true if a call to acquire would block.
- """
-diff --git a/tests/semaphore_test.py b/tests/semaphore_test.py
-index d6c11d1f6..cf6a29daf 100644
---- a/tests/semaphore_test.py
-+++ b/tests/semaphore_test.py
-@@ -42,6 +42,27 @@ def test_timeout_non_blocking(self):
- sem = eventlet.Semaphore()
- self.assertRaises(ValueError, sem.acquire, blocking=False, timeout=1)
-
-+ def test_reinit(self):
-+ # py39+ expects locks to have a _at_fork_reinit() method; since we
-+ # patch in Semaphores in eventlet.green.thread, they need it, too
-+ sem = eventlet.Semaphore()
-+ sem.acquire()
-+ sem._at_fork_reinit()
-+ self.assertEqual(sem.acquire(blocking=False), True)
-+ self.assertEqual(sem.acquire(blocking=False), False)
-+
-+ sem = eventlet.Semaphore(0)
-+ sem.release()
-+ sem._at_fork_reinit()
-+ self.assertEqual(sem.acquire(blocking=False), False)
-+
-+ sem = eventlet.Semaphore(2)
-+ sem.acquire()
-+ sem._at_fork_reinit()
-+ self.assertEqual(sem.acquire(blocking=False), True)
-+ self.assertEqual(sem.acquire(blocking=False), True)
-+ self.assertEqual(sem.acquire(blocking=False), False)
-+
-
- def test_semaphore_contention():
- g_mutex = eventlet.Semaphore()
diff --git a/dev-python/eventlet/files/eventlet-0.30.0-tests-socket.patch b/dev-python/eventlet/files/eventlet-0.30.0-tests-socket.patch
new file mode 100644
index 000000000000..4dd309c68a38
--- /dev/null
+++ b/dev-python/eventlet/files/eventlet-0.30.0-tests-socket.patch
@@ -0,0 +1,13 @@
+Let's use TMPDIR as the base for this test's unix socket to help it pass.
+We set TMPDIR in the ebuild to ${T}.
+--- a/tests/backdoor_test.py
++++ b/tests/backdoor_test.py
+@@ -47,7 +47,7 @@ class BackdoorTest(tests.LimitedTestCase):
+ self._run_test_on_client_and_server(client, serv)
+
+ def test_server_on_unix_socket(self):
+- SOCKET_PATH = '/tmp/eventlet_backdoor_test.socket'
++ SOCKET_PATH = os.getenv('TMPDIR', '/tmp') + '/eventlet_backdoor_test.socket'
+ if os.path.exists(SOCKET_PATH):
+ os.unlink(SOCKET_PATH)
+ listener = socket.socket(socket.AF_UNIX)