summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorLorenzo Peña <lorinkoz@gmail.com>2024-07-23 12:06:29 +0200
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-07-25 09:42:17 +0200
commite18601273a833fb25533f45527e364642ee3644d (patch)
tree5e7dcd6a99ffb26a07b9cf688b986dfb25f11ee4 /docs/ref
parent41d8ef18ac2d983bea5ef919615687308ffe41c1 (diff)
[5.0.x] Fixed #35627 -- Raised a LookupError rather than an unhandled ValueError in get_supported_language_variant().
LocaleMiddleware didn't handle the ValueError raised by get_supported_language_variant() when language codes were over 500 characters. Regression in 9e9792228a6bb5d6402a5d645bc3be4cf364aefb. Backport of 0e94f292cda632153f2b3d9a9037eb0141ae9c2e from main.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/utils.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index 23b7e7030e..1d0178a263 100644
--- a/docs/ref/utils.txt
+++ b/docs/ref/utils.txt
@@ -1114,7 +1114,7 @@ For a complete discussion on the usage of the following see the
``'es-ar'`` isn't.
``lang_code`` has a maximum accepted length of 500 characters. A
- :exc:`ValueError` is raised if ``lang_code`` exceeds this limit and
+ :exc:`LookupError` is raised if ``lang_code`` exceeds this limit and
``strict`` is ``True``, or if there is no generic variant and ``strict``
is ``False``.
@@ -1126,10 +1126,10 @@ For a complete discussion on the usage of the following see the
Raises :exc:`LookupError` if nothing is found.
- .. versionchanged:: 4.2.14
+ .. versionchanged:: 4.2.15
In older versions, ``lang_code`` values over 500 characters were
- processed without raising a :exc:`ValueError`.
+ processed without raising a :exc:`LookupError`.
.. function:: to_locale(language)