Typeguard

Latest version: v4.3.0

Safety actively analyzes 634728 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 11

4.3.0

- Added support for checking against static protocols
- Fixed some compatibility problems when running on Python 3.13
(`460 <https://github.com/agronholm/typeguard/issues/460>`_; PR by JelleZijlstra)
- Fixed test suite incompatibility with pytest 8.2
(`461 <https://github.com/agronholm/typeguard/issues/461>`_)
- Fixed pytest plugin crashing on pytest version older than v7.0.0 (even if it's just
present) (`343 <https://github.com/agronholm/typeguard/issues/343>`_)

4.2.1

- Fixed missing ``typing_extensions`` dependency for Python 3.12
(`444 <https://github.com/agronholm/typeguard/issues/444>`_)
- Fixed deprecation warning in the test suite on Python 3.13
(`444 <https://github.com/agronholm/typeguard/issues/444>`_)

4.2.0

- Added support for specifying options for the pytest plugin via pytest config files
(`440 <https://github.com/agronholm/typeguard/issues/440>`_)
- 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 (`442 <https://github.com/agronholm/typeguard/issues/442>`_)
- Fixed ``TypedDict`` from ``typing_extensions`` not being recognized as one
(`443 <https://github.com/agronholm/typeguard/issues/443>`_)
- Fixed ``typing`` types (``dict[str, int]``, ``List[str]``, etc.) not passing checks
against ``type`` or ``Type``
(`432 <https://github.com/agronholm/typeguard/issues/432>`_, PR by Yongxin Wang)
- Fixed detection of optional fields (``NotRequired[...]``) in ``TypedDict`` when using
forward references (`424 <https://github.com/agronholm/typeguard/issues/424>`_)
- Fixed mapping checks against Django's ``MultiValueDict``
(`419 <https://github.com/agronholm/typeguard/issues/419>`_)

4.1.5

- Fixed ``Callable`` erroneously rejecting a callable that has the requested amount of
positional arguments but they have defaults
(`400 <https://github.com/agronholm/typeguard/issues/400>`_)
- Fixed a regression introduced in v4.1.4 where the elements of ``Literal`` got quotes
removed from them by the AST transformer
(`399 <https://github.com/agronholm/typeguard/issues/399>`_)

4.1.4

- Fixed ``AttributeError`` where the transformer removed elements from a PEP 604 union
(`384 <https://github.com/agronholm/typeguard/issues/384>`_)
- Fixed ``AttributeError: 'Subscript' object has no attribute 'slice'`` when
encountering an annotation with a subscript containing an ignored type (imported
within an ``if TYPE_CHECKING:`` block)
(`397 <https://github.com/agronholm/typeguard/issues/397>`_)
- 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)
(`394 <https://github.com/agronholm/typeguard/issues/394>`_,
`395 <https://github.com/agronholm/typeguard/issues/395>`_)
- Fixed type checking of class instances created in ``__new__()`` in cases such as enums
where this method is already invoked before the class has finished initializing
(`398 <https://github.com/agronholm/typeguard/issues/398>`_)

4.1.3

- 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)
(`352 <https://github.com/agronholm/typeguard/issues/352>`_)
- Fixed placement of injected typeguard imports with respect to ``__future__`` imports
and module docstrings (`385 <https://github.com/agronholm/typeguard/issues/385>`_)

Page 1 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.