This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Description
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.