From cfef5b8bfb0cb1f13ba7852985a26947e9a6b9fa Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Sun, 18 Dec 2022 11:19:34 -0500
Subject: [PATCH 1/2] Upgrade databases and SQLAlchemy
Incompatibilities with recent SQLAlchemy versions are fixed in databases
0.7.0.
---
requirements-tests.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/requirements-tests.txt b/requirements-tests.txt
index a5586c5cef63..c2f4272e9b16 100644
--- a/requirements-tests.txt
+++ b/requirements-tests.txt
@@ -9,8 +9,8 @@ email_validator >=1.1.1,<3.0.0
dirty-equals ==0.6.0
# TODO: once removing databases from tutorial, upgrade SQLAlchemy
# probably when including SQLModel
-sqlalchemy >=1.3.18,<1.4.43
-databases[sqlite] >=0.3.2,<0.7.0
+sqlalchemy >=1.4.42,<1.5.0
+databases[sqlite] >=0.7.0,<0.9.0
orjson >=3.2.1,<4.0.0
ujson >=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,<6.0.0
python-multipart >=0.0.7,<0.1.0
From 03cb89bb4d9519da81fe0c9f52c21ea3f3f827ee Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Mon, 16 Jan 2023 19:19:56 -0500
Subject: [PATCH 2/2] Ignore SQLAlchemy RemovedIn20Warning from FastAPI and
Pydandic
We have SQLAlchemy pinned anyway; we are not yet concerned about
forward-compatibility with 2.0, especially in dependencies.
---
pyproject.toml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pyproject.toml b/pyproject.toml
index c23e82ef4709..acd63895271f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -101,6 +101,10 @@ filterwarnings = [
"error",
# TODO: needed by asyncio in Python 3.9.7 https://bugs.python.org/issue45097, try to remove on 3.9.8
'ignore:The loop argument is deprecated since Python 3\.8, and scheduled for removal in Python 3\.10:DeprecationWarning:asyncio',
+ # We have SQLAlchemy pinned anyway; we are not yet concerned about
+ # forward-compatibility with 2.0, especially in dependencies.
+ 'ignore::sqlalchemy.exc.RemovedIn20Warning:fastapi',
+ 'ignore::sqlalchemy.exc.RemovedIn20Warning:pydantic',
'ignore:starlette.middleware.wsgi is deprecated and will be removed in a future release\..*:DeprecationWarning:starlette',
# TODO: remove after upgrading HTTPX to a version newer than 0.23.0
# Including PR: https://github.com/encode/httpx/pull/2309