Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.1.1 breaks compatibility with python 3.7 #166

Closed
mivds opened this issue Jun 8, 2022 · 2 comments
Closed

v2.1.1 breaks compatibility with python 3.7 #166

mivds opened this issue Jun 8, 2022 · 2 comments

Comments

@mivds
Copy link

mivds commented Jun 8, 2022

Using the v2.1.1 release with python 3.7, I encounter a ModuleNotFoundError for importlib.metadata.
Logs (using docker in a python 3.7 container):

root@0420c51e5679:/# pip install backoff
Collecting backoff
  Downloading backoff-2.1.1-py3-none-any.whl (14 kB)
Installing collected packages: backoff
Successfully installed backoff-2.1.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.2.4; however, version 22.1.2 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
root@0420c51e5679:/# python3
Python 3.7.12 (default, Feb  8 2022, 05:37:08)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import backoff
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/backoff/__init__.py", line 15, in <module>
    import importlib.metadata
ModuleNotFoundError: No module named 'importlib.metadata'
>>>

Steps to reproduce:

docker run --rm -it python:3.7 bash
# pip install backoff
# python3
>>> import backoff

As far as I can tell, this was introduced in 596a295. v2.1.0 does not seem to be impacted by this issue.

@bgreen-litl
Copy link
Member

Thanks for the report. Fixed in backoff 2.1.2

@mivds
Copy link
Author

mivds commented Jun 8, 2022

No problem, thanks for the quick fix!

If you'd still want to pursue a dynamic version number for future releases, it should possible by using the importlib-metadata package for python 3.7. I believe it's included in the standard library from 3.8 onwards as mentioned on that page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants