GeospatialPython / pyshp

This library reads and writes ESRI Shapefiles in pure Python.
MIT License
1.09k stars 259 forks source link

Time for a 2.4 release? #276

Closed schwehr closed 12 hours ago

schwehr commented 3 weeks ago

Describe the feature request

With #275, pyshp no longer supports end-of-life python versions. That probably warrants a 2.4 release. It doesn't change the API, so going to 3.0 is probably not needed.

Contributions

schwehr commented 1 week ago

From email discussions:

Maybe something like this. By making a branch with continued python 2 support, the project could probably avoid a wait period.

  1. Do version independent cleanup
  2. Drop support for python 3.5 and 3.6. They are hard to support today
  3. Release 2.4 with notice that the upcoming 3.x releases will not have python 2 support.
  4. Make a pyshp 2 branch. If users want continued python 2 support, they can do pull requests on this
  5. On the main branch, remove support for python 2
  6. Release pyshp 3.0
  7. Drop support for python 3.7
  8. 2024-10 drop support for python 3.8
  9. 2025-10 drop support for python 3.9
  10. 2026-10 drop support for python 3.10
  11. etc. following https://devguide.python.org/versions/

If anyone needs support for older python versions, then make a branch at the last release of pyshp with that version and let work on that branch progress as needed. So if changes need to happen for python 2 in the future, work on the pyshp 2 branch and do a 2.4.1 or 2.5 release etc.

JamesParrott commented 6 days ago

Following those same email discussions, and on reflection, I've changed my mind and now support dropping Python <=3.7 for the following reasons:

i) to encourage new contributors who may only be familiar with modern Pythons, for the long term health of PyShp. ii) older pips will still install Python 2 compatible versions from PyPi until they're yanked (this only ceases development on Python 2 and <= 3.7 compatible PyShp versions. It doesn't break them). iii) Emphasise to PyShp users (especially those processing arbitrary shapefiles), that security fixes for unsupported Python versions are not guaranteed. The standard advice to PyShp users for whom security is important, is to upgrade.

Python 3.8's end of life is three weeks tomorrow. So if this is accepted, by the time this hits the main PyShp branch, Python 3.8 could be dropped too by the same reasoning, so work might as well focus on Python >= 3.9.

I'll allow a month or two to gather objections, both from users and my co-maintainers. In the meantime, I invite anyone else who wants to work on Python 3 only code, to submit PRs targeting the 3.0 branch:

https://github.com/GeospatialPython/pyshp/tree/3.0-dev-drop-Pythons-below-3.9

JamesParrott commented 12 hours ago

I've started a discussion on dropping older Python versions, and will reach out to PyShp's contributors, inviting them to comment.