Commit Graph

  • a7efd60e59 Accepting request 1225374 from devel:languages:python factory Ana Guerrero 2024-11-21 14:13:27 +0000
  • 7895a40d27 - update to 4.4.1: * Dropped Python 3.8 support * Changed the signature of typeguard_ignore() to be compatible with typing.no_type_check() (PR by @jolaf) * Avoid creating reference cycles when type checking uniontypes and classes * Fixed checking of variable assignments involving tuple unpacking * Fixed TypeError when checking a class against type[Self] * Fixed checking of protocols on the class level (against type[SomeProtocol]) * Fixed Self checks in instance/class methods that have positional-only arguments * Fixed explicit checks of PEP 604 unions against types.UnionType * Fixed checks against annotations wrapped in NotRequired not being run unless the NotRequired is a forward reference * Fixed the pytest_ignore_collect hook in the pytest plugin blocking default pytest collection ignoring behavior by returning None instead of False (PR by @mgorny) devel Dirk Mueller 2024-11-20 17:29:24 +0000
  • 9dc5a7ae50 Accepting request 1219719 from devel:languages:python Dominique Leuenberger 2024-11-01 20:00:42 +0000
  • a6377752b1 - update to 4.4.0: * Added proper checking for method signatures in protocol checks * Fixed basic support for intersection protocols * Fixed protocol checks running against the class of an instance and not the instance itself (this produced wrong results for non-method member checks) Dirk Mueller 2024-10-30 19:48:17 +0000
  • 63272178dc Accepting request 1179514 from devel:languages:python Ana Guerrero 2024-06-10 15:36:58 +0000
  • fa0ba54dc1 - 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 Dirk Mueller 2024-06-08 13:06:28 +0000
  • 9bab1c5229 Accepting request 1130725 from devel:languages:python Ana Guerrero 2023-12-05 16:01:04 +0000
  • 3b1315492d - 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 Dirk Mueller 2023-12-04 11:34:46 +0000
  • c27855f935 Accepting request 1087114 from devel:languages:python Dominique Leuenberger 2023-05-19 09:55:17 +0000
  • 6436ad7278 - update to 4.0.0: * Fixed `@typechecked optimization causing compilation of instrumented code to fail when an if block was left empty by the AST transformer * Fixed the AST transformer trying to parse the second argument of typing.Annotated as a forward reference * Added InstrumentationWarning to the public API * Changed @typechecked to skip instrumentation in optimized mode, as in typeguard 2.x * Avoid type checks where the types in question are shadowed by local variables * Fixed instrumentation using typing.Optional without a subscript when the subscript value was erased due to being an ignored import * Fixed TypeError: isinstance() arg 2 must be a type or tuple of types when instrumented code tries to check a value against a naked (str, not ForwardRef) * forward reference * Fixed instrumentation using the wrong "self" type in the __new__() method * Fixed imports guarded by if TYPE_CHECKING: when used with subscripts * (SomeType[...]) being replaced with Any[...] instead of just Any * Fixed instrumentation inadvertently mutating a function's annotations on Python 3.7 and 3.8 * Fixed Concatenate[...] in Callable parameters causing TypeError to be raised * Fixed type checks for *args or **kwargs` not being suppressed when their types are unusable Dirk Mueller 2023-05-14 16:39:43 +0000
  • 065aa08ad3 - update to 3.0.2: * Improved warnings by ensuring that they target user code and not Typeguard internal code * Fixed `warn_on_error() not showing where the type violation actually occurred * Fixed local assignment to *args or **kwargs being type checked incorrectly * Fixed TypeError on check_type(..., None) * Fixed unpacking assignment not working with a starred variable (x, *y = ...) in * the target tuple * Fixed variable multi-assignment (a = b = c = ...) being type checked incorrectly * Improved the documentation * Fixed assignment unpacking (a, b = ...) being checked incorrectly * Fixed @typechecked attempting to instrument wrapper decorators such as * @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() * Removed the check_argument_types() and check_return_type() functions (use @typechecked instead) * Moved install_import_hook to be directly importable from the typeguard` module * Changed the checking of collections (list, set, dict, sequence, mapping) to only check the first item by default. To get the old behavior, Dirk Mueller 2023-05-05 09:29:08 +0000
  • 60692c033d Accepting request 1081995 from devel:languages:python Dominique Leuenberger 2023-04-22 20:02:02 +0000
  • a34e987136 Accepting request 1081676 from home:dirkmueller:acdc:as_python3_module Dirk Mueller 2023-04-21 14:55:09 +0000
  • 42ef85bcd7 Accepting request 1009899 from devel:languages:python Dominique Leuenberger 2022-10-12 16:22:30 +0000
  • 5d944ce4bd Accepting request 1009850 from home:yarunachalam:branches:devel:languages:python Markéta Machová 2022-10-11 18:17:04 +0000
  • 8bf0d66e4f Accepting request 817607 from devel:languages:python Dominique Leuenberger 2020-06-29 19:17:10 +0000
  • a66c032993 - Initial version Steve Kowalik 2020-06-29 06:34:24 +0000