Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,13 @@ part of your geospatial project.

# Version Changes

## Next

## 3.0.3.dev
### Bug fix
- Prevented UnboundLocalError when reading non-single point M and Z type Shapefiles (@ekawas-vrify).

### Testing.
- Test PyShp on the Python 3.14 official release (officially released this week, no longer in beta)
- Test PyShp on the Python 3.14 official release (officially released this week, no longer in beta).

## 3.0.2

Expand Down Expand Up @@ -1572,6 +1575,7 @@ Casey Meisenzahl
Charles Arnold
David A. Riggs
davidh-ssec
Edward Kawas
Evan Heidtmann
ezcitron
fiveham
Expand Down
6 changes: 5 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
VERSION NEXT
VERSION 3.0.3.dev

2025-10-25
Bug fix:
* Prevented UnboundLocalError when reading non-single point M and Z type Shapefiles (@ekawas-vrify).

2025-10-10
Testing:
Expand Down
5 changes: 3 additions & 2 deletions src/shapefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from __future__ import annotations

__version__ = "3.0.3.dev0"
__version__ = "3.0.3.dev"

import array
import doctest
Expand Down Expand Up @@ -1492,7 +1492,8 @@ class _HasM(_CanHaveBBox):
@staticmethod
def _read_ms_from_byte_stream(
b_io: ReadSeekableBinStream, nPoints: int, next_shape: int
) -> tuple[MBox, list[float | None]]:
) -> tuple[MBox | None, list[float | None]]:
mbox = None # Ensure mbox is always defined
if next_shape - b_io.tell() >= 16:
mbox = unpack("<2d", b_io.read(16))
# Measure values less than -10e38 are nodata values according to the spec
Expand Down
Loading