[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
21/28: gnu: python-typing-inspect: Fix build on Python 3.9.
From: |
guix-commits |
Subject: |
21/28: gnu: python-typing-inspect: Fix build on Python 3.9. |
Date: |
Fri, 15 Jan 2021 16:34:53 -0500 (EST) |
apteryx pushed a commit to branch core-updates
in repository guix.
commit 0054cad5ad181cc51bbeae7583cf607bf72e851e
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Jan 15 15:17:10 2021 -0500
gnu: python-typing-inspect: Fix build on Python 3.9.
* gnu/packages/patches/python-typing-inspect-fix.patch: Add patch.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/python-xyz.scm (python-typing-inspect)[patches]: Apply it.
---
gnu/local.mk | 1 +
.../patches/python-typing-inspect-fix.patch | 38 ++++++++++++++++++++++
gnu/packages/python-xyz.scm | 3 +-
3 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 35fd151..f84f859b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1536,6 +1536,7 @@ dist_patch_DATA =
\
%D%/packages/patches/python-memcached-syntax-warnings.patch \
%D%/packages/patches/python-mox3-python3.6-compat.patch \
%D%/packages/patches/python-testtools.patch \
+ %D%/packages/patches/python-typing-inspect-fix.patch \
%D%/packages/patches/python-onnx-use-system-googletest.patch \
%D%/packages/patches/python-packaging-test-arch.patch \
%D%/packages/patches/python2-parameterized-docstring-test.patch \
diff --git a/gnu/packages/patches/python-typing-inspect-fix.patch
b/gnu/packages/patches/python-typing-inspect-fix.patch
new file mode 100644
index 0000000..e6e2898
--- /dev/null
+++ b/gnu/packages/patches/python-typing-inspect-fix.patch
@@ -0,0 +1,38 @@
+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
+
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index eb7c040..b7f8077 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13236,7 +13236,8 @@ feels like an AST.")
(uri (pypi-uri "typing_inspect" version))
(sha256
(base32
- "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
+ "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))
+ (patches (search-patches "python-typing-inspect-fix.patch"))))
(build-system python-build-system)
(propagated-inputs
`(("python-mypy-extensions" ,python-mypy-extensions)
- 15/28: gnu: python-backpack: Fix build., (continued)
- 15/28: gnu: python-backpack: Fix build., guix-commits, 2021/01/15
- 16/28: gnu: python-hypothesis: Update to 6.0.2, guix-commits, 2021/01/15
- 11/28: gnu: python-pympler: Update to 0.9., guix-commits, 2021/01/15
- 12/28: gnu: python-3.9: Add a search path specification for PYTHONTZPATH., guix-commits, 2021/01/15
- 17/28: gnu: python-flake8-pyi: Update to 20.10.0., guix-commits, 2021/01/15
- 20/28: gnu: python-hypothesmith: Update to 0.1.8., guix-commits, 2021/01/15
- 18/28: gnu: python-virtualenv: Update to 20.3.1., guix-commits, 2021/01/15
- 19/28: gnu: Add python-libcst-minimal., guix-commits, 2021/01/15
- 23/28: gnu: Add python-pylama., guix-commits, 2021/01/15
- 24/28: gnu: python2-pylint: Remove package., guix-commits, 2021/01/15
- 21/28: gnu: python-typing-inspect: Fix build on Python 3.9.,
guix-commits <=
- 22/28: gnu: Add python-mypy-minimal., guix-commits, 2021/01/15
- 25/28: gnu: python2-orator: Remove package., guix-commits, 2021/01/15
- 28/28: gnu: python-isort: Update to 5.7.0, fixing build on Python 3.9., guix-commits, 2021/01/15
- 26/28: gnu: python2-factory-boy: Remove package., guix-commits, 2021/01/15
- 27/28: gnu: python2-isort: Remove package., guix-commits, 2021/01/15