Skip to content

Commit eb5f934

Browse files
authored
Merge pull request #127 from binary-butterfly/release-0.11.0
Prepare release of 0.11.0; add note about yanked version 0.10.1
2 parents 787a497 + 50eb657 commit eb5f934

File tree

2 files changed

+46
-3
lines changed

2 files changed

+46
-3
lines changed

CHANGELOG.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
## [Unreleased](https://github.com/binary-butterfly/validataclass/compare/0.10.0...HEAD)
1010

1111

12-
## [0.10.1](https://github.com/binary-butterfly/validataclass/releases/tag/0.10.1) - 2024-08-08
12+
## [0.11.0](https://github.com/binary-butterfly/validataclass/releases/tag/0.11.0) - 2024-08-12
1313

14-
[Full changelog](https://github.com/binary-butterfly/validataclass/compare/0.10.0...0.10.1)
14+
[Full changelog](https://github.com/binary-butterfly/validataclass/compare/0.10.0...0.11.0)
1515

1616
This release makes the library PEP 561 compatible by adding a `py.typed` file. It also fixes some mypy issues that were
1717
previously ignored.
1818

1919
While there is still some work necessary to make the library fully compatible with mypy (see [#116]), this release
2020
enables mypy to detect the type annotations in the library without the need for stub files.
2121

22+
### Important note / breaking changes
23+
24+
This update was originally released as patch version 0.10.1, but was then yanked and later re-released as a new minor
25+
version instead.
26+
27+
The update does not introduce any breaking changes **in the code**. However, it **may** result in mypy errors in your
28+
project which have previously not been discovered by mypy, thus leading to failing CI pipelines. Keep this in mind when
29+
updating the library.
30+
31+
Some of the issues found by mypy currently need to be ignored using `# type: ignore` comments, until the library is
32+
fully compatible with mypy ([#116]). Examples:
33+
34+
- `Return type "X" of "validate" incompatible with return type "Y" in supertype "SomeBaseValidator" [override]`:
35+
This can happen when you subclass a validator and change the return type of the `validate` method, which technically
36+
violates the Liskov substitution principle. However, in the case of validators, that's intentional.
37+
- `Item "UnsetValueType" of "X | UnsetValueType" has no attribute "Y"`: This can happen despite of conditions like
38+
`if some_field is not UnsetValue:`, because mypy doesn't know that `UnsetValue` is a sentinel object, thus not being
39+
able to narrow down the type. A possible workaround that doesn't require `# type: ignore` would be to define a
40+
[Type Guard](https://mypy.readthedocs.io/en/stable/type_narrowing.html#user-defined-type-guards) and use that instead
41+
of the bare condition.
42+
43+
We will hopefully find better solutions for these problems in the future.
44+
2245
### Added
2346

2447
- Add `py.typed` file to make the package PEP 561 compatible. [#125]
@@ -31,6 +54,26 @@ enables mypy to detect the type annotations in the library without the need for
3154
[#125]: https://github.com/binary-butterfly/validataclass/pull/125
3255

3356

57+
## [0.10.1](https://github.com/binary-butterfly/validataclass/releases/tag/0.10.1) - 2024-08-08 [YANKED]
58+
59+
_This release was yanked from PyPI and re-released as 0.11.0. (See release notes above.)_
60+
61+
_Reason: Starting with this release, the library is PEP 561 compatible, which means that mypy recognized it as a typed
62+
package. This can uncover some typing issues that have previously been ignored by mypy, leading to failing CI pipelines
63+
in projects that use the library with the recommended version constraint of `~=0.10.0`. To prevent this, we yanked the
64+
version from PyPI and re-released it as a new minor release instead of a patch release._
65+
66+
### Added
67+
68+
- Add `py.typed` file to make the package PEP 561 compatible. [#125]
69+
70+
### Fixed
71+
72+
- Explicitly re-export imports in `__init__.py` by defining `__all__` to fix mypy issues. [#125]
73+
74+
[#125]: https://github.com/binary-butterfly/validataclass/pull/125
75+
76+
3477
## [0.10.0](https://github.com/binary-butterfly/validataclass/releases/tag/0.10.0) - 2024-05-07
3578

3679
[Full changelog](https://github.com/binary-butterfly/validataclass/compare/0.9.0...0.10.0)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If you add the package to your dependencies, it is recommended to use
2424
always get the latest version of the library but without running into breaking changes:
2525

2626
```shell
27-
pip install validataclass~=0.10
27+
pip install validataclass~=0.11.0
2828
```
2929

3030
However, keep in mind that the library still is in its beta phase (as indicated by the major version of 0). There can

0 commit comments

Comments
 (0)