GNU bug report logs - #55814
[PATCH] Updated python-flake8 and inputs to reenable build.

Previous Next

Package: guix-patches;

Reported by: Christopher Rodriguez <yewscion <at> gmail.com>

Date: Mon, 6 Jun 2022 01:44:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

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 55814 in the body.
You can then email your comments to 55814 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#55814; Package guix-patches. (Mon, 06 Jun 2022 01:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Rodriguez <yewscion <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 06 Jun 2022 01:44:02 GMT) Full text and rfc822 format available.

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

From: Christopher Rodriguez <yewscion <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Christopher Rodriguez <yewscion <at> gmail.com>
Subject: [PATCH] Updated python-flake8 and inputs to reenable build.
Date: Sun,  5 Jun 2022 21:43:15 -0400
---

Hey all,

I noticed today that `python-flake8` was failing to build, as one of its inputs
(`python-pyflakes`) had been bumped too high for the older version's `check`
phase. Tried to take the initiative and threw together this patch; It builds in
my local tree, and had been linted/styled/tested/etc. I believe I have done
everything by the book, but if I need to fix anything, let me know (I'm still
new to contributing)!

Thanks for Your time!


 gnu/packages/python-xyz.scm | 54 ++++++++++++++++++-------------------
 1 file changed, 26 insertions(+), 28 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0dfc6ca7e0..77f2c88235 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -6443,23 +6443,21 @@ (define-public python-socksipychain
 (define-public python-pycodestyle
   (package
     (name "python-pycodestyle")
-    (version "2.7.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "pycodestyle" version))
-       (sha256
-        (base32
-         "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
+    (version "2.8.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pycodestyle" version))
+              (sha256
+               (base32
+                "0zxyrg8029lzjhima6l5nk6y0z6lm5wfp9qchz3s33j3xx3mipgd"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda _
-             (invoke "pytest" "-vv"))))))
-    (native-inputs
-     (list python-pytest))
+     `(#:phases (modify-phases %standard-phases
+                  (replace 'check
+                    (lambda (#:keys input output tests? #:allow-other-keys)
+                      (if tests?
+                          (invoke "pytest" "-vv")))))))
+    (native-inputs (list python-pytest))
     (home-page "https://pycodestyle.readthedocs.io/")
     (synopsis "Python style guide checker")
     (description "@code{pycodestyle} (formerly pep8) is a tool to check
@@ -10143,18 +10141,17 @@ (define-public python-pyflakes
   (package
     (name "python-pyflakes")
     (version "2.4.0")
-    (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "pyflakes" version))
-        (sha256
-         (base32
-          "0k5jn8jpxni264wxf6cc3xcd1qckc0pww30bsd77mwzdf8l5ra05"))))
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pyflakes" version))
+              (sha256
+               (base32
+                "0k5jn8jpxni264wxf6cc3xcd1qckc0pww30bsd77mwzdf8l5ra05"))))
     (build-system python-build-system)
     (home-page "https://github.com/PyCQA/pyflakes")
     (synopsis "Passive checker of Python programs")
     (description
-      "Pyflakes statically checks Python source code for common errors.")
+     "Pyflakes statically checks Python source code for common errors.")
     (license license:expat)))
 
 (define-public python-pyflakes-2.2
@@ -10193,20 +10190,21 @@ (define-public python-mccabe
 (define-public python-flake8
   (package
     (name "python-flake8")
-    (version "3.9.2")
+    (version "4.0.1")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "flake8" version))
               (sha256
                (base32
-                "0sspgh2ph7bb5fmf49mrdhi7n5m421kfkxk1n0vn4akgg20q6lh7"))))
+                "03c7mnk34wfz7a0m5zq0273y94awz69fy5iww8alh4a4v96h6vl0"))))
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
                   (replace 'check
-                    (lambda* (#:key inputs outputs #:allow-other-keys)
-                      (add-installed-pythonpath inputs outputs)
-                      (invoke "pytest" "-v"))))))
+                    (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+                      (if tests?
+                          (add-installed-pythonpath inputs outputs)
+                          (invoke "pytest" "-v")))))))
     (propagated-inputs (list python-pycodestyle python-entrypoints
                              python-pyflakes python-mccabe))
     (native-inputs (list python-mock python-pytest))
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55814; Package guix-patches. (Mon, 06 Jun 2022 06:14:01 GMT) Full text and rfc822 format available.

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

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Christopher Rodriguez <yewscion <at> gmail.com>, 55814 <at> debbugs.gnu.org
Subject: Re: [PATCH] Updated python-flake8 and inputs to reenable build.
Date: Mon, 06 Jun 2022 08:13:43 +0200
Am Sonntag, dem 05.06.2022 um 21:43 -0400 schrieb Christopher
Rodriguez:
> It builds in my local tree, and had been linted/styled/tested/etc.
Did you also check that all the packages referring to it build?  The
upgrade to python-pyflakes ignored this important check as well as the
call not to update packages with more than 300 dependents on master.

>  gnu/packages/python-xyz.scm | 54 ++++++++++++++++++-----------------
> --
>  1 file changed, 26 insertions(+), 28 deletions(-)
> 
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-
> xyz.scm
> index 0dfc6ca7e0..77f2c88235 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -6443,23 +6443,21 @@ (define-public python-socksipychain
>  (define-public python-pycodestyle
>    (package
>      (name "python-pycodestyle")
> -    (version "2.7.0")
> -    (source
> -     (origin
> -       (method url-fetch)
> -       (uri (pypi-uri "pycodestyle" version))
> -       (sha256
> -        (base32
> -         "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
> +    (version "2.8.0")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (pypi-uri "pycodestyle" version))
> +              (sha256
> +               (base32
> +               
> "0zxyrg8029lzjhima6l5nk6y0z6lm5wfp9qchz3s33j3xx3mipgd"))))
Factor out into a single patch.

>      (build-system python-build-system)
>      (arguments
> -     `(#:phases
> -       (modify-phases %standard-phases
> -         (replace 'check
> -           (lambda _
> -             (invoke "pytest" "-vv"))))))
> +     `(#:phases (modify-phases %standard-phases
> +                  (replace 'check
> +                    (lambda (#:keys input output tests? #:allow-
> other-keys)
> +                      (if tests?
> +                          (invoke "pytest" "-vv")))))))
IIUC this is fixing an already existing problem; thus factor out into
its own patch.

> -    (native-inputs
> -     (list python-pytest)) 
> +    (native-inputs (list python-pytest))
I'd recommend not mixing updates and semantic fixes with style fixes.

>      (home-page "https://pycodestyle.readthedocs.io/")
>      (synopsis "Python style guide checker")
>      (description "@code{pycodestyle} (formerly pep8) is a tool to
> check
> @@ -10143,18 +10141,17 @@ (define-public python-pyflakes
>    (package
>      (name "python-pyflakes")
>      (version "2.4.0")
> -    (source
> -      (origin
> -        (method url-fetch)
> -        (uri (pypi-uri "pyflakes" version))
> -        (sha256
> -         (base32
> -          "0k5jn8jpxni264wxf6cc3xcd1qckc0pww30bsd77mwzdf8l5ra05"))))
> +    (source (origin
> +              (method url-fetch)
> +              (uri (pypi-uri "pyflakes" version))
> +              (sha256
> +               (base32
> +               
> "0k5jn8jpxni264wxf6cc3xcd1qckc0pww30bsd77mwzdf8l5ra05"))))
>      (build-system python-build-system)
>      (home-page "https://github.com/PyCQA/pyflakes")
>      (synopsis "Passive checker of Python programs")
>      (description
> -      "Pyflakes statically checks Python source code for common
> errors.")
> +     "Pyflakes statically checks Python source code for common
> errors.")
>      (license license:expat)))
Nothing to do here.

>  (define-public python-pyflakes-2.2
> @@ -10193,20 +10190,21 @@ (define-public python-mccabe
>  (define-public python-flake8
>    (package
>      (name "python-flake8")
> -    (version "3.9.2")
> +    (version "4.0.1")
Note that 4.0.1 is a semver break from 3.9 – also, we still supply 3.8.
Thus, you might want to keep python-flake8-3.9 as a variant.

>      (source (origin
>                (method url-fetch)
>                (uri (pypi-uri "flake8" version))
>                (sha256
>                 (base32
> -               
> "0sspgh2ph7bb5fmf49mrdhi7n5m421kfkxk1n0vn4akgg20q6lh7"))))
> +               
> "03c7mnk34wfz7a0m5zq0273y94awz69fy5iww8alh4a4v96h6vl0"))))
>      (build-system python-build-system)
>      (arguments
>       `(#:phases (modify-phases %standard-phases
>                    (replace 'check
> -                    (lambda* (#:key inputs outputs #:allow-other-
> keys)
> -                      (add-installed-pythonpath inputs outputs)
> -                      (invoke "pytest" "-v"))))))
> +                    (lambda* (#:key inputs outputs tests? #:allow-
> other-keys)
> +                      (if tests?
> +                          (add-installed-pythonpath inputs outputs)
> +                          (invoke "pytest" "-v")))))))
Again, should be its own patch.

Cheers




Information forwarded to guix-patches <at> gnu.org:
bug#55814; Package guix-patches. (Mon, 06 Jun 2022 09:32:01 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: Christopher Rodriguez <yewscion <at> gmail.com>, 55814 <at> debbugs.gnu.org
Subject: Re: [bug#55814] [PATCH] Updated python-flake8 and inputs to
 reenable build.
Date: Mon, 06 Jun 2022 11:31:05 +0200
[Message part 1 (text/plain, inline)]
Christopher Rodriguez schreef op zo 05-06-2022 om 21:43 [-0400]:
> +                      (if tests?
> +                          (add-installed-pythonpath inputs outputs)
> +                          (invoke "pytest" "-v")))))))

This does the following:

  * if tests?=#true, do (add-installed-pythonpath ...
  * if tests?=#false, do (invoke ...)

You'll probably need

 (when tests?
    (add-installed-pythonpath ...)
    (invoke ...))

instead.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55814; Package guix-patches. (Mon, 06 Jun 2022 17:25:02 GMT) Full text and rfc822 format available.

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

From: Christopher Rodriguez <yewscion <at> gmail.com>
To: 55814 <at> debbugs.gnu.org
Cc: Christopher Rodriguez <yewscion <at> gmail.com>
Subject: [PATCH v2] Updated python-flake8 and inputs to reenable build.
Date: Mon,  6 Jun 2022 13:24:32 -0400
---

Maxime,

Thanks for the feedback! Sorry for missing something so basic.

I swapped both of the `if` statements with `when` statements, as they are more
semantically appropriate here anyway.

I also fixed a mistake I found in the lambda call (#:keys instead of #:key), and
uploaded the current version of `python-flake8` (4.0.1) to the software heritage
project. I'm waiting for the save to go through, but after that, the linter will
return no errors.

 gnu/packages/python-xyz.scm | 54 ++++++++++++++++++-------------------
 1 file changed, 26 insertions(+), 28 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0dfc6ca7e0..ffb7001c03 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -6443,23 +6443,21 @@ (define-public python-socksipychain
 (define-public python-pycodestyle
   (package
     (name "python-pycodestyle")
-    (version "2.7.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "pycodestyle" version))
-       (sha256
-        (base32
-         "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
+    (version "2.8.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pycodestyle" version))
+              (sha256
+               (base32
+                "0zxyrg8029lzjhima6l5nk6y0z6lm5wfp9qchz3s33j3xx3mipgd"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda _
-             (invoke "pytest" "-vv"))))))
-    (native-inputs
-     (list python-pytest))
+     `(#:phases (modify-phases %standard-phases
+                  (replace 'check
+                    (lambda* (#:key input output tests? #:allow-other-keys)
+                      (when tests?
+                        (invoke "pytest" "-vv")))))))
+    (native-inputs (list python-pytest))
     (home-page "https://pycodestyle.readthedocs.io/")
     (synopsis "Python style guide checker")
     (description "@code{pycodestyle} (formerly pep8) is a tool to check
@@ -10143,18 +10141,17 @@ (define-public python-pyflakes
   (package
     (name "python-pyflakes")
     (version "2.4.0")
-    (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "pyflakes" version))
-        (sha256
-         (base32
-          "0k5jn8jpxni264wxf6cc3xcd1qckc0pww30bsd77mwzdf8l5ra05"))))
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pyflakes" version))
+              (sha256
+               (base32
+                "0k5jn8jpxni264wxf6cc3xcd1qckc0pww30bsd77mwzdf8l5ra05"))))
     (build-system python-build-system)
     (home-page "https://github.com/PyCQA/pyflakes")
     (synopsis "Passive checker of Python programs")
     (description
-      "Pyflakes statically checks Python source code for common errors.")
+     "Pyflakes statically checks Python source code for common errors.")
     (license license:expat)))
 
 (define-public python-pyflakes-2.2
@@ -10193,20 +10190,21 @@ (define-public python-mccabe
 (define-public python-flake8
   (package
     (name "python-flake8")
-    (version "3.9.2")
+    (version "4.0.1")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "flake8" version))
               (sha256
                (base32
-                "0sspgh2ph7bb5fmf49mrdhi7n5m421kfkxk1n0vn4akgg20q6lh7"))))
+                "03c7mnk34wfz7a0m5zq0273y94awz69fy5iww8alh4a4v96h6vl0"))))
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
                   (replace 'check
-                    (lambda* (#:key inputs outputs #:allow-other-keys)
-                      (add-installed-pythonpath inputs outputs)
-                      (invoke "pytest" "-v"))))))
+                    (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+                      (when tests?
+                        (add-installed-pythonpath inputs outputs)
+                        (invoke "pytest" "-v")))))))
     (propagated-inputs (list python-pycodestyle python-entrypoints
                              python-pyflakes python-mccabe))
     (native-inputs (list python-mock python-pytest))

base-commit: 41cf573f0a4fefb0539174b46cfe65e9db128870
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55814; Package guix-patches. (Mon, 06 Jun 2022 18:34:02 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: Christopher Rodriguez <yewscion <at> gmail.com>, 55814 <at> debbugs.gnu.org
Subject: Re: [bug#55814] [PATCH v2] Updated python-flake8 and inputs to
 reenable build.
Date: Mon, 06 Jun 2022 20:33:44 +0200
[Message part 1 (text/plain, inline)]
Christopher Rodriguez schreef op ma 06-06-2022 om 13:24 [-0400]:
> ---
> 
> Maxime,
> 
> Thanks for the feedback! Sorry for missing something so basic.
> 
> I swapped both of the `if` statements with `when` statements, as they are more
> semantically appropriate here anyway.
> 
> I also fixed a mistake I found in the lambda call (#:keys instead of #:key), and
> uploaded the current version of `python-flake8` (4.0.1) to the software heritage
> project. I'm waiting for the save to go through, but after that, the linter will
> return no errors.
> 
>  gnu/packages/python-xyz.scm | 54 ++++++++++++++++++-------------------
>  1 file changed, 26 insertions(+), 28 deletions(-)

Only a single independent change per patch, otherwise LGTM, haven't
looked at the source diff or build it though.  On Software Heritage:
IIUC, saving something on SWH is not something you can do as individual
(except for git repos), rather, SWH asks a Guix server what sources are
used by packages.  So effectively SWH will wait for the patch to be
applied before archiving it unless I'm misunderstanding things.

Greetings,
Maxime.

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55814; Package guix-patches. (Mon, 06 Jun 2022 19:06:02 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: Christopher Rodriguez <yewscion <at> gmail.com>
Cc: 55814 <at> debbugs.gnu.org
Subject: Re: [bug#55814] [PATCH v2] Updated python-flake8 and inputs to
 reenable build.
Date: Mon, 06 Jun 2022 21:05:07 +0200
[Message part 1 (text/plain, inline)]
Christopher Rodriguez schreef op ma 06-06-2022 om 14:44 [-0400]:
> Without the changes in this patch, `python-flake8` (and thus, any
> packages that
> depend on it) will not be able to successfully build (I use `python-
> lsp-server`
> in my profile; I believe that is where I ran into an issue with this
> package). Can this, then, be considered a "single independent
> change"? All of
> the changes made were made to support `python-flake8` building, even
> though the
> changes effected 3 separate packages.

They are related changed (same external purpose: make python-flake8),
but each change can stand on its own (different internal purposes:
update this, run tests, respect #:tests?) without causing new build
failures AFAIK.

> If not, I suppose I can split the patch into three separate packages
> like this:
> 
> 1. `python-pycodestyle` changes. (needed for `python-flake8` to build
> with tests)
> 2. `python-pyflakes` changes. (needed for `python-flake8` to build
> with tests)
> 3. `python-flake8` changes. (the package that would not build)

That, and seperate the update and the (when tests? ...).

TBC the just need to be separate patches, but not a seperate patch
series (all six can go to 55814 <at> debbugs.gnu.org).

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55814; Package guix-patches. (Tue, 07 Jun 2022 01:12:01 GMT) Full text and rfc822 format available.

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

From: Christopher Rodriguez <yewscion <at> gmail.com>
To: 55814 <at> debbugs.gnu.org
Cc: Christopher Rodriguez <yewscion <at> gmail.com>
Subject: [PATCH v3 1/8] Refreshed `python-pycodestyle` to version 2.8.0.
Date: Mon,  6 Jun 2022 21:10:05 -0400
[bug: 55814]
---
 gnu/packages/python-xyz.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0dfc6ca7e0..e3eeb2ea6e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -6443,14 +6443,14 @@ (define-public python-socksipychain
 (define-public python-pycodestyle
   (package
     (name "python-pycodestyle")
-    (version "2.7.0")
+    (version "2.8.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pycodestyle" version))
        (sha256
         (base32
-         "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
+         "0zxyrg8029lzjhima6l5nk6y0z6lm5wfp9qchz3s33j3xx3mipgd"))))
     (build-system python-build-system)
     (arguments
      `(#:phases

base-commit: 41cf573f0a4fefb0539174b46cfe65e9db128870
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55814; Package guix-patches. (Tue, 07 Jun 2022 01:12:02 GMT) Full text and rfc822 format available.

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

From: Christopher Rodriguez <yewscion <at> gmail.com>
To: 55814 <at> debbugs.gnu.org
Cc: Christopher Rodriguez <yewscion <at> gmail.com>
Subject: [PATCH v3 2/8] Refreshed `python-flake8` to 4.0.1.
Date: Mon,  6 Jun 2022 21:10:06 -0400
[Bug: 55814]
---
 gnu/packages/python-xyz.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e3eeb2ea6e..0c232e9aac 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10193,13 +10193,13 @@ (define-public python-mccabe
 (define-public python-flake8
   (package
     (name "python-flake8")
-    (version "3.9.2")
+    (version "4.0.1")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "flake8" version))
               (sha256
                (base32
-                "0sspgh2ph7bb5fmf49mrdhi7n5m421kfkxk1n0vn4akgg20q6lh7"))))
+                "03c7mnk34wfz7a0m5zq0273y94awz69fy5iww8alh4a4v96h6vl0"))))
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55814; Package guix-patches. (Tue, 07 Jun 2022 01:12:02 GMT) Full text and rfc822 format available.

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

From: Christopher Rodriguez <yewscion <at> gmail.com>
To: 55814 <at> debbugs.gnu.org
Cc: Christopher Rodriguez <yewscion <at> gmail.com>
Subject: [PATCH v3 3/8] `python-pycodestyle` now respects `#:tests?`
Date: Mon,  6 Jun 2022 21:10:07 -0400
[Bug: 55814]
---
 gnu/packages/python-xyz.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0c232e9aac..48311c6c33 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -6456,8 +6456,9 @@ (define-public python-pycodestyle
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda _
-             (invoke "pytest" "-vv"))))))
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest" "-vv")))))))
     (native-inputs
      (list python-pytest))
     (home-page "https://pycodestyle.readthedocs.io/")
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55814; Package guix-patches. (Tue, 07 Jun 2022 01:12:02 GMT) Full text and rfc822 format available.

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

From: Christopher Rodriguez <yewscion <at> gmail.com>
To: 55814 <at> debbugs.gnu.org
Cc: Christopher Rodriguez <yewscion <at> gmail.com>
Subject: [PATCH v3 7/8] Added `python-flake8-3.9` as a variant package.
Date: Mon,  6 Jun 2022 21:10:11 -0400
[Bug: 55814]
---
 gnu/packages/python-xyz.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index da7bb744e8..837bcc8fde 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10240,6 +10240,20 @@ (define-public python-flake8
      "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
     (license license:expat)))
 
+(define-public python-flake8-3.9
+  (package
+    (inherit python-flake8)
+    (version "3.9.2")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "flake8" version))
+              (sha256
+               (base32
+                "0sspgh2ph7bb5fmf49mrdhi7n5m421kfkxk1n0vn4akgg20q6lh7"))))
+    (propagated-inputs
+     (list python-pycodestyle-2.7 python-entrypoints python-pyflakes-2.3
+           python-mccabe))))
+
 (define-public python-flake8-3.8
   (package
     (inherit python-flake8)
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55814; Package guix-patches. (Tue, 07 Jun 2022 01:12:03 GMT) Full text and rfc822 format available.

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

From: Christopher Rodriguez <yewscion <at> gmail.com>
To: 55814 <at> debbugs.gnu.org
Cc: Christopher Rodriguez <yewscion <at> gmail.com>
Subject: [PATCH v3 4/8] `python-flake8` now supports `#:tests?`
Date: Mon,  6 Jun 2022 21:10:08 -0400
[Bug: 55814]
---
 gnu/packages/python-xyz.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 48311c6c33..de996826e1 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10205,9 +10205,10 @@ (define-public python-flake8
     (arguments
      `(#:phases (modify-phases %standard-phases
                   (replace 'check
-                    (lambda* (#:key inputs outputs #:allow-other-keys)
-                      (add-installed-pythonpath inputs outputs)
-                      (invoke "pytest" "-v"))))))
+                    (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+                      (when tests?
+                        (add-installed-pythonpath inputs outputs)
+                        (invoke "pytest" "-v")))))))
     (propagated-inputs (list python-pycodestyle python-entrypoints
                              python-pyflakes python-mccabe))
     (native-inputs (list python-mock python-pytest))
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55814; Package guix-patches. (Tue, 07 Jun 2022 01:12:03 GMT) Full text and rfc822 format available.

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

From: Christopher Rodriguez <yewscion <at> gmail.com>
To: 55814 <at> debbugs.gnu.org
Cc: Christopher Rodriguez <yewscion <at> gmail.com>
Subject: [PATCH v3 5/8] Added `python-pyflakes-2.3` as a variant package.
Date: Mon,  6 Jun 2022 21:10:09 -0400
[Bug: 55814]
---
 gnu/packages/python-xyz.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index de996826e1..a3a3d7d95f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10158,6 +10158,17 @@ (define-public python-pyflakes
       "Pyflakes statically checks Python source code for common errors.")
     (license license:expat)))
 
+(define-public python-pyflakes-2.3
+  (package
+    (inherit python-pyflakes)
+    (version "2.3.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pyflakes" version))
+              (sha256
+               (base32
+                "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))))
+
 (define-public python-pyflakes-2.2
   (package
     (inherit python-pyflakes)
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55814; Package guix-patches. (Tue, 07 Jun 2022 01:12:03 GMT) Full text and rfc822 format available.

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

From: Christopher Rodriguez <yewscion <at> gmail.com>
To: 55814 <at> debbugs.gnu.org
Cc: Christopher Rodriguez <yewscion <at> gmail.com>
Subject: [PATCH v3 6/8] Added `python-pycodestyle-2.7` as a variant package.
Date: Mon,  6 Jun 2022 21:10:10 -0400
[Bug: 55814]
---
 gnu/packages/python-xyz.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a3a3d7d95f..da7bb744e8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -6468,6 +6468,17 @@ (define-public python-pycodestyle
 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
     (license license:expat)))
 
+(define-public python-pycodestyle-2.7
+  (package
+    (inherit python-pycodestyle)
+    (version "2.7.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pycodestyle" version))
+              (sha256
+               (base32
+                "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))))
+
 (define-public python-pycodestyle-2.6
   (package
     (inherit python-pycodestyle)
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55814; Package guix-patches. (Tue, 07 Jun 2022 01:12:04 GMT) Full text and rfc822 format available.

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

From: Christopher Rodriguez <yewscion <at> gmail.com>
To: 55814 <at> debbugs.gnu.org
Cc: Christopher Rodriguez <yewscion <at> gmail.com>
Subject: [PATCH v3 8/8] Formatted Code with `guix style`.
Date: Mon,  6 Jun 2022 21:10:12 -0400
[Bug: 55814]
---
 gnu/packages/python-xyz.scm | 32 ++++++++++++++------------------
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 837bcc8fde..03d40b694f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -6444,23 +6444,20 @@ (define-public python-pycodestyle
   (package
     (name "python-pycodestyle")
     (version "2.8.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "pycodestyle" version))
-       (sha256
-        (base32
-         "0zxyrg8029lzjhima6l5nk6y0z6lm5wfp9qchz3s33j3xx3mipgd"))))
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pycodestyle" version))
+              (sha256
+               (base32
+                "0zxyrg8029lzjhima6l5nk6y0z6lm5wfp9qchz3s33j3xx3mipgd"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda* (#:key tests? #:allow-other-keys)
-             (when tests?
-               (invoke "pytest" "-vv")))))))
-    (native-inputs
-     (list python-pytest))
+     `(#:phases (modify-phases %standard-phases
+                  (replace 'check
+                    (lambda* (#:key tests? #:allow-other-keys)
+                      (when tests?
+                        (invoke "pytest" "-vv")))))))
+    (native-inputs (list python-pytest))
     (home-page "https://pycodestyle.readthedocs.io/")
     (synopsis "Python style guide checker")
     (description "@code{pycodestyle} (formerly pep8) is a tool to check
@@ -10250,9 +10247,8 @@ (define-public python-flake8-3.9
               (sha256
                (base32
                 "0sspgh2ph7bb5fmf49mrdhi7n5m421kfkxk1n0vn4akgg20q6lh7"))))
-    (propagated-inputs
-     (list python-pycodestyle-2.7 python-entrypoints python-pyflakes-2.3
-           python-mccabe))))
+    (propagated-inputs (list python-pycodestyle-2.7 python-entrypoints
+                             python-pyflakes-2.3 python-mccabe))))
 
 (define-public python-flake8-3.8
   (package
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#55814; Package guix-patches. (Tue, 07 Jun 2022 01:24:02 GMT) Full text and rfc822 format available.

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

From: Christopher Rodriguez <yewscion <at> gmail.com>
To: 55814 <at> debbugs.gnu.org
Subject: Status of Rebuilds for Change
Date: Mon, 06 Jun 2022 21:12:29 -0400
[Message part 1 (text/plain, inline)]
Hey all,

I've just submitted an 8 patch set. I think I've managed to isolate each change.

I'm currently ~65% of the way through rebuilding the following 178 packages in
my local guix repository after the changes. No issues yet; If I encounter any I
will update with a patch to fix it.

Worth mentioning, this list of 178 was what `guix refresh --list-dependent
python-flake8 python-pyflakes python-pycodestyle` said would trigger a rebuild
of all 370 packages that depend on the above 3.

Including the list of packages I am explicitly building here for transparency.

--

Christopher Rodriguez

[2022-06-06-impacted-packages.txt (text/plain, inline)]
magic-wormhole <at> 0.12.0 python-autoflake <at> 1.3.1 python-pytest-pycodestyle <at> 2.2.0
tractor <at> 3.13 nyx <at> 2.1.0 onionshare <at> 2.4 python-flake8-todo <at> 0.7 python-fpylll <at> 0.5.2
python-biom-format <at> 2.1.10 python-databases <at> 0.5.5 python-tortoise-orm <at> 0.17.8
docker-compose <at> 1.29.2 repo2docker <at> 2021.08.0 python-celery <at> 5.2.6
emacs-elpy <at> 1.35.0-1.1746e70 python-mt-940 <at> 4.23.0 piper <at> 0.6
python-markdownify <at> 0.10.1 cozy <at> 1.2.0 emacs-emms-mode-line-cycle <at> 0.2.5
emacs-helm-emms <at> 1.3-3.37e5aa0 emacs-org-emms <at> 0.1-1.07a8917 gpodder <at> 3.10.21
quodlibet <at> 4.5.0 beets-bandcamp <at> 0.1.4 picard <at> 2.4.4 anki <at> 2.1.16 ytfzf <at> 2.3
curseradio <at> 0-1.1bd4bd0 gfeeds <at> 0.16.2 celluloid <at> 0.23 mpv-mpris <at> 0.6
smplayer <at> 21.10.0 pipe-viewer <at> 0.2.0 python-tweepy <at> 4.4.0 python-hic2cool <at> 0.8.3
python-hicexplorer <at> 2.1.4 c-vise <at> 2.4.0 python-pytest-csv <at> 3.0.0 hangups <at> 0.4.18
python-behave-web-api <at> 1.0.6 python-pyvips <at> 2.2.0 python-jaraco-packaging <at> 6.1
python-woob <at> 3.0 python-mastodon-py <at> 1.5.1 python-flasgger <at> 0.6.3 python-furl <at> 2.1.3
tgcli <at> 0.3.1 scvelo <at> 0.2.4 python-minikanren <at> 1.0.1 conda <at> 4.10.3 fdroidserver <at> 1.1.9
python-photutils <at> 1.3.0 python-astropy-healpix <at> 0.6 python-regions <at> 0.5
python-gwcs <at> 0.18.0 python-iml <at> 0.6.2 python-slurm-magic <at> 0.0-0.73dd1a2
python-pytest-exploratory <at> 0.5 python-ipdb <at> 0.13.9 autokey <at> 0.95.10
python-pyfuse3 <at> 3.2.1 python-telethon <at> 1.17.5 emacs-calibredb <at> 2.10.0
python-astroquery <at> 0.4.6 vorta <at> 0.8.3 cura <at> 4.13.1 jrnl <at> 1.9.7 python-harmony <at> 0.7.1
caja-extensions <at> 1.24.1 python-swiftclient <at> 2.6.0 dbxfs <at> 1.0.51 linuxdcpp <at> 1.1.0
ikiwiki <at> 3.20200202.3 breezy <at> 3.2.2 poetry <at> 1.1.12 openconnect-sso <at> 0.7.3
snakemake <at> 7.7.0 electrum <at> 4.2.1 python-trio-websocket <at> 0.9.2
python-bash-kernel <at> 0.7.2 xeus <at> 2.4.1 r-torch <at> 0.7.2 python-pari-jupyter <at> 1.4.1
python-hyperopt <at> 0.2.5 python-ipython-cluster-helper <at> 0.6.4 pgcli <at> 3.2.0
rfcat <at> 1.9.5-1.725bf79 ruby-iruby <at> 0.3 nanosv <at> 1.2.4 tombo <at> 1.5.1
python-pytest-perf <at> 0.12.0 python-nb-clean <at> 2.1.0 pigx-sars-cov-2 <at> 0.0.7 pigx <at> 0.0.3
snakemake <at> 6.15.5 tuir <at> 1.29.0 rtv <at> 1.27.0 python-django-taggit <at> 1.3.0
emacs-py-isort <at> 2016.1 abjad-ext-nauert <at> 3.4 abjad-ext-rmakers <at> 3.4 komikku <at> 0.38.0
vdirsyncer <at> 0.18.0 orange <at> 3.31.1 python-mailman-hyperkitty <at> 1.2.0
python-falcon-cors <at> 1.1.7 ibus-theme-tools <at> 4.2.0 postorius <at> 1.3.3
emacs-flycheck-cpplint <at> 0.1-1.1d8a090 giara <at> 0.3 python-scrapy <at> 2.6.1 offlate <at> 0.5
ledger-agent <at> 0.9.0 keepkey-agent <at> 0.9.0 trezor-agent <at> 0.11.0-1
python-psycopg <at> 3.0.8 synapse <at> 1.29.0 python-pyvista <at> 0.34.0 python-pygmsh <at> 7.1.11
r-destiny <at> 3.10.0 python-pytest-check-links <at> 0.3.0 python-nbdime <at> 3.1.1
python-sparqlkernel <at> 1.3.0 python-plotly <at> 5.6.0 python-ipydatawidgets <at> 4.2.0
python-ipympl <at> 0.9.1 python-matplotlib-documentation <at> 3.5.2 scregseg <at> 0.1.1
r-irkernel <at> 1.3 abjad-ext-ipython <at> 3.3 guix-jupyter <at> 0.2.2 python-nbsphinx <at> 0.8.8
python-jupyter-sphinx <at> 0.3.2 python-qstylizer <at> 0.1.10 weasyprint <at> 54.3
python-ajsonrpc <at> 1.2.0 python-flake8-isort <at> 4.1.1 python-textdistance <at> 4.2.1
python-libcst <at> 0.3.8 python-arpeggio <at> 2.0.0 audio-to-midi <at> 2020.7 gdc-client <at> 1.6.0
python-transient <at> 0.12 mdpo <at> 0.3.6 ccwl <at> 0.2.0 python-pygenometracks <at> 3.3
gourmet <at> 0.17.4-0.8af29c8 389-ds-base <at> 1.4.4.17 python-yq <at> 2.11.1 python-tldr <at> 3.1.0
sshoot <at> 1.5.1 python-pyls-black <at> 0.4.7 python-flake8-continuation <at> 1.0.5
weechat-matrix <at> 0.3.0 pantalaimon <at> 0.10.3 python-flask-restx <at> 0.5.1
python-minio <at> 6.0.0 nototools <at> 0.2.16 python-ipython-documentation <at> 8.2.0
python-numpy-documentation <at> 1.21.6 python-hyperkitty <at> 1.3.5 archivebox <at> 0.6.2
mbed-tools <at> 7.53.0 python-flask-combo-jsonapi <at> 1.1.0 electron-cash <at> 4.2.7
python-pystitcher <at> 1.0.4 python-argopt <at> 0.7.0 python-jinja2-cli <at> 0.7.0
python-xenon <at> 0.7.0 python-codespell <at> 2.1.0 python-flake8-pyi <at> 20.10.0
python-flake8-quotes <at> 3.2.0 nikola <at> 8.1.3 python-dolfin-adjoint <at> 2019.1.0
qmpbackup <at> 0.23 sshuttle <at> 0.78.5 qtile <at> 0.18.1

Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Tue, 07 Jun 2022 13:23:01 GMT) Full text and rfc822 format available.

Notification sent to Christopher Rodriguez <yewscion <at> gmail.com>:
bug acknowledged by developer. (Tue, 07 Jun 2022 13:23:01 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Christopher Rodriguez <yewscion <at> gmail.com>
Cc: 55814-done <at> debbugs.gnu.org
Subject: Re: bug#55814: [PATCH] Updated python-flake8 and inputs to reenable
 build.
Date: Tue, 07 Jun 2022 09:22:34 -0400
Hi Christopher,

Christopher Rodriguez <yewscion <at> gmail.com> writes:

> ---
>
> Hey all,
>
> I noticed today that `python-flake8` was failing to build, as one of its inputs
> (`python-pyflakes`) had been bumped too high for the older version's `check`
> phase. Tried to take the initiative and threw together this patch; It builds in
> my local tree, and had been linted/styled/tested/etc. I believe I have done
> everything by the book, but if I need to fix anything, let me know (I'm still
> new to contributing)!

Hehe, it seems at least 3 people noticed and tried fixing the problem,
which is nice!

python-pycodestyle ended up being updated by Petr Hodina in 2660f99b57
and python-flake8 to 4.0.1 in 5022cf8e04 by myself.  I've tested the
dependent packages (those reported by 'guix refresh --list
python-pycodestyle python-flake8' could still build, fixing a few
failing ones).

So I believe we've got that flake8 situation covered :-).

Thank you!

Closing.

Maxim




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

This bug report was last modified 1 year and 291 days ago.

Previous Next


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