diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-07-10 12:25:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-07-10 12:25:06 +0100 |
commit | e810ac4a0e6af9f763f4433863042b34609075a7 (patch) | |
tree | 6fe0b3ff24f3b875be1564e273049c1e301d205b /dev-python/django | |
parent | c218398bbbe70a616790cf146c28c1066b9284bf (diff) |
gentoo auto-resync : 10:07:2024 - 12:25:06
Diffstat (limited to 'dev-python/django')
-rw-r--r-- | dev-python/django/Manifest | 18 | ||||
-rw-r--r-- | dev-python/django/django-3.2.25.ebuild | 110 | ||||
-rw-r--r-- | dev-python/django/django-4.2.14.ebuild (renamed from dev-python/django/django-4.2.13.ebuild) | 0 | ||||
-rw-r--r-- | dev-python/django/django-5.0.7.ebuild (renamed from dev-python/django/django-5.0.6.ebuild) | 0 | ||||
-rw-r--r-- | dev-python/django/files/django-3.1-bashcomp.patch | 56 | ||||
-rw-r--r-- | dev-python/django/files/django-3.2.19-py311.patch | 183 | ||||
-rw-r--r-- | dev-python/django/files/django-3.2.20-urlsplit.patch | 111 |
7 files changed, 6 insertions, 472 deletions
diff --git a/dev-python/django/Manifest b/dev-python/django/Manifest index 36731b1e5bbf..501b1f89b5f3 100644 --- a/dev-python/django/Manifest +++ b/dev-python/django/Manifest @@ -1,17 +1,11 @@ -AUX django-3.1-bashcomp.patch 2085 BLAKE2B 36a0aa4d3413f13089ac104f5d3f98ecbb152a9a5a35f8c1ff2e5ffc9824153b0ac89f1cbca76c31a1afefde471e4d6ed801e405551b25cb31da89c20f3019cc SHA512 82dceede4292bad6e3e4966a6dba01bd2bbc7db494fce592e25dc4a64236485d88d8ad67b247239a80f8fe96dff054d20afea6f48a5518b67cf88404d399e61c -AUX django-3.2.19-py311.patch 7776 BLAKE2B 387f602318cbf9cdc7edfb2c63a2fe05d3559c3773defae5a5aaf30aef5fe46aadd5c764273d4b7af59132a57caf28cc0463c70eac680105103ba824009eba16 SHA512 5d94f45e92d8ac020aeda1c682e9c5cc60f4c82920dcdf46ef777e76c880e6ca81ec70daabd09cde4ce769fbbc13ac63d1a3763d7eeeeff53102bc31890166ca -AUX django-3.2.20-urlsplit.patch 4567 BLAKE2B fc167eeba60856cde358a37239eda0cc77c856bed76597505d934c71a88f838e4c001adb2593abdc98a8e4f0bfd90e1e9ea86b3a25fc8bc1d9cf8f556b046afd SHA512 0f26a0118897f2cdcdbbbaf02b1fe9c2e2ad7b680f15e19cff2b69a242a0108975d1b9029f78a49db75090ee292c12d14f2b0618fd91aacc97cd18cf5190e86c AUX django-4.0-bashcomp.patch 2021 BLAKE2B f04c83b500a92ea8ef9609225191e38a41b3349a295beca8f8575ab05395d0cf37e1aefe295004b11c1bcf34cce9074ac7d274034cb50e1ae43e2fcb5d6952b2 SHA512 2215dca4120023b0fd839738bd602443c49e9adaa98d182bc74081ebe70613649c2dc11e2b5f6242701dceac25755adb8605774895091360b56ed1195a7e629e AUX django-5.0.6-py313.patch 2474 BLAKE2B cf47f32ec1989b50a3e2a3cdce950f33c9f1ca9b6b367397710f9b2a4fed96c78200f4ec8ad8c274a8cea57183be0c873ebbaacd2e4de86543311229cd2b76d1 SHA512 be59bc3bea66b446a0b145b447032b5a5dca9e6e7580830ca2c58170b7fa58ce0cf01b5daf864f44843f490ccac8192befc8c010b23e04fd9ed39616716717ad -DIST Django-3.2.25.checksum.txt 2560 BLAKE2B e082c588f4e124c9d71c1914e475fd70ed9b68583d65ea59ba0822b96de36c2edc98b4d9192f3d7c75467306fe03404303f6c2a98a026bdb5308bbd1dee89f99 SHA512 49a1610dcd61cbd322f0a5d7fe3cf249c0c4288b194fc8c2bdf7ec6fb8f92b69ca68dcdb71b79998cd80b978b70f48069669d996b6503261ba726c77c8b87672 -DIST Django-3.2.25.tar.gz 9836336 BLAKE2B 586520e0689b2594dd8ce4abb173418aedfde80cc84012d2a4207cbfc67120cbf405a8dfc8d069bb946f027f0eef22b233bd3b3ce569b01ea8fdc7836a6e530f SHA512 ccba83abd1777123186d685e21b96f41abf216a692d18ffe764d2e519eb9d1f6011d08c86b3affdd891591ca4ed7fee27ffa4750d19b486ca775ee680fdb0cb1 -DIST Django-4.2.13.checksum.txt 2578 BLAKE2B c4dee2c255a77da0655f685852bfac937e6afbfa32c6f5048916675d806c1d9218ff40117c99d7e63ee06b05dd88af4db9460672c3628c948cb17e5ca2f56817 SHA512 0994eef854b991c2db290712aff892e900ef3bab84607e385b4f78e3213b816739e42d5010afaaf30f6c68d5bc52b509b7c6e797e8e87db499a49f75b4cfd232 -DIST Django-4.2.13.tar.gz 10430886 BLAKE2B 09e8743de500f11c32c540d23d9aae1377c83177089732c78c03501dc560fd7b4316d6032534c923c354539421e519ed8439fc09d61500cea479c9eaf115f160 SHA512 2d141e2d710dbd55999db9c7005ca4a8d291dad57f0ef246eb41d4ffed76e62035b36969c5f338c3158ccd2d1677eb23de0b8f783606b4c62a3ee45e8988b712 -DIST Django-5.0.6.checksum.txt 2568 BLAKE2B c4c94e1a245248ed59707fb8aeb97a8379e679c50829d0470eefd2f870de32d5b57cb4841ac44809483993bc515514c3e2b0cdf0f1768681a4ba1930e2d278a3 SHA512 231954ae528beff69fbfa385aba192f19d56e862f1a2e5e40ccbba60ce31b59a075af31d75ab9e5767c9405a37f14fd3c5c41e74f60f6b7d6821391a43992301 -DIST Django-5.0.6.tar.gz 10639679 BLAKE2B 2198f273f28f89eb12db481e3531a963e2f5215677f0227d2ce8940cf1c2076acafe9bf1064595b481c6d65fadd7c6d6c7cda5fbbded81a87895e697338c78fd SHA512 6dab32357c423762a4fdd7372aec0ae4855861431fb9a90d4a818144e675cf891c0673a11351ddf8344f31624ce0ea8c9d9c6bc3c4514f38380aecb48a684894 +DIST Django-4.2.14.checksum.txt 2579 BLAKE2B 9cf59d23c8fa0ad9b86f30a492d981a3084c31fd0c7e8ea212c62377385bcb45369ee3f29573c8e129f8d248ca4e94d4c1a4172048b9a9b2f66cc3291e972367 SHA512 c36efc19f8cc90db89dfe3ffaedff724f4b5a049f6def7acb194f8114a2ae519c5c07dea5452c09618629c9d585867de4b028bcef382f43d24f753f4a100c1c6 +DIST Django-4.2.14.tar.gz 10432993 BLAKE2B 0139669111f834bcb79fea5fa2bc43386d62a65790fda9d762f8ac4e2a32f2a3740629e31c863b2643fa13b893938c33b066c21f27857f391715b7cec88dfad7 SHA512 2663454c48f57a441d1620faad30ac25750d1e71bf34eddbdef3e6d8dd208913752ab657447ffea5e9d3a0676a4a4d501fa88a40a0ca0fd361df0782a6b3306b +DIST Django-5.0.7.checksum.txt 2569 BLAKE2B 0d4cecf064da9313058606569fcb014c5f3d5ec3c60a5a056cd8242ed9a8349b6d273c38010ba3d41fac85e5551a21748a7739772ad310f8c64224243745eac5 SHA512 9ec2e5e3ac0cb99be9349373c2cf47c6055e0bb729e5bb7e476350cd39595c4c82e7eab9a7eb286a9199834bed65d7f3d31ba59509d6e2e827b0f9c743aa9fcd +DIST Django-5.0.7.tar.gz 10642686 BLAKE2B 559c3e3dd3971081e8572a707f59054ec84d9922493caddec9e008c5e850e8beb7bfbca291e4e7157e94d4fcd655983e3444f1c8f078342c8b66b3e8ce122ab7 SHA512 29aa4cd7bfdc5c00479c9d60d988653bab76dcfd8cd553ab446f6c274f99677ccaef0571b0afdf1579215918f500d87a0b098a98452c7526e89b1ab64f00b037 DIST django-4.2.8-pypy3.patch.xz 5900 BLAKE2B b7dc5c5fc162817a218ee6d025ed8a65559b80e4506e49ac393428c26e2621f9e7c5010b36f2412dea8194a9f1086ab21f97286eabd696c6a786285eb07393cf SHA512 f953b5adbd1364f1d84dde55087ccb493256b1327701275fd2fe99f3cd41751d18e002b6e21afc96892e1671428a6b8f3c2e4b88252c3c278f1a79e286bb73e3 DIST django-5.0-pypy3.patch.xz 6124 BLAKE2B 7eba7cc70b30743cf4e186a2c5b0f27c13f49114a7a80bcaa2b25fdd7a959583c115a302c9bc6da97c32f6401cf8f3616818ba759190d317c5b033a0f0088766 SHA512 c550e2b2c1243d13cd1f4908f4b6df606355d1491e3bf72042e4b4777a4474306ff0f67b1c2eb4ab4d137cc85bde52dcdbd54bec245d2ba2e092545be8a2993b -EBUILD django-3.2.25.ebuild 3041 BLAKE2B 293a3705879ca309be9f5d7f10251d8ebe8593c6966bad010ecd3512693c575b2a364e0f5f76f8e14682ea00f8dc757a3aa0499a4b4214f9963f458711bf5508 SHA512 33e714421ca6664ed4c45d2b57ea54d20005b0797d7b902f53b6e424321735080551363acecbefa0959d80048201cbcbefc6f092fc9963ffeb37bad0ffb8a8f7 -EBUILD django-4.2.13.ebuild 2849 BLAKE2B a8e4e8071b0c3853b3bf304c3085e7b6fc4ee182df7dd7cb65603a6179238589bb148f4d18ce98c2c4d254d7a95def052a10f5a865dc1fc58c89e82f902422bb SHA512 16f5471623fd32c1d967bc44e9a0cc11edcd157a06630ebdd8145f25f5c088588e73fcd9710ee78bea3f2602a9d862aa96d2a52a8f6e5888b840718181fa5318 -EBUILD django-5.0.6.ebuild 3008 BLAKE2B a8839458df094b4b0365e6c4b0c07b26dfd0e3ccae15605a62a6500cbb4d8b769a00fa90e7370cad715ca2b4ae835eb17f326685bd1bdeea58645b765cc7d5ef SHA512 9cd60f9f98f3d5bafcd3984ae1f287bc1a0c5cec9ed51152a26b5a2f90049cde1baa7b61b6b00aee3e75d6a03db459f90d4034a7dde940ba9f8878580bc5738d +EBUILD django-4.2.14.ebuild 2849 BLAKE2B a8e4e8071b0c3853b3bf304c3085e7b6fc4ee182df7dd7cb65603a6179238589bb148f4d18ce98c2c4d254d7a95def052a10f5a865dc1fc58c89e82f902422bb SHA512 16f5471623fd32c1d967bc44e9a0cc11edcd157a06630ebdd8145f25f5c088588e73fcd9710ee78bea3f2602a9d862aa96d2a52a8f6e5888b840718181fa5318 +EBUILD django-5.0.7.ebuild 3008 BLAKE2B a8839458df094b4b0365e6c4b0c07b26dfd0e3ccae15605a62a6500cbb4d8b769a00fa90e7370cad715ca2b4ae835eb17f326685bd1bdeea58645b765cc7d5ef SHA512 9cd60f9f98f3d5bafcd3984ae1f287bc1a0c5cec9ed51152a26b5a2f90049cde1baa7b61b6b00aee3e75d6a03db459f90d4034a7dde940ba9f8878580bc5738d MISC metadata.xml 400 BLAKE2B 6b3414ac734f078d90c82b44edd2f9f70e494e98da8a3d874d18006ae5e0eb5f7060b98b402094d6045e800bf525586f2566e6f554a8b2999cce37bdcc5472a0 SHA512 1cf0bb6ef93da3abbd1a66878462b1b8672a9b8fccd7f968b427e429caa6ecf30cb703a6060d621ccad1ba77b927d2b0e632b04b0a47975918ccbfcc5f2b85f7 diff --git a/dev-python/django/django-3.2.25.ebuild b/dev-python/django/django-3.2.25.ebuild deleted file mode 100644 index a026c5a478e4..000000000000 --- a/dev-python/django/django-3.2.25.ebuild +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..11} ) -PYTHON_REQ_USE='sqlite?,threads(+)' - -inherit bash-completion-r1 distutils-r1 optfeature verify-sig - -DESCRIPTION="High-level Python web framework" -HOMEPAGE=" - https://www.djangoproject.com/ - https://github.com/django/django/ - https://pypi.org/project/Django/ -" -SRC_URI=" - https://media.djangoproject.com/releases/$(ver_cut 1-2)/${P^}.tar.gz - verify-sig? ( https://media.djangoproject.com/pgp/${P^}.checksum.txt ) -" -S="${WORKDIR}/${P^}" - -LICENSE="BSD" -# admin fonts: Roboto (media-fonts/roboto) -LICENSE+=" Apache-2.0" -# admin icons, jquery, xregexp.js -LICENSE+=" MIT" -SLOT="0" -KEYWORDS="amd64 arm arm64 ~ppc ~ppc64 ~riscv ~sparc x86 ~x64-macos" -IUSE="doc sqlite test" -RESTRICT="!test? ( test )" - -RDEPEND=" - >=dev-python/asgiref-3.3.4[${PYTHON_USEDEP}] - dev-python/pytz[${PYTHON_USEDEP}] - >=dev-python/sqlparse-0.2.2[${PYTHON_USEDEP}] - sys-libs/timezone-data -" -BDEPEND=" - test? ( - $(python_gen_impl_dep sqlite) - ${RDEPEND} - dev-python/docutils[${PYTHON_USEDEP}] - dev-python/jinja[${PYTHON_USEDEP}] - dev-python/numpy[${PYTHON_USEDEP}] - dev-python/pillow[webp,${PYTHON_USEDEP}] - dev-python/pyyaml[${PYTHON_USEDEP}] - dev-python/selenium[${PYTHON_USEDEP}] - dev-python/tblib[${PYTHON_USEDEP}] - sys-devel/gettext - ) - verify-sig? ( >=sec-keys/openpgp-keys-django-20201201 ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-3.1-bashcomp.patch - "${FILESDIR}"/django-3.2.19-py311.patch - # needed for Python 3.11 - "${FILESDIR}"/django-3.2.20-urlsplit.patch -) - -distutils_enable_sphinx docs --no-autodoc - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/django.asc - -src_unpack() { - if use verify-sig; then - cd "${DISTDIR}" || die - verify-sig_verify_signed_checksums \ - "${P^}.checksum.txt" sha256 "${P^}.tar.gz" - cd "${WORKDIR}" || die - fi - - default -} - -python_prepare_all() { - # Fails because of warnings - sed -i 's/test_dumpdata_proxy_with_concrete/_&/' tests/fixtures/tests.py || die - # TODO: this suddenly started failing - sed -i -e 's:test_custom_fields:_&:' tests/inspectdb/tests.py || die - - distutils-r1_python_prepare_all -} - -python_test() { - # Tests have non-standard assumptions about PYTHONPATH, - # and don't work with ${BUILD_DIR}/lib. - PYTHONPATH=. "${EPYTHON}" tests/runtests.py --settings=test_sqlite -v2 || - die "Tests fail with ${EPYTHON}" -} - -python_install_all() { - newbashcomp extras/django_bash_completion ${PN}-admin - bashcomp_alias ${PN}-admin django-admin.py - - distutils-r1_python_install_all -} - -pkg_postinst() { - optfeature_header "Additional Backend support can be enabled via:" - optfeature "MySQL backend support" dev-python/mysqlclient - optfeature "PostgreSQL backend support" dev-python/psycopg:2 - optfeature_header - optfeature "GEO Django" "sci-libs/gdal[geos]" - optfeature "Memcached support" dev-python/pylibmc dev-python/python-memcached - optfeature "ImageField Support" dev-python/pillow - optfeature "Password encryption" dev-python/bcrypt -} diff --git a/dev-python/django/django-4.2.13.ebuild b/dev-python/django/django-4.2.14.ebuild index 7379e6655f94..7379e6655f94 100644 --- a/dev-python/django/django-4.2.13.ebuild +++ b/dev-python/django/django-4.2.14.ebuild diff --git a/dev-python/django/django-5.0.6.ebuild b/dev-python/django/django-5.0.7.ebuild index be69e34a55a0..be69e34a55a0 100644 --- a/dev-python/django/django-5.0.6.ebuild +++ b/dev-python/django/django-5.0.7.ebuild diff --git a/dev-python/django/files/django-3.1-bashcomp.patch b/dev-python/django/files/django-3.1-bashcomp.patch deleted file mode 100644 index 1652842aaa38..000000000000 --- a/dev-python/django/files/django-3.1-bashcomp.patch +++ /dev/null @@ -1,56 +0,0 @@ -From e0a8c0663debeb222bf78b97678f60929313b60a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Wed, 6 May 2020 07:24:05 +0200 -Subject: [PATCH] Remove completions unsuitable for autoloading - -The override of 'python*' completions, as well as the attempt -to './manage.py' completion are not going to work with autoloader. -Strip them. ---- - extras/django_bash_completion | 33 +-------------------------------- - 1 file changed, 1 insertion(+), 32 deletions(-) - -diff --git a/extras/django_bash_completion b/extras/django_bash_completion -index fa77d59aff..dfeb439a2e 100755 ---- a/extras/django_bash_completion -+++ b/extras/django_bash_completion -@@ -37,35 +37,4 @@ _django_completion() - DJANGO_AUTO_COMPLETE=1 $1 ) ) - } - # When the django-admin.py deprecation ends, remove django-admin.py. --complete -F _django_completion -o default django-admin.py manage.py django-admin -- --_python_django_completion() --{ -- if [[ ${COMP_CWORD} -ge 2 ]]; then -- local PYTHON_EXE=${COMP_WORDS[0]##*/} -- if echo "$PYTHON_EXE" | grep -qE "python([3-9]\.[0-9])?"; then -- local PYTHON_SCRIPT=${COMP_WORDS[1]##*/} -- if echo "$PYTHON_SCRIPT" | grep -qE "manage\.py|django-admin(\.py)?"; then -- COMPREPLY=( $( COMP_WORDS=( "${COMP_WORDS[*]:1}" ) -- COMP_CWORD=$(( COMP_CWORD-1 )) -- DJANGO_AUTO_COMPLETE=1 ${COMP_WORDS[*]} ) ) -- fi -- fi -- fi --} -- --# Support for multiple interpreters. --unset pythons --if command -v whereis &>/dev/null; then -- python_interpreters=$(whereis python | cut -d " " -f 2-) -- for python in $python_interpreters; do -- [[ $python != *-config ]] && pythons="${pythons} ${python##*/}" -- done -- unset python_interpreters -- pythons=$(echo "$pythons" | tr " " "\n" | sort -u | tr "\n" " ") --else -- pythons=python --fi -- --complete -F _python_django_completion -o default $pythons --unset pythons -+complete -F _django_completion -o default django-admin.py django-admin --- -2.28.0 - diff --git a/dev-python/django/files/django-3.2.19-py311.patch b/dev-python/django/files/django-3.2.19-py311.patch deleted file mode 100644 index 976537289ff3..000000000000 --- a/dev-python/django/files/django-3.2.19-py311.patch +++ /dev/null @@ -1,183 +0,0 @@ -From 2882cf6f184c7578219e2b5266623e82c0e9b8a2 Mon Sep 17 00:00:00 2001 -From: Mariusz Felisiak <felisiak.mariusz@gmail.com> -Date: Thu, 7 Apr 2022 07:02:21 +0200 -Subject: [PATCH] Refs #33173 -- Fixed test_runner/test_utils tests on Python - 3.11+. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Python 3.11 uses fully qualified test name in unittest output. See -https://github.com/python/cpython/commit/755be9b1505af591b9f2ee424a6525b6c2b65ce9 - -(rebased by Michał Górny) ---- - django/utils/version.py | 1 + - tests/test_runner/test_debug_sql.py | 30 ++++++++++++++++++----------- - tests/test_runner/test_parallel.py | 11 ++++++++--- - tests/test_utils/tests.py | 9 +++++++-- - 4 files changed, 35 insertions(+), 16 deletions(-) - -diff --git a/django/utils/version.py b/django/utils/version.py -index 74c327525e..0c2bfc626e 100644 ---- a/django/utils/version.py -+++ b/django/utils/version.py -@@ -15,6 +15,7 @@ PY37 = sys.version_info >= (3, 7) - PY38 = sys.version_info >= (3, 8) - PY39 = sys.version_info >= (3, 9) - PY310 = sys.version_info >= (3, 10) -+PY311 = sys.version_info >= (3, 11) - - - def get_version(version=None): -diff --git a/tests/test_runner/test_debug_sql.py b/tests/test_runner/test_debug_sql.py -index 0e8e4207d6..2b5fed7a76 100644 ---- a/tests/test_runner/test_debug_sql.py -+++ b/tests/test_runner/test_debug_sql.py -@@ -4,6 +4,7 @@ from io import StringIO - from django.db import connection - from django.test import TestCase - from django.test.runner import DiscoverRunner -+from django.utils.version import PY311 - - from .models import Person - -@@ -100,20 +101,27 @@ class TestDebugSQL(unittest.TestCase): - '''"test_runner_person"."first_name" = 'subtest-fail';'''), - ] - -+ # Python 3.11 uses fully qualified test name in the output. -+ method_name = ".runTest" if PY311 else "" -+ test_class_path = "test_runner.test_debug_sql.TestDebugSQL" - verbose_expected_outputs = [ -- 'runTest (test_runner.test_debug_sql.TestDebugSQL.FailingTest) ... FAIL', -- 'runTest (test_runner.test_debug_sql.TestDebugSQL.ErrorTest) ... ERROR', -- 'runTest (test_runner.test_debug_sql.TestDebugSQL.PassingTest) ... ok', -+ f"runTest ({test_class_path}.FailingTest{method_name}) ... FAIL", -+ f"runTest ({test_class_path}.ErrorTest{method_name}) ... ERROR", -+ f"runTest ({test_class_path}.PassingTest{method_name}) ... ok", - # If there are errors/failures in subtests but not in test itself, - # the status is not written. That behavior comes from Python. -- 'runTest (test_runner.test_debug_sql.TestDebugSQL.FailingSubTest) ...', -- 'runTest (test_runner.test_debug_sql.TestDebugSQL.ErrorSubTest) ...', -- ('''SELECT COUNT(*) AS "__count" ''' -- '''FROM "test_runner_person" WHERE ''' -- '''"test_runner_person"."first_name" = 'pass';'''), -- ('''SELECT COUNT(*) AS "__count" ''' -- '''FROM "test_runner_person" WHERE ''' -- '''"test_runner_person"."first_name" = 'subtest-pass';'''), -+ f"runTest ({test_class_path}.FailingSubTest{method_name}) ...", -+ f"runTest ({test_class_path}.ErrorSubTest{method_name}) ...", -+ ( -+ """SELECT COUNT(*) AS "__count" """ -+ """FROM "test_runner_person" WHERE """ -+ """"test_runner_person"."first_name" = 'pass';""" -+ ), -+ ( -+ """SELECT COUNT(*) AS "__count" """ -+ """FROM "test_runner_person" WHERE """ -+ """"test_runner_person"."first_name" = 'subtest-pass';""" -+ ), - ] - - def test_setupclass_exception(self): -diff --git a/tests/test_runner/test_parallel.py b/tests/test_runner/test_parallel.py -index c1a89bd0f0..0f1adcf208 100644 ---- a/tests/test_runner/test_parallel.py -+++ b/tests/test_runner/test_parallel.py -@@ -2,7 +2,7 @@ import unittest - - from django.test import SimpleTestCase - from django.test.runner import RemoteTestResult --from django.utils.version import PY37 -+from django.utils.version import PY37, PY311 - - try: - import tblib -@@ -78,8 +78,13 @@ class RemoteTestResultTest(SimpleTestCase): - self.assertEqual(len(events), 4) - - event = events[1] -- self.assertEqual(event[0], 'addSubTest') -- self.assertEqual(str(event[2]), 'dummy_test (test_runner.test_parallel.SampleFailingSubtest) (index=0)') -+ self.assertEqual(event[0], "addSubTest") -+ self.assertEqual( -+ str(event[2]), -+ "dummy_test (test_runner.test_parallel.SampleFailingSubtest%s) (index=0)" -+ # Python 3.11 uses fully qualified test name in the output. -+ % (".dummy_test" if PY311 else ""), -+ ) - trailing_comma = '' if PY37 else ',' - self.assertEqual(repr(event[3][1]), "AssertionError('0 != 1'%s)" % trailing_comma) - -diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py -index 9255315e98..8f72057afe 100644 ---- a/tests/test_utils/tests.py -+++ b/tests/test_utils/tests.py -@@ -26,6 +26,7 @@ from django.test.utils import ( - ) - from django.urls import NoReverseMatch, path, reverse, reverse_lazy - from django.utils.deprecation import RemovedInDjango41Warning -+from django.utils.version import PY311 - - from .models import Car, Person, PossessedCar - from .views import empty_response -@@ -78,9 +79,11 @@ class SkippingTestCase(SimpleTestCase): - SkipTestCase('test_foo').test_foo, - ValueError, - "skipUnlessDBFeature cannot be used on test_foo (test_utils.tests." -- "SkippingTestCase.test_skip_unless_db_feature.<locals>.SkipTestCase) " -+ "SkippingTestCase.test_skip_unless_db_feature.<locals>.SkipTestCase%s) " - "as SkippingTestCase.test_skip_unless_db_feature.<locals>.SkipTestCase " - "doesn't allow queries against the 'default' database." -+ # Python 3.11 uses fully qualified test name in the output. -+ % (".test_foo" if PY311 else ""), - ) - - def test_skip_if_db_feature(self): -@@ -122,9 +125,11 @@ class SkippingTestCase(SimpleTestCase): - SkipTestCase('test_foo').test_foo, - ValueError, - "skipIfDBFeature cannot be used on test_foo (test_utils.tests." -- "SkippingTestCase.test_skip_if_db_feature.<locals>.SkipTestCase) " -+ "SkippingTestCase.test_skip_if_db_feature.<locals>.SkipTestCase%s) " - "as SkippingTestCase.test_skip_if_db_feature.<locals>.SkipTestCase " - "doesn't allow queries against the 'default' database." -+ # Python 3.11 uses fully qualified test name in the output. -+ % (".test_foo" if PY311 else ""), - ) - - --- -2.40.0 - -From 0981a4bc273e2a87ad10c602d9547e006e06d8dd Mon Sep 17 00:00:00 2001 -From: Mariusz Felisiak <felisiak.mariusz@gmail.com> -Date: Fri, 7 Apr 2023 11:07:54 +0200 -Subject: [PATCH] Refs #34118 -- Fixed CustomChoicesTests.test_uuid_unsupported - on Python 3.11.4+. - -https://github.com/python/cpython/commit/5342f5e713e0cc45b6f226d2d053a8cde1b4d68e - -Follow up to 38e63c9e61152682f3ff982c85a73793ab6d3267. ---- - tests/model_enums/tests.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tests/model_enums/tests.py b/tests/model_enums/tests.py -index ffc199ce42..c4ca6c91d7 100644 ---- a/tests/model_enums/tests.py -+++ b/tests/model_enums/tests.py -@@ -259,7 +259,7 @@ class CustomChoicesTests(SimpleTestCase): - pass - - def test_uuid_unsupported(self): -- msg = 'UUID objects are immutable' -- with self.assertRaisesMessage(TypeError, msg): -+ with self.assertRaises(TypeError): -+ - class Identifier(uuid.UUID, models.Choices): - A = '972ce4eb-a95f-4a56-9339-68c208a76f18' --- -2.40.1 - diff --git a/dev-python/django/files/django-3.2.20-urlsplit.patch b/dev-python/django/files/django-3.2.20-urlsplit.patch deleted file mode 100644 index 4883da38c0f5..000000000000 --- a/dev-python/django/files/django-3.2.20-urlsplit.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 74fee3f5cab1481dcb299b6eeaf82f862470bafa Mon Sep 17 00:00:00 2001 -From: mendespedro <windowsxpedro@gmail.com> -Date: Wed, 15 Dec 2021 11:55:19 -0300 -Subject: [PATCH] Fixed #33367 -- Fixed URLValidator crash in some edge cases. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -[backported to 3.2.x by Michał Górny] ---- - django/core/validators.py | 13 +++--- - .../forms_tests/field_tests/test_urlfield.py | 40 +++++++++++++++---- - 2 files changed, 40 insertions(+), 13 deletions(-) - -diff --git a/django/core/validators.py b/django/core/validators.py -index b9b58dfa61..aad21f95ea 100644 ---- a/django/core/validators.py -+++ b/django/core/validators.py -@@ -111,15 +111,16 @@ class URLValidator(RegexValidator): - raise ValidationError(self.message, code=self.code, params={'value': value}) - - # Then check full URL -+ try: -+ splitted_url = urlsplit(value) -+ except ValueError: -+ raise ValidationError(self.message, code=self.code, params={'value': value}) - try: - super().__call__(value) - except ValidationError as e: - # Trivial case failed. Try for possible IDN domain - if value: -- try: -- scheme, netloc, path, query, fragment = urlsplit(value) -- except ValueError: # for example, "Invalid IPv6 URL" -- raise ValidationError(self.message, code=self.code, params={'value': value}) -+ scheme, netloc, path, query, fragment = splitted_url - try: - netloc = punycode(netloc) # IDN -> ACE - except UnicodeError: # invalid domain part -@@ -130,7 +131,7 @@ class URLValidator(RegexValidator): - raise - else: - # Now verify IPv6 in the netloc part -- host_match = re.search(r'^\[(.+)\](?::\d{2,5})?$', urlsplit(value).netloc) -+ host_match = re.search(r'^\[(.+)\](?::\d{1,5})?$', splitted_url.netloc) - if host_match: - potential_ip = host_match[1] - try: -@@ -142,7 +143,7 @@ class URLValidator(RegexValidator): - # section 3.1. It's defined to be 255 bytes or less, but this includes - # one byte for the length of the name and one byte for the trailing dot - # that's used to indicate absolute names in DNS. -- if len(urlsplit(value).hostname) > 253: -+ if splitted_url.hostname is None or len(splitted_url.hostname) > 253: - raise ValidationError(self.message, code=self.code, params={'value': value}) - - -diff --git a/tests/forms_tests/field_tests/test_urlfield.py b/tests/forms_tests/field_tests/test_urlfield.py -index 19e4351c6a..68b148e7b7 100644 ---- a/tests/forms_tests/field_tests/test_urlfield.py -+++ b/tests/forms_tests/field_tests/test_urlfield.py -@@ -135,13 +135,39 @@ class URLFieldTest(FormFieldAssertionsMixin, SimpleTestCase): - def test_urlfield_10(self): - """URLField correctly validates IPv6 (#18779).""" - f = URLField() -- urls = ( -- 'http://[12:34::3a53]/', -- 'http://[a34:9238::]:8080/', -- ) -- for url in urls: -- with self.subTest(url=url): -- self.assertEqual(url, f.clean(url)) -+ tests = [ -+ 'foo', -+ 'com.', -+ '.', -+ 'http://', -+ 'http://example', -+ 'http://example.', -+ 'http://.com', -+ 'http://invalid-.com', -+ 'http://-invalid.com', -+ 'http://inv-.alid-.com', -+ 'http://inv-.-alid.com', -+ '[a', -+ 'http://[a', -+ # Non-string. -+ 23, -+ # Hangs "forever" before fixing a catastrophic backtracking, -+ # see #11198. -+ 'http://%s' % ('X' * 60,), -+ # A second example, to make sure the problem is really addressed, -+ # even on domains that don't fail the domain label length check in -+ # the regex. -+ 'http://%s' % ("X" * 200,), -+ # urlsplit() raises ValueError. -+ '////]@N.AN', -+ # Empty hostname. -+ '#@A.bO', -+ ] -+ msg = "'Enter a valid URL.'" -+ for value in tests: -+ with self.subTest(value=value): -+ with self.assertRaisesMessage(ValidationError, msg): -+ f.clean(value) - - def test_urlfield_not_string(self): - f = URLField(required=False) --- -2.41.0 - |