Skip to content
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

OpenCage provider: use no_annotations=1 as returned data is not used #464

Merged

Conversation

mtmail
Copy link
Contributor

@mtmail mtmail commented Jan 15, 2021

OpenCage results include https://opencagedata.com/api#annotations data by default. As this data isn't put into the Location response object it can be skipped in the request.

@KostyaEsmukov
Copy link
Member

I'm afraid this might count as a breaking change, because it would affect the contents of the location.raw value.

Is the benefit from disabling these by default really prominent?

@KostyaEsmukov KostyaEsmukov added this to the 2.2 milestone Mar 20, 2021
@KostyaEsmukov
Copy link
Member

Well, it seems to reduce mean request time in tests by 20%, so I guess that's something.

I'm merging this, but will add a new method param to switch annotations and will make it on by default, in order to not break backwards compatibility.

Copy link
Member

@KostyaEsmukov KostyaEsmukov left a comment

Choose a reason for hiding this comment

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

Thanks!

@KostyaEsmukov KostyaEsmukov merged commit ac98b8d into geopy:master Mar 20, 2021
@mtmail
Copy link
Contributor Author

mtmail commented Mar 20, 2021

Sounds good. Thanks a lot.

KostyaEsmukov added a commit that referenced this pull request Mar 20, 2021
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.

None yet

2 participants