Sync from SUSE:SLFO:Main python-typeguard revision 9a6aa16306c64f0a8c75a01a7355ffc9

This commit is contained in:
Adrian Schröter 2024-12-13 12:32:55 +01:00
parent 4cd6014f62
commit ee81216855
4 changed files with 82 additions and 13 deletions

View File

@ -1,3 +1,71 @@
-------------------------------------------------------------------
Sat Jun 8 13:05:55 UTC 2024 - Dirk Müller <dmueller@suse.com>
- 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 <dmueller@suse.com>
- 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 <dmueller@suse.com>
@ -100,8 +168,8 @@ Fri May 5 09:24:37 UTC 2023 - Dirk Müller <dmueller@suse.com>
* ``@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 <mcepl@suse.com>
-------------------------------------------------------------------
Tue Oct 11 16:36:44 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- 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

View File

@ -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

BIN
typeguard-4.0.0.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
typeguard-4.3.0-gh.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.