Skip to content

Commit 62eec22

Browse files
committed
Make Reader and Writer stricter about their args. Use pathlib.Paths instead of os.path
1 parent 46fcefa commit 62eec22

4 files changed

Lines changed: 295 additions & 251 deletions

File tree

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,14 @@ part of your geospatial project.
9595

9696
## 3.0.9.dev
9797
### Bug fixes
98-
- BREAKING CHANGE. Reader now raises TypeError instead of failing silently (e.g. in anticipation
99-
of a subsequent call to Reader.load), when passed an unsupported truthy Python object (not a str
100-
or a Path) as its first arg (the positional-only, non-keyword arg).
98+
- Remove ambiguity in API (BREAKING CHANGE). Reader and Writer now both raise TypeError
99+
when passed a supported Shapefile target
100+
as the positional-only, non-keyword arg, but also passed kwargs for shp, dbf or shx (instead
101+
of silently dropping or overwriting those kwargs, with the user being none the wiser).
102+
- Bug fix (BREAKING CHANGE). Reader and Writer now raise TypeError instead of continuing silently
103+
as if given no args (e.g. in anticipation of a subsequent call to Reader.load), when passed an unsupported
104+
truthy Python object (not a str or a Path) as its first arg (the positional-only, non-keyword arg).
105+
101106
- BREAKING CHANGE. Correct NODATA lower threshold to -1e38 (as per [spec](https://www.esri.com/content/dam/esrisites/sitecore-archive/Files/Pdfs/library/whitepapers/pdfs/shapefile.pdf) 2, Numeric Types). This is 10% of
102107
PyShp's previous threshold -10e38, so it is possible large negative values x (-1e39 < x < -1e38 will now be NODATA.
103108

changelog.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
VERSION 3.0.9.dev
22

3+
2026-05-26
4+
Remove ambiguity in API (BREAKING CHANGE):
5+
* Reader and Writer now both raise TypeError when passed a supported Shapefile target
6+
as the positional-only, non-keyword arg, and also kwargs for shp, dbf or shx (instead
7+
of silently dropping or overwriting those kwargs, with the user being none the wiser).
38
2026-05-26
49
Bug fix (BREAKING CHANGE):
5-
* Reader now raises TypeError instead of failing silently (e.g. in anticipation of a subsequent call
6-
to Reader.load), when passed an unsupported truthy Python object (not a str or a Path) as its first
7-
arg (the positional-only, non-keyword arg).
10+
* Reader and Writer now raise TypeError instead of continuing silently, as if given no args
11+
(e.g. in anticipation of a subsequent call to Reader.load), when passed an unsupported
12+
truthy Python object (not a str or a Path) as its first arg (the positional-only, non-keyword arg).
813

914
2026-05-23
1015
Bug fix (BREAKING CHANGE):

0 commit comments

Comments
 (0)