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

5.0: Update django.contrib.gis.db.backends.postgis.operations #2138

Merged
merged 4 commits into from
May 13, 2024

Conversation

JaeHyuckSa
Copy link
Contributor

I have made things!

Update stubs for django.contrib.gis.db.backends.postgis.operations for Django 5.0.

  • django.contrib.gis.db.backends.postgis.operations
    • django.contrib.gis.db.backends.postgis.operations.PostGISOperator.check_geography was added

Related issues

Refs

Upstream PR

@sudosubin sudosubin mentioned this pull request May 9, 2024
39 tasks
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

I misclicked. This needs to be changed

@JaeHyuckSa
Copy link
Contributor Author

Just like in as_sql:

template_params: Mapping[str, Any],

which calls check_geometry: https://github.com/django/django/blob/d59066b90c2ef91a956c6682ed3d25bbb31bf216/django/contrib/gis/db/backends/postgis/operations.py#L42
But! as_sql also calls check_raster which uses mutation :( https://github.com/django/django/blob/d59066b90c2ef91a956c6682ed3d25bbb31bf216/django/contrib/gis/db/backends/postgis/operations.py#L59-L62

https://github.com/django/django/blob/d59066b90c2ef91a956c6682ed3d25bbb31bf216/django/contrib/gis/db/backends/postgis/operations.py#L79

So, template_params is at least MutableMapping

I appreciate your thorough explanation! Thanks to your guidance, I now have a clear understanding. I've revised the section accordingly and have uploaded the updates. Thank you for your assistance!

@JaeHyuckSa JaeHyuckSa requested a review from sobolevn May 11, 2024 14:38
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Please, also update .as_sql method from the base class

@JaeHyuckSa
Copy link
Contributor Author

Please, also update .as_sql method from the base class

Thank you for your guidance in revising it! :)

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thanks!

@sobolevn sobolevn merged commit a70e45c into typeddjango:master May 13, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants