Blob Blame History Raw
From 403663d123c0e96d1d6e827845d41dfe89f22edb 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 | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/requirements-tests.txt b/requirements-tests.txt
index 5cedde84d445..cff46be23d42 100644
--- a/requirements-tests.txt
+++ b/requirements-tests.txt
@@ -6,11 +6,9 @@ ruff ==0.0.275
 black == 23.3.0
 httpx >=0.23.0,<0.24.0
 email_validator >=1.1.1,<2.0.0
-# TODO: once removing databases from tutorial, upgrade SQLAlchemy
-# probably when including SQLModel
-sqlalchemy >=1.3.18,<1.4.43
+sqlalchemy >=1.4.42,<1.5.0
 peewee >=3.13.3,<4.0.0
-databases[sqlite] >=0.3.2,<0.7.0
+databases[sqlite] >=0.7.0,<0.8.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.5,<0.0.7

From 0112aba96b57eb5ff4609a2a2c9d5a45a264e9ed 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

We have SQLAlchemy pinned anyway; we are not yet concerned about
forward-compatibility with 2.0, especially in dependencies.
---
 pyproject.toml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pyproject.toml b/pyproject.toml
index 5c0d3c48ecfd..1946126206e2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -91,6 +91,9 @@ 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: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