Message ID | 20220606172432.363385-1-yewscion@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [bug#55814,v2] Updated python-flake8 and inputs to reenable build. | expand |
Context | Check | Description |
---|---|---|
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
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.
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@debbugs.gnu.org). Greetings, Maxime.
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))