Skip to content

Commit 0421050

Browse files
authored
Merge pull request #236 from yukinarit/bump-to-0.8.0
chore: Bump version to 0.8.0
2 parents 7c8408b + ba7580f commit 0421050

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

CHANGELOG.md

+36
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
## `0.8.0` (2022-05-31)
2+
3+
4+
Thanks to the contribution by [@kigawas](https://github.com/kigawas), pyserde can optionally use [orjson](supports://github.com/ijl/orjson) as JSON serializer!
5+
```
6+
pip install pyserde[orjson]
7+
```
8+
If orjson is installed in the system, pyserde automatically use orjson in [to_json](https://yukinarit.github.io/pyserde/api/serde/json.html#to_json)/[from_json](https://yukinarit.github.io/pyserde/api/serde/json.html#from_json).
9+
10+
**NOTE:** In order to align the JSON (de)serializer to orjson, a few parameters are passed in `json.dumps` internally. This would lead to a breaking change in some cases. If you need the same behaviour as in pyserde<0.8, please explicitely pass those parameters in `serde.json.to_json`. 🙇‍♂️
11+
```python
12+
to_json(obj, ensure_ascii=True, separators=(", ", ": "))
13+
```
14+
15+
Other noteble chage is we have `@dataclass` decorator back in the all example and test code in the repository as shown below. It's because we found mypy isn't able to deduce the type correctly without `@dataclass` decorator. If you are not mypy user, you can still declare a class with only `@serde` decorator. 👍 For more information, please read [the docs](https://yukinarit.github.io/pyserde/guide/features/decorators.html).
16+
17+
```python
18+
@serde
19+
@dataclass # <-- Recommended to add @dataclass if you are mypy user.
20+
class Foo:
21+
i: int
22+
s: str
23+
f: float
24+
b: bool
25+
```
26+
27+
* build: Add "orjson" extras ([ea70ec1](https://github.com/yukinarit/pyserde/commit/ea70ec1))
28+
* orjson support ([2744675](https://github.com/yukinarit/pyserde/commit/2744675))
29+
* Update json.py ([2d67b65](https://github.com/yukinarit/pyserde/commit/2d67b65))
30+
* feat: Support class declaration w/wo dataclass ([a35f909](https://github.com/yukinarit/pyserde/commit/a35f909))
31+
* fix: Add dataclass decorator for all example code ([60567ab](https://github.com/yukinarit/pyserde/commit/60567ab))
32+
* fix: Treat <type>|None as Optional ([5555452](https://github.com/yukinarit/pyserde/commit/5555452))
33+
* Fix the default deserializer for custom class deserializer ([6c2245b](https://github.com/yukinarit/pyserde/commit/6c2245b))
34+
35+
This release had contributions from 1 person: [@kigawas](https://github.com/kigawas). Thank you so much! :tada: :joy:
36+
137
## `0.7.3` (2022-05-10)
238

339
Thanks to the great contribution by [@kmsquire](https://github.com/kmsquire), pyserde supports some numpy types!

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pyserde"
3-
version = "0.7.3"
3+
version = "0.8.0"
44
description = "Yet another serialization library on top of dataclasses"
55
authors = ["yukinarit <[email protected]>"]
66
license = "MIT"

0 commit comments

Comments
 (0)