From 36adbb22e41d3d0f30ed62fd16be70a2f6c31022 Mon Sep 17 00:00:00 2001 From: James Parrott <80779630+JamesParrott@users.noreply.github.com> Date: Sat, 7 Nov 2026 09:22:54 +0000 Subject: [PATCH] v3.1.7 (bug fix) --- README.md | 17 ++++++++++------- changelog.txt | 4 ++++ src/shapefile.py | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5f7d188..b5dbd8e 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ The Python Shapefile Library (PyShp) reads and writes ESRI Shapefiles in pure Py - **Author**: [Joel Lawhead](https://github.com/GeospatialPython) - **Maintainers**: [James Parrott](https://github.com/JamesParrott) & [Karim Bahgat](https://github.com/karimbahgat) -- **Version**: 3.1.7.dev -- **Date**: 6th Nov 2026 +- **Version**: 3.1.7 +- **Date**: 7th Nov 2026 - **License**: [MIT](https://github.com/GeospatialPython/pyshp/blob/master/LICENSE.TXT) ## Contents @@ -93,15 +93,14 @@ part of your geospatial project. # Recent version Changes See also the Older Version Changes section below +## 3.1.7 +### Bug fix + - Non-positive .shp record lengths (@lunnuyenhi-dev) and mismatched shape types now raise CorruptShpShapeRecord instead of hanging forever, raising a KeyError, or passing silently. + ## 3.1.6 ### Feature - Encodings can now be read from .cpg files (and optionally written to them). -## 3.1.5 -### Bug fix - - Fixed another bug causing dates before the year 1000 to be encoded as less than 8 chars under "%Y%m%d (found by [Thomas Beierlein](https://github.com/GeospatialPython/pyshp/issues/435)) - - # The Basics @@ -1514,6 +1513,10 @@ Zac Miller # Older version changes +## 3.1.5 +### Bug fix + - Fixed another bug causing dates before the year 1000 to be encoded as less than 8 chars under "%Y%m%d (found by [Thomas Beierlein](https://github.com/GeospatialPython/pyshp/issues/435)) + ## 3.1.4 ### Bug fix - Fix bug causing dates supplied as length 8 strings of digits to be encoded by the custom encoding, not ascii. diff --git a/changelog.txt b/changelog.txt index 74df818..9416a46 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +VERSION 3.1.7 +2026-11-07 + * Improved handling of corrupt .shp record headers [@lunnuyenhi-dev] (see [issue 453](https://github.com/GeospatialPython/pyshp/issues/453)) + VERSION 3.1.6 2026-07-25 * Encodings can now be read from .cpg files (and optionally written to them). diff --git a/src/shapefile.py b/src/shapefile.py index b33bc15..e307204 100644 --- a/src/shapefile.py +++ b/src/shapefile.py @@ -8,7 +8,7 @@ from __future__ import annotations -__version__ = "3.1.6" +__version__ = "3.1.7" import abc import array