Pyserde

Latest version: v0.22.2

Safety actively analyzes 685838 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 12

0.12.0

<!-- Release notes generated using configuration in .github/release.yml at main -->

What's Changed
New features
* Union directly by yukinarit in https://github.com/yukinarit/pyserde/pull/339

This example works correctly now

python
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
python
print(to_json(bar))


For more information about Union, please see [the docs](https://github.com/yukinarit/pyserde/blob/main/docs/en/union.md#deserializing-union-types-directly)

Refactoring
* Fix mypy/pyright errors in serde/inspect.py by yukinarit in https://github.com/yukinarit/pyserde/pull/401
* Fix mypy/pyright errors in serde/__init__.py by yukinarit in https://github.com/yukinarit/pyserde/pull/402
* Fix mypy/pyright errors in serde/compat.py by yukinarit in https://github.com/yukinarit/pyserde/pull/403
Other changes
* Change line length from 120 to 100 by yukinarit in https://github.com/yukinarit/pyserde/pull/391


**Full Changelog**: https://github.com/yukinarit/pyserde/compare/v0.11.1...v0.12.0

0.11.1

<!-- Release notes generated using configuration in .github/release.yml at main -->

What's Changed
New features
* Support (de)serialize a subclass of primitive type by yukinarit in https://github.com/yukinarit/pyserde/pull/388
Bug fixes
* Fix deserializing from incompatible value e.g. None by yukinarit in https://github.com/yukinarit/pyserde/pull/389
Refactoring
* Make serde.core.Field a generic type by yukinarit in https://github.com/yukinarit/pyserde/pull/385
* Fix a bit more mypy error by yukinarit in https://github.com/yukinarit/pyserde/pull/387
Other changes
* Update links on README.md by yukinarit in https://github.com/yukinarit/pyserde/pull/384
* Update field-attributes.md by gpetrovic-meltin in https://github.com/yukinarit/pyserde/pull/386
* :busts_in_silhouette: Add gpetrovic-meltin as a contributor by yukinarit in https://github.com/yukinarit/pyserde/pull/390

New Contributors
* gpetrovic-meltin made their first contribution in https://github.com/yukinarit/pyserde/pull/386

**Full Changelog**: https://github.com/yukinarit/pyserde/compare/v0.11.0...v0.11.1

0.11.0

<!-- Release notes generated using configuration in .github/release.yml at main -->

This release fixes a lot of untyped code of (de)serialize APIs e.g. `to_json` and `from_json`. We started using [ruff](https://github.com/astral-sh/ruff) and [pyright](https://github.com/microsoft/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](https://yukinarit.github.io/pyserde/guide/en/) 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 https://github.com/yukinarit/pyserde/pull/367
Bug fixes
* Fix mypy error for Optional and Union in (de)serialize APIs by yukinarit in https://github.com/yukinarit/pyserde/pull/371
* Fix nested generic class deserialization by kmsquire in https://github.com/yukinarit/pyserde/pull/377
* Fix variable length tuple codegen by kykosic in https://github.com/yukinarit/pyserde/pull/378
Build
* Use new linter and type checker by yukinarit in https://github.com/yukinarit/pyserde/pull/364
* Ignore overload in code coverage by yukinarit in https://github.com/yukinarit/pyserde/pull/382
Documentation
* Improve guide by yukinarit in https://github.com/yukinarit/pyserde/pull/365
* Fix wrong path to generated guide by yukinarit in https://github.com/yukinarit/pyserde/pull/372
* Fix wrong path to gh-pages by yukinarit in https://github.com/yukinarit/pyserde/pull/373
* Fix expired links in README by yukinarit in https://github.com/yukinarit/pyserde/pull/374
Other changes
* :busts_in_silhouette: Add kykosic as a contributor by yukinarit in https://github.com/yukinarit/pyserde/pull/381

New Contributors
* kykosic made their first contribution in https://github.com/yukinarit/pyserde/pull/378

**Full Changelog**: https://github.com/yukinarit/pyserde/compare/v0.10.8...v0.11.0

0.10.8

<!-- Release notes generated using configuration in .github/release.yml at main -->

What's Changed
Bug fixes
* Fix combination of alias and default by kmsquire in https://github.com/yukinarit/pyserde/pull/354


**Full Changelog**: https://github.com/yukinarit/pyserde/compare/v0.10.7...v0.10.8

0.10.7

<!-- Release notes generated using configuration in .github/release.yml at main -->

What's Changed
Bug fixes
* Fix type error when calling serde as function by yukinarit in https://github.com/yukinarit/pyserde/pull/348
* Fix mypy error for flatten attribute by yukinarit in https://github.com/yukinarit/pyserde/pull/359
Refactoring
* Refactor to have more explicit type by yukinarit in https://github.com/yukinarit/pyserde/pull/346
Documentation
* Fix typo in union.md by nicoddemus in https://github.com/yukinarit/pyserde/pull/349
Other changes
* :busts_in_silhouette: Add nicoddemus as a contributor by yukinarit in https://github.com/yukinarit/pyserde/pull/350
* Fix flacky example by yukinarit in https://github.com/yukinarit/pyserde/pull/356
* Remove webapi example by yukinarit in https://github.com/yukinarit/pyserde/pull/357

New Contributors
* nicoddemus made their first contribution in https://github.com/yukinarit/pyserde/pull/349

**Full Changelog**: https://github.com/yukinarit/pyserde/compare/v0.10.6...v0.10.7

0.10.6

<!-- Release notes generated using configuration in .github/release.yml at main -->

What's Changed
Bug fixes
* Fix recursive union by yukinarit in https://github.com/yukinarit/pyserde/pull/345


**Full Changelog**: https://github.com/yukinarit/pyserde/compare/v0.10.5...v0.10.6

Page 6 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.