From cc5693017e4f4015ef594add0f40852690773280 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 16:55:05 +0100 Subject: [PATCH] Update django-countries requirement from ==7.6.* to ==8.2.* (#5660) * Update django-countries requirement from ==7.6.* to ==8.2.* Updates the requirements on [django-countries](https://github.com/SmileyChris/django-countries) to permit the latest version. - [Changelog](https://github.com/SmileyChris/django-countries/blob/main/CHANGES.md) - [Commits](https://github.com/SmileyChris/django-countries/compare/v7.6...v8.2.0) --- updated-dependencies: - dependency-name: django-countries dependency-version: 8.2.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] * Update our helpers --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Raphael Michel --- pyproject.toml | 2 +- src/pretix/helpers/countries.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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), ]