Skip to content

Commit

Permalink
Add draft user warning
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesParrott committed Sep 20, 2024
1 parent 7fbbd8e commit 6ebdac0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions shapefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
import os
import sys
import tempfile
import textwrap
import time
import warnings
import zipfile
from datetime import date
from struct import Struct, calcsize, error, pack, unpack
Expand Down Expand Up @@ -93,6 +95,27 @@
from urllib2 import HTTPError, Request, urlopen
from urlparse import urlparse, urlunparse

if sys.version_info < (3, 9):
warnings.showwarning(
textwrap.dedent("""\
Warning!
The PyShp developers propose to drop support for Pythons 3.8 and earlier, including Python 2.
Thereafter, Python version support will follow the official Python release
cycle: https://devguide.python.org/versions/. This will make Python 3.9 the earliest
supported version until October 2025.
The reasoning behind this is available in the following discussion:
https://github.com/GeospatialPython/pyshp/discussions/290
Please post any feedback there.
Many thanks,
"""),
category=UserWarning,
filename=__name__,
lineno=99,
)


# Helpers

Expand Down

0 comments on commit 6ebdac0

Please sign in to comment.