Skip to content

[2.0] Remove shapely.geos.lgeos ctypes interface to GEOS#1163

Merged
jorisvandenbossche merged 1 commit intoshapely:shapely-2.0from
jorisvandenbossche:refactor-remove-lgeos
Oct 27, 2021
Merged

[2.0] Remove shapely.geos.lgeos ctypes interface to GEOS#1163
jorisvandenbossche merged 1 commit intoshapely:shapely-2.0from
jorisvandenbossche:refactor-remove-lgeos

Conversation

@jorisvandenbossche
Copy link
Copy Markdown
Member

@jorisvandenbossche jorisvandenbossche commented Jul 7, 2021

This is on top of #1161 and #1162 (tests will fail here until both of those are merged).

This removes the content shapely/geos.py and shapely/ctypes_declarations.py.
The shapely.geos module is kept for now just for the geos_version(_string) variables (we should discuss whether we want to keep them long term in a geos submodule or move them top-level as we have in pygeos, but I think that's something we can see later).

@jorisvandenbossche
Copy link
Copy Markdown
Member Author

I updated this PR now the last PRs that were removing usages of the ctypes interface are merged.

@coveralls
Copy link
Copy Markdown

coveralls commented Sep 30, 2021

Coverage Status

Coverage increased (+1.4%) to 78.4% when pulling 2b34edd on jorisvandenbossche:refactor-remove-lgeos into fbfb2f4 on Toblerity:shapely-2.0.

Copy link
Copy Markdown
Member

@mwtoews mwtoews left a comment

Choose a reason for hiding this comment

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

Good clean-up of imports, and obviously a nice clear-out of core ctypes-related modules.

There are a few remaining "ctypes" lurking around (git grep -i ctypes), but not in the package or test suite. These will get cleaned up when we revise the repo structure and docs.

As for shapely.geos, agree to keep it for now, and discuss its fate next (i.e. keep, deprecate, etc.).

@sgillies
Copy link
Copy Markdown
Contributor

So long, ctypes!

This was really a perfect storm of trouble. Subtle differences between the way libraries are loaded on different platforms, our dynamic language's lack of guardrails against loading different versions of the same C lib, and what are, I am convinced, defects in the GEOS library. It's nice to look forward to having less of this trouble. I would still like to someday understand exactly what was going wrong.

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.

4 participants