From 842a01f1632d0a7c4c70106ffd205e852fd05a81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Tue, 17 Mar 2026 15:16:47 +0300 Subject: [PATCH 1/6] Bump version to 0.0.13 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 545e148..becc3ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "simtypes" -version = "0.0.12" +version = "0.0.13" authors = [{ name = "Evgeniy Blinov", email = "zheni-b@yandex.ru" }] description = 'Type checking in runtime without stupid games' readme = "README.md" From df1f025e7e5a3b70adf08394fc9fcb52313eb2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Tue, 17 Mar 2026 15:17:19 +0300 Subject: [PATCH 2/6] Update denial version requirement to >=0.0.13 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index becc3ad..2afc23a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ readme = "README.md" requires-python = ">=3.8" dependencies = [ 'typing_extensions ; python_version <= "3.12"', - 'denial>=0.0.5', + 'denial>=0.0.13', ] classifiers = [ "Operating System :: OS Independent", From 540169c4a4d3c653f1b917bd9fc014589dadb1b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Tue, 17 Mar 2026 15:18:03 +0300 Subject: [PATCH 3/6] Add Python 3.15 support in CI and classifiers --- .github/workflows/lint.yml | 2 +- .github/workflows/tests_and_coverage.yml | 2 +- pyproject.toml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2048219..f5bb36c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: python-version: - ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] + ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "3.15.0-alpha.1"] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index 449122e..553148e 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -9,7 +9,7 @@ jobs: matrix: os: [macos-latest, ubuntu-latest, windows-latest] python-version: - ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] + ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "3.15.0-alpha.1"] steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index 2afc23a..00f6b23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ classifiers = [ 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.13', 'Programming Language :: Python :: 3.14', + 'Programming Language :: Python :: 3.15', 'Programming Language :: Python :: Free Threading', 'Programming Language :: Python :: Free Threading :: 3 - Stable', 'License :: OSI Approved :: MIT License', From ef35fed51f597a938a0d7f0cea315fd25fe5650b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Tue, 17 Mar 2026 15:27:34 +0300 Subject: [PATCH 4/6] Fix typo in "JSON" references and update deserialization section formatting --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4022b5b..1c4afaf 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ ![logo](https://raw.githubusercontent.com/mutating/simtypes/develop/docs/assets/logo_2.svg) -Python type checking tools are usually very complex. In this case, we have thrown out almost all the places where there is a lot of complexity, and left only the most obvious and necessary things for runtime. +Python type checking tools are usually very complex. In this case, we have thrown out almost all the places where there is a lot of complexity, and left only the most obvious and necessary things for runtime use. ## Table of contents @@ -31,9 +31,9 @@ Python type checking tools are usually very complex. In this case, we have throw ## Why? -It's been a long time since static type checking tools like [`mypy`](https://github.com/python/mypy) for `Python` have been available, and they've become very complex. The typing system has also become noticeably more complicated, providing us with more and more new types of annotations, new syntax and other tools. It seems that `Python` devs procrastinate endlessly, postponing all the really important [`CPyhton`](https://github.com/python/cpython) improvements in order to add more garbage to [`typing`](https://docs.python.org/3/library/typing.html). +It's been a long time since static type checking tools like [`mypy`](https://github.com/python/mypy) for `Python` have been available, and they've become very complex. The typing system has also become noticeably more complicated, providing us with more and more new types of annotations, new syntax and other tools. It seems that `Python` devs procrastinate endlessly, postponing all the really important [`CPython`](https://github.com/python/cpython) improvements in order to add more garbage to [`typing`](https://docs.python.org/3/library/typing.html). -A separate difficulty arises for those who try to use type annotations in runtime. Many data types make sense only in the context of static validation, and there is no way to verify these aspects in runtime. And some checks, although theoretically possible, would be extremely expensive. For example, to verify the validity of annotation `List[int]` in relation to a list, you would need to go through all its objects linearly to make sure that none of them violates the contract from the annotation. +A separate difficulty arises for those who try to use type annotations at runtime. Many data types make sense only in the context of static validation, and there is no way to verify these aspects at runtime. And some checks, although theoretically possible, would be extremely expensive. For example, to verify the validity of annotation `List[int]` in relation to a list, you would need to iterate over all its elements to make sure that none of them violates the contract from the annotation. So, why do we need this package? There is only one function where you can pass a type or a type annotation + a specific value, and you will find out if one corresponds to the other. That's it! You can use this feature as a support when creating runtime type checking tools, however, we do not offer these tools here. You decide for yourself whether to wrap this function in syntactic sugar like decorators with automatic type checking. @@ -179,16 +179,16 @@ print(check(InnerNoneType('key'), InnerNoneType('key'))) ## String deserialization -The library also provides primitive deserialization. Conversion of strings into several basic types in any combinations is supported: +The library also provides basic deserialization. Conversion of strings into several basic types in various combinations is supported: -- `str`- any string can be interpreted as a `str` type. +- `str` - any string can be interpreted as a `str` type. - `int` - any integers. - `float` - any floating-point numbers, including infinities and [`NaN`](https://en.wikipedia.org/wiki/NaN). -- `bool`- the strings `"yes"`, `"True"`, and `"true"` are interpreted as `True`, while `"no"`, `"False"`, or `"false"` are interpreted as `False`. +- `bool` - the strings `"yes"`, `"True"`, and `"true"` are interpreted as `True`, while `"no"`, `"False"`, or `"false"` are interpreted as `False`. - `date` or `datetime` - strings representing, respectively, dates or dates + time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. -- `list` - lists in [`json`](https://en.wikipedia.org/wiki/JSON) format are expected. -- `tuple` - lists in [`json`](https://en.wikipedia.org/wiki/JSON) format are expected. -- `dict` - dicts in [`json`](https://en.wikipedia.org/wiki/JSON) format are expected. +- `list` - lists in [`JSON`](https://en.wikipedia.org/wiki/JSON) format are expected. +- `tuple` - lists in [`JSON`](https://en.wikipedia.org/wiki/JSON) format are expected. +- `dict` - dicts in [`JSON`](https://en.wikipedia.org/wiki/JSON) format are expected. Examples: From c015e5660d66450ebc466a8a06d43e0f9991ade5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Tue, 17 Mar 2026 15:32:09 +0300 Subject: [PATCH 5/6] Rename "Usage" to "Type checking" in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1c4afaf..48ae66b 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Python type checking tools are usually very complex. In this case, we have throw - [**Why?**](#why) - [**Installation**](#installation) -- [**Usage**](#usage) +- [**Type checking**](#type-checking) - [**Special types**](#special-types) - [**String deserialization**](#string-deserialization) @@ -66,7 +66,7 @@ pip install simtypes You can also quickly try out this and other packages without having to install using [instld](https://github.com/pomponchik/instld). -## Usage +## Type checking Import the `check` function: From 33172221ddc9db4bfca61c39c43d94968dd1355e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Tue, 17 Mar 2026 15:32:39 +0300 Subject: [PATCH 6/6] Fix typo: "2 arguments" to "two arguments" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 48ae66b..6ff0c11 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Import the `check` function: from simtypes import check ``` -And pass there 2 arguments, a value + a type or type annotation: +And pass there two arguments, a value + a type or type annotation: ```python print(check(1, int))