diff --git a/Django-4.2.7.tar.gz b/Django-4.2.11.tar.gz similarity index 57% rename from Django-4.2.7.tar.gz rename to Django-4.2.11.tar.gz index d98225048e76c3108f050876842d48cdfd448775..bb776426e52d047a4c7f62371ee19dc8be42487f 100644 Binary files a/Django-4.2.7.tar.gz and b/Django-4.2.11.tar.gz differ diff --git a/dirty-hack-remove-assert.patch b/dirty-hack-remove-assert.patch deleted file mode 100644 index 7aa4002c61ebd2a6a75e67339ab4b57cef9ba757..0000000000000000000000000000000000000000 --- a/dirty-hack-remove-assert.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 36736edaf595d2bbf1fe881609b2a4c8e3bac68a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Thu, 29 Jun 2023 12:29:21 +0200 -Subject: [PATCH] Dirty hack: Remove a failing assert, failure does not seem - critical - ---- - tests/settings_tests/tests.py | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/tests/settings_tests/tests.py b/tests/settings_tests/tests.py -index 62cbffb..b7432d3 100644 ---- a/tests/settings_tests/tests.py -+++ b/tests/settings_tests/tests.py -@@ -397,7 +397,6 @@ class TestComplexSettingOverride(SimpleTestCase): - with self.assertWarnsMessage(UserWarning, msg) as cm: - with override_settings(TEST_WARN="override"): - self.assertEqual(settings.TEST_WARN, "override") -- self.assertEqual(cm.filename, __file__) - - - class SecureProxySslHeaderTest(SimpleTestCase): --- -2.40.1 - diff --git a/python-django.rpmlintrc b/python-django.rpmlintrc new file mode 100644 index 0000000000000000000000000000000000000000..eabd7733a6857722f03a041eab946c0664a27873 --- /dev/null +++ b/python-django.rpmlintrc @@ -0,0 +1,5 @@ +# these are intentionally unversioned, they are virtual provides +# declared by every Django stack's subpackages +addFilter("W: unversioned-explicit-provides python-django-bash-completion-impl") +addFilter("W: unversioned-explicit-provides python-django-doc-impl") +addFilter("W: unversioned-explicit-provides python-django-impl") diff --git a/python-django.spec b/python-django.spec index defebcb2b3abf93e06aecd10909190ec854c3c24..70446238b0ac661fffeddc2e67ecd4e762858b29 100644 --- a/python-django.spec +++ b/python-django.spec @@ -2,15 +2,14 @@ %global pkgname Django Name: python-django -Version: 4.2.7 +Version: 4.2.11 Release: %{anolis_release}%{?dist} Summary: A high-level Python Web framework License: BSD-3-Clause URL: https://www.djangoproject.com/ -Source0: %{pypi_source %{pkgname} %{version}} -# FAIL: test_complex_override_warning (settings_tests.tests.TestComplexSettingOverride.test_complex_override_warning) -Patch0: dirty-hack-remove-assert.patch +Source: %{pypi_source %{pkgname} %{version}} +#Source: %{name}.rpmlintrc BuildArch: noarch @@ -28,6 +27,10 @@ Summary: Bash completion files for Django BuildRequires: bash-completion Requires: bash-completion +# Make sure this replaces any other Django bash-completion package +#Provides: python3-django-bash-completion-impl +#Conflicts: python3-django-bash-completion-impl + %description -n python3-django-bash-completion This package contains the Bash completion files form Django high-level Python Web framework. @@ -38,6 +41,10 @@ Summary: Documentation for Django Suggests: python3-django = %{version}-%{release} BuildRequires: make +# Make sure this replaces any other Django doc package +#Provides: python3-django-doc-impl +#Conflicts: python3-django-doc-impl + %description -n python3-django-doc This package contains the documentation for the Django high-level Python Web framework. @@ -54,6 +61,15 @@ BuildRequires: python3-asgiref Provides: bundled(jquery) = 2.2.3 Provides: bundled(xregexp) = 2.0.0 +# see django/contrib/admin/static/admin/js/vendor/ +#Provides: bundled(jquery) = 3.6.4 +#Provides: bundled(select2) = 4.0.13 +#Provides: bundled(xregexp) = 3.2.0 + +# Make sure this replaces any other Django package +#Provides: python3-django-impl +#Conflicts: python3-django-impl + %description -n python3-django %_description %prep @@ -75,6 +91,7 @@ sed -i '/^tzdata$/d' tests/requirements/py3.txt # Remove deps on code checkers/linters sed -i '/^black\b/d' tests/requirements/py3.txt +sed -i '/^black\b/d' docs/requirements.txt sed -i '/^blacken-docs\b/d' docs/requirements.txt %generate_buildrequires @@ -88,6 +105,7 @@ sed -i '/^blacken-docs\b/d' docs/requirements.txt %pyproject_install %pyproject_save_files django + # build documentation (cd docs && mkdir djangohtml && mkdir -p _build/{doctrees,html} && make html) cp -ar docs .. @@ -116,11 +134,26 @@ find %{buildroot} -name "*.po" | xargs rm -f sed -i '/.po$/d' %{pyproject_files} %check +# many contrib modules assume a configured app, "Requested setting INSTALLED_APPS..." +# the rest needs optional dependencies +%{pyproject_check_import \ + -e 'django.contrib.*' \ + -e 'django.core.serializers.pyyaml' \ + -e 'django.db.backends.mysql*' \ + -e 'django.db.backends.oracle*' \ + -e 'django.db.backends.postgresql*'} + cd %{_builddir}/%{pkgname}-%{version} export PYTHONPATH=$(pwd) cd tests -%{python3} runtests.py --settings=test_sqlite --verbosity=2 --parallel 1 +# disable two tests due to regression in 3.12b4: +# https://github.com/python/cpython/issues/106669 +%{python3} runtests.py --settings=test_sqlite --verbosity=2 --parallel 1 \ +%if v"%{python3_version}" >= v"3.12" + -k "not test_safe_mime_multipart and not test_unicode_address_header" +%endif +#%%{python3} runtests.py --settings=test_sqlite --verbosity=2 --parallel 1 %files -n python3-django-bash-completion %{_datadir}/bash-completion/* @@ -137,7 +170,15 @@ cd tests %{_bindir}/python3-django-admin %{_mandir}/man1/django-admin.1* + %changelog +## START: Generated by rpmautospec +* Thu May 09 2024 mgb01105731 - 4.2.11-1 +- update to 4.2.11 + +* Wed Mar 27 2024 Zhao Hang - 4.2.7-2 +- Rebuild with python3.11 + * Mon Nov 06 2023 Funda Wang - 4.2.7-1 - New version 4.2.7