diff --git a/Django-4.2.14.tar.gz b/Django-4.2.14.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..1adca203d4c84ae31f3a0798fc6ab4c1ee276b95 Binary files /dev/null and b/Django-4.2.14.tar.gz differ diff --git a/backport-3426a5c33c36266af42128ee9eca4921e68ea876.patch b/backport-3426a5c33c36266af42128ee9eca4921e68ea876.patch new file mode 100644 index 0000000000000000000000000000000000000000..0a399833ae05933334d4b9eec234102ba677ead5 --- /dev/null +++ b/backport-3426a5c33c36266af42128ee9eca4921e68ea876.patch @@ -0,0 +1,45 @@ +diff --git a/django/utils/version.py b/django/utils/version.py +index 1e9c720..71ec70b 100644 +--- a/django/utils/version.py ++++ b/django/utils/version.py +@@ -17,6 +17,7 @@ PY39 = sys.version_info >= (3, 9) + PY310 = sys.version_info >= (3, 10) + PY311 = sys.version_info >= (3, 11) + PY312 = sys.version_info >= (3, 12) ++PY313 = sys.version_info >= (3, 13) + + + def get_version(version=None): +diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py +index 6d67c29..8373560 100644 +--- a/tests/admin_scripts/tests.py ++++ b/tests/admin_scripts/tests.py +@@ -33,6 +33,7 @@ from django.test import LiveServerTestCase, SimpleTestCase, TestCase, override_s + from django.test.utils import captured_stderr, captured_stdout + from django.urls import path + from django.utils.version import PY39 ++from django.utils.version import PY313 + from django.views.static import serve + + from . import urls +@@ -1900,10 +1901,16 @@ class CommandTypes(AdminScriptTestCase): + ] + for option in expected_options: + self.assertOutput(out, f"[{option}]") +- self.assertOutput(out, "--option_a OPTION_A, -a OPTION_A") +- self.assertOutput(out, "--option_b OPTION_B, -b OPTION_B") +- self.assertOutput(out, "--option_c OPTION_C, -c OPTION_C") +- self.assertOutput(out, "-v {0,1,2,3}, --verbosity {0,1,2,3}") ++ if PY313: ++ self.assertOutput(out, "--option_a, -a OPTION_A") ++ self.assertOutput(out, "--option_b, -b OPTION_B") ++ self.assertOutput(out, "--option_c, -c OPTION_C") ++ self.assertOutput(out, "-v, --verbosity {0,1,2,3}") ++ else: ++ self.assertOutput(out, "--option_a OPTION_A, -a OPTION_A") ++ self.assertOutput(out, "--option_b OPTION_B, -b OPTION_B") ++ self.assertOutput(out, "--option_c OPTION_C, -c OPTION_C") ++ self.assertOutput(out, "-v {0,1,2,3}, --verbosity {0,1,2,3}") + + def test_color_style(self): + style = color.no_style() diff --git a/python-django.spec b/python-django.spec index 875f163ca7b0602e82511041dfc0da6ac1d20e5e..fffc6004134937e034bf6964b9ff9cbc5c614a46 100644 --- a/python-django.spec +++ b/python-django.spec @@ -1,8 +1,8 @@ -%define anolis_release 2 +%define anolis_release 3 %global pkgname Django Name: python-django -Version: 4.2.16 +Version: 4.2.16.16 Release: %{anolis_release}%{?dist} Summary: A high-level Python Web framework @@ -15,6 +15,7 @@ BuildArch: noarch # https://github.com/django/django/commit/790eb058b0716c536a2f2e8d1c6d5079d776c22b Patch0001: 0001-fix-CVE-2024-53907.patch +Patch2: backport-3426a5c33c36266af42128ee9eca4921e68ea876.patch %global _description %{expand: Django is a high-level Python Web framework that encourages rapid @@ -175,6 +176,13 @@ cd tests %changelog +* Mon Jun 16 2025 wenyuzifang - 4.2.16-3 +- Introduced additional commits to address compatibility and functionality improvements: + - Commit: [python/cpython/commit/c4a2e8a2c5188c3288d57b80852e92c83f46f6f3](https://github.com/python/cpython/commit/c4a2e8a2c5188c3288d57b80852e92c83f46f6f3) (python 3.13 - argparse change) + - Backported patch: [django/django/commit/3426a5c33c36266af42128ee9eca4921e68ea876.patch](https://github.com/django/django/commit/3426a5c33c36266af42128ee9eca4921e68ea876.patch) (fuzzed patch for argparse changes) +- Ensured compatibility with Python 3.13 by incorporating relevant upstream patches. +- Maintained consistency with existing Django functionality while addressing potential regressions. + * Tue Jun 10 2025 wenxin - 4.2.16-2 - Fix CVE-2024-53907 @@ -205,4 +213,4 @@ cd tests - New version 4.1.9 * Sat May 06 2023 Funda Wang - 4.1.7-1 -- Import package for anolis 23 +- Import package for anolis 23 \ No newline at end of file