Skip to content

Releases: FelixTheC/strongtyping

3.13.6

19 Apr 13:34

Choose a tag to compare

What's Changed

  • fix: include strongtyping-stubs in distribution by @idreesaziz in #149

  • Improvements by @FelixTheC in #150

    • improve error messaging and validation logic across modules

    Enhanced the strong_typing decorator with better error messaging using traceback and Template for detailed TypeMismatch reporting. Updated CachedDict and CachedSet to use deque for eviction handling. Added support for TypeGuard and improved validate_return logic for return type checking.

    • update pyproject.toml and type annotations; enhance validation utilities for Python 3.13+ compatibility

    • migrate TypeMismatch, UndefinedKey, and ValidationError to new exceptions module; update imports across codebase

    • add mypyc for performance optimization

    • Add new validation utility functions ( Gt, Len, and Regex, Gte, Lte, Range, IsPositive, IsNegative, IsUUID); enhance documentation and Python 3.13+ compatibility

Full Changelog: v3.13.5...v3.13.6a

3.13.6a

19 Apr 13:02

Choose a tag to compare

3.13.6a Pre-release
Pre-release

What's Changed

  • fix: include strongtyping-stubs in distribution by @idreesaziz in #149

  • Improvements by @FelixTheC in #150

    • improve error messaging and validation logic across modules

    Enhanced the strong_typing decorator with better error messaging using traceback and Template for detailed TypeMismatch reporting. Updated CachedDict and CachedSet to use deque for eviction handling. Added support for TypeGuard and improved validate_return logic for return type checking.

    • update pyproject.toml and type annotations; enhance validation utilities for Python 3.13+ compatibility

    • migrate TypeMismatch, UndefinedKey, and ValidationError to new exceptions module; update imports across codebase

    • add mypyc for performance optimization

    • Add new validation utility functions ( Gt, Len, and Regex, Gte, Lte, Range, IsPositive, IsNegative, IsUUID); enhance documentation and Python 3.13+ compatibility

Full Changelog: v3.13.5...v3.13.6a

3.13.5

27 Feb 21:02

Choose a tag to compare

  • some cleanup
  • add support for checking the return type
from strongtyping.strong_typing import match_typing

@match_typing(validate_return=True)
def multipler(a: int, b: int) -> int:
    return str(a * b)

3.13.4

26 Dec 20:26

Choose a tag to compare

What's Changed

  • chore(deps): bump urllib3 from 2.5.0 to 2.6.0 by @dependabot[bot] in #146
  • support Annotated
  • update dependencies
  • update documentation

3.13.3

15 Sep 18:53

Choose a tag to compare

Some small fixes in the docs
Added tests for TypedDict with the usage of the Validator-Type
Fix an issue when using Validator-Type inside of a TypedDict

Full Changelog: v3.13.2...v3.13.3

3.13.2

21 Jun 05:28

Choose a tag to compare

What's Changed

  • fix: add support for PEP 604 union syntax (X | Y) by @fergo2910 in #145

New Contributors

Full Changelog: v3.13.1...v3.13.2

v3.13.1

05 Jan 12:18

Choose a tag to compare

Enhancements

  • Updated the CI workflow to use Python 3.13 and modernized the build process by replacing deprecated setup.py commands with build and twine.
  • Adjusted pyproject.toml to align with new packaging configurations.
  • Enabled Python 3.13 in GitHub Actions workflows and tests, adding related compatibility checks where necessary.
  • Upgraded actions/checkout and adjusted test markers for feature-specific availability in 3.13.
  • Replaced all occurrences of "TypeMisMatch" with the correct term "TypeMismatch" across documentation files, improving consistency and correctness in the error type mentioned throughout the project.

New Features

  • Added support for Python version 3.13 as reflected in the README updates. Now users are aware of the extended compatibility with newer Python versions.

Refactoring

  • Relocated all test files from strongtyping/tests to a root-level tests directory for better project organization and consistency. No code changes were made, ensuring functionality remains unaffected.

3.12.1

04 Dec 20:58

Choose a tag to compare

What's Changed

  • feat: raise UndefinedKey exception on user decision by @FelixTheC in #130
    • new exception type UndefinedKey
    • new allowed parameter(throw_on_undefined) for match_class_typing which will be thrown if you try to init a TypeDict with an unspecified attribute/key
  • test case example:
def test_new_parameter():
    @match_class_typing(throw_on_undefined=True)
    class User(TypedDict):
        id: str
        username: str
        description: str | None

    with pytest.raises(UndefinedKey):
        User({"id": "0123", "username": "test", "description": None, "age": 10})

Full Changelog: v3.12.0...v3.12.1

3.12.0

04 Oct 13:48

Choose a tag to compare

  • cleanup for the latest Python version
  • support new type annotation type Unpack for TypedDict objects

3.11.4

10 Jul 21:17
cac289c

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.2.3...v3.11.4