diff --git a/CHANGELOG.md b/CHANGELOG.md index bf6a7409..873e7866 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed +* Updated SQLAlchemy from version 1.4 to 2.0 + ## [0.15.8] ### Changed * supporting python versions 3.8, 3.9, 3.10, 3.11 diff --git a/entropylab/pipeline/params/persistence/sqlalchemy/alembic/env.py b/entropylab/pipeline/params/persistence/sqlalchemy/alembic/env.py index 4919512b..8f1178e4 100644 --- a/entropylab/pipeline/params/persistence/sqlalchemy/alembic/env.py +++ b/entropylab/pipeline/params/persistence/sqlalchemy/alembic/env.py @@ -1,8 +1,6 @@ from logging.config import fileConfig from alembic import context -from sqlalchemy import engine_from_config -from sqlalchemy import pool from entropylab.pipeline.params.persistence.sqlalchemy.model import Base @@ -59,24 +57,10 @@ def run_migrations_online() -> None: and associate a connection with the context. """ - connectable = config.attributes.get("connection", None) - - if connectable is None: - # only create Engine if we don't have a Connection - # from the outside - connectable = engine_from_config( - config.get_section(config.config_ini_section), - prefix="sqlalchemy.", - poolclass=pool.NullPool, - ) - - # when connectable is already a Connection object, calling - # connect() gives us a *branched connection*. - with connectable.connect() as connection: - context.configure(connection=connection, target_metadata=target_metadata) - - with context.begin_transaction(): - context.run_migrations() + connection = config.attributes["connection"] + context.configure(connection=connection, target_metadata=target_metadata) + with context.begin_transaction(): + context.run_migrations() if context.is_offline_mode(): diff --git a/entropylab/pipeline/params/persistence/sqlalchemy/sqlalchemypersistence.py b/entropylab/pipeline/params/persistence/sqlalchemy/sqlalchemypersistence.py index 4208d1f6..6df189de 100644 --- a/entropylab/pipeline/params/persistence/sqlalchemy/sqlalchemypersistence.py +++ b/entropylab/pipeline/params/persistence/sqlalchemy/sqlalchemypersistence.py @@ -1,5 +1,6 @@ import os import uuid +from uuid import UUID from pathlib import Path from typing import Optional, Set, List @@ -8,7 +9,7 @@ from alembic.config import Config from sqlalchemy import create_engine, text from sqlalchemy.engine import Connection -from sqlalchemy.orm import sessionmaker +from sqlalchemy.orm import sessionmaker, close_all_sessions from entropylab.pipeline.api.errors import EntropyError from entropylab.pipeline.params.persistence.persistence import Persistence, Commit @@ -17,7 +18,7 @@ TempTable, ) -TEMP_COMMIT_ID = "00000000-0000-0000-0000-000000000000" +TEMP_COMMIT_ID = UUID("00000000-0000-0000-0000-000000000000") class SqlAlchemyPersistence(Persistence): @@ -57,7 +58,7 @@ def _abs_path_to(rel_path: str) -> str: return os.path.join(source_dir, rel_path) def close(self): - self.__session_maker.close_all() + close_all_sessions() def get_commit( self, commit_id: Optional[str] = None, commit_num: Optional[int] = None @@ -66,7 +67,7 @@ def get_commit( with self.__session_maker() as session: commit = ( session.query(CommitTable) - .filter(CommitTable.id == commit_id) + .filter(CommitTable.id == UUID(commit_id)) .one_or_none() ) if commit: @@ -108,7 +109,7 @@ def commit( # TODO: Perhaps create the timestamp here? self.stamp_dirty_params_with_commit(commit, dirty_keys) commit_table = CommitTable() - commit_table.id = commit.id + commit_table.id = UUID(commit.id) commit_table.timestamp = commit.timestamp commit_table.label = commit.label commit_table.params = commit.params @@ -116,7 +117,7 @@ def commit( with self.__session_maker() as session: session.add(commit_table) session.commit() - return commit_table.id + return commit.id @staticmethod def __generate_commit_id() -> str: diff --git a/entropylab/pipeline/params/persistence/sqlalchemy/tests/test_sqlalchemypersistence.py b/entropylab/pipeline/params/persistence/sqlalchemy/tests/test_sqlalchemypersistence.py index 128dad32..f3cc7df1 100644 --- a/entropylab/pipeline/params/persistence/sqlalchemy/tests/test_sqlalchemypersistence.py +++ b/entropylab/pipeline/params/persistence/sqlalchemy/tests/test_sqlalchemypersistence.py @@ -23,13 +23,17 @@ def target(tmp_path) -> SqlAlchemyPersistence: def test_ctor_creates_schema(target): - cursor = target.engine.execute("SELECT sql FROM sqlite_master WHERE type = 'table'") - assert len(cursor.fetchall()) == 3 + with target.engine.connect() as connection: + cursor = connection.execute( + text("SELECT sql FROM sqlite_master WHERE type = 'table'") + ) + assert len(cursor.fetchall()) == 3 def test_ctor_stamps_head(target): - cursor = target.engine.execute("SELECT version_num FROM alembic_version") - assert cursor.first() == ("000c6a88457f",) + with target.engine.connect() as connection: + cursor = connection.execute(text("SELECT version_num FROM alembic_version")) + assert cursor.first() == ("000c6a88457f",) """ get_commit """ @@ -37,11 +41,11 @@ def test_ctor_stamps_head(target): def test_get_commit_when_commit_id_exists_then_commit_is_returned(target): commit_id = "f74c808e-2388-4b0a-a051-17eb9eb14339" - with target.engine.connect() as connection: + with target.engine.begin() as connection: connection.execute( text( "INSERT INTO 'commit' VALUES " - f"('{commit_id}', '{pd.Timestamp.now()}', 'bar', '0', '0');" + f"('{UUID(commit_id).hex}', '{pd.Timestamp.now()}', 'bar', '0', '0');" ) ) actual = target.get_commit(commit_id) @@ -50,20 +54,20 @@ def test_get_commit_when_commit_id_exists_then_commit_is_returned(target): def test_get_commit_when_commit_id_does_not_exist_then_error_is_raised(target): with pytest.raises(EntropyError): - target.get_commit("foo") + target.get_commit("f74c808e-2388-4b0a-a051-17eb9eb14339") def test_get_commit_when_commit_num_exists_then_commit_is_returned(target): commit_id1 = "f74c808e-2388-4b0a-a051-17eb9eb11111" commit_id2 = "f74c808e-2388-4b0a-a051-17eb9eb22222" commit_id3 = "f74c808e-2388-4b0a-a051-17eb9eb33333" - with target.engine.connect() as connection: + with target.engine.begin() as connection: connection.execute( text( "INSERT INTO 'commit' VALUES " - f"('{commit_id1}', '{pd.Timestamp.now()}', 'bar', '0', '0')," - f"('{commit_id2}', '{pd.Timestamp.now()}', 'bar', '0', '0')," - f"('{commit_id3}', '{pd.Timestamp.now()}', 'bar', '0', '0');" + f"('{UUID(commit_id1).hex}', '{pd.Timestamp.now()}', 'bar', '0', '0')," + f"('{UUID(commit_id2).hex}', '{pd.Timestamp.now()}', 'bar', '0', '0')," + f"('{UUID(commit_id3).hex}', '{pd.Timestamp.now()}', 'bar', '0', '0');" ) ) actual = target.get_commit(commit_num=2) diff --git a/entropylab/pipeline/results_backend/sqlalchemy/alembic/env.py b/entropylab/pipeline/results_backend/sqlalchemy/alembic/env.py index fda85f38..3c78ea1b 100644 --- a/entropylab/pipeline/results_backend/sqlalchemy/alembic/env.py +++ b/entropylab/pipeline/results_backend/sqlalchemy/alembic/env.py @@ -1,8 +1,6 @@ from logging.config import fileConfig from alembic import context -from sqlalchemy import engine_from_config -from sqlalchemy import pool # this is the Alembic Config object, which provides # access to the values within the .ini file in use. @@ -61,24 +59,10 @@ def run_migrations_online(): https://alembic.sqlalchemy.org/en/latest/cookbook.html#connection-sharing """ - connectable = config.attributes.get("connection", None) - - if connectable is None: - # only create Engine if we don't have a Connection - # from the outside - connectable = engine_from_config( - config.get_section(config.config_ini_section), - prefix="sqlalchemy.", - poolclass=pool.NullPool, - ) - - # when connectable is already a Connection object, calling - # connect() gives us a *branched connection*. - with connectable.connect() as connection: - context.configure(connection=connection, target_metadata=target_metadata) - - with context.begin_transaction(): - context.run_migrations() + connection = config.attributes["connection"] + context.configure(connection=connection, target_metadata=target_metadata) + with context.begin_transaction(): + context.run_migrations() if context.is_offline_mode(): diff --git a/entropylab/pipeline/results_backend/sqlalchemy/db.py b/entropylab/pipeline/results_backend/sqlalchemy/db.py index 489c0240..2022c2f3 100644 --- a/entropylab/pipeline/results_backend/sqlalchemy/db.py +++ b/entropylab/pipeline/results_backend/sqlalchemy/db.py @@ -1,17 +1,16 @@ from datetime import datetime +from contextlib import contextmanager from typing import List, TypeVar, Optional, ContextManager, Iterable, Union, Any from typing import Set from warnings import warn import jsonpickle -import pandas as pd from pandas import DataFrame from plotly import graph_objects as go -from sqlalchemy import desc +from sqlalchemy import text, desc from sqlalchemy.exc import DBAPIError from sqlalchemy.orm import sessionmaker, Session from sqlalchemy.sql import Selectable -from sqlalchemy.util.compat import contextmanager from entropylab.components.instrument_driver import Function, Parameter from entropylab.components.lab_model import ( @@ -336,11 +335,12 @@ def __get_last_result_of_experiment_from_sqlalchemy( def custom_query(self, query: Union[str, Selectable]) -> DataFrame: with self._session_maker() as sess: if isinstance(query, str): - selectable = query + selectable = text(query) else: selectable = query.statement - return pd.read_sql(selectable, sess.bind) + result = sess.execute(selectable) + return DataFrame(result.all(), columns=result.keys()) def _execute_transaction(self, transaction): with self._session_maker() as sess: @@ -350,7 +350,8 @@ def _execute_transaction(self, transaction): @staticmethod def _query_pandas(query): - return pd.read_sql(query.statement, query.session.bind) + result = query.session.execute(query.statement) + return DataFrame(result.all(), columns=result.keys()) @contextmanager def _session_maker(self) -> ContextManager[Session]: diff --git a/entropylab/pipeline/results_backend/sqlalchemy/db_initializer.py b/entropylab/pipeline/results_backend/sqlalchemy/db_initializer.py index 7ffa6fb0..5e34d8df 100644 --- a/entropylab/pipeline/results_backend/sqlalchemy/db_initializer.py +++ b/entropylab/pipeline/results_backend/sqlalchemy/db_initializer.py @@ -4,7 +4,7 @@ from typing import TypeVar, Type, Tuple import sqlalchemy.engine -from sqlalchemy import create_engine +from sqlalchemy import create_engine, text from sqlalchemy.orm import sessionmaker from entropylab.logger import logger @@ -117,10 +117,11 @@ def _validate_path(path): ) def _db_is_empty(self) -> bool: - cursor = self._engine.execute( - "SELECT sql FROM sqlite_master WHERE type = 'table'" - ) - return len(cursor.fetchall()) == 0 + with self._engine.connect() as connection: + cursor = connection.execute( + text("SELECT sql FROM sqlite_master WHERE type = 'table'") + ) + return len(cursor.fetchall()) == 0 class _DbUpgrader: diff --git a/entropylab/pipeline/results_backend/sqlalchemy/model.py b/entropylab/pipeline/results_backend/sqlalchemy/model.py index 5e750aa7..24d77771 100644 --- a/entropylab/pipeline/results_backend/sqlalchemy/model.py +++ b/entropylab/pipeline/results_backend/sqlalchemy/model.py @@ -18,8 +18,7 @@ Enum, Boolean, ) -from sqlalchemy.ext.declarative import declarative_base -from sqlalchemy.orm import relationship +from sqlalchemy.orm import declarative_base, relationship from entropylab.logger import logger from entropylab.pipeline.api.data_reader import ( diff --git a/entropylab/pipeline/results_backend/sqlalchemy/tests/test_db_upgrader.py b/entropylab/pipeline/results_backend/sqlalchemy/tests/test_db_upgrader.py index 3950740b..cb1dd342 100644 --- a/entropylab/pipeline/results_backend/sqlalchemy/tests/test_db_upgrader.py +++ b/entropylab/pipeline/results_backend/sqlalchemy/tests/test_db_upgrader.py @@ -2,7 +2,7 @@ import shutil import pytest -from sqlalchemy import create_engine +from sqlalchemy import create_engine, text from entropylab import SqlAlchemyDB, RawResultData from entropylab.conftest import _copy_template @@ -76,9 +76,12 @@ def test_upgrade_db_when_initial_db_is_empty(initialized_project_dir_path): engine = create_engine( f"sqlite:///{initialized_project_dir_path}/{_ENTROPY_DIRNAME}/{_DB_FILENAME}" ) - cur = engine.execute("SELECT sql FROM sqlite_master WHERE name = 'Results'") - res = cur.fetchone() - cur.close() + with engine.connect() as connection: + cur = connection.execute( + text("SELECT sql FROM sqlite_master WHERE name = 'Results'") + ) + res = cur.fetchone() + cur.close() assert "saved_in_hdf5" in res[0] @@ -88,9 +91,12 @@ def test_upgrade_db_when_db_is_in_memory(): # act target.upgrade_db() # assert - cur = target._engine.execute("SELECT sql FROM sqlite_master WHERE name = 'Results'") - res = cur.fetchone() - cur.close() + with target._engine.connect() as connection: + cur = connection.execute( + text("SELECT sql FROM sqlite_master WHERE name = 'Results'") + ) + res = cur.fetchone() + cur.close() assert "saved_in_hdf5" in res[0] @@ -112,8 +118,9 @@ def test__migrate_results_to_hdf5(initialized_project_dir_path): ) hdf5_results = storage.get_result_records() assert len(list(hdf5_results)) == 5 - cur = target._engine.execute("SELECT * FROM Results WHERE saved_in_hdf5 = 1") - res = cur.all() + with target._engine.connect() as connection: + cur = connection.execute(text("SELECT * FROM Results WHERE saved_in_hdf5 = 1")) + res = cur.all() assert len(res) == 5 @@ -135,10 +142,11 @@ def test__migrate_metadata_to_hdf5(initialized_project_dir_path): ) hdf5_metadata = storage.get_metadata_records() assert len(list(hdf5_metadata)) == 5 - cur = target._engine.execute( - "SELECT * FROM ExperimentMetadata WHERE saved_in_hdf5 = 1" - ) - res = cur.all() + with target._engine.connect() as connection: + cur = connection.execute( + text("SELECT * FROM ExperimentMetadata WHERE saved_in_hdf5 = 1") + ) + res = cur.all() assert len(res) == 5 @@ -205,14 +213,16 @@ def test_upgrade_db_deletes_results_and_metadata_from_sqlite( # act target.upgrade_db() # assert for results - cur = target._engine.execute("SELECT * FROM Results WHERE saved_in_hdf5 = 1") - res = cur.all() + with target._engine.connect() as connection: + cur = connection.execute(text("SELECT * FROM Results WHERE saved_in_hdf5 = 1")) + res = cur.all() assert len(res) == 0 # assert for metadata - cur = target._engine.execute( - "SELECT * FROM ExperimentMetadata WHERE saved_in_hdf5 = 1" - ) - res = cur.all() + with target._engine.connect() as connection: + cur = connection.execute( + text("SELECT * FROM ExperimentMetadata WHERE saved_in_hdf5 = 1") + ) + res = cur.all() assert len(res) == 0 @@ -230,8 +240,11 @@ def test_upgrade_db_adds_favorite_column_to_experiments_table( target = _DbUpgrader(initialized_project_dir_path) # act target.upgrade_db() - cur = target._engine.execute( - "SELECT COUNT(*) FROM pragma_table_info('Experiments') WHERE name='favorite'; " - ) - res = cur.all() + with target._engine.connect() as connection: + cur = connection.execute( + text( + "SELECT COUNT(*) FROM pragma_table_info('Experiments') WHERE name='favorite'; " + ) + ) + res = cur.all() assert res[0][0] == 1 diff --git a/entropylab/pipeline/results_backend/sqlalchemy/tests/test_migrations.py b/entropylab/pipeline/results_backend/sqlalchemy/tests/test_migrations.py index 75f5924e..276da5ba 100644 --- a/entropylab/pipeline/results_backend/sqlalchemy/tests/test_migrations.py +++ b/entropylab/pipeline/results_backend/sqlalchemy/tests/test_migrations.py @@ -1,4 +1,5 @@ import pytest +from sqlalchemy import text from entropylab import SqlAlchemyDB @@ -8,9 +9,12 @@ def test_ctor_creates_up_to_date_schema_when_in_memory(path: str): # act target = SqlAlchemyDB(path=path, echo=True) # assert - cur = target._engine.execute("SELECT sql FROM sqlite_master WHERE name = 'Results'") - res = cur.fetchone() - cur.close() + with target._engine.connect() as connection: + cur = connection.execute( + text("SELECT sql FROM sqlite_master WHERE name = 'Results'") + ) + res = cur.fetchone() + cur.close() assert "saved_in_hdf5" in res[0] diff --git a/poetry.lock b/poetry.lock index 30819bdc..986c3393 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.4.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. [[package]] name = "alembic" @@ -2481,78 +2481,81 @@ files = [ [[package]] name = "sqlalchemy" -version = "1.4.47" +version = "2.0.7" description = "Database Abstraction Library" category = "main" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" -files = [ - {file = "SQLAlchemy-1.4.47-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:dcfb480bfc9e1fab726003ae00a6bfc67a29bad275b63a4e36d17fe7f13a624e"}, - {file = "SQLAlchemy-1.4.47-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:28fda5a69d6182589892422c5a9b02a8fd1125787aab1d83f1392aa955bf8d0a"}, - {file = "SQLAlchemy-1.4.47-cp27-cp27m-win32.whl", hash = "sha256:45e799c1a41822eba6bee4e59b0e38764e1a1ee69873ab2889079865e9ea0e23"}, - {file = "SQLAlchemy-1.4.47-cp27-cp27m-win_amd64.whl", hash = "sha256:10edbb92a9ef611f01b086e271a9f6c1c3e5157c3b0c5ff62310fb2187acbd4a"}, - {file = "SQLAlchemy-1.4.47-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:7a4df53472c9030a8ddb1cce517757ba38a7a25699bbcabd57dcc8a5d53f324e"}, - {file = "SQLAlchemy-1.4.47-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:511d4abc823152dec49461209607bbfb2df60033c8c88a3f7c93293b8ecbb13d"}, - {file = "SQLAlchemy-1.4.47-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dbe57f39f531c5d68d5594ea4613daa60aba33bb51a8cc42f96f17bbd6305e8d"}, - {file = "SQLAlchemy-1.4.47-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ca8ab6748e3ec66afccd8b23ec2f92787a58d5353ce9624dccd770427ee67c82"}, - {file = "SQLAlchemy-1.4.47-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:299b5c5c060b9fbe51808d0d40d8475f7b3873317640b9b7617c7f988cf59fda"}, - {file = "SQLAlchemy-1.4.47-cp310-cp310-win32.whl", hash = "sha256:684e5c773222781775c7f77231f412633d8af22493bf35b7fa1029fdf8066d10"}, - {file = "SQLAlchemy-1.4.47-cp310-cp310-win_amd64.whl", hash = "sha256:2bba39b12b879c7b35cde18b6e14119c5f1a16bd064a48dd2ac62d21366a5e17"}, - {file = "SQLAlchemy-1.4.47-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:795b5b9db573d3ed61fae74285d57d396829e3157642794d3a8f72ec2a5c719b"}, - {file = "SQLAlchemy-1.4.47-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:989c62b96596b7938cbc032e39431e6c2d81b635034571d6a43a13920852fb65"}, - {file = "SQLAlchemy-1.4.47-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e3b67bda733da1dcdccaf354e71ef01b46db483a4f6236450d3f9a61efdba35a"}, - {file = "SQLAlchemy-1.4.47-cp311-cp311-win32.whl", hash = "sha256:9a198f690ac12a3a807e03a5a45df6a30cd215935f237a46f4248faed62e69c8"}, - {file = "SQLAlchemy-1.4.47-cp311-cp311-win_amd64.whl", hash = "sha256:03be6f3cb66e69fb3a09b5ea89d77e4bc942f3bf84b207dba84666a26799c166"}, - {file = "SQLAlchemy-1.4.47-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:16ee6fea316790980779268da47a9260d5dd665c96f225d28e7750b0bb2e2a04"}, - {file = "SQLAlchemy-1.4.47-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:557675e0befafa08d36d7a9284e8761c97490a248474d778373fb96b0d7fd8de"}, - {file = "SQLAlchemy-1.4.47-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:bb2797fee8a7914fb2c3dc7de404d3f96eb77f20fc60e9ee38dc6b0ca720f2c2"}, - {file = "SQLAlchemy-1.4.47-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28297aa29e035f29cba6b16aacd3680fbc6a9db682258d5f2e7b49ec215dbe40"}, - {file = "SQLAlchemy-1.4.47-cp36-cp36m-win32.whl", hash = "sha256:998e782c8d9fd57fa8704d149ccd52acf03db30d7dd76f467fd21c1c21b414fa"}, - {file = "SQLAlchemy-1.4.47-cp36-cp36m-win_amd64.whl", hash = "sha256:dde4d02213f1deb49eaaf8be8a6425948963a7af84983b3f22772c63826944de"}, - {file = "SQLAlchemy-1.4.47-cp37-cp37m-macosx_10_15_x86_64.whl", hash = "sha256:e98ef1babe34f37f443b7211cd3ee004d9577a19766e2dbacf62fce73c76245a"}, - {file = "SQLAlchemy-1.4.47-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:14a3879853208a242b5913f3a17c6ac0eae9dc210ff99c8f10b19d4a1ed8ed9b"}, - {file = "SQLAlchemy-1.4.47-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:7120a2f72599d4fed7c001fa1cbbc5b4d14929436135768050e284f53e9fbe5e"}, - {file = "SQLAlchemy-1.4.47-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:048509d7f3ac27b83ad82fd96a1ab90a34c8e906e4e09c8d677fc531d12c23c5"}, - {file = "SQLAlchemy-1.4.47-cp37-cp37m-win32.whl", hash = "sha256:6572d7c96c2e3e126d0bb27bfb1d7e2a195b68d951fcc64c146b94f088e5421a"}, - {file = "SQLAlchemy-1.4.47-cp37-cp37m-win_amd64.whl", hash = "sha256:a6c3929df5eeaf3867724003d5c19fed3f0c290f3edc7911616616684f200ecf"}, - {file = "SQLAlchemy-1.4.47-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:71d4bf7768169c4502f6c2b0709a02a33703544f611810fb0c75406a9c576ee1"}, - {file = "SQLAlchemy-1.4.47-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd45c60cc4f6d68c30d5179e2c2c8098f7112983532897566bb69c47d87127d3"}, - {file = "SQLAlchemy-1.4.47-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0fdbb8e9d4e9003f332a93d6a37bca48ba8095086c97a89826a136d8eddfc455"}, - {file = "SQLAlchemy-1.4.47-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f216a51451a0a0466e082e163591f6dcb2f9ec182adb3f1f4b1fd3688c7582c"}, - {file = "SQLAlchemy-1.4.47-cp38-cp38-win32.whl", hash = "sha256:bd988b3362d7e586ef581eb14771bbb48793a4edb6fcf62da75d3f0f3447060b"}, - {file = "SQLAlchemy-1.4.47-cp38-cp38-win_amd64.whl", hash = "sha256:32ab09f2863e3de51529aa84ff0e4fe89a2cb1bfbc11e225b6dbc60814e44c94"}, - {file = "SQLAlchemy-1.4.47-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:07764b240645627bc3e82596435bd1a1884646bfc0721642d24c26b12f1df194"}, - {file = "SQLAlchemy-1.4.47-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1e2a42017984099ef6f56438a6b898ce0538f6fadddaa902870c5aa3e1d82583"}, - {file = "SQLAlchemy-1.4.47-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6b6d807c76c20b4bc143a49ad47782228a2ac98bdcdcb069da54280e138847fc"}, - {file = "SQLAlchemy-1.4.47-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6a94632ba26a666e7be0a7d7cc3f7acab622a04259a3aa0ee50ff6d44ba9df0d"}, - {file = "SQLAlchemy-1.4.47-cp39-cp39-win32.whl", hash = "sha256:f80915681ea9001f19b65aee715115f2ad310730c8043127cf3e19b3009892dd"}, - {file = "SQLAlchemy-1.4.47-cp39-cp39-win_amd64.whl", hash = "sha256:fc700b862e0a859a37faf85367e205e7acaecae5a098794aff52fdd8aea77b12"}, - {file = "SQLAlchemy-1.4.47.tar.gz", hash = "sha256:95fc02f7fc1f3199aaa47a8a757437134cf618e9d994c84effd53f530c38586f"}, +python-versions = ">=3.7" +files = [ + {file = "SQLAlchemy-2.0.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7917632606fc5d4be661dcde45cc415df835e594e2c50cc999a44f24b6bf6d92"}, + {file = "SQLAlchemy-2.0.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:32f508fef9c5a7d19411d94ef64cf5405e42c4689e51ddbb81ac9a7be045cce8"}, + {file = "SQLAlchemy-2.0.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b0995b92612979d208189245bf87349ad9243b97b49652347a28ddee0803225a"}, + {file = "SQLAlchemy-2.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cebd161f964af58290596523c65e41a5a161a99f7212b1ae675e288a4b5e0a7c"}, + {file = "SQLAlchemy-2.0.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c38641f5c3714505d65dbbd8fb1350408b9ad8461769ec8e440e1177f9c92d1d"}, + {file = "SQLAlchemy-2.0.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:921485d1f69ed016e1f756de67d02ad4f143eb6b92b9776bfff78786d8978ab5"}, + {file = "SQLAlchemy-2.0.7-cp310-cp310-win32.whl", hash = "sha256:a65a8fd09bdffd63fa23b39cd902e6a4ca23d86ecfe129513e43767a1f3e91fb"}, + {file = "SQLAlchemy-2.0.7-cp310-cp310-win_amd64.whl", hash = "sha256:d2e7411d5ea164c6f4d003f5d4f5e72e202956aaa7496b95bb4a4c39669e001c"}, + {file = "SQLAlchemy-2.0.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:432cfd77642771ee7ea0dd0f3fb664f18506a3625eab6e6d5d1d771569171270"}, + {file = "SQLAlchemy-2.0.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ce076e25f1170000b4ecdc57a1ff8a70dbe4a5648ec3da0563ef3064e8db4f15"}, + {file = "SQLAlchemy-2.0.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:14854bdb2a35af536d14f77dfa8dbc20e1bb1972996d64c4147e0d3165c9aaf5"}, + {file = "SQLAlchemy-2.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9020125e3be677c64d4dda7048e247343f1663089cf268a4cc98c957adb7dbe0"}, + {file = "SQLAlchemy-2.0.7-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:fb649c5473f79c9a7b6133f53a31f4d87de14755c79224007eb7ec76e628551e"}, + {file = "SQLAlchemy-2.0.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:33f73cc45ffa050f5c3b60ff4490e0ae9e02701461c1600d5ede1b008076b1b9"}, + {file = "SQLAlchemy-2.0.7-cp311-cp311-win32.whl", hash = "sha256:0789e199fbce8cb1775337afc631ed12bcc5463dd77d7a06b8dafd758cde51f8"}, + {file = "SQLAlchemy-2.0.7-cp311-cp311-win_amd64.whl", hash = "sha256:013f4f330001e84a2b0ef1f2c9bd73169c79d582e54e1a144be1be1dbc911711"}, + {file = "SQLAlchemy-2.0.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4339110be209fea37a2bb4f35f1127c7562a0393e9e6df5d9a65cc4f5c167cb6"}, + {file = "SQLAlchemy-2.0.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e7e61e2e4dfe175dc3510889e44eda1c32f55870d6950ef40519640cb266704d"}, + {file = "SQLAlchemy-2.0.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d44ff7573016fc26311b5a5c54d5656fb9e0c39e138bc8b81cb7c8667485203"}, + {file = "SQLAlchemy-2.0.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:57b80e877eb6ec63295835f8a3b86ca3a44829f80c4748e1b019e03adea550fc"}, + {file = "SQLAlchemy-2.0.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e90f0be674e0845c5c1ccfa5e31c9ee28fd406546a61afc734355cc7ea1f8f8b"}, + {file = "SQLAlchemy-2.0.7-cp37-cp37m-win32.whl", hash = "sha256:e735a635126b2338dfd3a0863b675437cb53d85885a7602b8cffb24345df33ed"}, + {file = "SQLAlchemy-2.0.7-cp37-cp37m-win_amd64.whl", hash = "sha256:ea1c63e61b5c13161c8468305f0a5837c80aae2070e33654c68dd12572b638eb"}, + {file = "SQLAlchemy-2.0.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cc337b96ec59ef29907eeadc2ac11188739281568f14c719e61550ca6d201a41"}, + {file = "SQLAlchemy-2.0.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0eac488be90dd3f7a655d2e34fa59e1305fccabc4abfbd002e3a72ae10bd2f89"}, + {file = "SQLAlchemy-2.0.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b8ab8f90f4a13c979e6c41c9f011b655c1b9ae2df6cffa8fa2c7c4d740f3512e"}, + {file = "SQLAlchemy-2.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc370d53fee7408330099c4bcc2573a107757b203bc61f114467dfe586a0c7bd"}, + {file = "SQLAlchemy-2.0.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:494db0026918e3f707466a1200a5dedbf254a4bce01a3115fd95f04ba8258f09"}, + {file = "SQLAlchemy-2.0.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:486015a58c9a67f65a15b4f19468b35b97cee074ae55386a9c240f1da308fbfe"}, + {file = "SQLAlchemy-2.0.7-cp38-cp38-win32.whl", hash = "sha256:5f7c40ec2e3b31293184020daba95850832bea523a08496ac89b27a5276ec804"}, + {file = "SQLAlchemy-2.0.7-cp38-cp38-win_amd64.whl", hash = "sha256:3da3dff8d9833a7d7f66a3c45a79a3955f775c79f47bb7eea266d0b4c267b17a"}, + {file = "SQLAlchemy-2.0.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:774965c41b71c8ebe3c5728bf5b9a948231fc3a0422d9fdace0686f5bb689ad6"}, + {file = "SQLAlchemy-2.0.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:94556a2a7fc3de094ea056b62845e2e6e271e26d1e1b2540a1cd2d2506257a10"}, + {file = "SQLAlchemy-2.0.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f15c54713a8dd57a01c974c9f96476688f6f6374d348819ed7e459535844b614"}, + {file = "SQLAlchemy-2.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea9461f6955f3cf9eff6eeec271686caed7792c76f5b966886a36a42ea46e6b2"}, + {file = "SQLAlchemy-2.0.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:18795e87601b4244fd08b542cd6bff9ef674b17bcd34e4a3c9935398e2cc762c"}, + {file = "SQLAlchemy-2.0.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0b698440c477c00bdedff87348b19a79630a235864a8f4378098d61079c16ce9"}, + {file = "SQLAlchemy-2.0.7-cp39-cp39-win32.whl", hash = "sha256:38e26cf6b9b4c6c37846f7e31b42e4d664b35f055691265f07e06aeb6167c494"}, + {file = "SQLAlchemy-2.0.7-cp39-cp39-win_amd64.whl", hash = "sha256:a6f7d1debb233f1567d700ebcdde0781a0b63db0ef266246dfbf75ae41bfdf85"}, + {file = "SQLAlchemy-2.0.7-py3-none-any.whl", hash = "sha256:fc67667c8e8c04e5c3250ab2cd51df40bc7c28c7c253d0475b377eff86fe4bb0"}, + {file = "SQLAlchemy-2.0.7.tar.gz", hash = "sha256:a4c1e1582492c66dfacc9eab52738f3e64d9a2a380e412668f75aa06e540f649"}, ] [package.dependencies] -greenlet = {version = "!=0.4.17", markers = "python_version >= \"3\" and platform_machine == \"aarch64\" or python_version >= \"3\" and platform_machine == \"ppc64le\" or python_version >= \"3\" and platform_machine == \"x86_64\" or python_version >= \"3\" and platform_machine == \"amd64\" or python_version >= \"3\" and platform_machine == \"AMD64\" or python_version >= \"3\" and platform_machine == \"win32\" or python_version >= \"3\" and platform_machine == \"WIN32\""} +greenlet = {version = "!=0.4.17", markers = "platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\""} importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} +typing-extensions = ">=4.2.0" [package.extras] aiomysql = ["aiomysql", "greenlet (!=0.4.17)"] aiosqlite = ["aiosqlite", "greenlet (!=0.4.17)", "typing-extensions (!=3.10.0.1)"] asyncio = ["greenlet (!=0.4.17)"] -asyncmy = ["asyncmy (>=0.2.3,!=0.2.4)", "greenlet (!=0.4.17)"] -mariadb-connector = ["mariadb (>=1.0.1,!=1.1.2)"] +asyncmy = ["asyncmy (>=0.2.3,!=0.2.4,!=0.2.6)", "greenlet (!=0.4.17)"] +mariadb-connector = ["mariadb (>=1.0.1,!=1.1.2,!=1.1.5)"] mssql = ["pyodbc"] mssql-pymssql = ["pymssql"] mssql-pyodbc = ["pyodbc"] -mypy = ["mypy (>=0.910)", "sqlalchemy2-stubs"] -mysql = ["mysqlclient (>=1.4.0)", "mysqlclient (>=1.4.0,<2)"] +mypy = ["mypy (>=0.910)"] +mysql = ["mysqlclient (>=1.4.0)"] mysql-connector = ["mysql-connector-python"] -oracle = ["cx-oracle (>=7)", "cx-oracle (>=7,<8)"] +oracle = ["cx-oracle (>=7)"] +oracle-oracledb = ["oracledb (>=1.0.1)"] postgresql = ["psycopg2 (>=2.7)"] postgresql-asyncpg = ["asyncpg", "greenlet (!=0.4.17)"] -postgresql-pg8000 = ["pg8000 (>=1.16.6,!=1.29.0)"] +postgresql-pg8000 = ["pg8000 (>=1.29.1)"] +postgresql-psycopg = ["psycopg (>=3.0.7)"] postgresql-psycopg2binary = ["psycopg2-binary"] postgresql-psycopg2cffi = ["psycopg2cffi"] -pymysql = ["pymysql", "pymysql (<1)"] +pymysql = ["pymysql"] sqlcipher = ["sqlcipher3-binary"] [[package]] @@ -2774,4 +2777,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = ">3.7.1,<3.11" -content-hash = "5edb991e498f295619e3e6e0899855d8d7f1079e65e4daff4b6e7be3480d9578" +content-hash = "4b15e0f483a35468c702ee65d6edb4e17b864b2e542c115b5eb6c03933e7b3f0" diff --git a/pyproject.toml b/pyproject.toml index 7e99bbbb..d1c57036 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ n3p = 'entropylab.cli.main:main' [tool.poetry.dependencies] python = ">3.7.1,<3.11" -sqlalchemy = "^1.4.0" +sqlalchemy = "^2.0.7" bokeh = "^2.3.0" param = "^1.10.1" dill = "^0.3.3"