Skip to content

Shapely-like force_2d plus more segfault-related hardening#65

Merged
mindflayer merged 5 commits into
mainfrom
segfault-tackling
Jun 8, 2026
Merged

Shapely-like force_2d plus more segfault-related hardening#65
mindflayer merged 5 commits into
mainfrom
segfault-tackling

Conversation

@mindflayer

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 8, 2026 10:15

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

This PR continues the project’s segfault/memory-safety hardening by adding explicit initialization checks to several Geometry accessors/predicates, introducing a GEOS-backed binary union() overlay operation, and adding regression tests + documentation updates around these safety guarantees.

Changes:

  • Added _ensure_initialized() / _ensure_overlay_safe() guards and applied them to several Shapely-compatible accessors and overlay/predicate entrypoints.
  • Implemented GEOS-backed Geometry.union() plus convenience union() APIs on geometry wrapper classes and at module level.
  • Added regression tests for overlay safety and updated README/version/pre-commit config.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
togo.pyx Adds initialization/overlay safety checks and implements GEOS-backed union() across Geometry APIs.
tests/test_overlay_safety.py Adds regression tests for uninitialized/empty-geometry safety and union behavior.
README.md Updates docs/examples for union and describes the new managed-exception behavior.
pyproject.toml Bumps project version to 0.4.3.
.pre-commit-config.yaml Updates hook revisions (one revision appears invalid).

Comment thread togo.pyx Outdated
Comment thread README.md
@mindflayer mindflayer changed the title More segfault-related hardening Shapely-like force_2d plus more segfault-related hardening Jun 8, 2026
@mindflayer mindflayer requested a review from Copilot June 8, 2026 11:13

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.

Comment thread togo.pyx Outdated
Comment thread togo.pyx
Comment thread togo.pyx
Comment thread togo.pyx Outdated
Comment thread togo.pyx Outdated
Comment thread togo.pyx Outdated
Comment thread togo.pyx Outdated
Comment thread README.md Outdated
@mindflayer mindflayer merged commit ce23df7 into main Jun 8, 2026
7 checks passed
@mindflayer mindflayer deleted the segfault-tackling branch June 8, 2026 11:40
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.

3 participants