GNU bug report logs - #28726
[PATCH] Update python-sqlparse and fix some dependent packages

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Fri, 6 Oct 2017 20:21:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28726 in the body.
You can then email your comments to 28726 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Fri, 06 Oct 2017 20:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 06 Oct 2017 20:21:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] Update python-sqlparse and fix some dependent packages
Date: Fri, 6 Oct 2017 21:20:26 +0100
[Message part 1 (text/plain, inline)]
I tried to update python-sqlparse, but it turns out that quite a few of
the dependant packages were broken already.

I've managed to fix all but one of them. The python-django-mailman3
package still fails to build, I think because it (or at least the
testsuite) is not compatible with python 3.

Christopher Baines (5):
  gnu: django: Fix the build for python-django-gravatar2.
  gnu: django: Fix building python-django-allauth.
  gnu: django: Fix building python2-django-mailman3.
  gnu: python: Disable tests for python-graphene.
  gnu: python: Update python-sqlparse.

 gnu/packages/django.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++---
 gnu/packages/mail.scm   | 11 ++++++++++
 gnu/packages/python.scm |  7 +++++--
 3 files changed, 67 insertions(+), 5 deletions(-)
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Fri, 06 Oct 2017 20:28:02 GMT) Full text and rfc822 format available.

Message #8 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28726 <at> debbugs.gnu.org
Subject: [PATCH 3/5] gnu: django: Fix building python2-django-mailman3.
Date: Fri,  6 Oct 2017 21:27:00 +0100
The python-django-mailman3 build is still broken, as I don't think this
package is compatible with python3 yet. With this patch, the tests fail due to
the lack of urllib2 (which is just urllib in python3).

* gnu/packages/django.scm (python-django-mailman3)[arguments]: Modify the
  phases to run the tests using django-admin.
---
 gnu/packages/mail.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index cc3977e2c..62bcfef1a 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2091,6 +2091,17 @@ installation on systems where resources are limited.  Its features include:
         (base32
          "1adxyh8knw9knjlh73xq0jpn5adml0ck4alsv0swakm95wfyx46z"))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (zero?
+              (system*
+               "django-admin"
+               "test"
+               "--settings=django_mailman3.tests.settings_test"
+               "django_mailman3")))))))
     (inputs
      `(("python-django" ,python-django)))
     (propagated-inputs
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Fri, 06 Oct 2017 20:28:02 GMT) Full text and rfc822 format available.

Message #11 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28726 <at> debbugs.gnu.org
Subject: [PATCH 4/5] gnu: python: Disable tests for python-graphene.
Date: Fri,  6 Oct 2017 21:27:01 +0100
As the tests are missing from the PyPI release.

* gnu/packages/python.scm (python-graphene)[arguments]: Set #:tests? to #f.
---
 gnu/packages/python.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 594dd38e4..6489bb415 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -13099,6 +13099,9 @@ from Facebook.")
          (base32
           "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
     (build-system python-build-system)
+    (arguments
+     ;; Tests missing from PyPI release.
+     '(#:tests? #f))
     (native-inputs
      `(("python-django-filter" ,python-django-filter)
        ("python-mock" ,python-mock)
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Fri, 06 Oct 2017 20:28:02 GMT) Full text and rfc822 format available.

Message #14 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28726 <at> debbugs.gnu.org
Subject: [PATCH 5/5] gnu: python: Update python-sqlparse.
Date: Fri,  6 Oct 2017 21:27:02 +0100
* gnu/packages/python.scm (python-sqlparse)[version]: 0.1.19 -> 0.2.4.
  [source]: Update the sha256 hash.
---
 gnu/packages/python.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 6489bb415..8362696e9 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -11548,13 +11548,13 @@ multiple processes (imagine multiprocessing, billiard, futures, celery etc).
 (define-public python-sqlparse
   (package
     (name "python-sqlparse")
-    (version "0.1.19")
+    (version "0.2.4")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "sqlparse" version))
               (sha256
                (base32
-                "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
+                "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Fri, 06 Oct 2017 20:28:03 GMT) Full text and rfc822 format available.

Message #17 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28726 <at> debbugs.gnu.org
Subject: [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2.
Date: Fri,  6 Oct 2017 21:26:58 +0100
The build was failing as the Django settings were not configured for the
tests. The relevant files are missing from the release on PyPI, so switch to
using a more complete source release. Also update the package at the same
time.

* gnu/packages/django.scm (python-django-gravatar2)[version]: 1.4.0 -> 1.4.2.
  [source]: Change to use a tarball from GitHub, update the sha256 hash.
  [arguments]: Add a phase to skip a test requiring network access, and
  replace the check phase to call ./manage.py within the example_project
  directory.
---
 gnu/packages/django.scm | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index c70c07493..fb8663d3f 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -226,15 +226,43 @@ account authentication.")
 (define-public python-django-gravatar2
   (package
     (name "python-django-gravatar2")
-    (version "1.4.0")
+    (version "1.4.2")
     (source
      (origin
        (method url-fetch)
-       (uri (pypi-uri "django-gravatar2" version))
+       (uri (string-append
+             "https://github.com/twaddington/django-gravatar/archive/"
+             version ".tar.gz"))
        (sha256
         (base32
-         "1v4qyj6kms321yw0z2g1kch6b2dskmv6fjd6sfxzwr4xshq9mccl"))))
+         "1qa0awqkfnfcjx7d5ijgr9hj8ifpq5xrj16196im4hw9r9i1wapf"))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; TODO: Tagging the tests requiring the web could be done upstream.
+         (add-before 'check 'skip-test-requiring-network-access
+           (lambda _
+             (substitute* "django_gravatar/tests.py"
+               (("def test_has_gravatar")
+                "from django.test import tag
+    @tag('requires-web')
+    def test_has_gravatar"))))
+         (replace 'check
+           (lambda _
+             (setenv "PYTHONPATH"
+                     (string-append
+                      (getcwd)
+                      ":"
+                      (getenv "PYTHONPATH")))
+             (with-directory-excursion "example_project"
+               (zero?
+                (system*
+                 "./manage.py"
+                 "test"
+                 "--verbosity=2"
+                 "--exclude-tag=requires-web"
+                 "django_gravatar"))))))))
     (inputs
      `(("python-django" ,python-django)))
     (home-page "https://github.com/twaddington/django-gravatar")
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Fri, 06 Oct 2017 20:28:03 GMT) Full text and rfc822 format available.

Message #20 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28726 <at> debbugs.gnu.org
Subject: [PATCH 2/5] gnu: django: Fix building python-django-allauth.
Date: Fri,  6 Oct 2017 21:26:59 +0100
* gnu/packages/django.scm (python-django-allauth)[arguments]: Modify the
  standard phases to skip a test, and run the tests using django-admin with
  the settings configured.
---
 gnu/packages/django.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index fb8663d3f..93068300d 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -204,6 +204,26 @@ them do this.")
         (base32
          "1fslqc5qqb0b66yscvkyjwfv8cnbfx5nlkpnwimyb3pf1nc1w7r3"))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; TODO: Tagging the tests requiring the web could be done upstream.
+         (add-before 'check 'skip-test-requiring-network-access
+           (lambda _
+             (substitute* "allauth/socialaccount/providers/openid/tests.py"
+               (("def test_login")
+                "from django.test import tag
+    @tag('requires-web')
+    def test_login"))))
+         (replace 'check
+           (lambda _
+             (setenv "DJANGO_SETTINGS_MODULE" "test_settings")
+             (zero? (system*
+                     "django-admin"
+                     "test"
+                     "allauth"
+                     "--verbosity=2"
+                     "--exclude-tag=requires-web")))))))
     (propagated-inputs
      `(("python-openid" ,python-openid)
        ("python-requests" ,python-requests)
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Sun, 08 Oct 2017 03:32:02 GMT) Full text and rfc822 format available.

Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Cyril Roelandt <tipecaml <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: Re: [bug#28726] [PATCH 1/5] gnu: django: Fix the build for
 python-django-gravatar2.
Date: Sun, 8 Oct 2017 05:30:56 +0200
On 10/06/2017 10:26 PM, Christopher Baines wrote:
> The build was failing as the Django settings were not configured for the
> tests. The relevant files are missing from the release on PyPI, so switch to
> using a more complete source release. Also update the package at the same
> time.
What are these missing files? Couldn't we add them using a patch? Is
there a reason why they were not included in PyPI, or is this a bug?

The reason why we'd like to use PyPI rather than other URLs is that,
when using PyPI, "guix refresh" is able to find new releases automatically.


Cyril.




Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Sun, 08 Oct 2017 03:33:01 GMT) Full text and rfc822 format available.

Message #26 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Cyril Roelandt <tipecaml <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: Re: [bug#28726] [PATCH 4/5] gnu: python: Disable tests for
 python-graphene.
Date: Sun, 8 Oct 2017 05:32:30 +0200
On 10/06/2017 10:27 PM, Christopher Baines wrote:
> As the tests are missing from the PyPI release.

Looks good to me.

This is done on purpose:
https://github.com/graphql-python/graphene/blob/master/MANIFEST.in . Do
you think the authors would be open to fix this?


Cyril.




Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Sun, 08 Oct 2017 03:41:01 GMT) Full text and rfc822 format available.

Message #29 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Cyril Roelandt <tipecaml <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: Re: [bug#28726] [PATCH 5/5] gnu: python: Update python-sqlparse.
Date: Sun, 8 Oct 2017 05:39:52 +0200
On 10/06/2017 10:27 PM, Christopher Baines wrote:
> * gnu/packages/python.scm (python-sqlparse)[version]: 0.1.19 -> 0.2.4.
>   [source]: Update the sha256 hash.
OK, thanks!


Cyril.




Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Sun, 08 Oct 2017 03:44:02 GMT) Full text and rfc822 format available.

Message #32 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Cyril Roelandt <tipecaml <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: Re: [bug#28726] [PATCH 3/5] gnu: django: Fix building
 python2-django-mailman3.
Date: Sun, 8 Oct 2017 05:42:50 +0200
On 10/06/2017 10:27 PM, Christopher Baines wrote:
> The python-django-mailman3 build is still broken, as I don't think this
> package is compatible with python3 yet. With this patch, the tests fail due to
> the lack of urllib2 (which is just urllib in python3).

You're right: https://gitlab.com/mailman/django-mailman3/issues/3 .


Shouldn't this package be removed? I believe we should only keep the
Python 2 version. WDYT?

Cyril.




Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Sun, 08 Oct 2017 07:55:01 GMT) Full text and rfc822 format available.

Message #35 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: ng0 <ng0 <at> infotropique.org>
To: Cyril Roelandt <tipecaml <at> gmail.com>
Cc: 28726 <at> debbugs.gnu.org
Subject: Re: [bug#28726] [PATCH 3/5] gnu: django: Fix building
 python2-django-mailman3.
Date: Sun, 8 Oct 2017 07:53:54 +0000
[Message part 1 (text/plain, inline)]
Cyril Roelandt transcribed 0.4K bytes:
> On 10/06/2017 10:27 PM, Christopher Baines wrote:
> > The python-django-mailman3 build is still broken, as I don't think this
> > package is compatible with python3 yet. With this patch, the tests fail due to
> > the lack of urllib2 (which is just urllib in python3).
> 
> You're right: https://gitlab.com/mailman/django-mailman3/issues/3 .
> 
> 
> Shouldn't this package be removed? I believe we should only keep the
> Python 2 version. WDYT?
> 
> Cyril.

As far as I understood Harmut and Mailman back then, only some parts
of mailman3 are python3 compatible (search the mailinglist for it).
I seem to be remember that it was limited to frontends so far, so
you are right it should be removed.
-- 
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://krosos.org/dist/keys/
https://www.infotropique.org https://krosos.org
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Sun, 08 Oct 2017 07:57:02 GMT) Full text and rfc822 format available.

Message #38 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: ng0 <ng0 <at> infotropique.org>
To: Cyril Roelandt <tipecaml <at> gmail.com>
Cc: 28726 <at> debbugs.gnu.org
Subject: Re: [bug#28726] [PATCH 4/5] gnu: python: Disable tests for
 python-graphene.
Date: Sun, 8 Oct 2017 07:55:58 +0000
[Message part 1 (text/plain, inline)]
Cyril Roelandt transcribed 0.3K bytes:
> On 10/06/2017 10:27 PM, Christopher Baines wrote:
> > As the tests are missing from the PyPI release.
> 
> Looks good to me.
> 
> This is done on purpose:
> https://github.com/graphql-python/graphene/blob/master/MANIFEST.in . Do
> you think the authors would be open to fix this?
> 
> 
> Cyril.

As I would say: "Don't ask to ask, just ask".
Even when it might take a very long time, you'll get a response
from upstream developers.
-- 
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://krosos.org/dist/keys/
https://www.infotropique.org https://krosos.org
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Sun, 08 Oct 2017 14:53:01 GMT) Full text and rfc822 format available.

Message #41 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Cyril Roelandt <tipecaml <at> gmail.com>
Cc: 28726 <at> debbugs.gnu.org
Subject: Re: [bug#28726] [PATCH 1/5] gnu: django: Fix the build for
 python-django-gravatar2.
Date: Sun, 8 Oct 2017 15:52:45 +0100
[Message part 1 (text/plain, inline)]
On Sun, 8 Oct 2017 05:30:56 +0200
Cyril Roelandt <tipecaml <at> gmail.com> wrote:

> On 10/06/2017 10:26 PM, Christopher Baines wrote:
> > The build was failing as the Django settings were not configured
> > for the tests. The relevant files are missing from the release on
> > PyPI, so switch to using a more complete source release. Also
> > update the package at the same time.  
> What are these missing files? Couldn't we add them using a patch? Is
> there a reason why they were not included in PyPI, or is this a bug?

It's the example_project/settings.py file that is key. I guess this
could be added as a patch, it's a little long at 168 lines though.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Sun, 08 Oct 2017 16:03:02 GMT) Full text and rfc822 format available.

Message #44 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Cyril Roelandt <tipecaml <at> gmail.com>
Cc: 28726 <at> debbugs.gnu.org
Subject: Re: [bug#28726] [PATCH 1/5] gnu: django: Fix the build for
 python-django-gravatar2.
Date: Sun, 8 Oct 2017 17:02:20 +0100
[Message part 1 (text/plain, inline)]
On Sun, 8 Oct 2017 15:52:45 +0100
Christopher Baines <mail <at> cbaines.net> wrote:

> On Sun, 8 Oct 2017 05:30:56 +0200
> Cyril Roelandt <tipecaml <at> gmail.com> wrote:
> 
> > On 10/06/2017 10:26 PM, Christopher Baines wrote:  
> > > The build was failing as the Django settings were not configured
> > > for the tests. The relevant files are missing from the release on
> > > PyPI, so switch to using a more complete source release. Also
> > > update the package at the same time.    
> > What are these missing files? Couldn't we add them using a patch? Is
> > there a reason why they were not included in PyPI, or is this a
> > bug?  
> 
> It's the example_project/settings.py file that is key. I guess this
> could be added as a patch, it's a little long at 168 lines though.

On a more practical note, I don't know of an proper way of generating
such a patch. The only approaches that come to mind are going through
Git, or writing it manually in Emacs, both of which seem bad. Any
advice on generating patches?
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Sun, 08 Oct 2017 16:04:01 GMT) Full text and rfc822 format available.

Message #47 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28726 <at> debbugs.gnu.org
Subject: [PATCH 2/6] gnu: django: Fix building python-django-allauth.
Date: Sun,  8 Oct 2017 17:03:48 +0100
* gnu/packages/django.scm (python-django-allauth)[arguments]: Modify the
  standard phases to skip a test, and run the tests using django-admin with
  the settings configured.
---
 gnu/packages/django.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index fb8663d3f..93068300d 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -204,6 +204,26 @@ them do this.")
         (base32
          "1fslqc5qqb0b66yscvkyjwfv8cnbfx5nlkpnwimyb3pf1nc1w7r3"))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; TODO: Tagging the tests requiring the web could be done upstream.
+         (add-before 'check 'skip-test-requiring-network-access
+           (lambda _
+             (substitute* "allauth/socialaccount/providers/openid/tests.py"
+               (("def test_login")
+                "from django.test import tag
+    @tag('requires-web')
+    def test_login"))))
+         (replace 'check
+           (lambda _
+             (setenv "DJANGO_SETTINGS_MODULE" "test_settings")
+             (zero? (system*
+                     "django-admin"
+                     "test"
+                     "allauth"
+                     "--verbosity=2"
+                     "--exclude-tag=requires-web")))))))
     (propagated-inputs
      `(("python-openid" ,python-openid)
        ("python-requests" ,python-requests)
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Sun, 08 Oct 2017 16:04:02 GMT) Full text and rfc822 format available.

Message #50 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28726 <at> debbugs.gnu.org
Subject: [PATCH 1/6] gnu: django: Fix the build for python-django-gravatar2.
Date: Sun,  8 Oct 2017 17:03:47 +0100
The build was failing as the Django settings were not configured for the
tests. The relevant files are missing from the release on PyPI, so switch to
using a more complete source release. Also update the package at the same
time.

* gnu/packages/django.scm (python-django-gravatar2)[version]: 1.4.0 -> 1.4.2.
  [source]: Change to use a tarball from GitHub, update the sha256 hash.
  [arguments]: Add a phase to skip a test requiring network access, and
  replace the check phase to call ./manage.py within the example_project
  directory.
---
 gnu/packages/django.scm | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index c70c07493..fb8663d3f 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -226,15 +226,43 @@ account authentication.")
 (define-public python-django-gravatar2
   (package
     (name "python-django-gravatar2")
-    (version "1.4.0")
+    (version "1.4.2")
     (source
      (origin
        (method url-fetch)
-       (uri (pypi-uri "django-gravatar2" version))
+       (uri (string-append
+             "https://github.com/twaddington/django-gravatar/archive/"
+             version ".tar.gz"))
        (sha256
         (base32
-         "1v4qyj6kms321yw0z2g1kch6b2dskmv6fjd6sfxzwr4xshq9mccl"))))
+         "1qa0awqkfnfcjx7d5ijgr9hj8ifpq5xrj16196im4hw9r9i1wapf"))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; TODO: Tagging the tests requiring the web could be done upstream.
+         (add-before 'check 'skip-test-requiring-network-access
+           (lambda _
+             (substitute* "django_gravatar/tests.py"
+               (("def test_has_gravatar")
+                "from django.test import tag
+    @tag('requires-web')
+    def test_has_gravatar"))))
+         (replace 'check
+           (lambda _
+             (setenv "PYTHONPATH"
+                     (string-append
+                      (getcwd)
+                      ":"
+                      (getenv "PYTHONPATH")))
+             (with-directory-excursion "example_project"
+               (zero?
+                (system*
+                 "./manage.py"
+                 "test"
+                 "--verbosity=2"
+                 "--exclude-tag=requires-web"
+                 "django_gravatar"))))))))
     (inputs
      `(("python-django" ,python-django)))
     (home-page "https://github.com/twaddington/django-gravatar")
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Sun, 08 Oct 2017 16:04:02 GMT) Full text and rfc822 format available.

Message #53 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28726 <at> debbugs.gnu.org
Subject: [PATCH 3/6] gnu: mail: Fix building python2-django-mailman3.
Date: Sun,  8 Oct 2017 17:03:49 +0100
The python-django-mailman3 build is still broken, as I don't think this
package is compatible with python3 yet. With this patch, the tests fail due to
the lack of urllib2 (which is just urllib in python3).

* gnu/packages/mail.scm (python-django-mailman3)[arguments]: Modify the phases
  to run the tests using django-admin.
---
 gnu/packages/mail.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index ddf583649..4d0e177e5 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2091,6 +2091,17 @@ installation on systems where resources are limited.  Its features include:
         (base32
          "1adxyh8knw9knjlh73xq0jpn5adml0ck4alsv0swakm95wfyx46z"))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (zero?
+              (system*
+               "django-admin"
+               "test"
+               "--settings=django_mailman3.tests.settings_test"
+               "django_mailman3")))))))
     (inputs
      `(("python-django" ,python-django)))
     (propagated-inputs
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Sun, 08 Oct 2017 16:04:03 GMT) Full text and rfc822 format available.

Message #56 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28726 <at> debbugs.gnu.org
Subject: [PATCH 4/6] gnu: python: Disable tests for python-graphene.
Date: Sun,  8 Oct 2017 17:03:50 +0100
As the tests are missing from the PyPI release.

* gnu/packages/python.scm (python-graphene)[arguments]: Set #:tests? to #f.
---
 gnu/packages/python.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index cc7aa8fa4..eb98f5f13 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -13112,6 +13112,9 @@ from Facebook.")
          (base32
           "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
     (build-system python-build-system)
+    (arguments
+     ;; Tests missing from PyPI release.
+     '(#:tests? #f))
     (native-inputs
      `(("python-django-filter" ,python-django-filter)
        ("python-mock" ,python-mock)
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Sun, 08 Oct 2017 16:04:03 GMT) Full text and rfc822 format available.

Message #59 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28726 <at> debbugs.gnu.org
Subject: [PATCH 6/6] gnu: mail: Remove python-django-mailman3.
Date: Sun,  8 Oct 2017 17:03:52 +0100
This package fails to build, as django-mailman3 currently only works with
Python 2.

* gnu/packages/mail.scm (python-django-mailman3): Removed variable.
  (python2-django-mailman3): Inline the use of python-django-mailman3, and
  remove the use of package-with-python2.
---
 gnu/packages/mail.scm | 34 +++++++++++++---------------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 4d0e177e5..dfa78da26 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2079,9 +2079,9 @@ installation on systems where resources are limited.  Its features include:
 @end enumerate\n")
     (license license:expat)))
 
-(define-public python-django-mailman3
+(define-public python2-django-mailman3
   (package
-    (name "python-django-mailman3")
+    (name "python2-django-mailman3")
     (version "1.0.1")
     (source
      (origin
@@ -2092,7 +2092,7 @@ installation on systems where resources are limited.  Its features include:
          "1adxyh8knw9knjlh73xq0jpn5adml0ck4alsv0swakm95wfyx46z"))))
     (build-system python-build-system)
     (arguments
-     '(#:phases
+     `(#:phases
        (modify-phases %standard-phases
          (replace 'check
            (lambda _
@@ -2101,17 +2101,18 @@ installation on systems where resources are limited.  Its features include:
                "django-admin"
                "test"
                "--settings=django_mailman3.tests.settings_test"
-               "django_mailman3")))))))
+               "django_mailman3")))))
+       #:python ,python-2))
     (inputs
-     `(("python-django" ,python-django)))
+     `(("python2-django" ,python2-django)))
     (propagated-inputs
-     `(("python-requests" ,python-requests)
-       ("python-requests-oauthlib" ,python-requests-oauthlib)
-       ("python-openid" ,python-openid)
-       ("python-mailmanclient" ,python-mailmanclient)
-       ("python-django-allauth" ,python-django-allauth)
-       ("python-django-gravatar2" ,python-django-gravatar2)
-       ("python-pytz" ,python-pytz)))
+     `(("python2-requests" ,python2-requests)
+       ("python2-requests-oauthlib" ,python2-requests-oauthlib)
+       ("python2-openid" ,python2-openid)
+       ("python2-mailmanclient" ,python2-mailmanclient)
+       ("python2-django-allauth" ,python2-django-allauth)
+       ("python2-django-gravatar2" ,python2-django-gravatar2)
+       ("python2-pytz" ,python2-pytz)))
     (home-page "https://gitlab.com/mailman/django-mailman3")
     (synopsis "Django library for Mailman UIs")
     (description
@@ -2119,15 +2120,6 @@ installation on systems where resources are limited.  Its features include:
 interacting with Mailman.")
     (license gpl3+)))
 
-(define-public python2-django-mailman3
-  (let ((base (package-with-python2
-               python-django-mailman3)))
-    (package
-      (inherit base)
-      (propagated-inputs
-       `(("python2-openid" ,python2-openid)
-         ,@(package-propagated-inputs base))))))
-
 (define-public postorius
   (package
     (name "postorius")
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Sun, 08 Oct 2017 16:04:03 GMT) Full text and rfc822 format available.

Message #62 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28726 <at> debbugs.gnu.org
Subject: [PATCH 5/6] gnu: python: Update python-sqlparse.
Date: Sun,  8 Oct 2017 17:03:51 +0100
* gnu/packages/python.scm (python-sqlparse)[version]: 0.1.19 -> 0.2.4.
  [source]: Update the sha256 hash.
---
 gnu/packages/python.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index eb98f5f13..8b2ed6612 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -11561,13 +11561,13 @@ multiple processes (imagine multiprocessing, billiard, futures, celery etc).
 (define-public python-sqlparse
   (package
     (name "python-sqlparse")
-    (version "0.1.19")
+    (version "0.2.4")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "sqlparse" version))
               (sha256
                (base32
-                "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
+                "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#28726; Package guix-patches. (Sun, 08 Oct 2017 16:05:02 GMT) Full text and rfc822 format available.

Message #65 received at 28726 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: ng0 <ng0 <at> infotropique.org>
Cc: 28726 <at> debbugs.gnu.org, Cyril Roelandt <tipecaml <at> gmail.com>
Subject: Re: [bug#28726] [PATCH 3/5] gnu: django: Fix building
 python2-django-mailman3.
Date: Sun, 8 Oct 2017 17:04:57 +0100
[Message part 1 (text/plain, inline)]
On Sun, 8 Oct 2017 07:53:54 +0000
ng0 <ng0 <at> infotropique.org> wrote:

> Cyril Roelandt transcribed 0.4K bytes:
> > On 10/06/2017 10:27 PM, Christopher Baines wrote:  
> > > The python-django-mailman3 build is still broken, as I don't
> > > think this package is compatible with python3 yet. With this
> > > patch, the tests fail due to the lack of urllib2 (which is just
> > > urllib in python3).  
> > 
> > You're right: https://gitlab.com/mailman/django-mailman3/issues/3 .
> > 
> > 
> > Shouldn't this package be removed? I believe we should only keep the
> > Python 2 version. WDYT?
> > 
> > Cyril.  
> 
> As far as I understood Harmut and Mailman back then, only some parts
> of mailman3 are python3 compatible (search the mailinglist for it).
> I seem to be remember that it was limited to frontends so far, so
> you are right it should be removed.

Ok. I've sent an updated set of patches, which includes a patch to
remove the Python 3 variant.
[Message part 2 (application/pgp-signature, inline)]

Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Fri, 24 Nov 2017 22:25:01 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Fri, 24 Nov 2017 22:25:02 GMT) Full text and rfc822 format available.

Message #70 received at 28726-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28726-done <at> debbugs.gnu.org
Subject: Re: [bug#28726] [PATCH] Update python-sqlparse and fix some dependent
 packages
Date: Fri, 24 Nov 2017 22:23:57 +0000
[Message part 1 (text/plain, inline)]
Christopher Baines writes:

> I tried to update python-sqlparse, but it turns out that quite a few of
> the dependant packages were broken already.
>
> I've managed to fix all but one of them. The python-django-mailman3
> package still fails to build, I think because it (or at least the
> testsuite) is not compatible with python 3.
>
> Christopher Baines (5):
>   gnu: django: Fix the build for python-django-gravatar2.
>   gnu: django: Fix building python-django-allauth.
>   gnu: django: Fix building python2-django-mailman3.
>   gnu: python: Disable tests for python-graphene.
>   gnu: python: Update python-sqlparse.
>
>  gnu/packages/django.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++---
>  gnu/packages/mail.scm   | 11 ++++++++++
>  gnu/packages/python.scm |  7 +++++--
>  3 files changed, 67 insertions(+), 5 deletions(-)

So, I left this for so long that the update I was trying to do was done
by someone else (in [1]), which is fine, but there was still some stuff
to finish off here.

As above, some of the dependant packages were broken already. I've
checked this just now, and pushed a couple of the patches that were
being tracked in this bug, the python-django-allauth fix, and the
removal of python-django-mailman3.

I've left the python-django-gravatar2 fix for now, as there were some
open questions about the change in source from PyPI.

1: 8d688cd27f267f4d143d0f20ed3c352188151302
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 23 Dec 2017 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 119 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.