Skip to content

Pickle serialization#66

Merged
mindflayer merged 3 commits into
mainfrom
pickle-serialization
Jun 8, 2026
Merged

Pickle serialization#66
mindflayer merged 3 commits into
mainfrom
pickle-serialization

Conversation

@mindflayer

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 8, 2026 13:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds pickle support for core geometry objects by implementing __reduce__-based serialization (primarily via WKB), plus a couple of Shapely-compatibility additions (LineString boundary + Ring __geo_interface__) and accompanying tests.

Changes:

  • Implemented __reduce__ for Geometry, Point, Ring, Line, and Poly (with helpers to preserve class on restore).
  • Added Line.boundary (endpoints as MultiPoint, empty for closed lines) and Ring.__geo_interface__.
  • Added pytest coverage for pickle roundtrips (including spawn-based multiprocessing) and boundary/geo-interface behavior; bumped project version.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
togo.pyx Adds restore helpers and __reduce__ methods for pickling; adds Line.boundary and Ring.__geo_interface__ for compatibility.
tests/test_pickle_boundary_compat.py New tests validating pickle roundtrip correctness (including process spawn) and Shapely-compat behavior.
pyproject.toml Version bump to 0.4.4.

Comment thread togo.pyx Outdated
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@mindflayer mindflayer merged commit ab591f5 into main Jun 8, 2026
7 checks passed
@mindflayer mindflayer deleted the pickle-serialization branch June 8, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants