unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#42465] [PATCH 00/10] gnu: Add python-mypy.
@ 2020-07-21 11:55 Tanguy Le Carrour
  2020-07-21 11:56 ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Tanguy Le Carrour
                   ` (2 more replies)
  0 siblings, 3 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-21 11:55 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

This patch replaces #42395 and #42396.
It might also replace #35975 and #35193.

Tanguy Le Carrour (10):
  gnu: python-typing-extension: Update to 3.7.4.2.
  gnu: python-hypothesis: Update to 5.20.0.
  gnu: Add python-mypy-extensions.
  gnu: Add python-typing-inspect.
  gnu: Add python-libcst.
  gnu: Add python-lark-parser.
  gnu: Add python-hypothesmith.
  gnu: Add python-flake8-bugbear.
  gnu: Add python-flake8-pyi.
  gnu: Add python-mypy.

 gnu/packages/check.scm        |  27 +++++-
 gnu/packages/python-check.scm |  71 +++++++++++++++
 gnu/packages/python-xyz.scm   | 159 +++++++++++++++++++++++++++++++++-
 3 files changed, 253 insertions(+), 4 deletions(-)

-- 
2.27.0





^ permalink raw reply	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2.
  2020-07-21 11:55 [bug#42465] [PATCH 00/10] gnu: Add python-mypy Tanguy Le Carrour
@ 2020-07-21 11:56 ` Tanguy Le Carrour
  2020-07-21 11:56   ` [bug#42465] [PATCH 02/10] gnu: python-hypothesis: Update to 5.20.0 Tanguy Le Carrour
                     ` (9 more replies)
  2020-07-22 12:09 ` [bug#42465] [PATCH v2 " Tanguy Le Carrour
  2020-07-27  8:00 ` [bug#42465] [PATCH v3 1/9] gnu: Add python-mypy-extensions Tanguy Le Carrour
  2 siblings, 10 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-21 11:56 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-typing-extension): Update to 3.7.4.2.
---
 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 748f48f229..893506b5c3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16663,14 +16663,14 @@ and other tools.")
 (define-public python-typing-extensions
   (package
     (name "python-typing-extensions")
-    (version "3.7.4.1")
+    (version "3.7.4.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "typing_extensions" version))
        (sha256
         (base32
-         "1wj1vcgbnm20aiinmphyxfrbv3qi9xdhvw89ab3qm42y9n4wq7h9"))))
+         "1bk9b60s3rm1c8cwhv0bl3gh0x43153xxa6jpyllk9mc7jd5ivkr"))))
     (build-system python-build-system)
     (home-page
      "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 02/10] gnu: python-hypothesis: Update to 5.20.0.
  2020-07-21 11:56 ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Tanguy Le Carrour
@ 2020-07-21 11:56   ` Tanguy Le Carrour
  2020-07-25 15:52     ` Marius Bakke
  2020-07-21 11:56   ` [bug#42465] [PATCH 03/10] gnu: Add python-mypy-extensions Tanguy Le Carrour
                     ` (8 subsequent siblings)
  9 siblings, 1 reply; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-21 11:56 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/check.scm (python-hypothesis): Update to 5.20.0.
---
 gnu/packages/check.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 661ed65e53..a3608e4125 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1801,13 +1801,13 @@ instantly.")
 (define-public python-hypothesis
   (package
     (name "python-hypothesis")
-    (version "5.4.1")
+    (version "5.20.0")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "hypothesis" version))
               (sha256
                (base32
-                "0zn09bn6hadk4vxl6jy8bkjr5fz8mrhin3z46w7pq5qgbaycr89p"))))
+                "0h1wy6wdcbgidqw5spm0lndlj77l6d5na5z2cxy04g4yp5m9v9jh"))))
     (build-system python-build-system)
     (arguments
      ;; XXX: Tests are not distributed with the PyPI archive.
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 03/10] gnu: Add python-mypy-extensions.
  2020-07-21 11:56 ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Tanguy Le Carrour
  2020-07-21 11:56   ` [bug#42465] [PATCH 02/10] gnu: python-hypothesis: Update to 5.20.0 Tanguy Le Carrour
@ 2020-07-21 11:56   ` Tanguy Le Carrour
  2020-07-25 15:55     ` Marius Bakke
  2020-07-21 11:56   ` [bug#42465] [PATCH 04/10] gnu: Add python-typing-inspect Tanguy Le Carrour
                     ` (7 subsequent siblings)
  9 siblings, 1 reply; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-21 11:56 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-check.scm (python-mypy-extensions): New variable.
---
 gnu/packages/python-check.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 09eb253f06..89137b515d 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
+;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bionelang.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -454,3 +455,22 @@ analysing code quality.")
     (description "This package provides a library for replying fake data to
 Python software under test, when they make an HTTP query.")
     (license license:asl2.0)))
+
+(define-public python-mypy-extensions
+  (package
+    (name "python-mypy-extensions")
+    (version "0.4.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "mypy_extensions" version))
+        (sha256
+         (base32
+          "1a04qsk8hd1lqns8w1j7cr0vmvbhg450di5k1i16kqxkbf7q30id"))))
+    (build-system python-build-system)
+    (arguments `(#:tests? #f)); no tests
+    (home-page "https://github.com/python/mypy_extensions")
+    (synopsis "Experimental extensions for MyPy.")
+    (description "The @code{python-mypy-extensions} module defines experimental
+extensions to the standard 'typing' module that are supported by the mypy typechecker.")
+    (license license:expat)))
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 04/10] gnu: Add python-typing-inspect.
  2020-07-21 11:56 ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Tanguy Le Carrour
  2020-07-21 11:56   ` [bug#42465] [PATCH 02/10] gnu: python-hypothesis: Update to 5.20.0 Tanguy Le Carrour
  2020-07-21 11:56   ` [bug#42465] [PATCH 03/10] gnu: Add python-mypy-extensions Tanguy Le Carrour
@ 2020-07-21 11:56   ` Tanguy Le Carrour
  2020-07-25 15:58     ` Marius Bakke
  2020-07-21 11:56   ` [bug#42465] [PATCH 05/10] gnu: Add python-libcst Tanguy Le Carrour
                     ` (6 subsequent siblings)
  9 siblings, 1 reply; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-21 11:56 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-typing-inspect): New variable.
---
 gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 893506b5c3..2293a16ecc 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12274,6 +12274,30 @@ in Python.  It allows you to declare the libraries your project depends on and
 it will manage (install/update) them for you.")
     (license license:expat)))
 
+(define-public python-typing-inspect
+  (package
+    (name "python-typing-inspect")
+    (version "0.6.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "typing_inspect" version))
+              (sha256
+               (base32
+                "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-mypy-extensions" ,python-mypy-extensions)
+       ("python-typing-extensions" ,python-typing-extensions)))
+    (home-page "https://github.com/ilevkivskyi/typing_inspect")
+    (synopsis
+     "Defines experimental API for runtime inspection of types defined in the Python
+standard typing module")
+    (description
+     "The typing_inspect module defines experimental API for runtime inspection of types
+defined in the Python standard typing module. Works with typing version 3.7.4 and
+later.")
+    (license license:expat)))
+
 (define-public python-lazy-object-proxy
   (package
     (name "python-lazy-object-proxy")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 05/10] gnu: Add python-libcst.
  2020-07-21 11:56 ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Tanguy Le Carrour
                     ` (2 preceding siblings ...)
  2020-07-21 11:56   ` [bug#42465] [PATCH 04/10] gnu: Add python-typing-inspect Tanguy Le Carrour
@ 2020-07-21 11:56   ` Tanguy Le Carrour
  2020-07-25 16:03     ` Marius Bakke
  2020-07-21 11:56   ` [bug#42465] [PATCH 06/10] gnu: Add python-lark-parser Tanguy Le Carrour
                     ` (5 subsequent siblings)
  9 siblings, 1 reply; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-21 11:56 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-libcst): New variable.
---
 gnu/packages/python-xyz.scm | 55 +++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2293a16ecc..6b462a42f0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12274,6 +12274,61 @@ in Python.  It allows you to declare the libraries your project depends on and
 it will manage (install/update) them for you.")
     (license license:expat)))
 
+(define-public python-libcst
+  (package
+    (name "python-libcst")
+    (version "0.3.7")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "libcst" version))
+              (sha256
+               (base32
+                "1wfd5m9jhk5x2qpz29pjhm9ypp5h3nlbk6xv4vzn4f45xdf5bv9x"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-failing-tests
+           (lambda _
+             ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
+             (delete-file "libcst/tests/test_fuzz.py")
+             ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
+             (delete-file "libcst/tests/test_pyre_integration.py")
+             (delete-file "libcst/codemod/tests/test_codemod_cli.py")
+             (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
+             (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
+             #t))
+         (replace 'check
+           (lambda _
+             (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
+             (invoke "python" "-m" "libcst.codegen.generate" "visitors")
+             (invoke "python" "-m" "libcst.codegen.generate" "return_types")
+             (invoke "python" "-m" "unittest")
+             #t)))))
+    (native-inputs
+     `(("python-black" ,python-black)
+       ("python-hypothesis" ,python-hypothesis)
+       ("python-isort" ,python-isort)))
+    (propagated-inputs
+     `(("python-typing-extensions" ,python-typing-extensions)
+       ("python-typing-inspect" ,python-typing-inspect)
+       ("python-pyyaml" ,python-pyyaml)))
+    (home-page "https://github.com/Instagram/LibCST")
+    (synopsis "A Concrete Syntax Tree (CST) parser and serializer library for Python")
+    (description
+     "LibCST parses Python 3.0, 3.1, 3.3, 3.5, 3.6, 3.7 or 3.8 source code as a CST tree
+that keeps all formatting details (comments, whitespaces, parentheses, etc).  It's useful
+for building automated refactoring (codemod) applications and linters.  LibCST creates
+a compromise between an Abstract Syntax Tree (AST) and a traditional Concrete Syntax
+Tree (CST).  By carefully reorganizing and naming node types and fields, we've created
+a lossless CST that looks and feels like an AST.")
+    (license (list license:expat
+                   ;; Some files unde libcst/_parser/ are under Python Software
+                   ;; Foundation license (see LICENSE file for details)
+                   license:psfl
+                   ;; libcst/_add_slots.py
+                   license:asl2.0))))
+
 (define-public python-typing-inspect
   (package
     (name "python-typing-inspect")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 06/10] gnu: Add python-lark-parser.
  2020-07-21 11:56 ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Tanguy Le Carrour
                     ` (3 preceding siblings ...)
  2020-07-21 11:56   ` [bug#42465] [PATCH 05/10] gnu: Add python-libcst Tanguy Le Carrour
@ 2020-07-21 11:56   ` Tanguy Le Carrour
  2020-07-25 16:05     ` Marius Bakke
  2020-07-21 11:56   ` [bug#42465] [PATCH 07/10] gnu: Add python-hypothesmith Tanguy Le Carrour
                     ` (4 subsequent siblings)
  9 siblings, 1 reply; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-21 11:56 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-lark-parser): New variable.
---
 gnu/packages/python-xyz.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6b462a42f0..533e2f6421 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12274,6 +12274,25 @@ in Python.  It allows you to declare the libraries your project depends on and
 it will manage (install/update) them for you.")
     (license license:expat)))
 
+(define-public python-lark-parser
+  (package
+    (name "python-lark-parser")
+    (version "0.9.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "lark-parser" version))
+              (sha256
+               (base32
+                "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/lark-parser/lark")
+    (synopsis "A modern parsing library for Python")
+    (description
+     "Lark is a parser built with a focus on ergonomics, performance and resilience.
+Lark can parse all context-free languages.  That means it is capable of parsing almost
+any programming language out there, and to some degree most natural languages too.")
+    (license license:expat)))
+
 (define-public python-libcst
   (package
     (name "python-libcst")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 07/10] gnu: Add python-hypothesmith.
  2020-07-21 11:56 ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Tanguy Le Carrour
                     ` (4 preceding siblings ...)
  2020-07-21 11:56   ` [bug#42465] [PATCH 06/10] gnu: Add python-lark-parser Tanguy Le Carrour
@ 2020-07-21 11:56   ` Tanguy Le Carrour
  2020-07-25 16:09     ` Marius Bakke
  2020-07-21 11:56   ` [bug#42465] [PATCH 08/10] gnu: Add python-flake8-bugbear Tanguy Le Carrour
                     ` (3 subsequent siblings)
  9 siblings, 1 reply; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-21 11:56 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/check.scm (python-hypothesmith): New variable.
---
 gnu/packages/check.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index a3608e4125..817bdb4cd9 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1840,6 +1840,29 @@ seamlessly into your existing Python unit testing work flow.")
        `(("python2-enum34" ,python2-enum34)
          ,@(package-propagated-inputs hypothesis))))))
 
+(define-public python-hypothesmith
+  (package
+    (name "python-hypothesmith")
+    (version "0.1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "hypothesmith" version))
+       (sha256
+        (base32
+         "09331sspknv459xcyn1k0lx5flqlc6gmnwp9370pfvg4kg1zmss6"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-hypothesis" ,python-hypothesis)
+       ("python-lark-parser" ,python-lark-parser)
+       ("python-libcst" ,python-libcst)))
+    (home-page "https://github.com/Zac-HD/hypothesmith")
+    (synopsis "Strategies for generating Python programs.")
+    (description
+     "Hypothesis strategies for generating Python programs, something like CSmith.  This
+is definitely pre-alpha, but if you want to play with it feel free!")
+    (license license:mpl2.0)))
+
 (define-public python-lit
   (package
     (name "python-lit")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 08/10] gnu: Add python-flake8-bugbear.
  2020-07-21 11:56 ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Tanguy Le Carrour
                     ` (5 preceding siblings ...)
  2020-07-21 11:56   ` [bug#42465] [PATCH 07/10] gnu: Add python-hypothesmith Tanguy Le Carrour
@ 2020-07-21 11:56   ` Tanguy Le Carrour
  2020-07-25 16:13     ` Marius Bakke
  2020-07-21 11:56   ` [bug#42465] [PATCH 09/10] gnu: Add python-flake8-pyi Tanguy Le Carrour
                     ` (2 subsequent siblings)
  9 siblings, 1 reply; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-21 11:56 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-flake8-bugbear): New variable.
---
 gnu/packages/python-xyz.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 533e2f6421..dd1e78d2e0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7886,6 +7886,34 @@ complexity of Python source code.")
        ("python-pyflakes" ,python-pyflakes-1.2)
        ("python-mccabe" ,python-mccabe)))))
 
+(define-public python-flake8-bugbear
+  (package
+    (name "python-flake8-bugbear")
+    (version "20.1.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "flake8-bugbear" version))
+       (sha256
+        (base32
+         "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-hypothesis" ,python-hypothesis)
+       ("python-hypothesmith" ,python-hypothesmith)))
+    (propagated-inputs
+     `(("python-attrs" ,python-attrs)
+       ("python-flake8" ,python-flake8)))
+    (home-page "https://github.com/PyCQA/flake8-bugbear")
+    (synopsis
+      "A plugin for Flake8 finding likely bugs and design problems in your program")
+    (description
+     "A plugin for Flake8 finding likely bugs and design problems in your program.
+Contains warnings that don't belong in pyflakes and pycodestyle.  It is felt that
+these lints don't belong in the main Python tools as they are very opinionated and
+do not have a PEP or standard behind them.")
+    (license license:expat)))
+
 (define-public python-flake8-polyfill
   (package
     (name "python-flake8-polyfill")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 09/10] gnu: Add python-flake8-pyi.
  2020-07-21 11:56 ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Tanguy Le Carrour
                     ` (6 preceding siblings ...)
  2020-07-21 11:56   ` [bug#42465] [PATCH 08/10] gnu: Add python-flake8-bugbear Tanguy Le Carrour
@ 2020-07-21 11:56   ` Tanguy Le Carrour
  2020-07-25 16:15     ` Marius Bakke
  2020-07-21 11:56   ` [bug#42465] [PATCH 10/10] gnu: Add python-mypy Tanguy Le Carrour
  2020-07-25 15:47   ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Marius Bakke
  9 siblings, 1 reply; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-21 11:56 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-flake8-pyi): New variable.
---
 gnu/packages/python-xyz.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index dd1e78d2e0..1d4199eb14 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7957,6 +7957,35 @@ plugins that intend to support Flake8 2.x and 3.x simultaneously.")
 (define-public python2-flake8-polyfill
   (package-with-python2 python-flake8-polyfill))
 
+(define-public python-flake8-pyi
+  (package
+    (name "python-flake8-pyi")
+    (version "20.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "flake8-pyi" version))
+       (sha256
+        (base32
+         "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-attrs" ,python-attrs)
+       ("python-flake8" ,python-flake8)
+       ("python-pyflakes" ,python-pyflakes)))
+    (home-page "https://github.com/ambv/flake8-pyi")
+    (synopsis
+      "A plugin for Flake8 that provides specializations for type hinting stub files.")
+    (description
+     "A plugin for Flake8 that provides specializations for type hinting stub files,
+especially interesting for linting typeshed.  1) Adds the .pyi extension to
+the default value of the --filename command-line argument to Flake8.  This means
+stubs are linted by default with this plugin enabled, without needing to explicitly list
+every file.  2) Modifies PyFlakes runs for .pyi files to defer checking type annotation
+expressions after the entire file has been read.  This enables support for first-class
+forward references that stub files use.")
+    (license license:expat)))
+
 (define-public python-mistune
   (package
     (name "python-mistune")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 10/10] gnu: Add python-mypy.
  2020-07-21 11:56 ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Tanguy Le Carrour
                     ` (7 preceding siblings ...)
  2020-07-21 11:56   ` [bug#42465] [PATCH 09/10] gnu: Add python-flake8-pyi Tanguy Le Carrour
@ 2020-07-21 11:56   ` Tanguy Le Carrour
  2020-07-25 16:18     ` Marius Bakke
  2020-07-25 15:47   ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Marius Bakke
  9 siblings, 1 reply; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-21 11:56 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-check.scm (python-mypy): New variable.
---
 gnu/packages/python-check.scm | 51 +++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 89137b515d..ea26282074 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -30,6 +30,7 @@
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages web)
+  #:use-module (gnu packages xml)
   #:use-module (guix utils)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
@@ -474,3 +475,53 @@ Python software under test, when they make an HTTP query.")
     (description "The @code{python-mypy-extensions} module defines experimental
 extensions to the standard 'typing' module that are supported by the mypy typechecker.")
     (license license:expat)))
+
+(define-public python-mypy
+  (package
+    (name "python-mypy")
+    (version "0.782")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "mypy" version))
+        (sha256
+         (base32
+          "030kn709515452n6gy2i1d9fg6fyrkmdz228lfpmbslybsld9xzg"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (invoke "./runtests.py")
+             #t)))))
+    (native-inputs
+     `(("python-attrs" ,python-attrs)
+       ("python-flake8" ,python-flake8)
+       ("python-flake8-bugbear" ,python-flake8-bugbear)
+       ("python-flake8-pyi" ,python-flake8-pyi)
+       ("python-importlib-metadata" ,python-importlib-metadata)
+       ("python-lxml" ,python-lxml)
+       ("python-psutil" ,python-psutil)
+       ("python-py" ,python-py)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-pytest-forked" ,python-pytest-forked)
+       ("python-pytest-xdist" ,python-pytest-xdist)
+       ("python-setuptools" ,python-setuptools)
+       ("python-virtualenv" ,python-virtualenv)))
+    (propagated-inputs
+     `(("python-mypy-extensions" ,python-mypy-extensions)
+       ("python-typing-extensions" ,python-typing-extensions)
+       ("python-typed-ast" ,python-typed-ast)))
+    (home-page "http://www.mypy-lang.org/")
+    (synopsis "Optional static type checker for Python")
+    (description "Mypy is an optional static type checker for Python that aims
+to combine the benefits of dynamic (or 'duck') 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 them using
+any Python VM with basically no runtime overhead.")
+    ;; Most of the code is under MIT license; Some files are under Python Software
+    ;; Foundation License version 2: stdlib-samples/*, mypyc/lib-rt/pythonsupport.h and
+    ;; mypyc/lib-rt/getargs.c
+    (license (list license:expat license:psfl))))
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v2 01/10] gnu: python-typing-extension: Update to 3.7.4.2.
  2020-07-21 11:55 [bug#42465] [PATCH 00/10] gnu: Add python-mypy Tanguy Le Carrour
  2020-07-21 11:56 ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Tanguy Le Carrour
@ 2020-07-22 12:09 ` Tanguy Le Carrour
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 02/10] gnu: python-hypothesis: Update to 5.20.0 Tanguy Le Carrour
                     ` (8 more replies)
  2020-07-27  8:00 ` [bug#42465] [PATCH v3 1/9] gnu: Add python-mypy-extensions Tanguy Le Carrour
  2 siblings, 9 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-22 12:09 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-typing-extension): Update to 3.7.4.2.
---
 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 07a52a0e5c..54bbef42e4 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16816,14 +16816,14 @@ and other tools.")
 (define-public python-typing-extensions
   (package
     (name "python-typing-extensions")
-    (version "3.7.4.1")
+    (version "3.7.4.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "typing_extensions" version))
        (sha256
         (base32
-         "1wj1vcgbnm20aiinmphyxfrbv3qi9xdhvw89ab3qm42y9n4wq7h9"))))
+         "1bk9b60s3rm1c8cwhv0bl3gh0x43153xxa6jpyllk9mc7jd5ivkr"))))
     (build-system python-build-system)
     (home-page
      "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v2 02/10] gnu: python-hypothesis: Update to 5.20.0.
  2020-07-22 12:09 ` [bug#42465] [PATCH v2 " Tanguy Le Carrour
@ 2020-07-22 12:09   ` Tanguy Le Carrour
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 03/10] gnu: Add python-mypy-extensions Tanguy Le Carrour
                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-22 12:09 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/check.scm (python-hypothesis): Update to 5.20.0.
---
 gnu/packages/check.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 661ed65e53..a3608e4125 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1801,13 +1801,13 @@ instantly.")
 (define-public python-hypothesis
   (package
     (name "python-hypothesis")
-    (version "5.4.1")
+    (version "5.20.0")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "hypothesis" version))
               (sha256
                (base32
-                "0zn09bn6hadk4vxl6jy8bkjr5fz8mrhin3z46w7pq5qgbaycr89p"))))
+                "0h1wy6wdcbgidqw5spm0lndlj77l6d5na5z2cxy04g4yp5m9v9jh"))))
     (build-system python-build-system)
     (arguments
      ;; XXX: Tests are not distributed with the PyPI archive.
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v2 03/10] gnu: Add python-mypy-extensions.
  2020-07-22 12:09 ` [bug#42465] [PATCH v2 " Tanguy Le Carrour
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 02/10] gnu: python-hypothesis: Update to 5.20.0 Tanguy Le Carrour
@ 2020-07-22 12:09   ` Tanguy Le Carrour
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 04/10] gnu: Add python-typing-inspect Tanguy Le Carrour
                     ` (6 subsequent siblings)
  8 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-22 12:09 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-check.scm (python-mypy-extensions): New variable.
---
 gnu/packages/python-check.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 2e3cfe05c5..f80b7634cf 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
+;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bionelang.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -534,3 +535,22 @@ it, the declaration of a name's public export semantics are not separated from
 the implementation of that name.")
     (license (list license:asl2.0
                    license:lgpl3))))    ; only for setup_helpers.py
+
+(define-public python-mypy-extensions
+  (package
+    (name "python-mypy-extensions")
+    (version "0.4.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "mypy_extensions" version))
+        (sha256
+         (base32
+          "1a04qsk8hd1lqns8w1j7cr0vmvbhg450di5k1i16kqxkbf7q30id"))))
+    (build-system python-build-system)
+    (arguments `(#:tests? #f)); no tests
+    (home-page "https://github.com/python/mypy_extensions")
+    (synopsis "Experimental extensions for MyPy.")
+    (description "The @code{python-mypy-extensions} module defines experimental
+extensions to the standard 'typing' module that are supported by the mypy typechecker.")
+    (license license:expat)))
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v2 04/10] gnu: Add python-typing-inspect.
  2020-07-22 12:09 ` [bug#42465] [PATCH v2 " Tanguy Le Carrour
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 02/10] gnu: python-hypothesis: Update to 5.20.0 Tanguy Le Carrour
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 03/10] gnu: Add python-mypy-extensions Tanguy Le Carrour
@ 2020-07-22 12:09   ` Tanguy Le Carrour
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 05/10] gnu: Add python-libcst Tanguy Le Carrour
                     ` (5 subsequent siblings)
  8 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-22 12:09 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-typing-inspect): New variable.
---
 gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 54bbef42e4..6fa1044fdc 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12297,6 +12297,30 @@ in Python.  It allows you to declare the libraries your project depends on and
 it will manage (install/update) them for you.")
     (license license:expat)))
 
+(define-public python-typing-inspect
+  (package
+    (name "python-typing-inspect")
+    (version "0.6.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "typing_inspect" version))
+              (sha256
+               (base32
+                "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-mypy-extensions" ,python-mypy-extensions)
+       ("python-typing-extensions" ,python-typing-extensions)))
+    (home-page "https://github.com/ilevkivskyi/typing_inspect")
+    (synopsis
+     "Defines experimental API for runtime inspection of types defined in the Python
+standard typing module")
+    (description
+     "The typing_inspect module defines experimental API for runtime inspection of types
+defined in the Python standard typing module. Works with typing version 3.7.4 and
+later.")
+    (license license:expat)))
+
 (define-public python-lazy-object-proxy
   (package
     (name "python-lazy-object-proxy")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v2 05/10] gnu: Add python-libcst.
  2020-07-22 12:09 ` [bug#42465] [PATCH v2 " Tanguy Le Carrour
                     ` (2 preceding siblings ...)
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 04/10] gnu: Add python-typing-inspect Tanguy Le Carrour
@ 2020-07-22 12:09   ` Tanguy Le Carrour
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 06/10] gnu: Add python-lark-parser Tanguy Le Carrour
                     ` (4 subsequent siblings)
  8 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-22 12:09 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-libcst): New variable.
---
 gnu/packages/python-xyz.scm | 57 +++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6fa1044fdc..4f959b886c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12297,6 +12297,63 @@ in Python.  It allows you to declare the libraries your project depends on and
 it will manage (install/update) them for you.")
     (license license:expat)))
 
+(define-public python-libcst
+  (package
+    (name "python-libcst")
+    (version "0.3.7")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "libcst" version))
+              (sha256
+               (base32
+                "1wfd5m9jhk5x2qpz29pjhm9ypp5h3nlbk6xv4vzn4f45xdf5bv9x"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-failing-tests
+           (lambda _
+             ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
+             (delete-file "libcst/tests/test_fuzz.py")
+             ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
+             (delete-file "libcst/tests/test_pyre_integration.py")
+             (delete-file "libcst/codemod/tests/test_codemod_cli.py")
+             (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
+             (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
+             #t))
+         (add-before 'check 'generate-test-data
+           (lambda _
+             (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
+             (invoke "python" "-m" "libcst.codegen.generate" "visitors")
+             (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
+         (replace 'check
+           (lambda _
+             (invoke "python" "-m" "unittest")
+             #t)))))
+    (native-inputs
+     `(("python-black" ,python-black)
+       ("python-hypothesis" ,python-hypothesis)
+       ("python-isort" ,python-isort)))
+    (propagated-inputs
+     `(("python-typing-extensions" ,python-typing-extensions)
+       ("python-typing-inspect" ,python-typing-inspect)
+       ("python-pyyaml" ,python-pyyaml)))
+    (home-page "https://github.com/Instagram/LibCST")
+    (synopsis "A Concrete Syntax Tree (CST) parser and serializer library for Python")
+    (description
+     "LibCST parses Python 3.0, 3.1, 3.3, 3.5, 3.6, 3.7 or 3.8 source code as a CST tree
+that keeps all formatting details (comments, whitespaces, parentheses, etc).  It's useful
+for building automated refactoring (codemod) applications and linters.  LibCST creates
+a compromise between an Abstract Syntax Tree (AST) and a traditional Concrete Syntax
+Tree (CST).  By carefully reorganizing and naming node types and fields, we've created
+a lossless CST that looks and feels like an AST.")
+    (license (list license:expat
+                   ;; Some files unde libcst/_parser/ are under Python Software
+                   ;; Foundation license (see LICENSE file for details)
+                   license:psfl
+                   ;; libcst/_add_slots.py
+                   license:asl2.0))))
+
 (define-public python-typing-inspect
   (package
     (name "python-typing-inspect")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v2 06/10] gnu: Add python-lark-parser.
  2020-07-22 12:09 ` [bug#42465] [PATCH v2 " Tanguy Le Carrour
                     ` (3 preceding siblings ...)
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 05/10] gnu: Add python-libcst Tanguy Le Carrour
@ 2020-07-22 12:09   ` Tanguy Le Carrour
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 07/10] gnu: Add python-hypothesmith Tanguy Le Carrour
                     ` (3 subsequent siblings)
  8 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-22 12:09 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-lark-parser): New variable.
---
 gnu/packages/python-xyz.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4f959b886c..26673c20c0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12297,6 +12297,25 @@ in Python.  It allows you to declare the libraries your project depends on and
 it will manage (install/update) them for you.")
     (license license:expat)))
 
+(define-public python-lark-parser
+  (package
+    (name "python-lark-parser")
+    (version "0.9.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "lark-parser" version))
+              (sha256
+               (base32
+                "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/lark-parser/lark")
+    (synopsis "A modern parsing library for Python")
+    (description
+     "Lark is a parser built with a focus on ergonomics, performance and resilience.
+Lark can parse all context-free languages.  That means it is capable of parsing almost
+any programming language out there, and to some degree most natural languages too.")
+    (license license:expat)))
+
 (define-public python-libcst
   (package
     (name "python-libcst")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v2 07/10] gnu: Add python-hypothesmith.
  2020-07-22 12:09 ` [bug#42465] [PATCH v2 " Tanguy Le Carrour
                     ` (4 preceding siblings ...)
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 06/10] gnu: Add python-lark-parser Tanguy Le Carrour
@ 2020-07-22 12:09   ` Tanguy Le Carrour
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 08/10] gnu: Add python-flake8-bugbear Tanguy Le Carrour
                     ` (2 subsequent siblings)
  8 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-22 12:09 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/check.scm (python-hypothesmith): New variable.
---
 gnu/packages/check.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index a3608e4125..817bdb4cd9 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1840,6 +1840,29 @@ seamlessly into your existing Python unit testing work flow.")
        `(("python2-enum34" ,python2-enum34)
          ,@(package-propagated-inputs hypothesis))))))
 
+(define-public python-hypothesmith
+  (package
+    (name "python-hypothesmith")
+    (version "0.1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "hypothesmith" version))
+       (sha256
+        (base32
+         "09331sspknv459xcyn1k0lx5flqlc6gmnwp9370pfvg4kg1zmss6"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-hypothesis" ,python-hypothesis)
+       ("python-lark-parser" ,python-lark-parser)
+       ("python-libcst" ,python-libcst)))
+    (home-page "https://github.com/Zac-HD/hypothesmith")
+    (synopsis "Strategies for generating Python programs.")
+    (description
+     "Hypothesis strategies for generating Python programs, something like CSmith.  This
+is definitely pre-alpha, but if you want to play with it feel free!")
+    (license license:mpl2.0)))
+
 (define-public python-lit
   (package
     (name "python-lit")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v2 08/10] gnu: Add python-flake8-bugbear.
  2020-07-22 12:09 ` [bug#42465] [PATCH v2 " Tanguy Le Carrour
                     ` (5 preceding siblings ...)
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 07/10] gnu: Add python-hypothesmith Tanguy Le Carrour
@ 2020-07-22 12:09   ` Tanguy Le Carrour
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 09/10] gnu: Add python-flake8-pyi Tanguy Le Carrour
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 10/10] gnu: Add python-mypy Tanguy Le Carrour
  8 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-22 12:09 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-flake8-bugbear): New variable.
---
 gnu/packages/python-xyz.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 26673c20c0..6be4c29976 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7909,6 +7909,34 @@ complexity of Python source code.")
        ("python-pyflakes" ,python-pyflakes-1.2)
        ("python-mccabe" ,python-mccabe)))))
 
+(define-public python-flake8-bugbear
+  (package
+    (name "python-flake8-bugbear")
+    (version "20.1.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "flake8-bugbear" version))
+       (sha256
+        (base32
+         "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-hypothesis" ,python-hypothesis)
+       ("python-hypothesmith" ,python-hypothesmith)))
+    (propagated-inputs
+     `(("python-attrs" ,python-attrs)
+       ("python-flake8" ,python-flake8)))
+    (home-page "https://github.com/PyCQA/flake8-bugbear")
+    (synopsis
+      "A plugin for Flake8 finding likely bugs and design problems in your program")
+    (description
+     "A plugin for Flake8 finding likely bugs and design problems in your program.
+Contains warnings that don't belong in pyflakes and pycodestyle.  It is felt that
+these lints don't belong in the main Python tools as they are very opinionated and
+do not have a PEP or standard behind them.")
+    (license license:expat)))
+
 (define-public python-flake8-polyfill
   (package
     (name "python-flake8-polyfill")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v2 09/10] gnu: Add python-flake8-pyi.
  2020-07-22 12:09 ` [bug#42465] [PATCH v2 " Tanguy Le Carrour
                     ` (6 preceding siblings ...)
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 08/10] gnu: Add python-flake8-bugbear Tanguy Le Carrour
@ 2020-07-22 12:09   ` Tanguy Le Carrour
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 10/10] gnu: Add python-mypy Tanguy Le Carrour
  8 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-22 12:09 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-flake8-pyi): New variable.
---
 gnu/packages/python-xyz.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6be4c29976..6deab39b0e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7980,6 +7980,35 @@ plugins that intend to support Flake8 2.x and 3.x simultaneously.")
 (define-public python2-flake8-polyfill
   (package-with-python2 python-flake8-polyfill))
 
+(define-public python-flake8-pyi
+  (package
+    (name "python-flake8-pyi")
+    (version "20.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "flake8-pyi" version))
+       (sha256
+        (base32
+         "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-attrs" ,python-attrs)
+       ("python-flake8" ,python-flake8)
+       ("python-pyflakes" ,python-pyflakes)))
+    (home-page "https://github.com/ambv/flake8-pyi")
+    (synopsis
+      "A plugin for Flake8 that provides specializations for type hinting stub files.")
+    (description
+     "A plugin for Flake8 that provides specializations for type hinting stub files,
+especially interesting for linting typeshed.  1) Adds the .pyi extension to
+the default value of the --filename command-line argument to Flake8.  This means
+stubs are linted by default with this plugin enabled, without needing to explicitly list
+every file.  2) Modifies PyFlakes runs for .pyi files to defer checking type annotation
+expressions after the entire file has been read.  This enables support for first-class
+forward references that stub files use.")
+    (license license:expat)))
+
 (define-public python-mistune
   (package
     (name "python-mistune")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v2 10/10] gnu: Add python-mypy.
  2020-07-22 12:09 ` [bug#42465] [PATCH v2 " Tanguy Le Carrour
                     ` (7 preceding siblings ...)
  2020-07-22 12:09   ` [bug#42465] [PATCH v2 09/10] gnu: Add python-flake8-pyi Tanguy Le Carrour
@ 2020-07-22 12:09   ` Tanguy Le Carrour
  8 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-22 12:09 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-check.scm (python-mypy): New variable.
---
 gnu/packages/python-check.scm | 51 +++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index f80b7634cf..511bc2b931 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -30,6 +30,7 @@
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages web)
+  #:use-module (gnu packages xml)
   #:use-module (guix utils)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
@@ -554,3 +555,53 @@ the implementation of that name.")
     (description "The @code{python-mypy-extensions} module defines experimental
 extensions to the standard 'typing' module that are supported by the mypy typechecker.")
     (license license:expat)))
+
+(define-public python-mypy
+  (package
+    (name "python-mypy")
+    (version "0.782")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "mypy" version))
+        (sha256
+         (base32
+          "030kn709515452n6gy2i1d9fg6fyrkmdz228lfpmbslybsld9xzg"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (invoke "./runtests.py")
+             #t)))))
+    (native-inputs
+     `(("python-attrs" ,python-attrs)
+       ("python-flake8" ,python-flake8)
+       ("python-flake8-bugbear" ,python-flake8-bugbear)
+       ("python-flake8-pyi" ,python-flake8-pyi)
+       ("python-importlib-metadata" ,python-importlib-metadata)
+       ("python-lxml" ,python-lxml)
+       ("python-psutil" ,python-psutil)
+       ("python-py" ,python-py)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-pytest-forked" ,python-pytest-forked)
+       ("python-pytest-xdist" ,python-pytest-xdist)
+       ("python-setuptools" ,python-setuptools)
+       ("python-virtualenv" ,python-virtualenv)))
+    (propagated-inputs
+     `(("python-mypy-extensions" ,python-mypy-extensions)
+       ("python-typing-extensions" ,python-typing-extensions)
+       ("python-typed-ast" ,python-typed-ast)))
+    (home-page "http://www.mypy-lang.org/")
+    (synopsis "Optional static type checker for Python")
+    (description "Mypy is an optional static type checker for Python that aims
+to combine the benefits of dynamic (or 'duck') 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 them using
+any Python VM with basically no runtime overhead.")
+    ;; Most of the code is under MIT license; Some files are under Python Software
+    ;; Foundation License version 2: stdlib-samples/*, mypyc/lib-rt/pythonsupport.h and
+    ;; mypyc/lib-rt/getargs.c
+    (license (list license:expat license:psfl))))
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2.
  2020-07-21 11:56 ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Tanguy Le Carrour
                     ` (8 preceding siblings ...)
  2020-07-21 11:56   ` [bug#42465] [PATCH 10/10] gnu: Add python-mypy Tanguy Le Carrour
@ 2020-07-25 15:47   ` Marius Bakke
  9 siblings, 0 replies; 43+ messages in thread
From: Marius Bakke @ 2020-07-25 15:47 UTC (permalink / raw)
  To: Tanguy Le Carrour, 42465; +Cc: Tanguy Le Carrour

[-- Attachment #1: Type: text/plain, Size: 146 bytes --]

Tanguy Le Carrour <tanguy@bioneland.org> writes:

> * gnu/packages/python-xyz.scm (python-typing-extension): Update to 3.7.4.2.

Applied, thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 02/10] gnu: python-hypothesis: Update to 5.20.0.
  2020-07-21 11:56   ` [bug#42465] [PATCH 02/10] gnu: python-hypothesis: Update to 5.20.0 Tanguy Le Carrour
@ 2020-07-25 15:52     ` Marius Bakke
  0 siblings, 0 replies; 43+ messages in thread
From: Marius Bakke @ 2020-07-25 15:52 UTC (permalink / raw)
  To: Tanguy Le Carrour, 42465; +Cc: Tanguy Le Carrour

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

Tanguy Le Carrour <tanguy@bioneland.org> writes:

> * gnu/packages/check.scm (python-hypothesis): Update to 5.20.0.

This can not be applied on 'master' because Hypothesis has 6261
dependent packages:

$ ./pre-inst-env guix refresh -l python-hypothesis
Building the following 2211 packages would ensure 6261 dependent
packages are rebuilt: [...]

If it is necessary for the remainder of this series, you can add a
different variable with the new hypothesis like so:

(define-public python-hypothesis-5.20
  (package
    (inherit python-hypothesis)
    (version "5.20")
    (source ...)))

And then add 'python-hypothesis-5.20' to native-inputs in the packages
that need it.

Can you look into it?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 03/10] gnu: Add python-mypy-extensions.
  2020-07-21 11:56   ` [bug#42465] [PATCH 03/10] gnu: Add python-mypy-extensions Tanguy Le Carrour
@ 2020-07-25 15:55     ` Marius Bakke
  0 siblings, 0 replies; 43+ messages in thread
From: Marius Bakke @ 2020-07-25 15:55 UTC (permalink / raw)
  To: Tanguy Le Carrour, 42465; +Cc: Tanguy Le Carrour

[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]

Tanguy Le Carrour <tanguy@bioneland.org> writes:

> * gnu/packages/python-check.scm (python-mypy-extensions): New variable.

[...]

> +(define-public python-mypy-extensions
> +  (package
> +    (name "python-mypy-extensions")
> +    (version "0.4.3")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (pypi-uri "mypy_extensions" version))
> +        (sha256
> +         (base32
> +          "1a04qsk8hd1lqns8w1j7cr0vmvbhg450di5k1i16kqxkbf7q30id"))))
> +    (build-system python-build-system)
> +    (arguments `(#:tests? #f)); no tests
> +    (home-page "https://github.com/python/mypy_extensions")
> +    (synopsis "Experimental extensions for MyPy.")
                                                 ^^^
No '.'.   --------->

> +    (description "The @code{python-mypy-extensions} module defines experimental
> +extensions to the standard 'typing' module that are supported by the mypy typechecker.")

@code{typing}.  Also try to keep description lines shorter than 78
characters.  This should probably also say 'MyPy' (capitalized)?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 04/10] gnu: Add python-typing-inspect.
  2020-07-21 11:56   ` [bug#42465] [PATCH 04/10] gnu: Add python-typing-inspect Tanguy Le Carrour
@ 2020-07-25 15:58     ` Marius Bakke
  0 siblings, 0 replies; 43+ messages in thread
From: Marius Bakke @ 2020-07-25 15:58 UTC (permalink / raw)
  To: Tanguy Le Carrour, 42465; +Cc: Tanguy Le Carrour

[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]

Tanguy Le Carrour <tanguy@bioneland.org> writes:

> * gnu/packages/python-xyz.scm (python-typing-inspect): New variable.

[...]
  
> +(define-public python-typing-inspect
> +  (package
> +    (name "python-typing-inspect")
> +    (version "0.6.0")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (pypi-uri "typing_inspect" version))
> +              (sha256
> +               (base32
> +                "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
> +    (build-system python-build-system)
> +    (propagated-inputs
> +     `(("python-mypy-extensions" ,python-mypy-extensions)
> +       ("python-typing-extensions" ,python-typing-extensions)))
> +    (home-page "https://github.com/ilevkivskyi/typing_inspect")
> +    (synopsis
> +     "Defines experimental API for runtime inspection of types defined in the Python
> +standard typing module")

Just 'API for inspection of types in the Python @code{typing} module'.

> +    (description
> +     "The typing_inspect module defines experimental API for runtime inspection of types
> +defined in the Python standard typing module. Works with typing version 3.7.4 and
> +later.")

@code{typing_inspect}.  Also two spaces between sentences (guix lint
will warn about this).  Although in this case I think we can cut the
other sentence completely, as I presume it will get outdated soon.
WDYT?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 05/10] gnu: Add python-libcst.
  2020-07-21 11:56   ` [bug#42465] [PATCH 05/10] gnu: Add python-libcst Tanguy Le Carrour
@ 2020-07-25 16:03     ` Marius Bakke
  0 siblings, 0 replies; 43+ messages in thread
From: Marius Bakke @ 2020-07-25 16:03 UTC (permalink / raw)
  To: Tanguy Le Carrour, 42465; +Cc: Tanguy Le Carrour

[-- Attachment #1: Type: text/plain, Size: 3385 bytes --]

Tanguy Le Carrour <tanguy@bioneland.org> writes:

> * gnu/packages/python-xyz.scm (python-libcst): New variable.

[...]
  
> +(define-public python-libcst
> +  (package
> +    (name "python-libcst")
> +    (version "0.3.7")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (pypi-uri "libcst" version))
> +              (sha256
> +               (base32
> +                "1wfd5m9jhk5x2qpz29pjhm9ypp5h3nlbk6xv4vzn4f45xdf5bv9x"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'remove-failing-tests
> +           (lambda _
> +             ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
> +             (delete-file "libcst/tests/test_fuzz.py")
> +             ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
> +             (delete-file "libcst/tests/test_pyre_integration.py")
> +             (delete-file "libcst/codemod/tests/test_codemod_cli.py")
> +             (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
> +             (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
> +             #t))
> +         (replace 'check
> +           (lambda _
> +             (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
> +             (invoke "python" "-m" "libcst.codegen.generate" "visitors")
> +             (invoke "python" "-m" "libcst.codegen.generate" "return_types")
> +             (invoke "python" "-m" "unittest")
> +             #t)))))

Nice.  :-)

> +    (native-inputs
> +     `(("python-black" ,python-black)
> +       ("python-hypothesis" ,python-hypothesis)
> +       ("python-isort" ,python-isort)))
> +    (propagated-inputs
> +     `(("python-typing-extensions" ,python-typing-extensions)
> +       ("python-typing-inspect" ,python-typing-inspect)
> +       ("python-pyyaml" ,python-pyyaml)))
> +    (home-page "https://github.com/Instagram/LibCST")
> +    (synopsis "A Concrete Syntax Tree (CST) parser and serializer library for Python")

No article in the start of synopsis (guix lint will warn about this).
So this becomes: "Concrete Syntax Tree (CST) parser and serializer
library for Python".

> +    (description
> +     "LibCST parses Python 3.0, 3.1, 3.3, 3.5, 3.6, 3.7 or 3.8 source code as a CST tree
> +that keeps all formatting details (comments, whitespaces, parentheses, etc).  It's useful
> +for building automated refactoring (codemod) applications and linters.  LibCST creates
> +a compromise between an Abstract Syntax Tree (AST) and a traditional Concrete Syntax
> +Tree (CST).  By carefully reorganizing and naming node types and fields, we've created
> +a lossless CST that looks and feels like an AST.")

Maybe the versions can be omitted so we don't have to update the
description for every update.  Also, the "we've created" sentence feels
weird, maybe s/we've created/LibCST creates/ ?

> +    (license (list license:expat
> +                   ;; Some files unde libcst/_parser/ are under Python Software
> +                   ;; Foundation license (see LICENSE file for details)
> +                   license:psfl
> +                   ;; libcst/_add_slots.py
> +                   license:asl2.0))))

Great!  :-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 06/10] gnu: Add python-lark-parser.
  2020-07-21 11:56   ` [bug#42465] [PATCH 06/10] gnu: Add python-lark-parser Tanguy Le Carrour
@ 2020-07-25 16:05     ` Marius Bakke
  0 siblings, 0 replies; 43+ messages in thread
From: Marius Bakke @ 2020-07-25 16:05 UTC (permalink / raw)
  To: Tanguy Le Carrour, 42465; +Cc: Tanguy Le Carrour

[-- Attachment #1: Type: text/plain, Size: 581 bytes --]

Tanguy Le Carrour <tanguy@bioneland.org> writes:

> * gnu/packages/python-xyz.scm (python-lark-parser): New variable.

[...]

> +    (synopsis "A modern parsing library for Python")

Maybe "Multi-language parser for Python"?  At least the 'A' should go. 

> +    (description
> +     "Lark is a parser built with a focus on ergonomics, performance and resilience.
> +Lark can parse all context-free languages.  That means it is capable of parsing almost
> +any programming language out there, and to some degree most natural languages too.")

Heh, cool stuff!  :-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 07/10] gnu: Add python-hypothesmith.
  2020-07-21 11:56   ` [bug#42465] [PATCH 07/10] gnu: Add python-hypothesmith Tanguy Le Carrour
@ 2020-07-25 16:09     ` Marius Bakke
  0 siblings, 0 replies; 43+ messages in thread
From: Marius Bakke @ 2020-07-25 16:09 UTC (permalink / raw)
  To: Tanguy Le Carrour, 42465; +Cc: Tanguy Le Carrour

[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]

Tanguy Le Carrour <tanguy@bioneland.org> writes:

> * gnu/packages/check.scm (python-hypothesmith): New variable.

[...]
  
> +(define-public python-hypothesmith
> +  (package
> +    (name "python-hypothesmith")
> +    (version "0.1.2")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "hypothesmith" version))
> +       (sha256
> +        (base32
> +         "09331sspknv459xcyn1k0lx5flqlc6gmnwp9370pfvg4kg1zmss6"))))
> +    (build-system python-build-system)
> +    (propagated-inputs
> +     `(("python-hypothesis" ,python-hypothesis)
> +       ("python-lark-parser" ,python-lark-parser)
> +       ("python-libcst" ,python-libcst)))
> +    (home-page "https://github.com/Zac-HD/hypothesmith")
> +    (synopsis "Strategies for generating Python programs.")

No '.' at the end of synopsis.

> +    (description
> +     "Hypothesis strategies for generating Python programs, something like CSmith.  This
> +is definitely pre-alpha, but if you want to play with it feel free!")

This should be a full sentence, i.e. "This package contains hypothesis
strategies for [...]".  Can you define "CSmith"?

Also I think the other sentence can be omitted.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 08/10] gnu: Add python-flake8-bugbear.
  2020-07-21 11:56   ` [bug#42465] [PATCH 08/10] gnu: Add python-flake8-bugbear Tanguy Le Carrour
@ 2020-07-25 16:13     ` Marius Bakke
  0 siblings, 0 replies; 43+ messages in thread
From: Marius Bakke @ 2020-07-25 16:13 UTC (permalink / raw)
  To: Tanguy Le Carrour, 42465; +Cc: Tanguy Le Carrour

[-- Attachment #1: Type: text/plain, Size: 1649 bytes --]

Tanguy Le Carrour <tanguy@bioneland.org> writes:

> * gnu/packages/python-xyz.scm (python-flake8-bugbear): New variable.

[...]
  
> +(define-public python-flake8-bugbear
> +  (package
> +    (name "python-flake8-bugbear")
> +    (version "20.1.4")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "flake8-bugbear" version))
> +       (sha256
> +        (base32
> +         "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
> +    (build-system python-build-system)
> +    (native-inputs
> +     `(("python-hypothesis" ,python-hypothesis)
> +       ("python-hypothesmith" ,python-hypothesmith)))

I realize now that hypothesmith is probably a hypothesis plugin?  In
that case it should not propagate hypothesis IMO.

> +    (propagated-inputs
> +     `(("python-attrs" ,python-attrs)
> +       ("python-flake8" ,python-flake8)))
> +    (home-page "https://github.com/PyCQA/flake8-bugbear")
> +    (synopsis
> +      "A plugin for Flake8 finding likely bugs and design problems in your program")

Just "Flake8 plugin for [...]".

> +    (description
> +     "A plugin for Flake8 finding likely bugs and design problems in your program.
> +Contains warnings that don't belong in pyflakes and pycodestyle.  It is felt that
> +these lints don't belong in the main Python tools as they are very opinionated and
> +do not have a PEP or standard behind them.")

Please use full sentences, i.e. "This package contains a plugin for
Flake8 ..." and "It contains warnings that ...".

I don't really understand the last sentence.  Who feels this?  Can we
remove it?  :-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 09/10] gnu: Add python-flake8-pyi.
  2020-07-21 11:56   ` [bug#42465] [PATCH 09/10] gnu: Add python-flake8-pyi Tanguy Le Carrour
@ 2020-07-25 16:15     ` Marius Bakke
  0 siblings, 0 replies; 43+ messages in thread
From: Marius Bakke @ 2020-07-25 16:15 UTC (permalink / raw)
  To: Tanguy Le Carrour, 42465; +Cc: Tanguy Le Carrour

[-- Attachment #1: Type: text/plain, Size: 1764 bytes --]

Tanguy Le Carrour <tanguy@bioneland.org> writes:

> * gnu/packages/python-xyz.scm (python-flake8-pyi): New variable.

[...]
  
> +(define-public python-flake8-pyi
> +  (package
> +    (name "python-flake8-pyi")
> +    (version "20.5.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "flake8-pyi" version))
> +       (sha256
> +        (base32
> +         "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
> +    (build-system python-build-system)
> +    (propagated-inputs
> +     `(("python-attrs" ,python-attrs)
> +       ("python-flake8" ,python-flake8)
> +       ("python-pyflakes" ,python-pyflakes)))
> +    (home-page "https://github.com/ambv/flake8-pyi")
> +    (synopsis
> +      "A plugin for Flake8 that provides specializations for type hinting stub files.")

No punctuation or article (you probably got that by now).  :-)

> +    (description
> +     "A plugin for Flake8 that provides specializations for type hinting stub files,
> +especially interesting for linting typeshed.  1) Adds the .pyi extension to
> +the default value of the --filename command-line argument to Flake8.  This means
> +stubs are linted by default with this plugin enabled, without needing to explicitly list
> +every file.  2) Modifies PyFlakes runs for .pyi files to defer checking type annotation
> +expressions after the entire file has been read.  This enables support for first-class
> +forward references that stub files use.")

And full sentence, i.e. "This package contains a plugin ...".  Also
@file{.pyi}.

The 1) and 2) reads "weird" to me, maybe they can be cut off and just
use the text?  Or perhaps they should be on separate lines, perhaps with
@enumerate or similar?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 10/10] gnu: Add python-mypy.
  2020-07-21 11:56   ` [bug#42465] [PATCH 10/10] gnu: Add python-mypy Tanguy Le Carrour
@ 2020-07-25 16:18     ` Marius Bakke
  2020-07-27  7:57       ` Tanguy Le Carrour
  0 siblings, 1 reply; 43+ messages in thread
From: Marius Bakke @ 2020-07-25 16:18 UTC (permalink / raw)
  To: Tanguy Le Carrour, 42465; +Cc: Tanguy Le Carrour

[-- Attachment #1: Type: text/plain, Size: 1937 bytes --]

Tanguy Le Carrour <tanguy@bioneland.org> writes:

> * gnu/packages/python-check.scm (python-mypy): New variable.

Neat!  I only recently learned about MyPy, good to have it in Guix.

> +(define-public python-mypy
> +  (package
> +    (name "python-mypy")
> +    (version "0.782")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (pypi-uri "mypy" version))
> +        (sha256
> +         (base32
> +          "030kn709515452n6gy2i1d9fg6fyrkmdz228lfpmbslybsld9xzg"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (replace 'check
> +           (lambda _
> +             (invoke "./runtests.py")
> +             #t)))))
> +    (native-inputs
> +     `(("python-attrs" ,python-attrs)
> +       ("python-flake8" ,python-flake8)
> +       ("python-flake8-bugbear" ,python-flake8-bugbear)
> +       ("python-flake8-pyi" ,python-flake8-pyi)
> +       ("python-importlib-metadata" ,python-importlib-metadata)
> +       ("python-lxml" ,python-lxml)
> +       ("python-psutil" ,python-psutil)
> +       ("python-py" ,python-py)
> +       ("python-pytest" ,python-pytest)
> +       ("python-pytest-cov" ,python-pytest-cov)
> +       ("python-pytest-forked" ,python-pytest-forked)
> +       ("python-pytest-xdist" ,python-pytest-xdist)
> +       ("python-setuptools" ,python-setuptools)
> +       ("python-virtualenv" ,python-virtualenv)))
> +    (propagated-inputs
> +     `(("python-mypy-extensions" ,python-mypy-extensions)
> +       ("python-typing-extensions" ,python-typing-extensions)
> +       ("python-typed-ast" ,python-typed-ast)))
> +    (home-page "http://www.mypy-lang.org/")
> +    (synopsis "Optional static type checker for Python")

Perhaps s/Optional//?  I mean, if it was mandatory, wouldn't it be part
of cpython?  :-P  Probably I'm missing something, I see upstream uses
optional too.

Anyway, LGTM, nice work!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 10/10] gnu: Add python-mypy.
  2020-07-25 16:18     ` Marius Bakke
@ 2020-07-27  7:57       ` Tanguy Le Carrour
  2020-07-29 22:20         ` bug#42465: " Marius Bakke
  0 siblings, 1 reply; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-27  7:57 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 42465

Hi Marius,

The emails that will follow contain the updated patch set.
I think I've addressed all the problems you reported. Thanks again!
There are two things that I'll changed:

- `python-flake8-bugbear`: I've disabled a test that fails on slow
  computers like mine. Was it the proper thing to do?!
- `python-hypothesmith` now uses `python-hypothesis-5.23` even though
  `python-flake8-bugbear` still uses `python-hypothesis`.

Just to make sure, I'll sum up your comments below.

* [PATCH 02/10] gnu: python-hypothesis: Update to 5.20.0.
> This can not be applied on 'master' because Hypothesis has 6261
> dependent packages. […] you can add a different variable with the new
> hypothesis.

Done! I've updated it to 5.23.0.

* [PATCH 03/10] gnu: Add python-mypy-extensions.
* [PATCH 04/10] gnu: Add python-typing-inspect.
* [PATCH 05/10] gnu: Add python-libcst.
* [PATCH 06/10] gnu: Add python-lark-parser.
* [PATCH 07/10] gnu: Add python-hypothesmith.

Thanks for all your helpful comments regarding synopsis and description.
I'd have accepted a global "run the f@#*!g linter", though! :-)
To be honest, I'm not yet comfortable with editing the info I get from
a project's page, so I mostly copy/paste… which, I know, is bad! I'll
work on that!

* [PATCH 08/10] gnu: Add python-flake8-bugbear.
> I realize now that hypothesmith is probably a hypothesis plugin?
> In that case it should not propagate hypothesis IMO.

Unfortunately, it does not build if I drop it.

* [PATCH 09/10] gnu: Add python-flake8-pyi.
> No punctuation or article (you probably got that by now). :-)

Yeah, I think I'm starting to see where you're going with this! :-D

* [PATCH 10/10] gnu: Add python-mypy.
> Perhaps s/Optional//?  I mean, if it was mandatory, wouldn't it be part
> of cpython?

Removed!

I've built, installed and tested MyPy successfully! Thanks again for
your help!

-- 
Tanguy




^ permalink raw reply	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v3 1/9] gnu: Add python-mypy-extensions.
  2020-07-21 11:55 [bug#42465] [PATCH 00/10] gnu: Add python-mypy Tanguy Le Carrour
  2020-07-21 11:56 ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Tanguy Le Carrour
  2020-07-22 12:09 ` [bug#42465] [PATCH v2 " Tanguy Le Carrour
@ 2020-07-27  8:00 ` Tanguy Le Carrour
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 2/9] gnu: Add python-typing-inspect Tanguy Le Carrour
                     ` (7 more replies)
  2 siblings, 8 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-27  8:00 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-check.scm (python-mypy-extensions): New variable.
---
 gnu/packages/python-check.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index e96ce9e666..facdf11f07 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -771,3 +772,23 @@ it, the declaration of a name's public export semantics are not separated from
 the implementation of that name.")
     (license (list license:asl2.0
                    license:lgpl3))))    ; only for setup_helpers.py
+
+(define-public python-mypy-extensions
+  (package
+    (name "python-mypy-extensions")
+    (version "0.4.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "mypy_extensions" version))
+        (sha256
+         (base32
+          "1a04qsk8hd1lqns8w1j7cr0vmvbhg450di5k1i16kqxkbf7q30id"))))
+    (build-system python-build-system)
+    (arguments `(#:tests? #f)); no tests
+    (home-page "https://github.com/python/mypy_extensions")
+    (synopsis "Experimental extensions for MyPy")
+    (description "The @code{python-mypy-extensions} module defines
+experimental extensions to the standard @code{typing} module that are
+supported by the MyPy typechecker.")
+    (license license:expat)))
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v3 2/9] gnu: Add python-typing-inspect.
  2020-07-27  8:00 ` [bug#42465] [PATCH v3 1/9] gnu: Add python-mypy-extensions Tanguy Le Carrour
@ 2020-07-27  8:00   ` Tanguy Le Carrour
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 3/9] gnu: Add python-hypothesis-5.23 Tanguy Le Carrour
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-27  8:00 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-typing-inspect): New variable.
---
 gnu/packages/python-xyz.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3aebff078b..f47052f8b9 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12297,6 +12297,27 @@ in Python.  It allows you to declare the libraries your project depends on and
 it will manage (install/update) them for you.")
     (license license:expat)))
 
+(define-public python-typing-inspect
+  (package
+    (name "python-typing-inspect")
+    (version "0.6.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "typing_inspect" version))
+              (sha256
+               (base32
+                "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-mypy-extensions" ,python-mypy-extensions)
+       ("python-typing-extensions" ,python-typing-extensions)))
+    (home-page "https://github.com/ilevkivskyi/typing_inspect")
+    (synopsis "API for inspection of types in the Python @code{typing} module")
+    (description
+     "The @code{typing_inspect} module defines experimental API for runtime
+inspection of types defined in the Python standard typing module.")
+    (license license:expat)))
+
 (define-public python-lazy-object-proxy
   (package
     (name "python-lazy-object-proxy")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v3 3/9] gnu: Add python-hypothesis-5.23.
  2020-07-27  8:00 ` [bug#42465] [PATCH v3 1/9] gnu: Add python-mypy-extensions Tanguy Le Carrour
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 2/9] gnu: Add python-typing-inspect Tanguy Le Carrour
@ 2020-07-27  8:00   ` Tanguy Le Carrour
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 4/9] gnu: Add python-libcst Tanguy Le Carrour
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-27  8:00 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/check.scm (python-hypothesis-5.23): New variable.
---
 gnu/packages/check.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 661ed65e53..ab1839e0a2 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -34,6 +34,7 @@
 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1824,6 +1825,18 @@ seamlessly into your existing Python unit testing work flow.")
     (license license:mpl2.0)
     (properties `((python2-variant . ,(delay python2-hypothesis))))))
 
+(define-public python-hypothesis-5.23
+  (package
+    (inherit python-hypothesis)
+    (version "5.23.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "hypothesis" version))
+              (sha256
+               (base32
+                "0sy1v6nyxg4rjcf3rlr8nalb7wqd9nccpb2lzkchbj5an13ysf1h"))))
+    (home-page "https://github.com/HypothesisWorks/hypothesis")))
+
 ;; This is the last version of Hypothesis that supports Python 2.
 (define-public python2-hypothesis
   (let ((hypothesis (package-with-python2
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v3 4/9] gnu: Add python-libcst.
  2020-07-27  8:00 ` [bug#42465] [PATCH v3 1/9] gnu: Add python-mypy-extensions Tanguy Le Carrour
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 2/9] gnu: Add python-typing-inspect Tanguy Le Carrour
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 3/9] gnu: Add python-hypothesis-5.23 Tanguy Le Carrour
@ 2020-07-27  8:00   ` Tanguy Le Carrour
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 5/9] gnu: Add python-lark-parser Tanguy Le Carrour
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-27  8:00 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-libcst): New variable.
---
 gnu/packages/python-xyz.scm | 57 +++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f47052f8b9..5a620e3808 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12297,6 +12297,63 @@ in Python.  It allows you to declare the libraries your project depends on and
 it will manage (install/update) them for you.")
     (license license:expat)))
 
+(define-public python-libcst
+  (package
+    (name "python-libcst")
+    (version "0.3.8")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "libcst" version))
+              (sha256
+               (base32
+                "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-failing-tests
+           (lambda _
+             ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
+             (delete-file "libcst/tests/test_fuzz.py")
+             ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
+             (delete-file "libcst/tests/test_pyre_integration.py")
+             (delete-file "libcst/codemod/tests/test_codemod_cli.py")
+             (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
+             (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
+             #t))
+         (add-before 'check 'generate-test-data
+           (lambda _
+             (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
+             (invoke "python" "-m" "libcst.codegen.generate" "visitors")
+             (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
+         (replace 'check
+           (lambda _
+             (invoke "python" "-m" "unittest")
+             #t)))))
+    (native-inputs
+     `(("python-black" ,python-black)
+       ("python-isort" ,python-isort)))
+    (propagated-inputs
+     `(("python-typing-extensions" ,python-typing-extensions)
+       ("python-typing-inspect" ,python-typing-inspect)
+       ("python-pyyaml" ,python-pyyaml)))
+    (home-page "https://github.com/Instagram/LibCST")
+    (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
+    (description
+     "LibCST parses Python source code as a CST tree that keeps all
+formatting details (comments, whitespaces, parentheses, etc).  It's useful
+for building automated refactoring (codemod) applications and linters.
+LibCST creates a compromise between an Abstract Syntax Tree (AST) and
+a traditional Concrete Syntax Tree (CST).  By carefully reorganizing and
+naming node types and fields, LibCST creates a lossless CST that looks and
+feels like an AST.")
+    (license (list license:expat
+                   ;; Some files unde libcst/_parser/ are under Python Software
+                   ;; Foundation license (see LICENSE file for details)
+                   license:psfl
+                   ;; libcst/_add_slots.py
+                   license:asl2.0))))
+
 (define-public python-typing-inspect
   (package
     (name "python-typing-inspect")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v3 5/9] gnu: Add python-lark-parser.
  2020-07-27  8:00 ` [bug#42465] [PATCH v3 1/9] gnu: Add python-mypy-extensions Tanguy Le Carrour
                     ` (2 preceding siblings ...)
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 4/9] gnu: Add python-libcst Tanguy Le Carrour
@ 2020-07-27  8:00   ` Tanguy Le Carrour
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 6/9] gnu: Add python-hypothesmith Tanguy Le Carrour
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-27  8:00 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-lark-parser): New variable.
---
 gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5a620e3808..e67ba783fe 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12297,6 +12297,26 @@ in Python.  It allows you to declare the libraries your project depends on and
 it will manage (install/update) them for you.")
     (license license:expat)))
 
+(define-public python-lark-parser
+  (package
+    (name "python-lark-parser")
+    (version "0.9.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "lark-parser" version))
+              (sha256
+               (base32
+                "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/lark-parser/lark")
+    (synopsis "Multi-language parser for Python")
+    (description
+     "Lark is a parser built with a focus on ergonomics, performance and
+resilience.  Lark can parse all context-free languages.  That means it is
+capable of parsing almost any programming language out there, and to
+some degree most natural languages too.")
+    (license license:expat)))
+
 (define-public python-libcst
   (package
     (name "python-libcst")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v3 6/9] gnu: Add python-hypothesmith.
  2020-07-27  8:00 ` [bug#42465] [PATCH v3 1/9] gnu: Add python-mypy-extensions Tanguy Le Carrour
                     ` (3 preceding siblings ...)
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 5/9] gnu: Add python-lark-parser Tanguy Le Carrour
@ 2020-07-27  8:00   ` Tanguy Le Carrour
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 7/9] gnu: Add python-flake8-bugbear Tanguy Le Carrour
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-27  8:00 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/check.scm (python-hypothesmith): New variable.
---
 gnu/packages/check.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index ab1839e0a2..eb12383887 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1853,6 +1853,29 @@ seamlessly into your existing Python unit testing work flow.")
        `(("python2-enum34" ,python2-enum34)
          ,@(package-propagated-inputs hypothesis))))))
 
+(define-public python-hypothesmith
+  (package
+    (name "python-hypothesmith")
+    (version "0.1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "hypothesmith" version))
+       (sha256
+        (base32
+         "09331sspknv459xcyn1k0lx5flqlc6gmnwp9370pfvg4kg1zmss6"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-hypothesis" ,python-hypothesis-5.23)
+       ("python-lark-parser" ,python-lark-parser)
+       ("python-libcst" ,python-libcst)))
+    (home-page "https://github.com/Zac-HD/hypothesmith")
+    (synopsis "Strategies for generating Python programs")
+    (description
+     "This package contains hypothesis strategies for generating Python
+programs, something like CSmith, a random generator of C programs.")
+    (license license:mpl2.0)))
+
 (define-public python-lit
   (package
     (name "python-lit")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v3 7/9] gnu: Add python-flake8-bugbear.
  2020-07-27  8:00 ` [bug#42465] [PATCH v3 1/9] gnu: Add python-mypy-extensions Tanguy Le Carrour
                     ` (4 preceding siblings ...)
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 6/9] gnu: Add python-hypothesmith Tanguy Le Carrour
@ 2020-07-27  8:00   ` Tanguy Le Carrour
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 8/9] gnu: Add python-flake8-pyi Tanguy Le Carrour
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 9/9] gnu: Add python-mypy Tanguy Le Carrour
  7 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-27  8:00 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-flake8-bugbear): New variable.
---
 gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e67ba783fe..7015c20b4e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7910,6 +7910,42 @@ complexity of Python source code.")
        ("python-pyflakes" ,python-pyflakes-1.2)
        ("python-mccabe" ,python-mccabe)))))
 
+(define-public python-flake8-bugbear
+  (package
+    (name "python-flake8-bugbear")
+    (version "20.1.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "flake8-bugbear" version))
+       (sha256
+        (base32
+         "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'disable-test
+           (lambda _
+             ;; This test fails on slow computers.
+             (substitute* "tests/test_bugbear.py"
+               (("def test_does_not_crash_on_any_valid_code")
+                "def _test_does_not_crash_on_any_valid_code")))))))
+    (native-inputs
+     `(("python-hypothesis" ,python-hypothesis)
+       ("python-hypothesmith" ,python-hypothesmith)))
+    (propagated-inputs
+     `(("python-attrs" ,python-attrs)
+       ("python-flake8" ,python-flake8)))
+    (home-page "https://github.com/PyCQA/flake8-bugbear")
+    (synopsis
+      "Flake8 plugin for finding likely bugs and design problems in your program")
+    (description
+     "This package contains a plugin for Flake8 finding likely bugs and
+design problems in your program.  It contains warnings that don't belong
+in pyflakes and pycodestyle.")
+    (license license:expat)))
+
 (define-public python-flake8-polyfill
   (package
     (name "python-flake8-polyfill")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v3 8/9] gnu: Add python-flake8-pyi.
  2020-07-27  8:00 ` [bug#42465] [PATCH v3 1/9] gnu: Add python-mypy-extensions Tanguy Le Carrour
                     ` (5 preceding siblings ...)
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 7/9] gnu: Add python-flake8-bugbear Tanguy Le Carrour
@ 2020-07-27  8:00   ` Tanguy Le Carrour
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 9/9] gnu: Add python-mypy Tanguy Le Carrour
  7 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-27  8:00 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-xyz.scm (python-flake8-pyi): New variable.
---
 gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 7015c20b4e..db470d3440 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7989,6 +7989,36 @@ plugins that intend to support Flake8 2.x and 3.x simultaneously.")
 (define-public python2-flake8-polyfill
   (package-with-python2 python-flake8-polyfill))
 
+(define-public python-flake8-pyi
+  (package
+    (name "python-flake8-pyi")
+    (version "20.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "flake8-pyi" version))
+       (sha256
+        (base32
+         "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-attrs" ,python-attrs)
+       ("python-flake8" ,python-flake8)
+       ("python-pyflakes" ,python-pyflakes)))
+    (home-page "https://github.com/ambv/flake8-pyi")
+    (synopsis
+      "Flake8 plugin that provides specializations for type hinting stub files")
+    (description
+     "This package contains a plugin that provides specializations for
+type hinting stub files, especially interesting for linting typeshed.  It
+adds the @file{.pyi} extension to the default value of the @code{--filename}
+command-line argument to Flake8.  This means stubs are linted by default with
+this plugin enabled, without needing to explicitly list every file.  It
+modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
+expressions after the entire file has been read.  This enables support for
+first-class forward references that stub files use.")
+    (license license:expat)))
+
 (define-public python-mistune
   (package
     (name "python-mistune")
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH v3 9/9] gnu: Add python-mypy.
  2020-07-27  8:00 ` [bug#42465] [PATCH v3 1/9] gnu: Add python-mypy-extensions Tanguy Le Carrour
                     ` (6 preceding siblings ...)
  2020-07-27  8:00   ` [bug#42465] [PATCH v3 8/9] gnu: Add python-flake8-pyi Tanguy Le Carrour
@ 2020-07-27  8:00   ` Tanguy Le Carrour
  7 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-27  8:00 UTC (permalink / raw)
  To: 42465; +Cc: Tanguy Le Carrour

* gnu/packages/python-check.scm (python-mypy): New variable.
---
 gnu/packages/python-check.scm | 50 +++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index facdf11f07..c4c91d21e9 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -31,6 +31,7 @@
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages web)
+  #:use-module (gnu packages xml)
   #:use-module (guix utils)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
@@ -792,3 +793,52 @@ the implementation of that name.")
 experimental extensions to the standard @code{typing} module that are
 supported by the MyPy typechecker.")
     (license license:expat)))
+
+(define-public python-mypy
+  (package
+    (name "python-mypy")
+    (version "0.782")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "mypy" version))
+        (sha256
+         (base32
+          "030kn709515452n6gy2i1d9fg6fyrkmdz228lfpmbslybsld9xzg"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (invoke "./runtests.py")
+             #t)))))
+    (native-inputs
+     `(("python-attrs" ,python-attrs)
+       ("python-flake8" ,python-flake8)
+       ("python-flake8-bugbear" ,python-flake8-bugbear)
+       ("python-flake8-pyi" ,python-flake8-pyi)
+       ("python-importlib-metadata" ,python-importlib-metadata)
+       ("python-lxml" ,python-lxml)
+       ("python-psutil" ,python-psutil)
+       ("python-py" ,python-py)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-pytest-forked" ,python-pytest-forked)
+       ("python-pytest-xdist" ,python-pytest-xdist)
+       ("python-virtualenv" ,python-virtualenv)))
+    (propagated-inputs
+     `(("python-mypy-extensions" ,python-mypy-extensions)
+       ("python-typing-extensions" ,python-typing-extensions)
+       ("python-typed-ast" ,python-typed-ast)))
+    (home-page "http://www.mypy-lang.org/")
+    (synopsis "Static type checker for Python")
+    (description "Mypy is an optional static type checker for Python that aims
+to combine the benefits of dynamic (or 'duck') 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 them using
+any Python VM with basically no runtime overhead.")
+    ;; Most of the code is under MIT license; Some files are under Python Software
+    ;; Foundation License version 2: stdlib-samples/*, mypyc/lib-rt/pythonsupport.h and
+    ;; mypyc/lib-rt/getargs.c
+    (license (list license:expat license:psfl))))
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 43+ messages in thread

* bug#42465: [PATCH 10/10] gnu: Add python-mypy.
  2020-07-27  7:57       ` Tanguy Le Carrour
@ 2020-07-29 22:20         ` Marius Bakke
  2020-07-30  6:36           ` [bug#42465] " Tanguy Le Carrour
  0 siblings, 1 reply; 43+ messages in thread
From: Marius Bakke @ 2020-07-29 22:20 UTC (permalink / raw)
  To: Tanguy Le Carrour; +Cc: 42465-done

[-- Attachment #1: Type: text/plain, Size: 2996 bytes --]

Tanguy Le Carrour <tanguy@bioneland.org> writes:

> Hi Marius,
>
> The emails that will follow contain the updated patch set.
> I think I've addressed all the problems you reported. Thanks again!
> There are two things that I'll changed:
>
> - `python-flake8-bugbear`: I've disabled a test that fails on slow
>   computers like mine. Was it the proper thing to do?!
> - `python-hypothesmith` now uses `python-hypothesis-5.23` even though
>   `python-flake8-bugbear` still uses `python-hypothesis`.
>
> Just to make sure, I'll sum up your comments below.
>
> * [PATCH 02/10] gnu: python-hypothesis: Update to 5.20.0.
>> This can not be applied on 'master' because Hypothesis has 6261
>> dependent packages. […] you can add a different variable with the new
>> hypothesis.
>
> Done! I've updated it to 5.23.0.

Great.  :-)

> * [PATCH 03/10] gnu: Add python-mypy-extensions.
> * [PATCH 04/10] gnu: Add python-typing-inspect.
> * [PATCH 05/10] gnu: Add python-libcst.
> * [PATCH 06/10] gnu: Add python-lark-parser.
> * [PATCH 07/10] gnu: Add python-hypothesmith.
>
> Thanks for all your helpful comments regarding synopsis and description.
> I'd have accepted a global "run the f@#*!g linter", though! :-)

Heheh.  I have become linter.  

> To be honest, I'm not yet comfortable with editing the info I get from
> a project's page, so I mostly copy/paste… which, I know, is bad! I'll
> work on that!

I find it is often the most difficult part of packaging.  How to convey
[upstream description] in [neutral language for noob].  Occasionally
I'll peek at Debians description which are typically pretty good (but
don't tell anyone!).

> * [PATCH 08/10] gnu: Add python-flake8-bugbear.
>> I realize now that hypothesmith is probably a hypothesis plugin?
>> In that case it should not propagate hypothesis IMO.
>
> Unfortunately, it does not build if I drop it.

Ah right, I was not entirely clear.  I meant the Hypothesis input should
probably be native (for tests), but not propagated so that other
packages could use it with other Hypothesis versions.  Making plugin
packages not propagate the package they "plug in to" is a favorite
nit-pick of mine, often causing great confusion...

This case is complicated since Hypothesmith depends on a newer version
of Hypothesis, maybe the plugin only works with that newer version?  In
which case propagating makes a lot of sense.  Anyway it's not a big deal
either way, so let's not go there.  :-)

> * [PATCH 09/10] gnu: Add python-flake8-pyi.
>> No punctuation or article (you probably got that by now). :-)
>
> Yeah, I think I'm starting to see where you're going with this! :-D
>
> * [PATCH 10/10] gnu: Add python-mypy.
>> Perhaps s/Optional//?  I mean, if it was mandatory, wouldn't it be part
>> of cpython?
>
> Removed!
>
> I've built, installed and tested MyPy successfully! Thanks again for
> your help!

Awesome, I applied the series as-is.  Thanks for your work!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [bug#42465] [PATCH 10/10] gnu: Add python-mypy.
  2020-07-29 22:20         ` bug#42465: " Marius Bakke
@ 2020-07-30  6:36           ` Tanguy Le Carrour
  0 siblings, 0 replies; 43+ messages in thread
From: Tanguy Le Carrour @ 2020-07-30  6:36 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 42465-done

Le 07/30, Marius Bakke a écrit :
> Tanguy Le Carrour <tanguy@bioneland.org> writes:
> > […]
> > To be honest, I'm not yet comfortable with editing the info I get from
> > a project's page, so I mostly copy/paste… which, I know, is bad! I'll
> > work on that!
> 
> I find it is often the most difficult part of packaging.  How to convey
> [upstream description] in [neutral language for noob].  Occasionally
> I'll peek at Debians description which are typically pretty good (but
> don't tell anyone!).

I promise I won't tell anyone! This will stay between you, me and the internet! ;-)


> > * [PATCH 08/10] gnu: Add python-flake8-bugbear.
> >> I realize now that hypothesmith is probably a hypothesis plugin?
> >> In that case it should not propagate hypothesis IMO.
> >
> > Unfortunately, it does not build if I drop it.
> 
> Ah right, I was not entirely clear.  I meant the Hypothesis input should
> probably be native (for tests), but not propagated so that other
> packages could use it with other Hypothesis versions.  Making plugin
> packages not propagate the package they "plug in to" is a favorite
> nit-pick of mine, often causing great confusion...
> 
> This case is complicated since Hypothesmith depends on a newer version
> of Hypothesis, maybe the plugin only works with that newer version?  In
> which case propagating makes a lot of sense.  Anyway it's not a big deal
> either way, so let's not go there.  :-)

I'll keep that for later! I think I have to sleep on the idea… several
nights! ^_^'


> > I've built, installed and tested MyPy successfully! Thanks again for
> > your help!
> 
> Awesome, I applied the series as-is.  Thanks for your work!

Thanks!!


-- 
Tanguy




^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2020-07-30  6:37 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-21 11:55 [bug#42465] [PATCH 00/10] gnu: Add python-mypy Tanguy Le Carrour
2020-07-21 11:56 ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Tanguy Le Carrour
2020-07-21 11:56   ` [bug#42465] [PATCH 02/10] gnu: python-hypothesis: Update to 5.20.0 Tanguy Le Carrour
2020-07-25 15:52     ` Marius Bakke
2020-07-21 11:56   ` [bug#42465] [PATCH 03/10] gnu: Add python-mypy-extensions Tanguy Le Carrour
2020-07-25 15:55     ` Marius Bakke
2020-07-21 11:56   ` [bug#42465] [PATCH 04/10] gnu: Add python-typing-inspect Tanguy Le Carrour
2020-07-25 15:58     ` Marius Bakke
2020-07-21 11:56   ` [bug#42465] [PATCH 05/10] gnu: Add python-libcst Tanguy Le Carrour
2020-07-25 16:03     ` Marius Bakke
2020-07-21 11:56   ` [bug#42465] [PATCH 06/10] gnu: Add python-lark-parser Tanguy Le Carrour
2020-07-25 16:05     ` Marius Bakke
2020-07-21 11:56   ` [bug#42465] [PATCH 07/10] gnu: Add python-hypothesmith Tanguy Le Carrour
2020-07-25 16:09     ` Marius Bakke
2020-07-21 11:56   ` [bug#42465] [PATCH 08/10] gnu: Add python-flake8-bugbear Tanguy Le Carrour
2020-07-25 16:13     ` Marius Bakke
2020-07-21 11:56   ` [bug#42465] [PATCH 09/10] gnu: Add python-flake8-pyi Tanguy Le Carrour
2020-07-25 16:15     ` Marius Bakke
2020-07-21 11:56   ` [bug#42465] [PATCH 10/10] gnu: Add python-mypy Tanguy Le Carrour
2020-07-25 16:18     ` Marius Bakke
2020-07-27  7:57       ` Tanguy Le Carrour
2020-07-29 22:20         ` bug#42465: " Marius Bakke
2020-07-30  6:36           ` [bug#42465] " Tanguy Le Carrour
2020-07-25 15:47   ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Marius Bakke
2020-07-22 12:09 ` [bug#42465] [PATCH v2 " Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 02/10] gnu: python-hypothesis: Update to 5.20.0 Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 03/10] gnu: Add python-mypy-extensions Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 04/10] gnu: Add python-typing-inspect Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 05/10] gnu: Add python-libcst Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 06/10] gnu: Add python-lark-parser Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 07/10] gnu: Add python-hypothesmith Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 08/10] gnu: Add python-flake8-bugbear Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 09/10] gnu: Add python-flake8-pyi Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 10/10] gnu: Add python-mypy Tanguy Le Carrour
2020-07-27  8:00 ` [bug#42465] [PATCH v3 1/9] gnu: Add python-mypy-extensions Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 2/9] gnu: Add python-typing-inspect Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 3/9] gnu: Add python-hypothesis-5.23 Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 4/9] gnu: Add python-libcst Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 5/9] gnu: Add python-lark-parser Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 6/9] gnu: Add python-hypothesmith Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 7/9] gnu: Add python-flake8-bugbear Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 8/9] gnu: Add python-flake8-pyi Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 9/9] gnu: Add python-mypy Tanguy Le Carrour

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