[PATCH] Updated python-flake8 and inputs to reenable build.

  • Done
  • quality assurance status badge
Details
4 participants
  • Liliana Marie Prikler
  • Maxim Cournoyer
  • Maxime Devos
  • Christopher Rodriguez
Owner
unassigned
Submitted by
Christopher Rodriguez
Severity
normal

Debbugs page

Christopher Rodriguez wrote 3 years ago
(address . guix-patches@gnu.org)(name . Christopher Rodriguez)(address . yewscion@gmail.com)
20220606014315.280227-1-yewscion@gmail.com
---

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(-)

Toggle diff (96 lines)
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
Liliana Marie Prikler wrote 3 years ago
2fe5b2c4a0eb1a65a04addaba74a3b578ede58b4.camel@gmail.com
Am Sonntag, dem 05.06.2022 um 21:43 -0400 schrieb Christopher
Rodriguez:
Toggle quote (1 lines)
> 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.

Toggle quote (29 lines)
>  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.

Toggle quote (13 lines)
>      (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.

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

Toggle quote (31 lines)
>      (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.

Toggle quote (7 lines)
>  (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.

Toggle quote (22 lines)
>      (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
Maxime Devos wrote 3 years ago
Re: [bug#55814] [PATCH] Updated python-flake8 and inputs to reenable build.
a37785632c5eb0f2ba41c89b5de5601f391a399c.camel@telenet.be
Christopher Rodriguez schreef op zo 05-06-2022 om 21:43 [-0400]:
Toggle quote (4 lines)
> +                      (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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYp3JWRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7vB1AQCT3/KnXKOYqmwk6er/CylAqIs/
urtMjcY7ep9TTjAfBgEA7xxtKOnfxgeUpO+fqj8q3qFA0D2yg+SkmyfqNS7pLgs=
=gsXd
-----END PGP SIGNATURE-----


Christopher Rodriguez wrote 3 years ago
[PATCH v2] Updated python-flake8 and inputs to reenable build.
(address . 55814@debbugs.gnu.org)(name . Christopher Rodriguez)(address . yewscion@gmail.com)
20220606172432.363385-1-yewscion@gmail.com
---

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(-)

Toggle diff (98 lines)
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
Maxime Devos wrote 3 years ago
87bd42fbfea63b89c0abd932986ad69b764e34ac.camel@telenet.be
Christopher Rodriguez schreef op ma 06-06-2022 om 13:24 [-0400]:
Toggle quote (17 lines)
> ---
>
> 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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYp5IiBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uv9AQDwigLNaYI8mTyBlyRe2bq1++/Q
5sIjdOK+hLkvTW9YsgD/bkS8ms8wHqGz8nBbleB+5Pe0SJJxPk5+b95SQMy5ggE=
=PgDB
-----END PGP SIGNATURE-----


Maxime Devos wrote 3 years ago
(name . Christopher Rodriguez)(address . yewscion@gmail.com)(address . 55814@debbugs.gnu.org)
37b08812fea6846879b5a9d8cb9177171c13cdf9.camel@telenet.be
Christopher Rodriguez schreef op ma 06-06-2022 om 14:44 [-0400]:
Toggle quote (11 lines)
> 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.

Toggle quote (9 lines)
> 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@debbugs.gnu.org).

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYp5P4xccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7s9aAP9hrB4WtgV1LFkt2J82aOqm4DiN
ZOmbrL6uvy8gc9uUNgEAsCiB/8ZiqUhR5skHzfgc6pwgzXZSF8WO9Ax5PgYa2gE=
=oMgO
-----END PGP SIGNATURE-----


Christopher Rodriguez wrote 3 years ago
[PATCH v3 1/8] Refreshed `python-pycodestyle` to version 2.8.0.
(address . 55814@debbugs.gnu.org)(name . Christopher Rodriguez)(address . yewscion@gmail.com)
20220607011012.1168112-1-yewscion@gmail.com
[bug: 55814]
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (25 lines)
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
Christopher Rodriguez wrote 3 years ago
[PATCH v3 2/8] Refreshed `python-flake8` to 4.0.1.
(address . 55814@debbugs.gnu.org)(name . Christopher Rodriguez)(address . yewscion@gmail.com)
20220607011012.1168112-2-yewscion@gmail.com
[Bug: 55814]
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
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
Christopher Rodriguez wrote 3 years ago
[PATCH v3 3/8] `python-pycodestyle` now respects `#:tests?`
(address . 55814@debbugs.gnu.org)(name . Christopher Rodriguez)(address . yewscion@gmail.com)
20220607011012.1168112-3-yewscion@gmail.com
[Bug: 55814]
---
gnu/packages/python-xyz.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (18 lines)
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
Christopher Rodriguez wrote 3 years ago
[PATCH v3 7/8] Added `python-flake8-3.9` as a variant package.
(address . 55814@debbugs.gnu.org)(name . Christopher Rodriguez)(address . yewscion@gmail.com)
20220607011012.1168112-7-yewscion@gmail.com
[Bug: 55814]
---
gnu/packages/python-xyz.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Toggle diff (27 lines)
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
Christopher Rodriguez wrote 3 years ago
[PATCH v3 4/8] `python-flake8` now supports `#:tests?`
(address . 55814@debbugs.gnu.org)(name . Christopher Rodriguez)(address . yewscion@gmail.com)
20220607011012.1168112-4-yewscion@gmail.com
[Bug: 55814]
---
gnu/packages/python-xyz.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (20 lines)
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
Christopher Rodriguez wrote 3 years ago
[PATCH v3 5/8] Added `python-pyflakes-2.3` as a variant package.
(address . 55814@debbugs.gnu.org)(name . Christopher Rodriguez)(address . yewscion@gmail.com)
20220607011012.1168112-5-yewscion@gmail.com
[Bug: 55814]
---
gnu/packages/python-xyz.scm | 11 +++++++++++
1 file changed, 11 insertions(+)

Toggle diff (24 lines)
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
Christopher Rodriguez wrote 3 years ago
[PATCH v3 6/8] Added `python-pycodestyle-2.7` as a variant package.
(address . 55814@debbugs.gnu.org)(name . Christopher Rodriguez)(address . yewscion@gmail.com)
20220607011012.1168112-6-yewscion@gmail.com
[Bug: 55814]
---
gnu/packages/python-xyz.scm | 11 +++++++++++
1 file changed, 11 insertions(+)

Toggle diff (24 lines)
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
Christopher Rodriguez wrote 3 years ago
[PATCH v3 8/8] Formatted Code with `guix style`.
(address . 55814@debbugs.gnu.org)(name . Christopher Rodriguez)(address . yewscion@gmail.com)
20220607011012.1168112-8-yewscion@gmail.com
[Bug: 55814]
---
gnu/packages/python-xyz.scm | 32 ++++++++++++++------------------
1 file changed, 14 insertions(+), 18 deletions(-)

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

Christopher Rodriguez <yewscion@gmail.com> writes:

Toggle quote (11 lines)
> ---
>
> 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
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 55814
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