unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 66788@debbugs.gnu.org
Cc: ludo@gnu.org, ngraves@ngraves.fr
Subject: [bug#66788] [PATCH 1/2] gnu: python-black: Update to 23.1.0.
Date: Sun,  4 Feb 2024 13:54:38 +0100	[thread overview]
Message-ID: <20240204125440.3508-1-ngraves@ngraves.fr> (raw)
In-Reply-To: <20231028094534.26587-1-ngraves@ngraves.fr>

* gnu/packages/python-xyz.scm (python-black): Update to 23.1.0.
---
 gnu/packages/python-xyz.scm | 36 +++++++++++++++++-------------------
 1 file changed, 17 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c68b17b0ab..5ffea67fc9 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7496,43 +7496,41 @@ (define-public python-language-server
 (define-public python-black
   (package
     (name "python-black")
-    (version "22.3.0")
+    (version "23.1.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "black" version))
        (sha256
-        (base32
-         "0yfahlqc7dsdp1js0cbv706apldnfnlbal9b53cww8n0hs40n0im"))))
-    (build-system python-build-system)
+        (base32 "1b4jjv3fw2wgssnw2v1x0w09s7rz9sj5g4i1lwmmlgwhm2z9ggdh"))))
+    (build-system pyproject-build-system)
+    ;; These tests fail because Guix replaces the file shebangs.
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'patch-source-shebangs 'use-absolute-file-names
-           (lambda* (#:key native-inputs inputs #:allow-other-keys)
-             (let* ((inpts (or native-inputs inputs))
-                    (python3 (search-input-file inpts "/bin/python3")))
-               (substitute* (find-files "tests" "\\.py$")
-                 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
-                  (string-append "#!" python3 (if (string? minor-version)
-                                                  minor-version
-                                                  "")))))))
-         (replace 'check
-           (lambda* (#:key tests? #:allow-other-keys)
-             (when tests? (invoke "pytest" "-vv")))))))
+     '(#:test-flags `("-k" ,(string-append
+                             "not test_infer_target_version "
+                             "and not test_simple_format[fmtonoff] "
+                             "and not test_simple_format[function] "
+                             "and not test_simple_format[string_prefixes] "
+                             "and not test_python_39[python39]"))))
     (propagated-inputs
      (list python-click
            python-attrs
            python-appdirs
            python-pathspec
            python-mypy-extensions
+           python-packaging
            python-platformdirs
            python-regex
            python-tomli
            python-typed-ast
            python-typing-extensions))
     (native-inputs
-     (list python-pytest python-pytest-aiohttp python-setuptools-scm))
+     (list python-hatchling
+           python-hatch-vcs
+           python-hatch-fancy-pypi-readme
+           python-pytest
+           python-pytest-aiohttp
+           python-setuptools-scm))
     (home-page "https://github.com/psf/black")
     (synopsis "The uncompromising code formatter")
     (description "Black is the uncompromising Python code formatter.")
-- 
2.41.0





  parent reply	other threads:[~2024-02-04 12:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-28  9:45 [bug#66788] [PATCH 0/2] Update python-black to 23.1.0 Nicolas Graves via Guix-patches via
2023-12-04 20:56 ` Ludovic Courtès
2024-02-04 12:55   ` Nicolas Graves via Guix-patches via
2024-02-04 12:54 ` Nicolas Graves via Guix-patches via [this message]
2024-02-04 12:54   ` [bug#66788] [PATCH 2/2] gnu: python-packaging: Update to 22.0 Nicolas Graves via Guix-patches via
2024-05-10  9:48 ` [bug#66788] [PATCH 0/2] Update python-black to 23.1.0 Nicolas Graves via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240204125440.3508-1-ngraves@ngraves.fr \
    --to=guix-patches@gnu.org \
    --cc=66788@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=ngraves@ngraves.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).