Subject: [PATCH] gnu: python-mypy: Update to 1.4.1.
From: Vincent Prat <[email-masked]>
To: [email-masked]
Date: Mon, 26 Jun 2023 11:53:08 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

From df2f9b0e844359f761788bf4dacdf93c53edcb19 Mon Sep 17 00:00:00 2001
From: Vincent Prat <[email-masked]>
Date: Mon, 26 Jun 2023 11:48:27 +0200
Subject: [PATCH 2/2] gnu: python-mypy: Fix style.

* gnu/packages/python-check.scm (python-mypy): Fix style.
---
 gnu/packages/python-check.scm | 46 +++++++++++++++++------------------
 1 file changed, 22 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 3a718954c5..a5e6299167 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -1835,34 +1835,32 @@ (define-public python-mypy
   (package
     (name "python-mypy")
     (version "1.4.1")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "mypy" version))
-       (sha256
-        (base32
-         "06svfmqbnb45pydy8lcrr12wqhhla5dl888w0g4f3wm1ismxkg4v"))))
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "mypy" version))
+              (sha256
+               (base32
+                "06svfmqbnb45pydy8lcrr12wqhhla5dl888w0g4f3wm1ismxkg4v"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda* (#:key tests? #:allow-other-keys)
-             (when tests?
-               (invoke "pytest" "mypyc")))))))
-    (native-inputs
-     (list python-attrs
-           python-lxml
-           python-psutil
-           python-pytest
-           python-pytest-forked
-           python-pytest-xdist
-           python-virtualenv))
-    (propagated-inputs
-     (list python-mypy-extensions python-tomli python-typing-extensions))
+     `(#:phases (modify-phases %standard-phases
+                  (replace 'check
+                    (lambda* (#:key tests? #:allow-other-keys)
+                      (when tests?
+                        (invoke "pytest" "mypyc")))))))
+    (native-inputs (list python-attrs
+                         python-lxml
+                         python-psutil
+                         python-pytest
+                         python-pytest-forked
+                         python-pytest-xdist
+                         python-virtualenv))
+    (propagated-inputs (list python-mypy-extensions python-tomli
+                             python-typing-extensions))
     (home-page "https://www.mypy-lang.org/")
     (synopsis "Static type checker for Python")
-    (description "Mypy is an optional static type checker for Python that aims
+    (description
+     "Mypy is an optional static type checker for Python that aims
 to combine the benefits of dynamic typing and static typing.  Mypy combines
 the expressive power and convenience of Python with a powerful type system and
 compile-time type checking.  Mypy type checks standard Python programs; run
-- 
2.39.2

From c42d4cbc518d200e1e31a31ce2e27effa1e7abed Mon Sep 17 00:00:00 2001
From: Vincent Prat <[email-masked]>
Date: Mon, 26 Jun 2023 11:44:47 +0200
Subject: [PATCH 1/2] gnu: python-mypy: Update to 1.4.1.

* gnu/packages/python-check.scm (python-mypy): Update to 1.4.1.
---
 gnu/packages/python-check.scm | 23 +++++------------------
 1 file changed, 5 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 87e15b4560..3a718954c5 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -1834,24 +1834,14 @@ (define-public python-mypy-extensions
 (define-public python-mypy
   (package
     (name "python-mypy")
-    (version "0.971")
+    (version "1.4.1")
     (source
      (origin
-       ;; Because of https://github.com/python/mypy/issues/9584, the
-       ;; mypyc/analysis directory is missing in the PyPI archive, leading to
-       ;; test failures.
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/python/mypy")
-             (commit (string-append "v" version))
-             ;; Fetch git submodules otherwise typeshed is not fetched.
-             ;; Typeshed is a collection of Python sources type annotation
-             ;; (data) files.
-             (recursive? #t)))
-       (file-name (git-file-name name version))
+       (method url-fetch)
+       (uri (pypi-uri "mypy" version))
        (sha256
         (base32
-         "0i8swdynms1wpiprgqn24za6mx8rlgxr2jash3cb5xi8jyf58n97"))))
+         "06svfmqbnb45pydy8lcrr12wqhhla5dl888w0g4f3wm1ismxkg4v"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -1859,10 +1849,7 @@ (define-public python-mypy
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
-               (invoke "pytest" "-vv" "mypyc"
-                       ;; XXX: This test gets an unexpected DeprecationWarning
-                       ;; from recent versions of setuptools.  Ignore for now.
-                       "-k" "not testImports")))))))
+               (invoke "pytest" "mypyc")))))))
     (native-inputs
      (list python-attrs
            python-lxml
-- 
2.39.2