From: Marius Bakke <marius@gnu.org>
To: 43354@debbugs.gnu.org
Subject: [bug#43354] [PATCH 02/55] gnu: python-django: Update to 3.1.1.
Date: Sat, 12 Sep 2020 16:28:18 +0200 [thread overview]
Message-ID: <20200912142911.6231-2-marius@gnu.org> (raw)
In-Reply-To: <20200912142911.6231-1-marius@gnu.org>
* gnu/packages/django.scm (python-django): Update to 3.1.1.
[arguments]: Remove #:modules. Rename set-tzdir phase to pre-check, and
disable one test. Adjust PYTHONPATH patching to preserve all entries. Ensure
the test suite runs sequentially.
[propagated-inputs]: Add PYTHON-ASGIREF.
(python-django-2.2): New public variable.
* gnu/packages/mail.scm (python-hyperkitty)[propagated-inptus]: Change from
PYTHON-DJANGO to PYTHON-DJANGO-2.2.
* gnu/packages/patchutils.scm (patchwork)[propagated-inputs]: Likewise.
---
gnu/packages/django.scm | 67 ++++++++++++++++++++++++++-----------
gnu/packages/mail.scm | 2 +-
gnu/packages/patchutils.scm | 2 +-
3 files changed, 50 insertions(+), 21 deletions(-)
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 2370de62f5..662bc110dd 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
;;; Copyright © 2019 Sam <smbaines8@gmail.com>
+;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -45,43 +46,55 @@
(define-public python-django
(package
(name "python-django")
- (version "1.11.29")
+ (version "3.1.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "Django" version))
(sha256
(base32
- "171jsi54fbnxzi2n3l4hkdmmwfnfrwacs180rw59l0bqcvxsw022"))))
+ "0bzwy58hrxbsh7szak1yfh7qvvfnpdpi8ay1x7d3pvbkm1f15j2r"))))
(build-system python-build-system)
(arguments
- '(#:modules ((srfi srfi-1)
- (guix build python-build-system)
- (guix build utils))
- #:phases
+ '(#:phases
(modify-phases %standard-phases
- (add-before 'check 'set-tzdir
+ (add-before 'check 'pre-check
(lambda* (#:key inputs #:allow-other-keys)
;; The test-suite tests timezone-dependent functions, thus tzdata
;; needs to be available.
(setenv "TZDIR"
(string-append (assoc-ref inputs "tzdata")
"/share/zoneinfo"))
- #t))
- (replace 'check
- (lambda* (#:key inputs #:allow-other-keys)
- (setenv "PYTHONPATH"
- (string-append ".:" (getenv "PYTHONPATH")))
+
+ ;; Disable test for incorrect timezone: it only raises the
+ ;; expected error when /usr/share/zoneinfo exists, even though
+ ;; the machinery gracefully falls back to TZDIR. According to
+ ;; django/conf/__init__.py, lack of /usr/share/zoneinfo is
+ ;; harmless, so just ignore this test.
+ (substitute* "tests/settings_tests/tests.py"
+ ((".*def test_incorrect_timezone.*" all)
+ (string-append " @unittest.skipIf(True, 'Disabled by Guix')\n"
+ all)))
+
+ ;; Preserve the PYTHONPATH created by Guix when running the tests.
(substitute* "tests/admin_scripts/tests.py"
(("python_path = \\[")
(string-append "python_path = ['"
- (find (lambda (entry)
- (string-prefix?
- (assoc-ref inputs "python-pytz")
- entry))
- (string-split (getenv "PYTHONPATH")
- #\:))
+ (string-join
+ (string-split (getenv "PYTHONPATH") #\:)
+ "','")
"', ")))
- (invoke "python" "tests/runtests.py"))))))
+
+ #t))
+ (replace 'check
+ (lambda _
+ (with-directory-excursion "tests"
+ (setenv "PYTHONPATH"
+ (string-append "..:" (getenv "PYTHONPATH")))
+ (invoke "python" "runtests.py"
+ ;; By default tests run in parallel, which may cause
+ ;; various race conditions. Run sequentially for
+ ;; consistent results.
+ "--parallel=1")))))))
;; TODO: Install extras/django_bash_completion.
(native-inputs
`(("tzdata" ,tzdata-for-tests)
@@ -99,6 +112,7 @@
("python-tblib" ,python-tblib)))
(propagated-inputs
`(("python-argon2-cffi" ,python-argon2-cffi)
+ ("python-asgiref" ,python-asgiref)
("python-bcrypt" ,python-bcrypt)
("python-pytz" ,python-pytz)))
(home-page "https://www.djangoproject.com/")
@@ -125,6 +139,21 @@ to the @dfn{don't repeat yourself} (DRY) principle.")
;; required.
,@(package-native-inputs base))))))
+(define-public python-django-2.2
+ (package
+ (inherit python-django)
+ (version "2.2.16")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "Django" version))
+ (sha256
+ (base32
+ "1535g2r322cl4x52fb0dmzlbg23539j2wx6027j54p22xvjlbkv2"))))
+ (native-inputs
+ `(;; XXX: In 2.2 and 3.0, selenium is required for the test suite.
+ ("python-selenium" ,python-selenium)
+ ,@(package-native-inputs python-django)))))
+
(define-public python-django-extensions
(package
(name "python-django-extensions")
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 4a9c6fc90f..15b9b1dd4e 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -3045,7 +3045,7 @@ which sends emails to HyperKitty, the official Mailman3 web archiver.")
"--settings=hyperkitty.tests.settings_test"))))))
(propagated-inputs
`(("python-dateutil" ,python-dateutil)
- ("python-django" ,python-django)
+ ("python-django" ,python-django-2.2)
("python-django-compressor" ,python-django-compressor)
("python-django-extensions" ,python-django-extensions)
("python-django-gravatar2" ,python-django-gravatar2)
diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index c26977be1f..335d251e74 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -467,7 +467,7 @@ if __name__ == \"__main__\":
(inputs
`(("python-wrapper" ,python-wrapper)))
(propagated-inputs
- `(("python-django" ,python-django)
+ `(("python-django" ,python-django-2.2)
;; TODO: Make this configurable
("python-psycopg2" ,python-psycopg2)
("python-mysqlclient" ,python-mysqlclient)
--
2.28.0
next prev parent reply other threads:[~2020-09-12 14:30 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-12 14:26 [bug#43354] [PATCH 00/55] Django upgrade Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 01/55] gnu: Add python-asgiref Marius Bakke
2020-09-12 14:28 ` Marius Bakke [this message]
2020-09-12 14:28 ` [bug#43354] [PATCH 03/55] gnu: python-django: Propagate python-sqlparse Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 04/55] gnu: python-pytest-django: Update to 3.9.0 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 05/55] gnu: python-django-simple-math-captcha: Update to 1.0.9 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 06/55] gnu: python-django-classy-tags: Update to 2.0.0 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 07/55] gnu: python-django-extensions: Update to 3.0.6 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 08/55] gnu: python-django-taggit: Update to 1.3.0 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 09/55] gnu: python-django-crispy-forms: Update to 1.9.2 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 10/55] gnu: python-djangorestframework: Update to 3.11.1 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 11/55] gnu: python-django-filter: Update to 2.3.0 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 12/55] gnu: python-django-allauth: Update to 0.42.0 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 13/55] gnu: Add python-css-html-js-minify Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 14/55] gnu: python-django-pipeline: Update to 2.0.5 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 15/55] gnu: python-django-jinja: Update to 2.6.0 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 16/55] gnu: python-django-debug-toolbar: Update to 2.2 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 17/55] gnu: python-django-gravatar2: Update to 1.4.4 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 18/55] gnu: python-webassets: Update to 2.0 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 19/55] gnu: python-django-assets: " Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 20/55] gnu: python-dj-database-url: Update to 0.5.0 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 21/55] gnu: python-django-picklefield: Update to 3.0.1 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 22/55] gnu: python-django-bulk-update: Update to 2.2.0 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 23/55] gnu: python-django-contact-form: Update to 1.8.1 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 24/55] gnu: python-django-contrib-comments: Update to 1.9.2 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 25/55] gnu: python-django-redis: Update to 4.12.1 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 26/55] gnu: python-redis: Update to 3.5.3 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 27/55] gnu: python-rq: Update to 1.5.1 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 28/55] gnu: Add python-croniter Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 29/55] gnu: Add python-rq-scheduler Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 30/55] gnu: python-django-rq: Update to 2.3.2 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 31/55] gnu: python-django-q: Update to 1.3.3 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 32/55] gnu: python-django-sortedm2m: Update to 3.0.2 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 33/55] gnu: python-django-appconf: Update to 1.0.4 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 34/55] gnu: python-django-statici18n: Update to 1.9.0 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 35/55] gnu: python-django-sekizai: Update to 2.0.0 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 36/55] gnu: python-django-override-storage: Update to 0.3.0 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 37/55] gnu: python-ldap: Update to 3.3.1 Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 38/55] gnu: Add python-django-auth-ldap Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 39/55] gnu: Add python-django-logging-json Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 40/55] gnu: Add python-django-netfields Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 41/55] gnu: Add python-sqlalchemy-mock Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 42/55] gnu: Add python-jsonplus Marius Bakke
2020-09-12 14:28 ` [bug#43354] [PATCH 43/55] gnu: Add python-django-debug-toolbar-alchemy Marius Bakke
2020-09-12 14:29 ` [bug#43354] [PATCH 44/55] gnu: Add python-django-url-filter Marius Bakke
2020-09-12 14:29 ` [bug#43354] [PATCH 45/55] gnu: Remove pootle Marius Bakke
2020-09-12 14:29 ` [bug#43354] [PATCH 46/55] gnu: Remove python2-django-mailman3 Marius Bakke
2020-09-12 14:29 ` [bug#43354] [PATCH 47/55] gnu: python2-graphite-web: Update to 1.1.7 Marius Bakke
2020-09-12 14:29 ` [bug#43354] [PATCH 48/55] gnu: Remove python2 versions of Django packages Marius Bakke
2020-09-12 14:29 ` [bug#43354] [PATCH 49/55] gnu: Deprecate python-django-jsonfield Marius Bakke
2020-09-12 14:29 ` [bug#43354] [PATCH 50/55] gnu: Remove python-django-overextends Marius Bakke
2020-09-12 14:29 ` [bug#43354] [PATCH 51/55] gnu: Django packages no longer propagates Django Marius Bakke
2020-09-12 14:29 ` [bug#43354] [PATCH 52/55] gnu: python-mysqlclient: Remove unused inputs Marius Bakke
2020-09-12 14:29 ` [bug#43354] [PATCH 53/55] gnu: python-mysqlclient: Update to 2.0.1 Marius Bakke
2020-09-12 14:29 ` [bug#43354] [PATCH 54/55] gnu: Remove python2-mysqlclient Marius Bakke
2020-09-12 14:29 ` [bug#43354] [PATCH 55/55] gnu: patchwork: Update to 2.2.2 Marius Bakke
2020-09-22 16:45 ` bug#43354: [PATCH 00/55] Django upgrade Marius Bakke
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200912142911.6231-2-marius@gnu.org \
--to=marius@gnu.org \
--cc=43354@debbugs.gnu.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).