diff --git a/pyproject.toml b/pyproject.toml index cfef66753..e049dc679 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "Django[argon2]==4.2.*,>=4.2.26", "django-bootstrap3==25.2", "django-compressor==4.5.1", - "django-countries==7.6.*", + "django-countries==8.2.*", "django-filter==25.1", "django-formset-js-improved==0.5.0.4", "django-formtools==2.5.1", diff --git a/src/pretix/helpers/countries.py b/src/pretix/helpers/countries.py index 12570aaa0..9cd4c944b 100644 --- a/src/pretix/helpers/countries.py +++ b/src/pretix/helpers/countries.py @@ -40,6 +40,10 @@ class CachedCountries(Countries): django-countries performs a unicode-aware sorting based on pyuca which is incredibly slow. """ + # Starting in django-countries 8.1, django-countries implemented a similar caching, but only on object level. + # We keep our caching for now for the added caching to the cache store. Unfortunately we can't really avoid + # the double-caching on object level if we want the caches od be used in a sensible order. We could re-evaluate + # and drop this in the future if it ever causes bugs or memory issues. cache_key = "countries:all:{}".format(get_language_without_region()) if self.cache_subkey: cache_key += ":" + self.cache_subkey @@ -84,8 +88,6 @@ class FastCountryField(CountryField): *self._check_backend_specific_checks(**kwargs), *self._check_validators(), *self._check_deprecation_details(), - *self._check_multiple(), - *self._check_max_length_attribute(**kwargs), ]