rasterio / affine

Affine transformation matrices
https://affine.readthedocs.io/en/latest/index.html
BSD 3-Clause "New" or "Revised" License
159 stars 28 forks source link

Require Python >=3.7, minor pyupgrade changes #96

Closed mwtoews closed 1 year ago

mwtoews commented 1 year ago

Affine 2.4b1 can be installed in Python 2, since the file affine-2.4b1-py2.py3-none-any.whl implies py2 compatibility, but does not "run" after installed:

$ python2 -c "import affine"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/py27/lib/python2.7/site-packages/affine/__init__.py", line 44
    EPSILON: float = 1e-5
           ^
SyntaxError: invalid syntax

this PR limits it to Python 3.7, which is the minimum version tested in CI. There are no technical limitations why affine wouldn't work with earlier Python 3 releases, but there is no guarantee.

Two other minor changes: