소스 검색

Fix gevent import (#4754)

`GreenletExit` is not in `__all__` in greenlet.py which can not be imported by Python 3.6.
Hsiaoming Yang 6 년 전
부모
커밋
022f447dd1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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