From 9756d6637da4f6f7932cca7c30194d1aa24b1f8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 18:42:04 +0000 Subject: [PATCH 1/4] pip(deps): update sqlalchemy requirement from <2,>=1.4.44 to >=2.0.52,<3 Updates the requirements on [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) to permit the latest version. - [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases) - [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES.rst) - [Commits](https://github.com/sqlalchemy/sqlalchemy/commits) --- updated-dependencies: - dependency-name: sqlalchemy dependency-version: 2.0.52 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index bc42ef2e..32e62a40 100644 --- a/requirements.txt +++ b/requirements.txt @@ -39,7 +39,7 @@ idna>=3.15.0 simplejson six>=1.12.0 # see also: safety 51668, https://github.com/sqlalchemy/sqlalchemy/pull/8563 -sqlalchemy>=1.4.44,<2 # pyup: ignore +sqlalchemy>=2.0.52,<3 # pyup: ignore # see also: safety 42194, https://github.com/kvesteri/sqlalchemy-utils/issues/166, not fixed since 2015 sqlalchemy-utils==0.42.1 # pyup: ignore threddsclient>=0.4.7 From 534cecd1d21c79720bfdb26979a3010e8bafd497 Mon Sep 17 00:00:00 2001 From: Francis Charette Migneault Date: Mon, 24 Aug 2026 17:23:29 -0400 Subject: [PATCH 2/4] drop 'convert_unicode' obsolete with 'sqlalchemy>=2' --- magpie/alembic/env.py | 4 ++-- magpie/db.py | 2 -- requirements.txt | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/magpie/alembic/env.py b/magpie/alembic/env.py index fb4bc903..fbd3e7e4 100644 --- a/magpie/alembic/env.py +++ b/magpie/alembic/env.py @@ -78,14 +78,14 @@ def connect(_connection=None): if isinstance(_connection, Connection) and not _connection.closed: return _connection if not isinstance(_connection, Connectable): - _connection = create_engine(url, convert_unicode=True, echo=False) + _connection = create_engine(url, echo=False) return _connection.connect() if not database_exists(url): db_name = get_constant("MAGPIE_POSTGRES_DB") LOGGER.warning("Database [%s] not found, attempting creation...", db_name) create_database(url, encoding="utf8", template="template0") - connection = create_engine(url, convert_unicode=True, echo=False) + connection = create_engine(url, echo=False) # retry connection and run migration with connect(connection) as migrate_conn: diff --git a/magpie/db.py b/magpie/db.py index 8886f0c3..eb00ce90 100644 --- a/magpie/db.py +++ b/magpie/db.py @@ -90,8 +90,6 @@ def get_engine(container=None, prefix="sqlalchemy.", **kwargs): settings = get_settings(container or {}) settings[prefix + "url"] = get_db_url(settings=settings) settings.setdefault(prefix + "pool_pre_ping", True) - kwargs = kwargs or {} - kwargs["convert_unicode"] = True return engine_from_config(settings, prefix, **kwargs) diff --git a/requirements.txt b/requirements.txt index 32e62a40..1203c6ff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -38,10 +38,8 @@ requests_file idna>=3.15.0 simplejson six>=1.12.0 -# see also: safety 51668, https://github.com/sqlalchemy/sqlalchemy/pull/8563 -sqlalchemy>=2.0.52,<3 # pyup: ignore -# see also: safety 42194, https://github.com/kvesteri/sqlalchemy-utils/issues/166, not fixed since 2015 -sqlalchemy-utils==0.42.1 # pyup: ignore +sqlalchemy>=2.0.52,<3 +sqlalchemy-utils==0.42.1 threddsclient>=0.4.7 transaction typing_extensions From d94d23a96b5b5afa0ec0b4d922f07088e26f8c44 Mon Sep 17 00:00:00 2001 From: Francis Charette Migneault Date: Mon, 24 Aug 2026 17:28:08 -0400 Subject: [PATCH 3/4] update changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 0d1fe63d..40cce675 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,6 +9,12 @@ Changes `Unreleased `_ (latest) ------------------------------------------------------------------------------------ +Features / Changes +~~~~~~~~~~~~~~~~~~~~~ + +* Update ``sqlalchemy>=2``. +* Security updates to Python and Docker dependencies. + Bug Fixes ~~~~~~~~~ From b78956fc4da5e222123dabf0ea1acd3a3696247c Mon Sep 17 00:00:00 2001 From: Francis Charette-Migneault Date: Thu, 3 Sep 2026 16:32:36 -0400 Subject: [PATCH 4/4] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index da7db96b..c3fc2668 100644 --- a/requirements.txt +++ b/requirements.txt @@ -37,6 +37,7 @@ requests>=2.32.5 requests_file idna>=3.15.0 simplejson +six>=1.17.0 sqlalchemy>=2.0.52,<3 # see also: safety 42194, https://github.com/kvesteri/sqlalchemy-utils/issues/166, not fixed since 2015 sqlalchemy-utils==0.42.1 # pyup: ignore