-
Notifications
You must be signed in to change notification settings - Fork 306
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
Fix: refactor to adapt to changes to shapely dependency #1376
Conversation
@shollyman can you take a look at this for me and give me a sanity check? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see in the pandas helper we also use the well-known bytes reader, does this also need cleanup?
https://github.com/googleapis/python-bigquery/blob/main/google/cloud/bigquery/_pandas_helpers.py#L66
May be also worth checking system tests for unusual setups.
Are there other imports under shapely that need scrutiny beyond shapely.geos?
I checked the remainder of the code for references to Added a minor change based on what I found. |
There's no test changes? Is this indicative that our existing tests were sufficient in catching and exercising this dependency? Do we need to exercise anything new as part of the changes? |
The existing tests were already using the new refactoring > they referred to the correct functions in the correct files. |
) * fix: refactored to account for changes in dependency * Removes comment and ensures linting success * refactor to use loads() function * fix: refactors to account for changes to shapely dependency * fix: refactors to account for changes to shapely dependency * blacken the code * add mypy ignore flag for shapely import
The
shapely
library has undergone some internal refactoring.Certain classes, such as
WKTReader
are no longer used, instead, the library relies on some functions that are imported from what appears to bepygeos
.This change points at the correct function to replace the outdated method call.
Fixes #1364 🦕
Context:
This issue appeared when running a test in
python-bigquery-sqlalchemy
... when running certain tests in that library, the code tried to load thetests/unit/testconf.py
file from that library which referencestable.py
in this library.That was causing some failures in tests in the
python-bigquery-sqlalchemy
library.