[PATCH] Update python-sqlparse and fix some dependent packages

  • Done
  • quality assurance status badge
Details
3 participants
  • Christopher Baines
  • ng0
  • Cyril Roelandt
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal

Debbugs page

Christopher Baines wrote 7 years ago
(address . guix-patches@gnu.org)
20171006212026.5797a685@cbaines.net
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(-)
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlnX5YpfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XelvA//blO2C8JYxzEiqWDHUo3kvXwgrobjcTmBjefl+LL/dW8u6mxUcKHqIwyj
sHZp0kdsWypmVwCG/6THm3azkkbMOhk7M3nEwVGYY5KWaUbpFCfTFOkCF2Fdvnxl
oC3yUkjhGX0YaHDh/Z4wvpu3l6DzGA1AeFl47Z4owHveoBXkPZzofCVUZZtwfI9p
kaU6RiajHjXRL1hd3BiJwkMDjFApL+2ylkWvnkQrIsBCBqwnbrYi478FL1+kUmqu
gL/EJ/L321Q7ySPceg6MO4RNbT/Vn5dxeO0pQi7p50Fj54xlORBd22GsY7zRvs0S
WoeqJmGyqrntmJbyFhBbNJQzblv9Iw0+Ghloqa6vyQFEm7wEp7vcv342RI8mnljL
D4OIQyH8FujXulwWHcAWf0mZlx3Otv9ofC+nJnLAmNfVRwcLRleAAGw6kjVY9QQk
0uOJL8gH1pW8oyg5wHP/jZbo+7kxUS6KErbu6X4+pMqeisgkJsBG0T47549IF3s4
xg8HDTm4lXyEHylY1a3GslJK8L3xL8VSzszDnWwihp6BapAsm86Qe0zyVDWmet4E
kEl+pX81aQrhFbnq8kwNaEJGiMFA4k8ychnB1t2PDq+ov4OYPEITudvd2o9mn8Ba
caAjKmXyKdxBlhkxEbDUG8xsEeYhYg1d1AQySG8ocURowuAEi5Q=
=xN/Z
-----END PGP SIGNATURE-----


Christopher Baines wrote 7 years ago
[PATCH 3/5] gnu: django: Fix building python2-django-mailman3.
(address . 28726@debbugs.gnu.org)
20171006202702.1511-3-mail@cbaines.net
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(+)

Toggle diff (24 lines)
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
Christopher Baines wrote 7 years ago
[PATCH 4/5] gnu: python: Disable tests for python-graphene.
(address . 28726@debbugs.gnu.org)
20171006202702.1511-4-mail@cbaines.net
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(+)

Toggle diff (16 lines)
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
Christopher Baines wrote 7 years ago
[PATCH 5/5] gnu: python: Update python-sqlparse.
(address . 28726@debbugs.gnu.org)
20171006202702.1511-5-mail@cbaines.net
* 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(-)

Toggle diff (22 lines)
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
Christopher Baines wrote 7 years ago
[PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2.
(address . 28726@debbugs.gnu.org)
20171006202702.1511-1-mail@cbaines.net
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(-)

Toggle diff (53 lines)
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
Christopher Baines wrote 7 years ago
[PATCH 2/5] gnu: django: Fix building python-django-allauth.
(address . 28726@debbugs.gnu.org)
20171006202702.1511-2-mail@cbaines.net
* 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(+)

Toggle diff (33 lines)
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
Cyril Roelandt wrote 7 years ago
Re: [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2.
(address . guix-patches@gnu.org)
aea0b8e9-b220-8bce-e3dc-a6749e8c1aad@gmail.com
On 10/06/2017 10:26 PM, Christopher Baines wrote:
Toggle quote (4 lines)
> 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.
Cyril Roelandt wrote 7 years ago
Re: [bug#28726] [PATCH 4/5] gnu: python: Disable tests for python-graphene.
(address . guix-patches@gnu.org)
b15be03e-46d8-20b5-a6a7-eaa51fd559d2@gmail.com
On 10/06/2017 10:27 PM, Christopher Baines wrote:
Toggle quote (2 lines)
> As the tests are missing from the PyPI release.

Looks good to me.

This is done on purpose:
you think the authors would be open to fix this?


Cyril.
Cyril Roelandt wrote 7 years ago
Re: [bug#28726] [PATCH 5/5] gnu: python: Update python-sqlparse.
(address . guix-patches@gnu.org)
3c26a9f6-aec1-9b09-d983-46773f70db7f@gmail.com
On 10/06/2017 10:27 PM, Christopher Baines wrote:
Toggle quote (2 lines)
> * gnu/packages/python.scm (python-sqlparse)[version]: 0.1.19 -> 0.2.4.
> [source]: Update the sha256 hash.
OK, thanks!


Cyril.
Cyril Roelandt wrote 7 years ago
Re: [bug#28726] [PATCH 3/5] gnu: django: Fix building python2-django-mailman3.
(address . guix-patches@gnu.org)
0d85a0df-14ad-6e97-1313-88ad0d3e6fab@gmail.com
On 10/06/2017 10:27 PM, Christopher Baines wrote:
Toggle quote (4 lines)
> 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).



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

Cyril.
ng0 wrote 7 years ago
(name . Cyril Roelandt)(address . tipecaml@gmail.com)(address . 28726@debbugs.gnu.org)
20171008075354.hy33ft7gpvniciik@abyayala
Cyril Roelandt transcribed 0.4K bytes:
Toggle quote (13 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlnZ2ZIACgkQ4i+bv+40
hYj2tg//aVgXd0YxTVjelSMdH63Tc1x9OqMLjiEeH6m4MGYd9HNR8aM8xou749xS
iopOpOk8krynV2tjBfuSOqIUmipjt3hdWQBWSte8SS/SkUT8u6PEmeB9TFFcQ5in
WzxT8XYi+7IdIz0w4sajJmHXtJEC7N5Jnw8FdDhoez+xBjhkNbL3ALt2AthNb/4f
igdMzU5C+MR11umyBvKQ/CulO3wO9G58PvePFW2QIeNyYDNqh55UzaMuq/VocTE3
b/g2shaKxMVSpFYcdR0vp6pfiUk2UcwQ3UWKvIU6xnlJVFqCfUthx//FyMoOs4xf
vFa7DZcu4/mI87f127T2DpAvHnMOJCjY9Chl9tFNpsHtcvJ+OKULR4s/t3vC02b2
XY72/p4eVDZ0ScxY9FUhrOJIHtZaq/2PDlLvuclR1Fwve8Yjh9m+dXgmaCQb3h8D
4sOVKhxJ1GXm8QoiAqSfiG6DO/xOiUp+w8jXvNkTTd8qr97Tq8G/0Hegt5XS3W02
9IcNm7rWemrKm95Zb0CSVjJSprGlW8CfxQ5N5b0sUxN1E3emNmNzmEmm6N5xsnFZ
b9GD1kTguMoVmzOjU3dQEwxF/UD8P/VoL9kgmRRilfjueDt+OWBUHD0elXU+m17c
oMgobvD2xejxS9UANQVQrm6LG41FrLeXy6eYYxfVt1PXiQ7YkCI=
=ptDc
-----END PGP SIGNATURE-----


ng0 wrote 7 years ago
Re: [bug#28726] [PATCH 4/5] gnu: python: Disable tests for python-graphene.
(name . Cyril Roelandt)(address . tipecaml@gmail.com)(address . 28726@debbugs.gnu.org)
20171008075558.jbof5twg7dootv4x@abyayala
Cyril Roelandt transcribed 0.3K bytes:
Toggle quote (12 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlnZ2g4ACgkQ4i+bv+40
hYj6dA//QGpOosHz6ubTRN48LJvg94uLAq+sPWK14+vOrrbMsBwbzH+92SlMU3lt
SXI2/dEqwvGCfKDfjZ/9xSteiiYmnYMti0bOyYFKy5/ARtna38g3zcD7h5rb/Bws
maCwXvBF0Q3hUNpjBd1gYV/t0y5HhR41D045bSJZbB7Isv5q1w9lNSGp4TRIG8C/
cT403p/2g0hFFcDq1cmGtdxclvrRqNOgHO+Q5qcX0MRgSh5jwCsnkMvor8j5L2k9
6qLWlKgqmBdI2mquW/PS8MoFs96m+N4Wpbq+GZpgdsGooNFxFOXYkfwd4dQ3yxk4
u8+7sxTrpl/+s4vpb7fl5Qtrrzebdg7Mh+zr1VQ3RiKE5QAEeIiNDsFQJUOZXXeQ
iVNosVoa9K8LEqewvm1+HV9dH7Omc5fty+X3+puMJZsih0xnFHFxxtUwzIlBn+uT
XcSBwD98Z+R5Z7iq8GseLSBa3L9Z/guSD4IuE8wcrumMLjnD3o5TvbOgbmg73999
3hmNPDY5aKlcaK701pmf9YJHpJ6Nygnsyg3qHN5W8UWmzcGw3c6aiyUneAxb5XDz
vBdogTIUq6vB0EBuSTRGrLON3AM0tUjxgmpj2mOaCNG2bwqOUfCSh+yJNlzhx9G1
qk75tIy1M/hES8k0F5E+/pFFXMznSEdq2J+PYSVA++W/+oIwF0s=
=pQKy
-----END PGP SIGNATURE-----


Christopher Baines wrote 7 years ago
Re: [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2.
(name . Cyril Roelandt)(address . tipecaml@gmail.com)(address . 28726@debbugs.gnu.org)
20171008155245.044649da@cbaines.net
On Sun, 8 Oct 2017 05:30:56 +0200
Cyril Roelandt <tipecaml@gmail.com> wrote:

Toggle quote (8 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlnaO71fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XfW0RAAsiBmZjx2P96XAqUBt+Ny690h9UMfwlnFUHOZBcKmTnJSJcKfq8FvdPAB
r8x3ioTaZ3nx5u4YFD6hB5TXqCjPHsA2M9JzxqFjXUVggonKqEMmUgCG7A2uAtWK
RlyqCFn3uThR7RT9YUOfbkEZDyYrp5fFQJH/gpSls/x9c7pntTlNSZQHh9liA8Do
MO18wX1xqWzXD82zzsLJ+whtDqjcIJAs7Ac/tN9F5+DXbuZQtCcTPtVV/D+YHa99
DvxT+baGzctW+1i/mFPR1qDNhHDfM+bFaCKsIHhJiiyLf1VQ4xJEauTQP6Uif/w7
Qob3bnsfPas1uecAJYa3QzGRsUrDi0fGdiYtEamE3HgeNOBYZlnm9hzvzBj0uLLK
jdHhMABZ/faQvF5OIxSRQjTllV/a9Knbsr0S31LDu9enaLuC4HNoFdeVvsfGLORk
WmracQ6e7k8PDlJm/46HrVeTrlfe23axaqxIvQ14c4a3xw9LwhSXoRviZXgAC+Sp
MtIX6+3ZOs75h7UFOz6niiEBJbiFtQxN/sfyZRLr80jW8t8eBULZpI9Vw+ebj2Vu
8BSnRGKBqppnEEwU/9MT9j071QV0U72lbMTZsxwhsFDjKbOqTI76fMRCAsVA0Dve
yyY7L9nLHVSM2ueLS/sxzepbRpQNwxlyx+O0+O3JSX1JQHC5UoA=
=DE3G
-----END PGP SIGNATURE-----


Christopher Baines wrote 7 years ago
(name . Cyril Roelandt)(address . tipecaml@gmail.com)(address . 28726@debbugs.gnu.org)
20171008170220.3f27c9e7@cbaines.net
On Sun, 8 Oct 2017 15:52:45 +0100
Christopher Baines <mail@cbaines.net> wrote:

Toggle quote (15 lines)
> On Sun, 8 Oct 2017 05:30:56 +0200
> Cyril Roelandt <tipecaml@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?
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlnaTAxfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XdQdg//fDdFgDsv1rJuoMKQKmmQRNO9ZaZndOtO/PJ+TRQ4ZOt58yoDGlXJgXbD
+9HzqlvH+W/gSpIOwdEumqZOPelVtxlPilzhr4aFK0lUvEKIz7hd/pCYJYbto42A
PimCqY4BwZTPNOEPdSBq6balktw7O7StTBiI02f++XJ8IOsGYjsF0Is8nFrGf7cw
W3tcTzMBaFsnFFY0kJ57RvPmSSgeIHnNlMzSjvF40mO1u9pWZMWv0Fl86zXwsVSc
eiDdtjRbO1pHNiwHGZlkt/ZCPWCcyRt3Qza+d434GcAAnz8nWGTanYO8FsZNqoVW
QMgzvoyBlkjv+r8bNin0PVDaSY+cfziI1FsfJ6rnUxeK9oCfHKJu5keStaL6twYN
HaI2GuoHzuOzrAgnsU6fXGEHQchNDoia4HBBUCiQ6+tShDfJC3j+5kpdmUgp+Xne
NTuIGp3xtV11nZehnBXo0MKPsfVK1pbaTyHUAjZLQB0ccX90Rr8PyPX9W80UiTt6
KN9E5GqBsxfDuQd1SpYtdF0uhAnMRSDRJ+kvBjVY6gtPIwSqaCuNifoIGobJiFkm
mmumbTy9kBvSV6GMWGdriEpaWyP6H+R+t6fk0NoKKFyhA63hn+ilpv7mcWJITBiv
8hpLG5ZvXhnadZ3J0ZlYkMlquWO5yt+2bWaTB1aLHla8rtEKqWs=
=VSyE
-----END PGP SIGNATURE-----


Christopher Baines wrote 7 years ago
[PATCH 2/6] gnu: django: Fix building python-django-allauth.
(address . 28726@debbugs.gnu.org)
20171008160352.10325-2-mail@cbaines.net
* 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(+)

Toggle diff (33 lines)
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
Christopher Baines wrote 7 years ago
[PATCH 1/6] gnu: django: Fix the build for python-django-gravatar2.
(address . 28726@debbugs.gnu.org)
20171008160352.10325-1-mail@cbaines.net
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(-)

Toggle diff (53 lines)
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
Christopher Baines wrote 7 years ago
[PATCH 3/6] gnu: mail: Fix building python2-django-mailman3.
(address . 28726@debbugs.gnu.org)
20171008160352.10325-3-mail@cbaines.net
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(+)

Toggle diff (24 lines)
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
Christopher Baines wrote 7 years ago
[PATCH 4/6] gnu: python: Disable tests for python-graphene.
(address . 28726@debbugs.gnu.org)
20171008160352.10325-4-mail@cbaines.net
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(+)

Toggle diff (16 lines)
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
Christopher Baines wrote 7 years ago
[PATCH 6/6] gnu: mail: Remove python-django-mailman3.
(address . 28726@debbugs.gnu.org)
20171008160352.10325-6-mail@cbaines.net
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(-)

Toggle diff (71 lines)
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
Christopher Baines wrote 7 years ago
[PATCH 5/6] gnu: python: Update python-sqlparse.
(address . 28726@debbugs.gnu.org)
20171008160352.10325-5-mail@cbaines.net
* 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(-)

Toggle diff (22 lines)
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
Christopher Baines wrote 7 years ago
Re: [bug#28726] [PATCH 3/5] gnu: django: Fix building python2-django-mailman3.
(name . ng0)(address . ng0@infotropique.org)
20171008170457.2107daab@cbaines.net
On Sun, 8 Oct 2017 07:53:54 +0000
ng0 <ng0@infotropique.org> wrote:

Toggle quote (20 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlnaTKlfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XdICQ/9FFzF7Zz/lob9H7A5NVH1he2w0suehG9/nYPFADbXnTedo7Is8eqVajZC
C5CvyS4elbHDwbixUqA9CF900HG4xOF5+oNg6L9iKrLDUecQLxAJ+IRSCvM4ShCH
yNp4qkkf8tNizMkWEZYN9UowUwPDcJIEvDzNqCij33zvzNZD75gO7PXQnzNBiIs+
2p6AsB9bJgWdM+qRd3O/ZelPUGonPFb1wsxIXpR2HIlQd4g0BVxTZt4iF2cAPNnY
H1L0z4yoeY0Xf41hRfspxVVWdSBfiAFS5HuXQcp383Rh8oZlgsnW5ok3fBLmpJqW
6dD681fCSF1H/ofrUHWQtEHmDyGyZZBEkduqTtiuA/EcLygMqj68Nt7XwWcCfCp/
Eb+KGmG1b+bhrDPHTWuVfN3zOQnQj60b5JhyGzi7/rAnJiLzgZBKM5orANHetrtC
ITLG84D7gAb15mdovjT2VI6n8RS+Zidc6QOdB1LoVXIvWlMnQ8CHYbiA5/pO0YLv
U+enCA9bdOaLCVKPHj1o0q8mgryZcFEtQuqYl1ooj9zmKESm7I+PqtLbnJ9FYsts
/UbY+5eEdTC3bvUypXpkgPEub2f2OkCKsnCksPgi21XYqGu7I8nF2pVE7KrS2m+X
HpLGiG7ViAJgNVlIPFXHU7jih57kgAw2hR03x47ghZY7fq9VlCg=
=95BD
-----END PGP SIGNATURE-----


Christopher Baines wrote 7 years ago
Re: [bug#28726] [PATCH] Update python-sqlparse and fix some dependent packages
(address . 28726-done@debbugs.gnu.org)
87tvxj48oy.fsf@cbaines.net
Christopher Baines writes:

Toggle quote (19 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAloYm/1fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9Xcnww/+IOFBuVRE2zBQfMdNMRvj3t3IPkmXKgS/YBgTth8AU2Q4Byts4lHdAGK6
Io8+CJFWCx1AbYZnb3RQR//ka53vvKcgns4aP1dDMd6n3o2p7WsbUvZpEn/xsJzS
t+iYUSwwVQl4O0zpk2qvYiPMPwj9ZWQtYiHqktPweDLYQ4hasjxUQi/dKfI4KUBw
JQSdy3I6Fw2f8YRh0+AMYuTB8YLIa8CkFYMbhAkt1WsOdQUWVqeuSzKva71zQmyF
OQc1FFl5jQXtHiXQtIzRcbWJddYtAsrO2YirLUuuEr5NJJpCm6fYjoNMW3mGt4yh
MdalwaLUd+S6Dufd5OimNXiNd31zLVZYj5cAQst59rkpzqr5rQlkxVBKVvbfD/cK
Y6xe3ZDlHC99btVTwX5Cb3J65qExL5qCsRHwPqxVVmgtJaXu38HJYyGsNwuHr68M
AR6Z84PRlTnpnWRq9Z5GpdzJzCPTy9yNfWEL0QO0+SAkENhllR7KKDK+lBunLB7n
5IBuTi1SkqnFBkCrC/CW1XkjlNnhc/5rpCsGjtd/UOB9lxnIanJG60SYSvyEbapr
/Fc1y+FQkbujripi8RiUbO4b4FBxjaRh7bQ3tq31l2jk6eX7J2pmpY7kBo7DDGTO
eHzSdAKeTsgnXphkkcBhjFSt9ePpAjZFuAU/Ix70E+3kvNJuhY4=
=+1V5
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 28726@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 28726
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help