-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add compatibility with shapely>=1.7 #1755
Add compatibility with shapely>=1.7 #1755
Conversation
This pull request has been linked to Shortcut Story #279134: CARTOFrames not working with 'shapely' 2.0.0 version. |
5222eb6
to
bb9c3b5
Compare
It seems this comes from geopandas/geopandas#2622 (more context here shapely/shapely#928) I have added the <2.0 limit and it works OK. I also moved the markupsafe dependency to the setup.py and CI ✔️ However, I'll take a look at how hard it is to make it compatible with shapely >=2.0 |
I have detected that the problem with Shapely 2.0 was related to lgeos functions for handling the srid. I have made some changes to make this part compatible with |
Context
shapely
is a geopandas' dependency (>1.7
), and with the version 2.0.0 released on December 12, some breaking changes were introduced. This means some parts of the code, like this one are not working anymore, sincelgeos
is no longer defined:This makes some crucial parts of the core of CARTOFrames to fail, like the
to_carto
method.Relevant PR changes
shapely
as requirement, with the following restrictions:>1.7,<=1.7.1
to avoid the breaking changes.ubuntu-latest
versions. For that reason, we need to useubuntu-20.04
, and the last versions ofactions/checkout@v2
andactions/setup-python@v4
for GitHub actions to be able to find them. Jobfail-fast
, otherwise we get a cancelled signal (Error: The operation was canceled.
) every time we install Python dependencies. Jobmarkupsafe
, the following error is raised for every test. So we need to downgrade it to version2.0.1
(or1.1.1
for Python 3.5). Job<2.0
and that's enough to fix the reported issue. However, with that version, the following test was failing. To fix it, we would need to downgrade it to version1.7.1
. Jobnumpy>1.22.4
. This only affects Python 3.8 because Python 3.7 was dropped with NumPy 1.22.0. So I've also added thenumpy<=1.22.4
requirement. Job