Releases: eliegoudout/paramclasses
Releases · eliegoudout/paramclasses
v0.4.3
What's Changed
- pkg: support 3.14.0 by @eliegoudout in #42
- pkg: python 3.15.0a1 compat + free-threaded versions by @eliegoudout in #43
- pkg: p315.0a2 compatibility by @eliegoudout in #44
Full Changelog: v0.4.2...v0.4.3
v0.4.2
The first stable version of Python 3.14 is released and paramclasses is already fully tested and compatible 🎉
Full Changelog: v0.4.1...v0.4.2
v0.4.1
Tested on python 3.14.0rc2.
Full Changelog: v0.4.0...v0.4.1
v0.4.0
What's Changed
- BREAKING: The signature of paramclasses changes for paramclasses with a
__post_init__method, depending on whether it accepts positional and/or keyword arguments. This makes documenting (withsphinxfor example) cleaner/more precise as there will be nopost_init_argsif__post_init__does not accept positional arguments for example. The drawback though is that different paramclasses may have different signatures, and one cannot simply use a genericMyParamClass(post_init_args, post_init_kwargs, **params)call. As such, if users strongly express preference for previous behaviour, we might revert to it. - If
__post_init__accepts both positional and keyword arguments, then users might mistakenly try to useMyParamClass(post_init_kwargs, **params)when they do not want to specify positional arguments. Normally, this would ultimately silently translate to a (probably unexpected)__post_init__(*post_init_kwargs, **{})call. To avoid such mistakes, we explicitly raise an error ifpost_init_argsis of a mapping type. - Tested for python up to
3.14.0b4.
- 36 py314 by @eliegoudout in #40
- 39 fix signature post init by @eliegoudout in #41
Full Changelog: v0.3.6...v0.4.0
v0.3.6
v0.3.5
What's Changed
- Breaking:
isparamclassdefault value forrawis nowTrue - Removed
RawParamClass.__post_init__, now optional method __signature__property (works with vanilla__post_init__or@classmethod/@staticmethod):
class A(ParamClass):
x: int
y: float = 0.1
@staticmethod
def __post_init__(pos_only_arg: str, /) -> None:
self.z = pos_only_arg>>> inspect.signature(A)
<Signature (post_init_args=[], /, *, x: int = ?, y: float = 0.1)>- MRO of paramclasses must now put all paramclasses first (fixes #28)
- Internals better enforce standard use of paramclasses and make manual use of
type(ParamClass)more difficult (see_run_onceuses and_check_valid_mro)
Merged PRs
- 33:
__post_init__signature by @ego-thales in #35
New Contributors
- @ego-thales made their first contribution in #35
Full Changelog: v0.3.4...v0.3.5
v0.3.4
-
relocate
py.typed -
new
__str__(old__repr__) and fully explicit__repr__ -
following #20:
- "default" is now the runtime current class value
- dropped
IMPL.default, newIMPL.annotations
-
new
__signature__using annotations (useful for e.g. sphinx) -
Full Changelog: v0.3.3...v0.3.4
v0.3.3
- Package is now compatible with python
3.14.0a6. - Added some metadata for PyPI.
What's Changed
- Py314 by @eliegoudout in #31
Full Changelog: v0.3.2...v0.3.3
v0.3.2
What's Changed
- Fixed class level lookup on inheritance (#27) by @eliegoudout in #30
- Typed package
Full Changelog: v0.3.1...v0.3.2
v0.3.1
What's Changed
- Update README.md by @TheoGoudout in #15
- Test/parametrize attr by @eliegoudout in #24
New Contributors
- @TheoGoudout made their first contribution in #15
Full Changelog: v0.3.0...v0.3.1