From 46c54e44403c5b5d914cf60f13c16d044868fe97 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Mon, 4 Mar 2024 16:18:51 +0000 Subject: Drop support for Pydantic 1.X --- docs/changelog.rst | 1 + poetry.lock | 2 +- pydis_core/utils/paste_service.py | 2 +- pyproject.toml | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 474adc8a..83a3af7a 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,7 @@ Changelog ========= +- :breaking:`208` Drop support for Pydantic 1.X - :breaking:`207` Enable more ruff linting rules. See :literal-url:`GitHub release notes ` for breaking changes. - :support:`206` Bump ruff from 0.1.15 to 0.2.2, using the new lint config namespace, and linting with the new rules. - :support:`204` Document the instance attributes of :obj:`pydis_core.BotBase`. diff --git a/poetry.lock b/poetry.lock index 855125f7..7c072a07 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2051,4 +2051,4 @@ async-rediscache = ["async-rediscache"] [metadata] lock-version = "2.0" python-versions = "3.10.* || 3.11.*" -content-hash = "012783d11abde1a1db5165482a61de9a342e6dd3f2a0ecba5f56777486af4e7f" +content-hash = "10074d9691a66b5086362d12ff78bc54028382f17b3b512d942e7d47c6b7d86d" diff --git a/pydis_core/utils/paste_service.py b/pydis_core/utils/paste_service.py index 0c15b588..140e6cdc 100644 --- a/pydis_core/utils/paste_service.py +++ b/pydis_core/utils/paste_service.py @@ -109,7 +109,7 @@ async def send_to_paste_service( payload = { "expiry": "30days", "long": "on", # Use a longer URI for the paste. - "files": [file.dict() for file in files] # Use file.model_dump() when we drop support for pydantic 1.X + "files": [file.model_dump() for file in files] } for attempt in range(1, FAILED_REQUEST_ATTEMPTS + 1): try: diff --git a/pyproject.toml b/pyproject.toml index 80e916d8..25d8317e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ python = "3.10.* || 3.11.*" "discord.py" = "~=2.3.2" async-rediscache = { version = "1.0.0rc2", extras = ["fakeredis"], optional = true } -pydantic = ">=1.7.4,<3.0.0" +pydantic = "~=2.6" statsd = "~=4.0" aiodns = "~=3.1" -- cgit v1.2.3