public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/django/files/, dev-python/django/
Date: Tue,  3 Aug 2021 08:52:29 +0000 (UTC)	[thread overview]
Message-ID: <1627980743.8d2990505684e8aae3f448e5ecfb12b04c9602b8.mgorny@gentoo> (raw)

commit:     8d2990505684e8aae3f448e5ecfb12b04c9602b8
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  3 06:15:32 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Aug  3 08:52:23 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d299050

dev-python/django: Bump to 3.2.6

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/django/Manifest                         |   2 +
 dev-python/django/django-3.2.6.ebuild              | 103 +++++++++++++++++++++
 .../django/files/django-3.2.6-argparse-py310.patch |  52 +++++++++++
 3 files changed, 157 insertions(+)

diff --git a/dev-python/django/Manifest b/dev-python/django/Manifest
index d1ab52f5e4b..fe0e31a141c 100644
--- a/dev-python/django/Manifest
+++ b/dev-python/django/Manifest
@@ -4,3 +4,5 @@ DIST Django-3.1.13.checksum.txt 2552 BLAKE2B e82052d952f7dfd15e11b413fe2f106af3d
 DIST Django-3.1.13.tar.gz 9656683 BLAKE2B bb2dd72ba2dfc13c8f487d6b59cd9302160800dca4f63b92e640eddf4aba2e5b1bd67580e56477bced44a5393b5f65a463a9c0c539ba998a20606bffdfafcf74 SHA512 55b1ceb24b6e0ba542a96319f63b138439532cf4b00971a8432baaab4a8ee219cc9fbb31d457ba7da9e932c919df83da9630866d909df4a5d432866b158098d7
 DIST Django-3.2.5.checksum.txt 2543 BLAKE2B 4a07a518bdde4670dc3bf079d8d3cfa32b6580cc06f18306a2127463f3a6a2d8f2a50c4562092439c7c99ccf80dde160b061180826c94d4e1064d5064ff500fe SHA512 b073ff758843f72b6467dae7580941774de9702db02a6fab303cb696cb22c84ca961885792e8ec85545294610f34a4eb52ac3f6521c190d2c339c1957ab4156a
 DIST Django-3.2.5.tar.gz 9806547 BLAKE2B d804d758f95f18aac5c44cba9bd9248efa56cba91bea5db2ac89e8c2202ac1fd088b61d6cc98eb7d6d33a95f85983b801c6cc26a3231986a8cf224a0bbeb8a7c SHA512 03d4eee650a857bed298658c68b916beb74690d16b4b28d649c52a7c2d8a61e92f53136d2de3a77fabe1dd01c0e6b3033befc6842f39c222793fb590b1020c13
+DIST Django-3.2.6.checksum.txt 2551 BLAKE2B 2fae4e3daca01f285f651b76df7402a0c08cdea9a98bdc3be3f9b337732c26b2a3dcb239fc06274b6a30227394047476d454bf34fd7e8b765df047510b08620c SHA512 66b9dff471928be514198e50e62f46d14fbea9c1cfb55e9d82562271795fc3e719e0bb8c43a1f6ff6c903700b648a6a0e19e335ddc50df2a7fa539911b6d44b6
+DIST Django-3.2.6.tar.gz 9821499 BLAKE2B 9f18d308bf15ef16a9fe9d84219bd7ad37833b718ff975344aae5950ef01a7a0e8ef8669936c8908e38e07fb078ce2e2d6392968177400c2357b1d3787e0ce39 SHA512 adf2d2ab3006cc5b389bed8d8e16ee8c98393b20d719c3521068e5cc5d1e679b9f660be90f827ea1cc6a41f975641c32bdb0779ee145e5e31a501ca9e06898a4

diff --git a/dev-python/django/django-3.2.6.ebuild b/dev-python/django/django-3.2.6.ebuild
new file mode 100644
index 00000000000..49eee54f6d6
--- /dev/null
+++ b/dev-python/django/django-3.2.6.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE='sqlite?,threads(+)'
+
+inherit bash-completion-r1 distutils-r1 optfeature verify-sig
+
+MY_P=${P^}
+DESCRIPTION="High-level Python web framework"
+HOMEPAGE="https://www.djangoproject.com/ https://pypi.org/project/Django/"
+SRC_URI="
+	https://media.djangoproject.com/releases/$(ver_cut 1-2)/${MY_P}.tar.gz
+	verify-sig? ( https://media.djangoproject.com/pgp/${MY_P}.checksum.txt )"
+S="${WORKDIR}/${MY_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? ( >=app-crypt/openpgp-keys-django-20201201 )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.1-bashcomp.patch
+	# https://github.com/django/django/pull/14732
+	"${FILESDIR}"/${P}-argparse-py310.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 \
+			"${MY_P}.checksum.txt" sha256 "${MY_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
+
+	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.6-argparse-py310.patch b/dev-python/django/files/django-3.2.6-argparse-py310.patch
new file mode 100644
index 00000000000..3702a4c58c7
--- /dev/null
+++ b/dev-python/django/files/django-3.2.6-argparse-py310.patch
@@ -0,0 +1,52 @@
+From dc7d30c03ff72917584952e70b3b25c9a0c59033 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 3 Aug 2021 10:04:22 +0200
+Subject: [PATCH] Refs #32074 -- Update expected argparse error in invalid
+ choice test
+
+Python 3.10.0rc1 changed the error messages issued by argparse on
+invalid choice to include the argument name.  Update the expected test
+output to account for that.
+---
+ django/utils/version.py      | 1 +
+ tests/user_commands/tests.py | 5 +++--
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/django/utils/version.py b/django/utils/version.py
+index 4b26586b36..54b10e89d7 100644
+--- a/django/utils/version.py
++++ b/django/utils/version.py
+@@ -13,6 +13,7 @@ PY36 = sys.version_info >= (3, 6)
+ PY37 = sys.version_info >= (3, 7)
+ PY38 = sys.version_info >= (3, 8)
+ PY39 = sys.version_info >= (3, 9)
++PY310 = sys.version_info >= (3, 10)
+ 
+ 
+ def get_version(version=None):
+diff --git a/tests/user_commands/tests.py b/tests/user_commands/tests.py
+index 9262e2717a..9da0977c38 100644
+--- a/tests/user_commands/tests.py
++++ b/tests/user_commands/tests.py
+@@ -17,7 +17,7 @@ from django.test import SimpleTestCase, override_settings
+ from django.test.utils import captured_stderr, extend_sys_path, ignore_warnings
+ from django.utils import translation
+ from django.utils.deprecation import RemovedInDjango41Warning
+-from django.utils.version import PY37
++from django.utils.version import PY37, PY310
+ 
+ from .management.commands import dance
+ 
+@@ -334,7 +334,8 @@ class CommandTests(SimpleTestCase):
+         self.assertIn('bar', out.getvalue())
+ 
+     def test_subparser_invalid_option(self):
+-        msg = "Error: invalid choice: 'test' (choose from 'foo')"
++        msg = "Error: %sinvalid choice: 'test' (choose from 'foo')" % (
++            'argument {foo}: ' if PY310 else '')
+         with self.assertRaisesMessage(CommandError, msg):
+             management.call_command('subparser', 'test', 12)
+         if PY37:
+-- 
+2.32.0
+


             reply	other threads:[~2021-08-03  8:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03  8:52 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-10  6:38 [gentoo-commits] repo/gentoo:master commit in: dev-python/django/files/, dev-python/django/ Michał Górny
2024-06-19 17:21 Michał Górny
2023-07-23 11:24 Michał Górny
2023-05-04 15:30 Michał Górny
2023-05-04  8:06 Michał Górny
2023-03-30 15:41 Michał Górny
2022-06-13  7:18 Michał Górny
2021-12-07 23:27 Michał Górny
2021-10-17 21:15 Michał Górny
2021-06-01 20:35 Michał Górny
2021-05-09  8:23 Michał Górny
2021-02-13 20:15 Michał Górny
2020-10-29 20:25 Michał Górny
2020-05-06  6:04 Michał Górny
2020-03-05 19:07 Michał Górny
2018-09-03 13:33 Virgil Dupras
2018-07-21  1:06 Virgil Dupras
2018-07-21  0:20 Virgil Dupras
2015-12-02  7:53 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1627980743.8d2990505684e8aae3f448e5ecfb12b04c9602b8.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox