summaryrefslogtreecommitdiff
path: root/dev-python/django
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-30 22:03:23 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-03-30 22:03:23 +0100
commited6e9ebb6ab4abd792d5b15e97ec245603dd6e2d (patch)
treee1f5f93f2986a4038351e6cf4804eb0c2aad060d /dev-python/django
parent8b63b46fda85d54cfbe94df2444a3ddd3e63b8e4 (diff)
gentoo auto-resync : 30:03:2023 - 22:03:23
Diffstat (limited to 'dev-python/django')
-rw-r--r--dev-python/django/Manifest2
-rw-r--r--dev-python/django/django-3.2.18-r1.ebuild110
-rw-r--r--dev-python/django/files/django-3.2.18-py311.patch153
3 files changed, 265 insertions, 0 deletions
diff --git a/dev-python/django/Manifest b/dev-python/django/Manifest
index bd9c27d54fee..4701846fede4 100644
--- a/dev-python/django/Manifest
+++ b/dev-python/django/Manifest
@@ -1,4 +1,5 @@
AUX django-3.1-bashcomp.patch 2085 BLAKE2B 36a0aa4d3413f13089ac104f5d3f98ecbb152a9a5a35f8c1ff2e5ffc9824153b0ac89f1cbca76c31a1afefde471e4d6ed801e405551b25cb31da89c20f3019cc SHA512 82dceede4292bad6e3e4966a6dba01bd2bbc7db494fce592e25dc4a64236485d88d8ad67b247239a80f8fe96dff054d20afea6f48a5518b67cf88404d399e61c
+AUX django-3.2.18-py311.patch 6716 BLAKE2B 6937c7dad0b4435906923cf08c47198d1d2046efbdc98dbcd914e66a6d72ea1d80393df71632e97f4f8aa3fdbc0e9cd63f4036dfc21833d9ce62de49986f76b9 SHA512 fb8c57bc1bcac563a6572ba54c2cb8ee98e6290ac44d75a380c841c048021e464aa85e60a41652d58094e21ec5b4ec4d677bbf9ce686fcbf1ea3e0999fe92c13
AUX django-4.0-bashcomp.patch 2021 BLAKE2B f04c83b500a92ea8ef9609225191e38a41b3349a295beca8f8575ab05395d0cf37e1aefe295004b11c1bcf34cce9074ac7d274034cb50e1ae43e2fcb5d6952b2 SHA512 2215dca4120023b0fd839738bd602443c49e9adaa98d182bc74081ebe70613649c2dc11e2b5f6242701dceac25755adb8605774895091360b56ed1195a7e629e
AUX django-4.0.5-py311.patch 9279 BLAKE2B 3082f4f9da3f127807402a55655b059019787143dd8c2cb14b1a27d2fbf66464179c2f08381284340fccb4e6bc1c25a1e36291a0dd8cbd83c754ee1f78d220b8 SHA512 d48f29fa5fe9e434a4220825d1592a03a0667d956db4e6c4119e74f91524b8d02b295a5a600516a993adc2dd3e1f5ca4bde83acd8a6a8e0838382116d2703a28
DIST Django-3.2.18.checksum.txt 2563 BLAKE2B 8deb25cdc9f3a859b68925b7c8615bf3bf955f0c5db7558818fc9177c2a5d5f588b848bb15094d5f2d1f9a92693204ddc753ef25411d328e8c7f755f93184b54 SHA512 b5fb24a525c10bbb1f82074b9637e4ddd68ec8bd80c3676f326f4be41a81643cb539c13123447895f6a3639d8938f70f009de31752eb5753ca1dc3dd162d9f92
@@ -7,6 +8,7 @@ DIST Django-4.0.10.checksum.txt 2563 BLAKE2B 1ec93751204e80d75f5f4f15086cfd9aabe
DIST Django-4.0.10.tar.gz 10430363 BLAKE2B d36aefd5d00023e5c4e34dda2b283e9a82d9e3b82576ce00cef7d9b75837ffdbf56327ad21ccefb02b79e8db93f12cf850541f4cb1d01b3dd28bdea0c73cb9d6 SHA512 04d1b207af21067c22c120486ff57ea602b3436adf1871f691735825afb30c3ed62f1cbc98d92fa70e9a818bcf50db70d949ab0c460f48f6027b75df9eba56c7
DIST Django-4.1.7.checksum.txt 2554 BLAKE2B 5a82eca5edb5b5d90c629c6d42414725b32ed55fc137cfb3fc9c5bfd392dc0fcc3f6b99eea64a16a88002a521bf910464a6fe11d9079d68e056acded3432be38 SHA512 4244abf4e81aec1f8daa7815f57483963e94cf67571f0c2f6ab67507515c7f6f72f86412a17c8e1e73170e1ed7d3d4503c5adba36c66d0b8f015350c81348116
DIST Django-4.1.7.tar.gz 10520415 BLAKE2B 88b66fea737f6fb1661a6987b9d6cecb84d58d675655a0ea5bed60ee28252edd11d8025498b7bc854b9c0c4814148bdc3bcdf59014dd040b5c424c3cd1711e46 SHA512 e34b0b05209297164d6cb84e7edf4740a2d638496c3107c06c0e773db292e9b02e6abbd8c3da347addaf17d9c9a56ef4873eb9edc5f1164e3d13d7f3ef083844
+EBUILD django-3.2.18-r1.ebuild 3109 BLAKE2B 8967ad33dff40ddd1612b05961e6645209ccd32d54ccabc54b742e2d3fa433b75c4db8be2f5a45ad2871ff3b9e5a6456ff04ba3c4dd5c48273bf7638bf03e4ea SHA512 2d4ceadad34853196663694f33afd6ec317892f55247d5c448a53e37ecbabe02094d1041d64b4814ead805646c12477a1cb4bc9634344bbda38e5d225bc37af0
EBUILD django-3.2.18.ebuild 3064 BLAKE2B 9870d944334ad12adc96f2701d6e72edcd684312f6dea6eeb10bc7e5f78278f819fd053e7ba5de8cf35998e962b2a05f4529b6177818336afc7825b9cd393a0b SHA512 0ca7d17d5b52120f9589a0b9e9802749603b2cdcf58a5697c55341e63a626bf95810daaf2e4ac4821113d39fbd4a0cba9657969f5d740d91080a2fe4d1aeff05
EBUILD django-4.0.10.ebuild 3028 BLAKE2B 062bd71385c3ea131706367b812f5102e1e8f82dcbd0b51f07b4a4ebf900cdb5c77451ea22ef79703831276f2f6b4dd71aac6817c59b78e90aae2c362fd0efce SHA512 02870c3cb88491fabd91553acf07f95afd3a2d133603de01320c5607337ed5466ab6efa3459ef2cae3d9d7736e39f70d1a449ebf7d9eaafcdd499f36c30f9ad4
EBUILD django-4.1.7.ebuild 2881 BLAKE2B 27dcb7fcad3b27c80714598b17dbc1b32f1ec13494f070cd44922ce72739ade4b2345594bae780eec5dc97dd8e2c58755ebe582aa4b5145e5556ffd6ce2df903 SHA512 1e0a4eacd93b27b2812ab210911b2f94d3e21f7f0ae987c107e56deb1df9ed4caefc071a5a10bf5f39e66550e70ac8bfc1ee5024cbf1653b0954a9fbb1c6d51d
diff --git a/dev-python/django/django-3.2.18-r1.ebuild b/dev-python/django/django-3.2.18-r1.ebuild
new file mode 100644
index 000000000000..bc404dde5670
--- /dev/null
+++ b/dev-python/django/django-3.2.18-r1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..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}]
+"
+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
+ !!<dev-python/ipython-7.21.0-r1
+ !!=dev-python/ipython-7.22.0-r0
+ )
+ verify-sig? ( >=sec-keys/openpgp-keys-django-20201201 )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1-bashcomp.patch
+ "${FILESDIR}"/django-3.2.18-py311.patch
+)
+
+distutils_enable_sphinx docs --no-autodoc
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/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
+ optfeature "High-level abstractions for Django forms" dev-python/django-formtools
+}
diff --git a/dev-python/django/files/django-3.2.18-py311.patch b/dev-python/django/files/django-3.2.18-py311.patch
new file mode 100644
index 000000000000..2cebb8cc817b
--- /dev/null
+++ b/dev-python/django/files/django-3.2.18-py311.patch
@@ -0,0 +1,153 @@
+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
+