GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Should PyShp drop support for Python 2, and Pythons earlier than 3.8? · GeospatialPython/pyshp · Discussion #290

Should PyShp drop support for Python 2, and Pythons earlier than 3.8? #290

Closed
JamesParrott started this conversation in General
Should PyShp drop support for Python 2, and Pythons earlier than 3.8? #290
@JamesParrott JamesParrott
Sep 14, 2024 · 9 comments · 3 replies
Return to top
Discussion options
  • Uh oh!

    There was an error while loading. Please reload this page.

  • Uh oh!

    There was an error while loading. Please reload this page.

JamesParrott
Sep 14, 2024
Collaborator

Following issue #276, PyShp users and contributors, please let us know below how dropping support for older Pythons would impact you, especially if there would be negative impacts.

Note, there is no proposal to yank PyShp versions that support older Pythons. So this will not break anything that installs PyShp from PyPi using the pip for that version of Python. This would effectively be a feature freeze, not a mandatory upgrade for users. Unsupported does not imply unavailable.

Pros:

  • Best practise for security. These Python versions are (or for 3.8 will soon be) no longer supported by the PSF. PyShp does process raw binary files, that could be maliciously constructed to contain anything.
  • Not a breaking change. Version pinning is not even required from users, if PyShp is installed with a dropped Python's pip.
  • Encourage more contributors, ensuring PyShp thrives as a healthy open source project, for the next 10 years. New contributors may prefer to write Python code using more recent, modern features, e.g. f-strings.
  • Eliminates a whole class of possible future bugs, and reduces the attack surface, improving security.
  • Facilitates a general tidy up of the code base, increasing readability.
  • Allows static type hints to be added.
  • Manage user expectations. I.e. in future, we contributors -may- still choose to fix Python 2 bugs. However, we contributors should not be expected to fix Python 2 bugs. The advice will be to upgrade Python and PyShp versions.
  • Reduces technical debt (allows deletion of the code that only runs in Python 2).

Cons:

  • It ain't broke, so don't fix it.
  • PyShp is one of the only libraries available that supports users running older Pythons - it's a USP!
  • Creates work.
  • Few users process arbitrary shapefiles from the wild. If they are running PyShp and Python 2 on their web server, they probably have much more important things they should worry about.

Proposed roadmap:

  1. Announce proposal. Gather feedback. Participate in this very discussion.
  2. October 2024, after Python 3.8 EOL. Release PyShp 2.4 with notice (deprecation warning if possible) that the upcoming 3.x releases will drop support for Python 2 and any Python below 3.8 (and changes for devs, e.g. Code formatter).
  3. On the main branch, remove support for pythons 2, 3.5, 3.6, 3.7 and 3.8.
  4. Release Pyshp 3.0 (support for Pythons >= 3.9 only).
  5. Allow X months for user feedback.
  6. Release 2.5, advertising PyShp 3, and announcing end of support for PyShp 2
  7. 2025-10 drop support for python 3.9
  8. 2026-10 drop support for python 3.10
  9. Thereafter, follow https://devguide.python.org/versions/
You must be logged in to vote
All reactions

Replies: 9 comments · 3 replies

Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

JamesParrott
Sep 14, 2024
Collaborator Author

I've reached out to all the other contributors, but couldn't otherwise contact you guys: @lgolston @lemonez @bva-bme @eumiro @midichef

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

  • Uh oh!

    There was an error while loading. Please reload this page.

JamesParrott
Sep 14, 2024
Collaborator Author

Also: @cwalv @atlefren

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

sebastic
Sep 14, 2024

The proposed changes don't affect the Debian package.

You must be logged in to vote
All reactions
  • 👍 2
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

schwehr
Sep 14, 2024

My main take is that dropping support for older versions reduces the maintenance burden for the main branch, which anyone needing support for older versions can do that in a branch.

Also, the addition of type annotations will make the library easier to use for many and possible catch some bugs in the process.

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

mwtoews
Sep 16, 2024

Generally, I don't think users of older/unsupported Python versions should expect maintenance from most packages. Previously published versions of packages are always available, so nothing is being taken away.

You must be logged in to vote
All reactions
  • 👍 1
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

dbotwinick
Jul 8, 2025

Adding a comment since I got a message about this today. All fine with me (as a user who has dependencies on pyshp). Any legacy stuff I have out there should still work with the older versions... and anything reasonably current is on at least python 3.10 right now (generally 3.11). I don't think staying in line with the Python release cycle is unreasonable given the 5yr life... and type hints, etc. are nice.

You must be logged in to vote
All reactions
  • 👍 3
2 replies
@cleder
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

cleder Jul 8, 2025

+1 the next version of fastkml will most likely also drop support for python versions < 3.9

All reactions
  • 👍 1
@bosth
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

  • Uh oh!

    There was an error while loading. Please reload this page.

bosth Jul 8, 2025

I was also contacted since plpygis uses pyshp (only for testing though), and I have no concerns about losing support for 3.8.

All reactions
  • 👍 1
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

  • Uh oh!

    There was an error while loading. Please reload this page.

JamesParrott
Jul 8, 2025
Collaborator Author

Thanks for the responses everyone. It's much appreciated.

I messaged the authors and maintainers of about 138 dependencies in total (including you three, Drew, Christian, and Benjamin). I will not be sending out any more messages, so (not that anyone has) there's no need to unsubscribe etc.

I wrote some code that tried to drop projects from the contact, that I could tell via the requires_python or Trove classifiers, had already themselves dropped Pythons <= 3.8. However I don't claim this code is foolproof, so my apologies to those who were emailed unnecessarily - you're already way ahead of us.

You must be logged in to vote
All reactions
  • 👍 2
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

mshumko
Jul 11, 2025

Hi @JamesParrott, I think that you're safe to drop Python <= 3.8. Since many of us use numpy, numpy==1.24.0, released on Dec 18, 2022, was the last version that supported python 3.8...

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

  • Uh oh!

    There was an error while loading. Please reload this page.

JamesParrott
Aug 3, 2025
Collaborator Author

I've just put out PyShp version 3.0.0, which drops Python 2 and Pythons <= 3.8. While adding type hints, I was able to find a few speed increases. There are some new Shape subclasses, but everything should still work with the old plain Shapes.

We ask for your patience while we complete the admin to get this latest version (and 2.4.1 & 2.4.0) on to PyPi.

You must be logged in to vote
All reactions
  • 👍 1
  • 🎉 1
1 reply
@schwehr
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

schwehr Aug 4, 2025

Thanks!

All reactions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
💬
General
Labels
None yet
8 participants
@JamesParrott @schwehr @mwtoews @cleder @bosth @sebastic @dbotwinick @mshumko
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.