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

Update contrib.gis for Django 5.1 #2587

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions django-stubs/contrib/gis/gdal/geometries.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ class Point(OGRGeometry):
@property
def z(self) -> float | None: ...
@property
def m(self) -> float | None: ...
@property
def coords(self) -> tuple[float, float] | tuple[float, float, float]: ...
@property
def tuple(self) -> tuple[float, float] | tuple[float, float, float]: ...
Expand All @@ -117,6 +119,8 @@ class LineString(OGRGeometry):
def y(self) -> list[float]: ...
@property
def z(self) -> list[float] | None: ...
@property
def m(self) -> list[float] | None: ...

class LinearRing(LineString): ...

Expand Down
9 changes: 7 additions & 2 deletions django-stubs/contrib/gis/gdal/prototypes/ds.pyi
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
from typing import Any

c_int_p: Any
GDAL_OF_READONLY: int = 0x00
Copy link
Member

Choose a reason for hiding this comment

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

Maybe : Final =?

GDAL_OF_UPDATE: int = 0x01
GDAL_OF_ALL: int = 0x00
GDAL_OF_RASTER: int = 0x02
GDAL_OF_VECTOR: int = 0x04
register_all: Any
cleanup_all: Any
get_driver: Any
get_driver_by_name: Any
get_driver_count: Any
get_driver_name: Any
get_driver_description: Any
open_ds: Any
destroy_ds: Any
release_ds: Any
get_ds_name: Any
get_dataset_driver: Any
get_layer: Any
get_layer_by_name: Any
get_layer_count: Any
Expand Down
7 changes: 7 additions & 0 deletions django-stubs/contrib/gis/gdal/prototypes/geom.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ to_kml: Any
getx: Any
gety: Any
getz: Any
getm: Any
from_wkb: Any
from_wkt: Any
from_gml: Any
Expand All @@ -22,11 +23,17 @@ geom_diff: Any
geom_intersection: Any
geom_sym_diff: Any
geom_union: Any
is_3d: Any
set_3d: Any
is_measured: Any
set_measured: Any
add_geom: Any
import_wkt: Any
destroy_geom: Any
to_wkb: Any
to_iso_wkb: Any
to_wkt: Any
to_iso_wkt: Any
to_gml: Any
get_wkbsize: Any
assign_srs: Any
Expand Down
5 changes: 0 additions & 5 deletions django-stubs/contrib/gis/gdal/prototypes/raster.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
from typing import Any

register_all: Any
get_driver: Any
get_driver_by_name: Any
get_driver_count: Any
get_driver_description: Any
create_ds: Any
open_ds: Any
close_ds: Any
Expand Down
23 changes: 0 additions & 23 deletions scripts/stubtest/allowlist_todo_django51.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,6 @@ django.contrib.contenttypes.models.ContentType.get_object_for_this_type
django.contrib.gis.db.models.ForeignObjectRel.accessor_name
django.contrib.gis.forms.ModelChoiceField.validate_no_null_characters
django.contrib.gis.forms.RadioSelect.__slotnames__
django.contrib.gis.gdal.geometries.LineString.m
django.contrib.gis.gdal.geometries.Point.m
django.contrib.gis.gdal.prototypes.ds.GDAL_OF_ALL
django.contrib.gis.gdal.prototypes.ds.GDAL_OF_RASTER
django.contrib.gis.gdal.prototypes.ds.GDAL_OF_READONLY
django.contrib.gis.gdal.prototypes.ds.GDAL_OF_UPDATE
django.contrib.gis.gdal.prototypes.ds.GDAL_OF_VECTOR
django.contrib.gis.gdal.prototypes.ds.get_dataset_driver
django.contrib.gis.gdal.prototypes.ds.get_driver_description
django.contrib.gis.gdal.prototypes.ds.get_driver_name
django.contrib.gis.gdal.prototypes.ds.release_ds
django.contrib.gis.gdal.prototypes.geom.getm
django.contrib.gis.gdal.prototypes.geom.is_3d
django.contrib.gis.gdal.prototypes.geom.is_measured
django.contrib.gis.gdal.prototypes.geom.set_3d
django.contrib.gis.gdal.prototypes.geom.set_measured
django.contrib.gis.gdal.prototypes.geom.to_iso_wkb
django.contrib.gis.gdal.prototypes.geom.to_iso_wkt
django.contrib.gis.gdal.prototypes.raster.get_driver
django.contrib.gis.gdal.prototypes.raster.get_driver_by_name
django.contrib.gis.gdal.prototypes.raster.get_driver_count
django.contrib.gis.gdal.prototypes.raster.get_driver_description
django.contrib.gis.gdal.prototypes.raster.register_all
django.contrib.gis.geoip2.GeoIP2.info
django.contrib.gis.geoip2.resources
django.contrib.postgres.aggregates.JSONBAgg.__init__
Expand Down
Loading