~ruther/guix-local

3ce9151a0303fde5a410596e50c8b4cb26f38efd — Sharlatan Hellseher 1 year, 3 months ago 100efdb
gnu: python-typing-inspect: Update to 0.9.0.

* gnu/packages/python-xyz.scm (python-typing-inspect): Update to 0.9.0.
[source]: Remove patch, as
<https://github.com/ilevkivskyi/typing_inspect/issues/60> was resolved.
[build-system]: Swap to pyproject-build-system.
[native-inputs]: Add python-pytest, python-setuptools, and python-wheel.

* gnu/packages/patches/python-typing-inspect-fix.patch: Delete file.
* gnu/local.mk: Deregester the patch.

Change-Id: Idc6e8745d4b85624863a5c2dc24e533a7dd92f46
3 files changed, 9 insertions(+), 44 deletions(-)

M gnu/local.mk
D gnu/packages/patches/python-typing-inspect-fix.patch
M gnu/packages/python-xyz.scm
M gnu/local.mk => gnu/local.mk +0 -1
@@ 2118,7 2118,6 @@ dist_patch_DATA =						\
  %D%/packages/patches/python-robotframework-atest.patch	\
  %D%/packages/patches/python-robotframework-source-date-epoch.patch \
  %D%/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch \
  %D%/packages/patches/python-typing-inspect-fix.patch		\
  %D%/packages/patches/python-unittest2-python3-compat.patch	\
  %D%/packages/patches/python-unittest2-remove-argparse.patch	\
  %D%/packages/patches/python-vega-datasets-remove-la-riots-code.patch	\

D gnu/packages/patches/python-typing-inspect-fix.patch => gnu/packages/patches/python-typing-inspect-fix.patch +0 -38
@@ 1,38 0,0 @@
From 16919e21936179e53df2f376c8b59b5fc44bd2dd Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Fri, 15 Jan 2021 09:22:52 -0500
Subject: [PATCH] Fix for Python 3.9+.

Fixes <https://github.com/ilevkivskyi/typing_inspect/issues/60>.

Based on an idea in
https://github.com/ilevkivskyi/typing_inspect/issues/60#issuecomment-683187584.
---
 typing_inspect.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/typing_inspect.py b/typing_inspect.py
index 1ca68ed..31d05ee 100644
--- a/typing_inspect.py
+++ b/typing_inspect.py
@@ -21,7 +21,7 @@ LEGACY_TYPING = False
 
 if NEW_TYPING:
     from typing import (
-        Generic, Callable, Union, TypeVar, ClassVar, Tuple, _GenericAlias, ForwardRef
+        Generic, Callable, Union, TypeVar, ClassVar, Tuple, _GenericAlias, _SpecialGenericAlias, ForwardRef
     )
     from typing_extensions import Literal
 else:
@@ -75,7 +75,7 @@ def is_generic_type(tp):
     """
     if NEW_TYPING:
         return (isinstance(tp, type) and issubclass(tp, Generic) or
-                isinstance(tp, _GenericAlias) and
+                (isinstance(tp, _GenericAlias) or isinstance(tp, _SpecialGenericAlias)) and
                 tp.__origin__ not in (Union, tuple, ClassVar, collections.abc.Callable))
     return (isinstance(tp, GenericMeta) and not
             isinstance(tp, (CallableMeta, TupleMeta)))
-- 
2.29.2


M gnu/packages/python-xyz.scm => gnu/packages/python-xyz.scm +9 -5
@@ 23087,17 23087,21 @@ Python versions that don't natively support them.")
(define-public python-typing-inspect
  (package
    (name "python-typing-inspect")
    (version "0.6.0")
    (version "0.9.0")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "typing_inspect" version))
              (sha256
               (base32
                "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))
              (patches (search-patches "python-typing-inspect-fix.patch"))))
    (build-system python-build-system)
                "0y0z8v4wr5bahlgzjd1il2z8vlfd2asiyb45wia6kvznyqpw8gxj"))))
    (build-system pyproject-build-system)
    (native-inputs
     (list python-pytest
           python-setuptools
           python-wheel))
    (propagated-inputs
     (list python-mypy-extensions python-typing-extensions))
     (list python-mypy-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