Skip to content

Releases: eliegoudout/paramclasses

v0.4.3

21 Nov 09:25

Choose a tag to compare

What's Changed

Full Changelog: v0.4.2...v0.4.3

v0.4.2

08 Oct 09:55

Choose a tag to compare

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

21 Aug 17:31

Choose a tag to compare

Tested on python 3.14.0rc2.

Full Changelog: v0.4.0...v0.4.1

v0.4.0

18 Jul 19:28
3b5211a

Choose a tag to compare

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 (with sphinx for example) cleaner/more precise as there will be no post_init_args if __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 generic MyParamClass(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 use MyParamClass(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 if post_init_args is of a mapping type.
  • Tested for python up to 3.14.0b4.

Full Changelog: v0.3.6...v0.4.0

v0.3.6

05 Jun 17:12

Choose a tag to compare

  • 3.14.0b1 compatible

Full Changelog: v0.3.5...v0.3.6

v0.3.5

19 Apr 14:02

Choose a tag to compare

What's Changed

  • Breaking: isparamclass default value for raw is now True
  • 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_once uses and _check_valid_mro)

Merged PRs

New Contributors

Full Changelog: v0.3.4...v0.3.5

v0.3.4

14 Apr 14:59

Choose a tag to compare

  • relocate py.typed

  • new __str__ (old __repr__) and fully explicit __repr__

  • following #20:

    • "default" is now the runtime current class value
    • dropped IMPL.default, new IMPL.annotations
  • new __signature__ using annotations (useful for e.g. sphinx)

  • Full Changelog: v0.3.3...v0.3.4

v0.3.3

03 Apr 17:24

Choose a tag to compare

  • Package is now compatible with python 3.14.0a6.
  • Added some metadata for PyPI.

What's Changed

Full Changelog: v0.3.2...v0.3.3

v0.3.2

30 Mar 23:17

Choose a tag to compare

What's Changed

Full Changelog: v0.3.1...v0.3.2

v0.3.1

27 Jan 21:11

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.3.0...v0.3.1