Skip to content

Commit

Permalink
Update version and add Pydantic v2 support check
Browse files Browse the repository at this point in the history
The package version has been updated from 0.21.0 to 0.22.0 in "__init__.py" and in "pyproject.toml" files. Given the potential compatibility issues, a check has been added and an exception is raised in "__init__.py" if Pydantic version 2 is being used, as Aiotdlib currently does not support it. Pydantic library version in the project dependency has been updated to not include version 3.
  • Loading branch information
pylakey committed Sep 22, 2023
1 parent 496a7a1 commit 4c1390a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion aiotdlib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
__version__ = "0.21.0"
__version__ = "0.22.0"

import pydantic

if pydantic.VERSION.startswith("2"):
raise NotImplementedError("Aiotdlib currently does not support Pydantic V2")

from .client import (
Client,
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "aiotdlib"
version = "0.21.0"
version = "0.22.0"
description = "Python asyncio Telegram client based on TDLib"
authors = ["pylakey <[email protected]>"]
license = "MIT"
Expand All @@ -27,7 +27,7 @@ classifiers = [

[tool.poetry.dependencies]
python = "^3.9"
pydantic = "^1.9.1"
pydantic = ">=1.9.1,<3"
sortedcontainers = "^2.4.0"
ujson = "^5.4.0"

Expand Down

0 comments on commit 4c1390a

Please sign in to comment.