pypi / pygeohash
pygeohash
What changed in pygeohash 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-25.
8 breaking1 security7 performance1 tooling13 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initpygeohash 330 changes
Breaking changes 8
The C decoder returns named tuples directly from decode() and decode_exactly(), changing the decoder results.
Type predicates reject empty Pandas Series.
Validates coordinate ordering and world bounds instead of silently returning empty results, and rejects boolean coordinates.
Rejects booleans in the direct C encoder API.
Rejects bare geohash strings as collection input.
Rejects boolean values for coordinates and precision.
Rejects non-string values when detecting geohash Series.
C encoders reject non-finite coordinates.
Security 1
C encode functions validate precision to prevent stack buffer overflow.
Performance 7
The C codec uses table-driven decoding and a pair-unrolled encoding core.
C decode entry points use FASTCALL and C-level case folding.
Derived bounding box construction is faster.
Wrapper validation has a faster common-case path.
Cell enumeration uses an interval walk.
Validation has a fast path and get_adjacent uses an iterative implementation.
Keeps optional imports lazy.
Tooling 1
The package ships the PEP 561 marker, enabling type checkers to recognize its typing information.
Fixes and other changes 13
Native decoder stubs are aligned with named-tuple results.
Uses canonical validation for approximate distance.
Cardinal selectors return the original geohashes.
Accepts uppercase and mixed-case geohashes and rejects over-precision geohashes.
Clamps generated viewport bounds to world bounds.
Computes mean longitude as a circular mean.
Correctly includes cells at box corners.
Correctly finds east/west neighbors across the antimeridian.
Validates the geohash and direction arguments.
Logging helpers emit records and register undoubled logger names.
Validates empty visualization collections.
Identical geohashes now return zero approximate distance.
Bounding-box enumeration stays within geographic limits.