spotify / luigi

Luigi is a Python module that helps you build complex pipelines of batch jobs. It handles dependency resolution, workflow management, visualization etc. It also comes with Hadoop support built in.
Apache License 2.0
17.71k stars 2.39k forks source link

Bug-Report: Tenacity 8.4.0 #3292

Closed AlexanderHeidelbach closed 2 months ago

AlexanderHeidelbach commented 3 months ago

Dear Devs,

The tenacity package just released the version 8.4.0. Unfortunately, this update brakes the luigi import most likely due to an API change of tenacity. More specifically, the error occurs when importing the rpc module. Please find below the traceback. Judging by the description this only happens for python>3.8. python==3.6 still installs tenacity==8.2.2

>>> import luigi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<path_python>/lib64/python3.9/site-packages/luigi/__init__.py", line 34, in <module>
    from luigi import rpc
  File "<path_python>/lib64/python3.9/site-packages/luigi/rpc.py", line 33, in <module>
    from tenacity import Retrying, wait_fixed, stop_after_attempt
  File "<path_python>/lib64/python3.9/site-packages/tenacity/__init__.py", line 653, in <module>
    from tenacity.asyncio import AsyncRetrying  # noqa:E402,I100
ModuleNotFoundError: No module named 'tenacity.asyncio'
JosephP91 commented 3 months ago

Same error here. Manually forcing tenacity==8.2.2 (using luigi==3.5.0) in requirements file for my project, temporary solves the issue

ztime commented 3 months ago

Same error, setting tenacity<8.4.0 was a temporary solve

AlexanderHeidelbach commented 3 months ago

The issue is also now reported in tenacity itself. https://github.com/jd/tenacity/issues/471

AlexanderHeidelbach commented 2 months ago

Fixed by https://github.com/jd/tenacity/releases/tag/8.4.1