From ee812168555580bbc9a9a17fbc7fec7e05ac4a550addaf1d373ce7f2a552e9e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 13 Dec 2024 12:32:55 +0100 Subject: [PATCH] Sync from SUSE:SLFO:Main python-typeguard revision 9a6aa16306c64f0a8c75a01a7355ffc9 --- python-typeguard.changes | 74 +++++++++++++++++++++++++++++++++++++-- python-typeguard.spec | 15 ++++---- typeguard-4.0.0.tar.gz | 3 -- typeguard-4.3.0-gh.tar.gz | 3 ++ 4 files changed, 82 insertions(+), 13 deletions(-) delete mode 100644 typeguard-4.0.0.tar.gz create mode 100644 typeguard-4.3.0-gh.tar.gz diff --git a/python-typeguard.changes b/python-typeguard.changes index da57e10..d60d811 100644 --- a/python-typeguard.changes +++ b/python-typeguard.changes @@ -1,3 +1,71 @@ +------------------------------------------------------------------- +Sat Jun 8 13:05:55 UTC 2024 - Dirk Müller + +- update to 4.3.0: + * Added support for checking against static protocols + * Fixed some compatibility problems when running on Python 3.13 + * Fixed test suite incompatibility with pytest 8.2 + * Fixed pytest plugin crashing on pytest version older than + v7.0.0 (even if it's just present) + * Fixed missing typing_extensions dependency for Python 3.12 + * Fixed deprecation warning in the test suite on Python 3.13 + * Added support for specifying options for the pytest plugin + via pytest config files + * Avoid creating reference cycles when type checking unions (PR + by Shantanu) + * Fixed Optional[...] being removed from the AST if it was + located within a subscript + * Fixed TypedDict from typing_extensions not being recognized + as one + * Fixed typing types (dict[str, int], List[str], etc.) not + passing checks against type or Type + * Fixed detection of optional fields (NotRequired[...]) in + TypedDict when using forward references + * Fixed mapping checks against Django's MultiValueDict + +------------------------------------------------------------------- +Mon Dec 4 11:32:09 UTC 2023 - Dirk Müller + +- update to 4.1.5: + * Fixed ``Callable`` erroneously rejecting a callable that has + the requested amount of positional arguments but they have + defaults + * Fixed a regression introduced in v4.1.4 where the elements of + ``Literal`` got quotes removed from them by the AST transformer + * Fixed ``AttributeError`` where the transformer removed + elements from a PEP 604 union + * Fixed ``AttributeError: 'Subscript' object has no attribute + 'slice'`` when encountering an annotation with a subscript + containing an ignored type + * Fixed type checking not being skipped when the target is a + union (PEP 604 or ``typing.Union``) where one of the elements + is an ignored type (shadowed by an argument, variable + assignment or an ``if TYPE_CHECKING`` import) + * Dropped Python 3.7 support + * Fixed ``@typechecked`` optimization causing compilation of + instrumented code to fail when any block was left empty by the + AST transformer (eg ``if`` or ``try`` / ``except`` blocks) + * Fixed placement of injected typeguard imports with respect to + ``__future__`` imports and module docstrings + * Fixed ``Any`` being removed from a subscript that still + contains other elements + * Fixed ``suppress_type_checks()`` causing annotated variable + assignments to always assign ``None`` + * Added support for passing a tuple as ``expected_type`` to + ``check_type()``, making it more of a drop-in replacement for + ``isinstance()`` + * Fixed regression where ``Literal`` inside a ``Union`` had + quotes stripped from its contents, thus typically causing + ``NameError`` to be raised when run + * Fixed handling of ``typing_extensions.Literal`` on Python 3.8 + and 3.9 when ``typing_extensions>=4.6.0`` is installed + * Fixed ``NameError`` when generated type checking code + references an imported name from a method + * Fixed docstrings disappearing from instrumented functions + * Fixed ``@typechecked`` failing to instrument functions when + there are more than one function within the same scope + * Fixed ``frozenset`` not being checked + ------------------------------------------------------------------- Sun May 14 16:35:53 UTC 2023 - Dirk Müller @@ -100,8 +168,8 @@ Fri May 5 09:24:37 UTC 2023 - Dirk Müller * ``@contextmanager`` when applied to a class * Fixed ``py.typed`` missing from the wheel when not building from a git checkout - * Dropped the ``argname``, ``memo``, ``globals`` and - ``locals`` arguments from ``check_type()`` + * Dropped the ``argname``, ``memo``, ``globals`` and + ``locals`` arguments from ``check_type()`` * Removed the ``check_argument_types()`` and ``check_return_type()`` functions (use ``@typechecked`` instead) * Moved ``install_import_hook`` to be directly importable from @@ -170,7 +238,7 @@ Thu Apr 13 22:45:38 UTC 2023 - Matej Cepl ------------------------------------------------------------------- Tue Oct 11 16:36:44 UTC 2022 - Yogalakshmi Arunachalam -- Update to version 2.13.3 +- Update to version 2.13.3 * Fixed TypeError when using typeguard within exec() (where __module__ is None) (PR by Andy Jones) * Fixed TypedDict causing TypeError: TypedDict does not support instance and class checks on Python 3.8 with standard library (not typing_extensions) typed dicts diff --git a/python-typeguard.spec b/python-typeguard.spec index 82a7d7f..1525def 100644 --- a/python-typeguard.spec +++ b/python-typeguard.spec @@ -1,7 +1,7 @@ # # spec file for package python-typeguard # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,24 +16,25 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 %{?sle15_python_module_pythons} Name: python-typeguard -Version: 4.0.0 +Version: 4.3.0 Release: 0 Summary: Library for runtime checking of Python types License: MIT URL: https://github.com/agronholm/typeguard -Source0: https://files.pythonhosted.org/packages/source/t/typeguard/typeguard-%{version}.tar.gz +Source0: https://github.com/agronholm/typeguard/archive/refs/tags/%{version}.tar.gz#/typeguard-%{version}-gh.tar.gz +BuildRequires: %{python_module mypy} BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module typing-extensions >= 4.10.0} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch Requires: python-importlib-metadata >= 3.6 -Requires: python-typing-extensions >= 4.4.0 +Requires: python-typing-extensions >= 4.10.0 %python_subpackages %description @@ -50,7 +51,7 @@ This library provides run-time type checking for functions defined with PEP 484 %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# No testsuite +%pytest %files %{python_files} %license LICENSE diff --git a/typeguard-4.0.0.tar.gz b/typeguard-4.0.0.tar.gz deleted file mode 100644 index a25de74..0000000 --- a/typeguard-4.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:194fb3dbcb06ea9caf7088f3befee014de57961689f9c859ac5239b1ef61d987 -size 66064 diff --git a/typeguard-4.3.0-gh.tar.gz b/typeguard-4.3.0-gh.tar.gz new file mode 100644 index 0000000..9094cda --- /dev/null +++ b/typeguard-4.3.0-gh.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:738026158f85d6c1e7b6d9ce6daafacb3d680fe65bc61c6bb2a9f8c4588a1932 +size 69514