GNU bug report logs - #47910
[PATCH] gnu: python-wtforms: Update to 2.3.3.

Previous Next

Package: guix-patches;

Reported by: "jgart" <jgart <at> dismail.de>

Date: Tue, 20 Apr 2021 17:29:02 UTC

Severity: normal

Tags: patch

Done: Raghav Gururajan <rg <at> raghavgururajan.name>

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 47910 in the body.
You can then email your comments to 47910 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#47910; Package guix-patches. (Tue, 20 Apr 2021 17:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "jgart" <jgart <at> dismail.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 20 Apr 2021 17:29:02 GMT) Full text and rfc822 format available.

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

From: "jgart" <jgart <at> dismail.de>
To: guix-patches <at> gnu.org
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, ben <at> sturm.com.au
Subject: [PATCH] gnu: python-wtforms: Update to 2.3.3.
Date: Tue, 20 Apr 2021 17:28:47 +0000
[Message part 1 (text/plain, inline)]
Hi Guix,

This is related to 47260.

Attached is a patch for an upgrade to python-wtforms 2.3.3.

Tests are currently disabled in the attached patch. 

I added a when form in the code for when we are ready to enable the tests.

I'm getting the following error when I try to run the tests with tox:

error: [Errno 13] Permission denied: 'WTForms-2.3.3/setup.cfg'

Should I be using make-file-writable on the above or is this a different issue?

I have not been able to successfully run all the tests without using tox manually. 

See the comment I placed in the patch with a link to the github issue that I opened upstream.

Help and/or advice with testing this is much appreciated. 

What is the consensus for using tox with guix?

I see only one other package in the guix source tree that is currently invoking tox and that package is broken: python-funcparserlib.

python-hy is also broken (it depends on python-funcparserlib and fails because of it)

I think Tobias is currently working on those.

all the best,

jgart
[0001-gnu-python-wtforms-Update-to-2.3.3.patch (application/octet-stream, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#47910; Package guix-patches. (Wed, 07 Jul 2021 23:30:02 GMT) Full text and rfc822 format available.

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

From: Vinicius Monego <monego <at> posteo.net>
To: 47910 <at> debbugs.gnu.org
Subject: [PATCH] gnu: python-wtforms: Update to 2.3.3.
Date: Wed, 07 Jul 2021 23:29:10 +0000
Hi,

> I have not been able to successfully run all the tests without using
> tox manually.

[...]

> What is the consensus for using tox with guix?

Tox is an environment manager. As such, it is redundant in Guix. Tox is
not a hard requirement for tests in any project.

You can inspect the tox.ini file that is shipped in projects. This is
the tox.ini from wtforms, in the 2.3.3 tag: [1]. Note that the test
command that tox will run is:

> python setup.py compile_catalog
> coverage run tests/runtests.py --with-pep8

After running these commands in the custom check phase, I could
succesfully run the tests. I also added python-sqlalchemy and python-
dateutil to native-inputs.

Note that it requires django<1.7 which we don't have, but it's
optional. It seems that the testing command will change again in
version 3 to a standard pytest call and the legacy dependencies will be
removed [2] (also see tox.ini in the master branch).

> python-hy is also broken (it depends on python-funcparserlib and
> fails because of it)

funcparserlib is broken because version 0.3.6 is compatible with only
up to Python 3.5 (it was released in 2013). There should be a 1.0.0
release this year [3] and it doesn't seem that 0.3.6 can be fixed from
our side.

It does not depend on tox either. Once 1.0.0 is released and packaged,
tox can be removed and it should run without replacing the check phase
(it uses unittest). Tox is still there because that package is
currently stagnating.

Vinicius

[1] https://github.com/wtforms/wtforms/blob/2.3.3/tox.ini

[2] https://github.com/wtforms/wtforms/commit/c49ecfb7e76f919eafb5c6a11c3b795c4e613757

[3] https://github.com/vlasovskikh/funcparserlib/issues/65





Information forwarded to guix-patches <at> gnu.org:
bug#47910; Package guix-patches. (Wed, 25 Aug 2021 00:58:02 GMT) Full text and rfc822 format available.

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

From: Ben Sturmfels <ben <at> sturm.com.au>
To: jgart <jgart <at> dismail.de>
Cc: Vinicius Monego <monego <at> posteo.net>, 47910 <at> debbugs.gnu.org
Subject: Re: bug#47910: [PATCH] gnu: python-wtforms: Update to 2.3.3.
Date: Wed, 25 Aug 2021 10:57:33 +1000
Hi Jgart,

>> I have not been able to successfully run all the tests without using
>> tox manually.
>
> [...]
>
>> What is the consensus for using tox with guix?
>
> Tox is an environment manager. As such, it is redundant in Guix. Tox is
> not a hard requirement for tests in any project.
>
> You can inspect the tox.ini file that is shipped in projects. This is
> the tox.ini from wtforms, in the 2.3.3 tag: [1]. Note that the test
> command that tox will run is:
>
>> python setup.py compile_catalog
>> coverage run tests/runtests.py --with-pep8
>
> After running these commands in the custom check phase, I could
> succesfully run the tests. I also added python-sqlalchemy and python-
> dateutil to native-inputs.
>
> Note that it requires django<1.7 which we don't have, but it's
> optional. It seems that the testing command will change again in
> version 3 to a standard pytest call and the legacy dependencies will be
> removed [2] (also see tox.ini in the master branch).

Vinicius's approach his makes sense to me - we only need to test wtforms on the version of Python in Guix, not all possible versions the library supports. Would you be able to proceed with calling the tests as Vinicius describes?

This is the last dependency we need to package MediaGoblin! Very exciting!

Regards,
Ben




Information forwarded to guix-patches <at> gnu.org:
bug#47910; Package guix-patches. (Sat, 11 Sep 2021 23:38:01 GMT) Full text and rfc822 format available.

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

From: Raghav Gururajan <rg <at> raghavgururajan.name>
To: 47910 <at> debbugs.gnu.org
Cc: Raghav Gururajan <rg <at> raghavgururajan.name>, jgart <jgart <at> dismail.de>,
 ben <at> sturm.com.au
Subject: [PATCH] gnu: python-wtforms: Update to 2.3.3 and adjust
 arguments+inputs.
Date: Sat, 11 Sep 2021 19:37:31 -0400
* gnu/packages/python-web.scm (python-wtforms)[version]: Update to 2.3.3.
[phases](remove-django-test): Remove phase.
(check): Replace with custom phase.
[native-inputs]: Remove unzip. Add python-babel, python-coverage,
python-dateutil, python-pep8 and python-sqlalchemy.
[propagated-inputs]: Add python-markupsafe.

Co-authored-by: jgart <jgart <at> dismail.de>
---
 gnu/packages/python-web.scm | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 32b4aa4bf0..73361ad584 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -4150,28 +4150,32 @@ addon modules.")
 (define-public python-wtforms
   (package
     (name "python-wtforms")
-    (version "2.1")
+    (version "2.3.3")
     (source
      (origin
        (method url-fetch)
-       (uri (pypi-uri "WTForms" version ".zip"))
+       (uri (pypi-uri "WTForms" version ".tar.gz"))
        (sha256
         (base32
-         "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
+         "17427m7p9nn9byzva697dkykykwcp2br3bxvi8vciywlmkh5s6c1"))))
     (build-system python-build-system)
     (arguments
-     '(#:phases
+     `(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'remove-django-test
-           ;; Don't fail the tests when the inputs for the optional tests cannot be found.
-           (lambda _
-             (substitute*
-               "tests/runtests.py"
-               (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
-               (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
-             #t)))))
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "setup.py" "compile_catalog")
+               (invoke "coverage" "run" "tests/runtests.py" "--with-pep8")))))))
     (native-inputs
-     `(("unzip" ,unzip)))
+     `(("python-babel" ,python-babel)
+       ("python-coverage" ,python-coverage)
+       ("python-dateutil" ,python-dateutil)
+       ("python-pep8" ,python-pep8)
+       ("python-sqlalchemy" ,python-sqlalchemy)))
+    (propagated-inputs
+     `(("python-markupsafe" ,python-markupsafe)))
     (home-page "http://wtforms.simplecodes.com/")
     (synopsis
      "Form validation and rendering library for Python web development")
-- 
2.33.0





Information forwarded to guix-patches <at> gnu.org:
bug#47910; Package guix-patches. (Sat, 11 Sep 2021 23:47:01 GMT) Full text and rfc822 format available.

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

From: Raghav Gururajan <rg <at> raghavgururajan.name>
To: 47910 <at> debbugs.gnu.org
Cc: Raghav Gururajan <rg <at> raghavgururajan.name>, jgart <jgart <at> dismail.de>,
 ben <at> sturm.com.au
Subject: [PATCH] gnu: python-wtforms: Update to 2.3.3 and adjust
 arguments+inputs.
Date: Sat, 11 Sep 2021 19:46:20 -0400
* gnu/packages/python-web.scm (python-wtforms)[version]: Update to 2.3.3.
[phases](remove-django-test): Remove phase.
(check): Replace with custom phase.
[native-inputs]: Remove unzip. Add python-coverage, python-dateutil,
python-pep8 and python-sqlalchemy.
[propagated-inputs]: Add python-babel, python-email-validaor and
python-markupsafe.

Co-authored-by: jgart <jgart <at> dismail.de>
---
 gnu/packages/python-web.scm | 31 ++++++++++++++++++-------------
 1 file changed, 18 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 32b4aa4bf0..bd390d371d 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -4150,28 +4150,33 @@ addon modules.")
 (define-public python-wtforms
   (package
     (name "python-wtforms")
-    (version "2.1")
+    (version "2.3.3")
     (source
      (origin
        (method url-fetch)
-       (uri (pypi-uri "WTForms" version ".zip"))
+       (uri (pypi-uri "WTForms" version ".tar.gz"))
        (sha256
         (base32
-         "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
+         "17427m7p9nn9byzva697dkykykwcp2br3bxvi8vciywlmkh5s6c1"))))
     (build-system python-build-system)
     (arguments
-     '(#:phases
+     `(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'remove-django-test
-           ;; Don't fail the tests when the inputs for the optional tests cannot be found.
-           (lambda _
-             (substitute*
-               "tests/runtests.py"
-               (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
-               (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
-             #t)))))
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "setup.py" "compile_catalog")
+               (invoke "coverage" "run" "tests/runtests.py" "--with-pep8")))))))
     (native-inputs
-     `(("unzip" ,unzip)))
+     `(("python-coverage" ,python-coverage)
+       ("python-dateutil" ,python-dateutil)
+       ("python-pep8" ,python-pep8)
+       ("python-sqlalchemy" ,python-sqlalchemy)))
+    (propagated-inputs
+     `(("python-babel" ,python-babel)
+       ("python-email-validator" ,python-email-validator)
+       ("python-markupsafe" ,python-markupsafe)))
     (home-page "http://wtforms.simplecodes.com/")
     (synopsis
      "Form validation and rendering library for Python web development")
-- 
2.33.0





Reply sent to Raghav Gururajan <rg <at> raghavgururajan.name>:
You have taken responsibility. (Sat, 11 Sep 2021 23:49:02 GMT) Full text and rfc822 format available.

Notification sent to "jgart" <jgart <at> dismail.de>:
bug acknowledged by developer. (Sat, 11 Sep 2021 23:49:02 GMT) Full text and rfc822 format available.

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

From: Raghav Gururajan <rg <at> raghavgururajan.name>
To: 47910-done <at> debbugs.gnu.org
Cc: jgart <at> dismail.de, ben <at> sturm.com.au
Subject: Re: python-wtforms
Date: Sat, 11 Sep 2021 19:48:51 -0400
[Message part 1 (text/plain, inline)]
Pushed to master as 87ec1ae95c..73f68c1a45.
[OpenPGP_0x5F5816647F8BE551.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 10 Oct 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 169 days ago.

Previous Next


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