Toblerity / Fiona

Fiona reads and writes geographic data files
https://fiona.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.14k stars 202 forks source link

Python 3.7 incompatibility seen in 1.9.5 #1325

Closed bartoli closed 7 months ago

bartoli commented 7 months ago

This is on 1.9.5 version, installed by pip of python 3.7.

in init.py:65, there is a call to os.add_dll_directory(), which was added in 3.8 only. That call (and the one on line 60) should have the same kind of version check done before the call of line 34

EDIT: the base repo does not have the check i mention on line 34, but on the pypi wheel version, there is a _delvewheel_patch_1_5_1 method that properly checks python version before calling add_dll_directory

sgillies commented 7 months ago

@bartoli thanks for the report. Yes, the use of add_dll_directory() contradicts the project's stated support for Python 3.7. I hope this isn't causing you difficulty. If it is, I'm sorry. This project needed to use that call to work properly on Windows.

As Python 3.7 is now end-of-life https://devguide.python.org/versions/, I won't make a change to the 1.9 version.

arobrien commented 6 months ago

I hit this same issue. Unfortunately I rely on software which requires 3.7 in some cases.

I agree that no real fix is needed (yanking the releases seems a bit extreme), but I believe that the minimum version should be changed in classifiers and requires-python in pyproject.toml, at least for the next version.

bartoli commented 6 months ago

@arobrien you can work around it using the pypi version. In there, init.py starts by a workaround to load the libs differently that works in python 3.7. Then you can just disable the block on lines 57:65 that calls the add_dll_directory, as the added code already manually loaded the libs