mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-typeguard: Update to 4.4.1.
* gnu/packages/python-xyz.scm (python-typeguard): Update to 4.4.1. [build-system]: Swap to pyproject-build-system. [arguments]<phases>: Use default 'check phase. [propagated-inputs]: Add python-typing-extensions. [native-inputs]: Add python-setuptools and python-wheel. * gnu/packages/patches/python-typeguard-python3.10.patch: Delete file. gnu/local.mk: Deregister patch. Change-Id: Ibabc0645b4a6192614d714036fcba1f337924305
This commit is contained in:
parent
10af55b093
commit
b0b7fc0484
3 changed files with 12 additions and 67 deletions
|
@ -1953,7 +1953,6 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/python-sgmllib3k-assertions.patch \
|
%D%/packages/patches/python-sgmllib3k-assertions.patch \
|
||||||
%D%/packages/patches/python-sphobjinv-defer-ssl-import.patch \
|
%D%/packages/patches/python-sphobjinv-defer-ssl-import.patch \
|
||||||
%D%/packages/patches/python-sphinx-prompt-docutils-0.19.patch \
|
%D%/packages/patches/python-sphinx-prompt-docutils-0.19.patch \
|
||||||
%D%/packages/patches/python-typeguard-python3.10.patch \
|
|
||||||
%D%/packages/patches/python-wxwidgets-type-errors.patch \
|
%D%/packages/patches/python-wxwidgets-type-errors.patch \
|
||||||
%D%/packages/patches/qtdeclarative-5-disable-qmlcache.patch \
|
%D%/packages/patches/qtdeclarative-5-disable-qmlcache.patch \
|
||||||
%D%/packages/patches/qtdeclarative-disable-qmlcache.patch \
|
%D%/packages/patches/qtdeclarative-disable-qmlcache.patch \
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
Taken from Gentoo, which adapted
|
|
||||||
https://github.com/agronholm/typeguard/commit/e0db07a777d5a481eaba6162354adf32286ce21b
|
|
||||||
|
|
||||||
diff --git a/src/typeguard/__init__.py b/src/typeguard/__init__.py
|
|
||||||
index 5684d63..27fa30b 100644
|
|
||||||
--- a/src/typeguard/__init__.py
|
|
||||||
+++ b/src/typeguard/__init__.py
|
|
||||||
@@ -61,22 +61,25 @@ except ImportError:
|
|
||||||
from typing import _ForwardRef as ForwardRef
|
|
||||||
evaluate_forwardref = ForwardRef._eval_type
|
|
||||||
|
|
||||||
-if sys.version_info >= (3, 10):
|
|
||||||
- from typing import is_typeddict
|
|
||||||
-else:
|
|
||||||
- _typed_dict_meta_types = ()
|
|
||||||
- if sys.version_info >= (3, 8):
|
|
||||||
- from typing import _TypedDictMeta
|
|
||||||
- _typed_dict_meta_types += (_TypedDictMeta,)
|
|
||||||
+try:
|
|
||||||
+ from typing_extensions import is_typeddict
|
|
||||||
+except ImportError:
|
|
||||||
+ if sys.version_info >= (3, 10):
|
|
||||||
+ from typing import is_typeddict
|
|
||||||
+ else:
|
|
||||||
+ _typed_dict_meta_types = ()
|
|
||||||
+ if sys.version_info >= (3, 8):
|
|
||||||
+ from typing import _TypedDictMeta
|
|
||||||
+ _typed_dict_meta_types += (_TypedDictMeta,)
|
|
||||||
|
|
||||||
- try:
|
|
||||||
- from typing_extensions import _TypedDictMeta
|
|
||||||
- _typed_dict_meta_types += (_TypedDictMeta,)
|
|
||||||
- except ImportError:
|
|
||||||
- pass
|
|
||||||
+ try:
|
|
||||||
+ from typing_extensions import _TypedDictMeta
|
|
||||||
+ _typed_dict_meta_types += (_TypedDictMeta,)
|
|
||||||
+ except ImportError:
|
|
||||||
+ pass
|
|
||||||
|
|
||||||
- def is_typeddict(tp) -> bool:
|
|
||||||
- return isinstance(tp, _typed_dict_meta_types)
|
|
||||||
+ def is_typeddict(tp) -> bool:
|
|
||||||
+ return isinstance(tp, _typed_dict_meta_types)
|
|
||||||
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
|
@ -27524,30 +27524,23 @@ based on the CPython 2.7 and 3.7 parsers.")
|
||||||
(define-public python-typeguard
|
(define-public python-typeguard
|
||||||
(package
|
(package
|
||||||
(name "python-typeguard")
|
(name "python-typeguard")
|
||||||
(version "2.13.3")
|
(version "4.4.1")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (pypi-uri "typeguard" version))
|
(uri (pypi-uri "typeguard" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1i5qzcyw2715h1g1hvj7fxykck2bkxyshpngjr3nfcx1lf6smv80"))
|
(base32 "06y22d1f5dhpyl71wbhsaibig5hvc2v44pw795yb8lxl02fsh8hd"))))
|
||||||
(patches (search-patches "python-typeguard-python3.10.patch"))))
|
(build-system pyproject-build-system)
|
||||||
(build-system python-build-system)
|
(native-inputs
|
||||||
(arguments
|
(list python-mypy
|
||||||
(list
|
python-pytest
|
||||||
#:phases
|
python-setuptools
|
||||||
#~(modify-phases %standard-phases
|
python-setuptools-scm
|
||||||
(replace 'check
|
python-typing-extensions
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
python-wheel))
|
||||||
(when tests?
|
(propagated-inputs
|
||||||
(invoke "pytest" "-vv" "-k"
|
(list python-typing-extensions))
|
||||||
;; XXX: These fail when installed as a library:
|
|
||||||
;; https://github.com/agronholm/typeguard/issues/176
|
|
||||||
"not usefixtures and not test_cached_module")))))))
|
|
||||||
(native-inputs (list python-mypy
|
|
||||||
python-pytest
|
|
||||||
python-setuptools-scm
|
|
||||||
python-typing-extensions))
|
|
||||||
(home-page "https://github.com/agronholm/typeguard")
|
(home-page "https://github.com/agronholm/typeguard")
|
||||||
(synopsis "Run-time type checker for Python")
|
(synopsis "Run-time type checker for Python")
|
||||||
(description
|
(description
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue