Releases: FelixTheC/strongtyping
3.13.6
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_typingdecorator with better error messaging usingtracebackandTemplatefor detailed TypeMismatch reporting. UpdatedCachedDictandCachedSetto usedequefor eviction handling. Added support for TypeGuard and improvedvalidate_returnlogic for return type checking.-
update
pyproject.tomland type annotations; enhance validation utilities for Python 3.13+ compatibility -
migrate
TypeMismatch,UndefinedKey, andValidationErrorto newexceptionsmodule; update imports across codebase -
add
mypycfor performance optimization -
Add new validation utility functions (
Gt,Len, andRegex, Gte, Lte, Range, IsPositive, IsNegative, IsUUID); enhance documentation and Python 3.13+ compatibility
Full Changelog: v3.13.5...v3.13.6a
3.13.6a
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_typingdecorator with better error messaging usingtracebackandTemplatefor detailed TypeMismatch reporting. UpdatedCachedDictandCachedSetto usedequefor eviction handling. Added support for TypeGuard and improvedvalidate_returnlogic for return type checking.-
update
pyproject.tomland type annotations; enhance validation utilities for Python 3.13+ compatibility -
migrate
TypeMismatch,UndefinedKey, andValidationErrorto newexceptionsmodule; update imports across codebase -
add
mypycfor performance optimization -
Add new validation utility functions (
Gt,Len, andRegex, Gte, Lte, Range, IsPositive, IsNegative, IsUUID); enhance documentation and Python 3.13+ compatibility
Full Changelog: v3.13.5...v3.13.6a
3.13.5
3.13.4
3.13.3
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
What's Changed
- fix: add support for PEP 604 union syntax (X | Y) by @fergo2910 in #145
New Contributors
- @fergo2910 made their first contribution in #145
Full Changelog: v3.13.1...v3.13.2
v3.13.1
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
What's Changed
- feat: raise
UndefinedKeyexception on user decision by @FelixTheC in #130- new exception type
UndefinedKey - new allowed parameter(
throw_on_undefined) formatch_class_typingwhich will be thrown if you try to init a TypeDict with an unspecified attribute/key
- new exception type
- 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