Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix: refactor to adapt to changes to shapely dependency#1376

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
chalmerlowe merged 7 commits intomainfromfix-shapely-bug
Oct 5, 2022

Conversation

@chalmerlowe
Copy link
Collaborator

@chalmerlowechalmerlowe commentedOct 4, 2022
edited by parthea
Loading

Theshapely library has undergone some internal refactoring.
Certain classes, such asWKTReader 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.

  • NEW: shapely.wkt.loads()
  • OLD: shapely.geos.WKTReader(shapely.geos.lgeos).read

Fixes#1364 🦕

Context:

This issue appeared when running a test inpython-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 thepython-bigquery-sqlalchemy library.

@product-auto-labelproduct-auto-labelbot added size: xsPull request size is extra small. api: bigqueryIssues related to the googleapis/python-bigquery API. labelsOct 4, 2022
@chalmerlowe
Copy link
CollaboratorAuthor

@shollyman can you take a look at this for me and give me a sanity check?

Copy link
Contributor

@shollymanshollyman left a 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?

@chalmerlowechalmerlowe changed the titleFix shapely bugFix: refactor to adapt to changes to shapely dependencyOct 5, 2022
@product-auto-labelproduct-auto-labelbot added size: sPull request size is small. and removed size: xsPull request size is extra small. labelsOct 5, 2022
@chalmerlowe
Copy link
CollaboratorAuthor

chalmerlowe commentedOct 5, 2022
edited
Loading

@shollyman

I checked the remainder of the code for references toshapely,WKT*,WKB*, etc.

Added a minor change based on what I found.

@chalmerlowechalmerlowe added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelOct 5, 2022
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelOct 5, 2022
@shollyman
Copy link
Contributor

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?

@chalmerlowe
Copy link
CollaboratorAuthor

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.

@chalmerlowechalmerlowe marked this pull request as ready for reviewOctober 5, 2022 17:48
@chalmerlowechalmerlowe requested a review froma teamOctober 5, 2022 17:48
@chalmerlowechalmerlowe requested a review froma team as acode ownerOctober 5, 2022 17:48
abdelmegahedgoogle pushed a commit to abdelmegahedgoogle/python-bigquery that referenced this pull requestApr 17, 2023
)* 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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@shollymanshollymanshollyman approved these changes

Assignees

No one assigned

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.size: sPull request size is small.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

bug: Missing attribute: WKTReader

4 participants

@chalmerlowe@shollyman@parthea@yoshi-kokoro

[8]ページ先頭

©2009-2025 Movatter.jp