diff options
Diffstat (limited to 'meta-python/recipes-devtools')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-django/0001-Fixed-35172-Fixed-intcomma-for-string-floats.patch | 30 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-django_2.2.28.bb | 1 |
2 files changed, 31 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-django/0001-Fixed-35172-Fixed-intcomma-for-string-floats.patch b/meta-python/recipes-devtools/python/python3-django/0001-Fixed-35172-Fixed-intcomma-for-string-floats.patch new file mode 100644 index 0000000000..75b816ab55 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-django/0001-Fixed-35172-Fixed-intcomma-for-string-floats.patch | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | From 820af24fcaae817ab7c0733035673afc3b37eeac Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 3 | Date: Thu, 8 Feb 2024 10:58:54 +0100 | ||
| 4 | Subject: [PATCH] Fixed #35172 -- Fixed intcomma for string floats. | ||
| 5 | |||
| 6 | From: Mariusz Felisiak <felisiak.mariusz@gmail.com> | ||
| 7 | |||
| 8 | Thanks Warwick Brown for the report. | ||
| 9 | |||
| 10 | Regression in 55519d6cf8998fe4c8f5c8abffc2b10a7c3d14e9. | ||
| 11 | |||
| 12 | Upstream-Status: Backport [https://github.com/django/django/commit/2f14c2cedc9c92373471c1f98a80c81ba299584a] | ||
| 13 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 14 | --- | ||
| 15 | django/contrib/humanize/templatetags/humanize.py | 2 ++ | ||
| 16 | 1 file changed, 2 insertions(+) | ||
| 17 | |||
| 18 | diff --git a/django/contrib/humanize/templatetags/humanize.py b/django/contrib/humanize/templatetags/humanize.py | ||
| 19 | index ee22a45..8490b5e 100644 | ||
| 20 | --- a/django/contrib/humanize/templatetags/humanize.py | ||
| 21 | +++ b/django/contrib/humanize/templatetags/humanize.py | ||
| 22 | @@ -77,6 +77,8 @@ def intcomma(value, use_l10n=True): | ||
| 23 | if match: | ||
| 24 | prefix = match[0] | ||
| 25 | prefix_with_commas = re.sub(r"\d{3}", r"\g<0>,", prefix[::-1])[::-1] | ||
| 26 | + # Remove a leading comma, if needed. | ||
| 27 | + prefix_with_commas = re.sub(r"^(-?),", r"\1", prefix_with_commas) | ||
| 28 | result = prefix_with_commas + result[len(prefix) :] | ||
| 29 | return result | ||
| 30 | |||
diff --git a/meta-python/recipes-devtools/python/python3-django_2.2.28.bb b/meta-python/recipes-devtools/python/python3-django_2.2.28.bb index 8e826b9b61..72485295a7 100644 --- a/meta-python/recipes-devtools/python/python3-django_2.2.28.bb +++ b/meta-python/recipes-devtools/python/python3-django_2.2.28.bb | |||
| @@ -34,6 +34,7 @@ SRC_URI += "file://CVE-2023-31047.patch \ | |||
| 34 | file://CVE-2025-64459.patch \ | 34 | file://CVE-2025-64459.patch \ |
| 35 | file://Fix-undefined-_lazy_re_compile.patch \ | 35 | file://Fix-undefined-_lazy_re_compile.patch \ |
| 36 | file://Fix-missing-JSONField-in-django.db.mo.patch \ | 36 | file://Fix-missing-JSONField-in-django.db.mo.patch \ |
| 37 | file://0001-Fixed-35172-Fixed-intcomma-for-string-floats.patch \ | ||
| 37 | " | 38 | " |
| 38 | 39 | ||
| 39 | SRC_URI[sha256sum] = "0200b657afbf1bc08003845ddda053c7641b9b24951e52acd51f6abda33a7413" | 40 | SRC_URI[sha256sum] = "0200b657afbf1bc08003845ddda053c7641b9b24951e52acd51f6abda33a7413" |
