Releases: yukinarit/pyserde
v0.12.2
What's Changed
New features
Bug fixes
- Fix frozen dataclass inheritance by @yukinarit in #412
CI
- Add prerelease job to make sure version is correct by @yukinarit in #417
- Fix fetch-depth by @yukinarit in #419
Build
- Do not shallow clone when publishing to PyPI by @yukinarit in #416
Documentation
- Document dataclass
frozen
andkw_only
support by @yukinarit in #415
Other changes
- 👥 Add @m472 as a contributor by @yukinarit in #414
New Contributors
Full Changelog: v0.12.1...v0.12.2
v0.12.1
What's Changed
Bug fixes
- Do not import optional modules in init.py by @yukinarit in #408
Refactoring
- Fix mypy/pyright errors in serde/core.py by @yukinarit in #406
Documentation
- Temporarily remove outdated benchmark doc by @yukinarit in #405
Full Changelog: v0.12.0...v0.12.1
v0.12.0
What's Changed
New features
- Union directly by @yukinarit in #339
This example works correctly now
@serde
@dataclass
class Foo:
a: int
@serde
@dataclass
class Bar:
a: int
bar = Bar(10)
s = to_json(bar)
print(s)
print(from_json(Union[Foo, Bar], s))
However, This will introduce a breaking change!! The default behaviour when you pass Union directly was "Untagged" until v0.11.1, but since v0.12.0 it is "ExternalTagging".
The following code prints {"a": 10}
until v0.11.1, but prints {"Bar": {"a": 10}}
since v0.12.0
print(to_json(bar))
For more information about Union, please see the docs
Refactoring
- Fix mypy/pyright errors in serde/inspect.py by @yukinarit in #401
- Fix mypy/pyright errors in serde/init.py by @yukinarit in #402
- Fix mypy/pyright errors in serde/compat.py by @yukinarit in #403
Other changes
- Change line length from 120 to 100 by @yukinarit in #391
Full Changelog: v0.11.1...v0.12.0
v0.11.1
What's Changed
New features
- Support (de)serialize a subclass of primitive type by @yukinarit in #388
Bug fixes
- Fix deserializing from incompatible value e.g. None by @yukinarit in #389
Refactoring
- Make serde.core.Field a generic type by @yukinarit in #385
- Fix a bit more mypy error by @yukinarit in #387
Other changes
- Update links on README.md by @yukinarit in #384
- Update field-attributes.md by @gpetrovic-meltin in #386
- 👥 Add @gpetrovic-meltin as a contributor by @yukinarit in #390
New Contributors
- @gpetrovic-meltin made their first contribution in #386
Full Changelog: v0.11.0...v0.11.1
v0.11.0
This release fixes a lot of untyped code of (de)serialize APIs e.g. to_json
and from_json
. We started using ruff and pyright as well as existing tools e.g. mypy to improve the quality of the code. So if you are a mypy/pyright/pylance user, you would probably get less type error or untyped warnings.
Also, pyserde guide was refactored a lot so that it will detail undocumented pyserde features as much as I can. I still think the documentation is not good enough, any help to improve guide, API docs and README is appreciated. 🙏
What's Changed
New features
- More strong typing on (de)serialize APIs by @yukinarit in #367
Bug fixes
- Fix mypy error for Optional and Union in (de)serialize APIs by @yukinarit in #371
- Fix nested generic class deserialization by @kmsquire in #377
- Fix variable length tuple codegen by @kykosic in #378
Build
- Use new linter and type checker by @yukinarit in #364
- Ignore @overload in code coverage by @yukinarit in #382
Documentation
- Improve guide by @yukinarit in #365
- Fix wrong path to generated guide by @yukinarit in #372
- Fix wrong path to gh-pages by @yukinarit in #373
- Fix expired links in README by @yukinarit in #374
Other changes
- 👥 Add @kykosic as a contributor by @yukinarit in #381
New Contributors
Full Changelog: v0.10.8...v0.11.0
v0.10.8
v0.10.7
What's Changed
Bug fixes
- Fix type error when calling serde as function by @yukinarit in #348
- Fix mypy error for flatten attribute by @yukinarit in #359
Refactoring
- Refactor to have more explicit type by @yukinarit in #346
Documentation
- Fix typo in union.md by @nicoddemus in #349
Other changes
- 👥 Add @nicoddemus as a contributor by @yukinarit in #350
- Fix flacky example by @yukinarit in #356
- Remove webapi example by @yukinarit in #357
New Contributors
- @nicoddemus made their first contribution in #349
Full Changelog: v0.10.6...v0.10.7
v0.10.6
What's Changed
Bug fixes
- Fix recursive union by @yukinarit in #345
Full Changelog: v0.10.5...v0.10.6
v0.10.5
What's Changed
Bug fixes
- Fix dataclass with recursive containers by @yukinarit in #342
Documentation
- Fix typo in Conditional skip documentation by @Kobzol in #337
- Update docs by @yukinarit in #341
Full Changelog: v0.10.4...v0.10.5
v0.10.4
What's Changed
New features
- Do not render field with init=False by @yukinarit in #334
Full Changelog: v0.10.3...v0.10.4