diff --git a/django-stubs/contrib/gis/geoip2/base.pyi b/django-stubs/contrib/gis/geoip2/base.pyi index 8b4884238..56546e504 100644 --- a/django-stubs/contrib/gis/geoip2/base.pyi +++ b/django-stubs/contrib/gis/geoip2/base.pyi @@ -3,6 +3,7 @@ from pathlib import Path from typing import Any from django.contrib.gis.geos import Point +from django.utils.functional import cached_property GEOIP_SETTINGS: dict[str, Any] @@ -23,6 +24,10 @@ class GeoIP2: def country_code(self, query: str) -> str: ... def country_name(self, query: str) -> str: ... def country(self, query: str) -> dict[str, Any]: ... + @cached_property + def is_city(self) -> bool: ... + @cached_property + def is_country(self) -> bool: ... def coords(self, query: str, ordering: Sequence[str] = ...) -> tuple[float, float] | tuple[None, None]: ... def lon_lat(self, query: str) -> tuple[float, float] | tuple[None, None]: ... def lat_lon(self, query: str) -> tuple[float, float] | tuple[None, None]: ... diff --git a/requirements.txt b/requirements.txt index 7ed4ae74c..840ad258c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ pytest-shard==0.1.2 # Django deps: psycopg2-binary Django==4.2.16; python_version < '3.10' -Django==5.1.2; python_version >= '3.10' +Django==5.1.3; python_version >= '3.10' -e ./ext -e .[redis,compatible-mypy,oracle] diff --git a/scripts/stubtest/allowlist.txt b/scripts/stubtest/allowlist.txt index 60a68c95b..ba056fd99 100644 --- a/scripts/stubtest/allowlist.txt +++ b/scripts/stubtest/allowlist.txt @@ -160,6 +160,8 @@ django.contrib.contenttypes.fields.ReverseGenericManyToOneDescriptor.related_man django.contrib.gis.db.backends.base.operations.BaseSpatialOperations.select_extent django.contrib.gis.db.backends.mysql.features.DatabaseFeatures.django_test_skips django.contrib.gis.db.backends.mysql.features.DatabaseFeatures.supports_geometry_field_unique_index +django.contrib.gis.geoip2.GeoIP2.is_country +django.contrib.gis.geoip2.GeoIP2.is_city django.contrib.gis.db.backends.mysql.operations.MySQLOperations.from_text django.contrib.gis.db.backends.mysql.operations.MySQLOperations.gis_operators django.contrib.gis.db.backends.mysql.operations.MySQLOperations.mariadb