Skip to content

Commit

Permalink
Pydantic>=2.2 supported
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaspuff committed Nov 23, 2023
1 parent e3c8397 commit 3a0156d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ sum(amounts)

### Use in Pydantic models

`Money` objects can be used in Pydantic models and used with Pydantic's JSON serialization and validation – the same goes for `Number` and `Currency` objects as well.
`Money` objects can be used in Pydantic (`Pydantic>=2.2` supported) models and used with Pydantic's JSON serialization and validation – the same goes for `Number` and `Currency` objects as well. Specify the `stockholm.Money` type as the field type and you're good to go.

```python
from pydantic import BaseModel
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ codecov = { version = ">=2.1.10", markers = "sys_platform != \"win32\"" }
protobuf = { version = ">=3.20.0,<5.0.0", markers = "sys_platform != \"win32\"" }
types-protobuf = { version = ">=0.1.13", markers = "sys_platform != \"win32\"" }
setuptools = { version = ">=68.1.2", markers = "sys_platform != \"win32\"" }
pydantic = { version = ">=2.5", markers = "sys_platform != \"win32\"" }
pydantic = { version = ">=2.2", markers = "sys_platform != \"win32\"" }

[tool.poetry.extras]
protobuf = ["protobuf"]
Expand Down

0 comments on commit 3a0156d

Please sign in to comment.