Skip to content

Don't use f'' strings for Python 3.<6 support

https://github.com/jaraco/path.py/issues/150 led me to this

According to https://importlib-metadata.readthedocs.io/en/latest/ importlib_metadata is supposed to be compatible with Python 3.4 and 3.5, but importing in those Python versions results in:

>>> import importlib_metadata
Traceback (most recent call last):
...
  File "C:\Users\userz\Projects\importlib\metadata\importlib_metadata\_py3.py", line 49
    and re.match(rf'{name}(-.*)?\.(dist|egg)-info', str(item.name))
                                                 ^
SyntaxError: invalid syntax

Since f-strings are only supported in Python 3.6+ (https://www.python.org/dev/peps/pep-0498/)

Merge request reports