v7labs / darwin-py

Library and commandline tool for managing datasets on darwin.v7labs.com
MIT License
115 stars 42 forks source link

ModuleNotFoundError: No module named 'tenacity.asyncio' #867

Closed rob-safi closed 3 months ago

rob-safi commented 3 months ago

After updating to darwin-py==0.8.62 I get the following error:

  File "/home/robin/safi/remote-inspection/.venv/lib/python3.10/site-packages/darwin/__init__.py", line 4, in <module>
    from .client import Client  # noqa
  File "/home/robin/safi/remote-inspection/.venv/lib/python3.10/site-packages/darwin/client.py", line 14, in <module>
    from darwin.backend_v2 import BackendV2
  File "/home/robin/safi/remote-inspection/.venv/lib/python3.10/site-packages/darwin/backend_v2.py", line 6, in <module>
    from tenacity import RetryCallState, retry, stop_after_attempt, wait_exponential_jitter
  File "/home/robin/safi/remote-inspection/.venv/lib/python3.10/site-packages/tenacity/__init__.py", line 653, in <module>
    from tenacity.asyncio import AsyncRetrying  # noqa:E402,I100
ModuleNotFoundError: No module named 'tenacity.asyncio'

with tenacity==8.4.0

linear[bot] commented 3 months ago

DAR-2624 ModuleNotFoundError: No module named 'tenacity.asyncio'

rob-safi commented 3 months ago

Usinge tenacity==8.3.0 works

JBWilkie commented 3 months ago

Hi @rob-safi! Thanks for raising this. This was due to an issue with the latest version of the tenacity library (8.4.0) which was released this morning and added as a dependency to darwin-py in 0.8.62: https://github.com/jd/tenacity/issues/471

The issue has since been patched in 8.4.1, which if you attempt to re-install darwin-py==0.8.62, will now be installed, avoiding the issue

To prevent this from happening again, in the DAR-2640 branch we've locked tenacity to 8.3.0. This will be included in the next release of darwin-py