Explorar o código

Fix gevent import (#4754)

`GreenletExit` is not in `__all__` in greenlet.py which can not be imported by Python 3.6.
Hsiaoming Yang %!s(int64=6) %!d(string=hai) anos
pai
achega
022f447dd1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      celery/concurrency/gevent.py

+ 1 - 1
celery/concurrency/gevent.py

@@ -34,7 +34,7 @@ def apply_timeout(target, args=(), kwargs={}, callback=None,
 class Timer(_timer.Timer):
 
     def __init__(self, *args, **kwargs):
-        from gevent.greenlet import Greenlet, GreenletExit
+        from gevent import Greenlet, GreenletExit
 
         class _Greenlet(Greenlet):
             cancel = Greenlet.kill