pytypehint 1.2.2__tar.gz → 1.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. {pytypehint-1.2.2 → pytypehint-1.2.3}/CHANGELOG.md +7 -0
  2. {pytypehint-1.2.2 → pytypehint-1.2.3}/PKG-INFO +13 -13
  3. pytypehint-1.2.3/README.md +42 -0
  4. {pytypehint-1.2.2 → pytypehint-1.2.3}/src/pytypehint/__init__.py +1 -1
  5. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_hardening_a.py +1 -1
  6. pytypehint-1.2.2/README.md +0 -42
  7. {pytypehint-1.2.2 → pytypehint-1.2.3}/.github/dependabot.yml +0 -0
  8. {pytypehint-1.2.2 → pytypehint-1.2.3}/.github/workflows/ci.yml +0 -0
  9. {pytypehint-1.2.2 → pytypehint-1.2.3}/.github/workflows/publish.yml +0 -0
  10. {pytypehint-1.2.2 → pytypehint-1.2.3}/.gitignore +0 -0
  11. {pytypehint-1.2.2 → pytypehint-1.2.3}/LICENSE +0 -0
  12. {pytypehint-1.2.2 → pytypehint-1.2.3}/docs/atoms.md +0 -0
  13. {pytypehint-1.2.2 → pytypehint-1.2.3}/docs/build.md +0 -0
  14. {pytypehint-1.2.2 → pytypehint-1.2.3}/docs/contract.md +0 -0
  15. {pytypehint-1.2.2 → pytypehint-1.2.3}/docs/decode.md +0 -0
  16. {pytypehint-1.2.2 → pytypehint-1.2.3}/docs/defaults.md +0 -0
  17. {pytypehint-1.2.2 → pytypehint-1.2.3}/docs/design.md +0 -0
  18. {pytypehint-1.2.2 → pytypehint-1.2.3}/docs/immutable.md +0 -0
  19. {pytypehint-1.2.2 → pytypehint-1.2.3}/docs/limits.md +0 -0
  20. {pytypehint-1.2.2 → pytypehint-1.2.3}/docs/overview.md +0 -0
  21. {pytypehint-1.2.2 → pytypehint-1.2.3}/docs/resolve.md +0 -0
  22. {pytypehint-1.2.2 → pytypehint-1.2.3}/docs/tuples.md +0 -0
  23. {pytypehint-1.2.2 → pytypehint-1.2.3}/docs/vocabulary.md +0 -0
  24. {pytypehint-1.2.2 → pytypehint-1.2.3}/pyproject.toml +0 -0
  25. {pytypehint-1.2.2 → pytypehint-1.2.3}/src/pytypehint/atoms.py +0 -0
  26. {pytypehint-1.2.2 → pytypehint-1.2.3}/src/pytypehint/bridge.py +0 -0
  27. {pytypehint-1.2.2 → pytypehint-1.2.3}/src/pytypehint/contract.py +0 -0
  28. {pytypehint-1.2.2 → pytypehint-1.2.3}/src/pytypehint/errors.py +0 -0
  29. {pytypehint-1.2.2 → pytypehint-1.2.3}/src/pytypehint/immutable.py +0 -0
  30. {pytypehint-1.2.2 → pytypehint-1.2.3}/src/pytypehint/py.typed +0 -0
  31. {pytypehint-1.2.2 → pytypehint-1.2.3}/src/pytypehint/shapes.py +0 -0
  32. {pytypehint-1.2.2 → pytypehint-1.2.3}/src/pytypehint/signature.py +0 -0
  33. {pytypehint-1.2.2 → pytypehint-1.2.3}/src/pytypehint/structure.py +0 -0
  34. {pytypehint-1.2.2 → pytypehint-1.2.3}/src/pytypehint/utils.py +0 -0
  35. {pytypehint-1.2.2 → pytypehint-1.2.3}/src/pytypehint/validation.py +0 -0
  36. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/conftest.py +0 -0
  37. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_annotated.py +0 -0
  38. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_annotated_hoisting_properties.py +0 -0
  39. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_atom_argument_validation.py +0 -0
  40. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_atom_table_reflection.py +0 -0
  41. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_atoms.py +0 -0
  42. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_bool.py +0 -0
  43. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_bridge.py +0 -0
  44. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_build.py +0 -0
  45. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_certification.py +0 -0
  46. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_collection_and_recursion_matrix.py +0 -0
  47. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_composition.py +0 -0
  48. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_contract.py +0 -0
  49. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_contract_graph.py +0 -0
  50. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_crossround_x.py +0 -0
  51. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_crossround_y.py +0 -0
  52. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_datetime.py +0 -0
  53. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_decode.py +0 -0
  54. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_decode_boundary.py +0 -0
  55. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_decode_routing.py +0 -0
  56. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_default_container_isolation.py +0 -0
  57. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_default_types.py +0 -0
  58. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_discriminated_wrapper.py +0 -0
  59. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_discriminator.py +0 -0
  60. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_documentation_contract.py +0 -0
  61. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_enum.py +0 -0
  62. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_equality.py +0 -0
  63. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_errors_pickle.py +0 -0
  64. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_extra.py +0 -0
  65. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_field_dataclass_surface.py +0 -0
  66. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_file_hint.py +0 -0
  67. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_final_restrictions.py +0 -0
  68. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_float.py +0 -0
  69. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_hardening_b.py +0 -0
  70. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_hardening_c.py +0 -0
  71. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_hardening_d.py +0 -0
  72. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_hardening_e.py +0 -0
  73. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_hardening_f.py +0 -0
  74. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_hardening_g.py +0 -0
  75. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_immutable.py +0 -0
  76. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_initvar_rejection.py +0 -0
  77. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_instance_validation_and_homonym_enums.py +0 -0
  78. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_int.py +0 -0
  79. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_list.py +0 -0
  80. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_literal.py +0 -0
  81. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_matches_no_option_notes.py +0 -0
  82. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_missing.py +0 -0
  83. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_none.py +0 -0
  84. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_none_transparency.py +0 -0
  85. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_numeric_constraint_validation.py +0 -0
  86. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_optional_toggle.py +0 -0
  87. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_portable_properties.py +0 -0
  88. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_presentation_atoms_surface.py +0 -0
  89. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_recursive.py +0 -0
  90. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_remat_runtime_failure.py +0 -0
  91. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_rematerialization.py +0 -0
  92. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_resolve.py +0 -0
  93. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_scalar_constraint_validation.py +0 -0
  94. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_scalar_option_identity.py +0 -0
  95. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_scalar_type_strictness.py +0 -0
  96. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_schema_model_invariants.py +0 -0
  97. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_shape_constraint_certification.py +0 -0
  98. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_shape_invariants.py +0 -0
  99. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_signature.py +0 -0
  100. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_signature_build.py +0 -0
  101. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_signature_field_rejection.py +0 -0
  102. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_single_pass_validation.py +0 -0
  103. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_str.py +0 -0
  104. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_string_and_literal_integration.py +0 -0
  105. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_struct.py +0 -0
  106. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_structured_errors.py +0 -0
  107. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_temporal_constraint_validation.py +0 -0
  108. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_time_second_precision.py +0 -0
  109. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_tuple.py +0 -0
  110. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_union_field_atoms.py +0 -0
  111. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_union_option_collisions.py +0 -0
  112. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_union_routing_matrix.py +0 -0
  113. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_unions.py +0 -0
  114. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_validate.py +0 -0
  115. {pytypehint-1.2.2 → pytypehint-1.2.3}/tests/test_wrapper_layer_composition.py +0 -0
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.3 - 2026-09-29
4
+
5
+ ### Changed
6
+
7
+ - Documentation only: the README's Documentation list links each page on the
8
+ documentation site, so readers on GitHub and PyPI land there. The code is the same as 1.2.2.
9
+
3
10
  ## 1.2.2 - 2026-09-29
4
11
 
5
12
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pytypehint
3
- Version: 1.2.2
3
+ Version: 1.2.3
4
4
  Summary: Compiles Python type hints into strict, inspectable, portable contracts
5
5
  Project-URL: Documentation, https://offerrall.github.io/pytypehint/
6
6
  Project-URL: Repository, https://github.com/offerrall/pytypehint
@@ -52,15 +52,15 @@ The full documentation is at https://offerrall.github.io/pytypehint/.
52
52
 
53
53
  ## Documentation
54
54
 
55
- - [Overview](docs/overview.md): immutable models, portable data, field metadata and the four operations.
56
- - [Immutable models](docs/immutable.md): the `@immutable` contract, allowed fields, reuse and Python behavior.
57
- - [Types and API](docs/vocabulary.md): which hints compile to which shapes, and the public API.
58
- - [Atoms](docs/atoms.md): constraints and notation per shape, file names, layering and extras.
59
- - [Build](docs/build.md): validating and constructing instances or keyword arguments, union selection and errors.
60
- - [Resolve](docs/resolve.md): validated dictionaries with defaults filled at the current level.
61
- - [Decode](docs/decode.md): restoring portable values such as dates, enums and tuples before validation.
62
- - [Tuples](docs/tuples.md): fixed, variadic and empty tuples and the `Tuple` shape.
63
- - [Defaults](docs/defaults.md): certification and rematerialization of default values.
64
- - [Portable contract](docs/contract.md): the JSON-compatible schema document returned by `to_dict()`.
65
- - [Limits](docs/limits.md): rejected definitions, option identity and runtime limits.
66
- - [Design](docs/design.md): what the core owns, what consumers own, and why.
55
+ - [Overview](https://offerrall.github.io/pytypehint/): immutable models, portable data, field metadata and the four operations.
56
+ - [Immutable models](https://offerrall.github.io/pytypehint/immutable/): the `@immutable` contract, allowed fields, reuse and Python behavior.
57
+ - [Types and API](https://offerrall.github.io/pytypehint/vocabulary/): which hints compile to which shapes, and the public API.
58
+ - [Atoms](https://offerrall.github.io/pytypehint/atoms/): constraints and notation per shape, file names, layering and extras.
59
+ - [Build](https://offerrall.github.io/pytypehint/build/): validating and constructing instances or keyword arguments, union selection and errors.
60
+ - [Resolve](https://offerrall.github.io/pytypehint/resolve/): validated dictionaries with defaults filled at the current level.
61
+ - [Decode](https://offerrall.github.io/pytypehint/decode/): restoring portable values such as dates, enums and tuples before validation.
62
+ - [Tuples](https://offerrall.github.io/pytypehint/tuples/): fixed, variadic and empty tuples and the `Tuple` shape.
63
+ - [Defaults](https://offerrall.github.io/pytypehint/defaults/): certification and rematerialization of default values.
64
+ - [Portable contract](https://offerrall.github.io/pytypehint/contract/): the JSON-compatible schema document returned by `to_dict()`.
65
+ - [Limits](https://offerrall.github.io/pytypehint/limits/): rejected definitions, option identity and runtime limits.
66
+ - [Design](https://offerrall.github.io/pytypehint/design/): what the core owns, what consumers own, and why.
@@ -0,0 +1,42 @@
1
+ # pytypehint
2
+
3
+ Define data once with ordinary Python type hints and dataclasses. pytypehint
4
+ compiles them into strict schemas that validate input with exact types and no
5
+ implicit coercion, build nested dataclasses, and export a portable description
6
+ another process can read.
7
+
8
+ Use `@immutable` for deeply immutable models that validate themselves and reuse
9
+ already validated children. pytypehint is the schema and validation core of
10
+ [func-to-web](https://offerrall.github.io/func-to-web/).
11
+
12
+ ```python
13
+ from dataclasses import dataclass
14
+ from typing import Annotated
15
+ from pytypehint import Min, struct_of
16
+
17
+ @dataclass
18
+ class Item:
19
+ name: str
20
+ quantity: Annotated[int, Min(1)] = 1
21
+
22
+ schema = struct_of(Item)
23
+ item = schema.build({"name": "Pen"}) # Item(name='Pen', quantity=1)
24
+ schema.build({"name": "Pen", "quantity": 0}) # SchemaValueError: quantity
25
+ ```
26
+
27
+ The full documentation is at https://offerrall.github.io/pytypehint/.
28
+
29
+ ## Documentation
30
+
31
+ - [Overview](https://offerrall.github.io/pytypehint/): immutable models, portable data, field metadata and the four operations.
32
+ - [Immutable models](https://offerrall.github.io/pytypehint/immutable/): the `@immutable` contract, allowed fields, reuse and Python behavior.
33
+ - [Types and API](https://offerrall.github.io/pytypehint/vocabulary/): which hints compile to which shapes, and the public API.
34
+ - [Atoms](https://offerrall.github.io/pytypehint/atoms/): constraints and notation per shape, file names, layering and extras.
35
+ - [Build](https://offerrall.github.io/pytypehint/build/): validating and constructing instances or keyword arguments, union selection and errors.
36
+ - [Resolve](https://offerrall.github.io/pytypehint/resolve/): validated dictionaries with defaults filled at the current level.
37
+ - [Decode](https://offerrall.github.io/pytypehint/decode/): restoring portable values such as dates, enums and tuples before validation.
38
+ - [Tuples](https://offerrall.github.io/pytypehint/tuples/): fixed, variadic and empty tuples and the `Tuple` shape.
39
+ - [Defaults](https://offerrall.github.io/pytypehint/defaults/): certification and rematerialization of default values.
40
+ - [Portable contract](https://offerrall.github.io/pytypehint/contract/): the JSON-compatible schema document returned by `to_dict()`.
41
+ - [Limits](https://offerrall.github.io/pytypehint/limits/): rejected definitions, option identity and runtime limits.
42
+ - [Design](https://offerrall.github.io/pytypehint/design/): what the core owns, what consumers own, and why.
@@ -13,7 +13,7 @@ from pytypehint.shapes import (
13
13
  )
14
14
  from pytypehint.utils import MISSING
15
15
 
16
- __version__ = "1.2.2"
16
+ __version__ = "1.2.3"
17
17
 
18
18
  __all__ = [
19
19
  "immutable",
@@ -505,7 +505,7 @@ def test_no_module_level_name_escapes_all_by_accident():
505
505
 
506
506
 
507
507
  def test_the_version_is_the_one_this_release_claims():
508
- assert pytypehint.__version__ == "1.2.2"
508
+ assert pytypehint.__version__ == "1.2.3"
509
509
  assert "__version__" not in pytypehint.__all__
510
510
 
511
511
 
@@ -1,42 +0,0 @@
1
- # pytypehint
2
-
3
- Define data once with ordinary Python type hints and dataclasses. pytypehint
4
- compiles them into strict schemas that validate input with exact types and no
5
- implicit coercion, build nested dataclasses, and export a portable description
6
- another process can read.
7
-
8
- Use `@immutable` for deeply immutable models that validate themselves and reuse
9
- already validated children. pytypehint is the schema and validation core of
10
- [func-to-web](https://offerrall.github.io/func-to-web/).
11
-
12
- ```python
13
- from dataclasses import dataclass
14
- from typing import Annotated
15
- from pytypehint import Min, struct_of
16
-
17
- @dataclass
18
- class Item:
19
- name: str
20
- quantity: Annotated[int, Min(1)] = 1
21
-
22
- schema = struct_of(Item)
23
- item = schema.build({"name": "Pen"}) # Item(name='Pen', quantity=1)
24
- schema.build({"name": "Pen", "quantity": 0}) # SchemaValueError: quantity
25
- ```
26
-
27
- The full documentation is at https://offerrall.github.io/pytypehint/.
28
-
29
- ## Documentation
30
-
31
- - [Overview](docs/overview.md): immutable models, portable data, field metadata and the four operations.
32
- - [Immutable models](docs/immutable.md): the `@immutable` contract, allowed fields, reuse and Python behavior.
33
- - [Types and API](docs/vocabulary.md): which hints compile to which shapes, and the public API.
34
- - [Atoms](docs/atoms.md): constraints and notation per shape, file names, layering and extras.
35
- - [Build](docs/build.md): validating and constructing instances or keyword arguments, union selection and errors.
36
- - [Resolve](docs/resolve.md): validated dictionaries with defaults filled at the current level.
37
- - [Decode](docs/decode.md): restoring portable values such as dates, enums and tuples before validation.
38
- - [Tuples](docs/tuples.md): fixed, variadic and empty tuples and the `Tuple` shape.
39
- - [Defaults](docs/defaults.md): certification and rematerialization of default values.
40
- - [Portable contract](docs/contract.md): the JSON-compatible schema document returned by `to_dict()`.
41
- - [Limits](docs/limits.md): rejected definitions, option identity and runtime limits.
42
- - [Design](docs/design.md): what the core owns, what consumers own, and why.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes