Skip to content

Commit

Permalink
Send warning message to logger as well
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesParrott committed Sep 20, 2024
1 parent 3722683 commit 3063d27
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions shapefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,26 @@
from urlparse import urlparse, urlunparse

if sys.version_info < (3, 9):
warnings.showwarning(
textwrap.dedent("""\
message = textwrap.dedent("""\
Warning!
The PyShp developers propose to drop support for Pythons 3.8 and earlier, including Python 2.
It is proposed 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.
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:
For more information, and to send the developers your feedback please
see the following discussion:
https://github.com/GeospatialPython/pyshp/discussions/290
Please post any feedback there.
Many thanks,
"""),
""")
logger.warning(message)
warnings.showwarning(
message,
category=UserWarning,
filename=__name__,
lineno=99,
lineno=115,
)


Expand Down

0 comments on commit 3063d27

Please sign in to comment.