diff --git a/ci/deps/actions-310-minimum_versions.yaml b/ci/deps/actions-310-minimum_versions.yaml index c7c72828db481..2aadf42a510eb 100644 --- a/ci/deps/actions-310-minimum_versions.yaml +++ b/ci/deps/actions-310-minimum_versions.yaml @@ -52,7 +52,7 @@ dependencies: - pyxlsb=1.0.10 - s3fs=2022.11.0 - scipy=1.10.0 - - sqlalchemy=2.0.0 + - sqlalchemy=1.4.36 - tabulate=0.9.0 - xarray=2022.12.0 - xlrd=2.0.1 diff --git a/ci/deps/actions-310.yaml b/ci/deps/actions-310.yaml index 74cab4e0970dc..5688d3143e621 100644 --- a/ci/deps/actions-310.yaml +++ b/ci/deps/actions-310.yaml @@ -50,7 +50,7 @@ dependencies: - pyxlsb>=1.0.10 - s3fs>=2022.11.0 - scipy>=1.10.0 - - sqlalchemy>=2.0.0 + - sqlalchemy>=1.4.36 - tabulate>=0.9.0 - xarray>=2022.12.0, <=2024.9.0 - xlrd>=2.0.1 diff --git a/ci/deps/actions-311-downstream_compat.yaml b/ci/deps/actions-311-downstream_compat.yaml index 092ca18d61259..7713ae0232623 100644 --- a/ci/deps/actions-311-downstream_compat.yaml +++ b/ci/deps/actions-311-downstream_compat.yaml @@ -51,7 +51,7 @@ dependencies: - pyxlsb>=1.0.10 - s3fs>=2022.11.0 - scipy>=1.10.0 - - sqlalchemy>=2.0.0 + - sqlalchemy>=1.4.36 - tabulate>=0.9.0 - xarray>=2022.12.0, <=2024.9.0 - xlrd>=2.0.1 diff --git a/ci/deps/actions-311.yaml b/ci/deps/actions-311.yaml index b6f515dceaea9..c160eae364ba2 100644 --- a/ci/deps/actions-311.yaml +++ b/ci/deps/actions-311.yaml @@ -50,7 +50,7 @@ dependencies: - pyxlsb>=1.0.10 - s3fs>=2022.11.0 - scipy>=1.10.0 - - sqlalchemy>=2.0.0 + - sqlalchemy>=1.4.36 - tabulate>=0.9.0 - xarray>=2022.12.0, <=2024.9.0 - xlrd>=2.0.1 diff --git a/ci/deps/actions-312.yaml b/ci/deps/actions-312.yaml index bc66f8a5382c9..034653d207c0b 100644 --- a/ci/deps/actions-312.yaml +++ b/ci/deps/actions-312.yaml @@ -50,7 +50,7 @@ dependencies: - pyxlsb>=1.0.10 - s3fs>=2022.11.0 - scipy>=1.10.0 - - sqlalchemy>=2.0.0 + - sqlalchemy>=1.4.36 - tabulate>=0.9.0 - xarray>=2022.12.0, <=2024.9.0 - xlrd>=2.0.1 diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst index bda959f380e8a..5d11e9574091e 100644 --- a/doc/source/getting_started/install.rst +++ b/doc/source/getting_started/install.rst @@ -287,7 +287,7 @@ Traditional drivers are installable with ``pip install "pandas[postgresql, mysql ================================================================== ================== =============== ============================================ Dependency Minimum Version pip extra Notes ================================================================== ================== =============== ============================================ -`SQLAlchemy `__ 2.0.0 postgresql, SQL support for databases other than sqlite +`SQLAlchemy `__ 1.4.36 postgresql, SQL support for databases other than sqlite mysql, sql-other `psycopg2 `__ 2.9.6 postgresql PostgreSQL engine for sqlalchemy diff --git a/doc/source/whatsnew/v2.3.0.rst b/doc/source/whatsnew/v2.3.0.rst index 230332319e0ac..d830dd8277ea9 100644 --- a/doc/source/whatsnew/v2.3.0.rst +++ b/doc/source/whatsnew/v2.3.0.rst @@ -38,6 +38,7 @@ Other enhancements - :meth:`Series.str.decode` result now has ``StringDtype`` when ``future.infer_string`` is True (:issue:`60709`) - :meth:`~Series.to_hdf` and :meth:`~DataFrame.to_hdf` now round-trip with ``StringDtype`` (:issue:`60663`) - Improved ``repr`` of :class:`.NumpyExtensionArray` to account for NEP51 (:issue:`61085`) +- Reverted the minimum version for the ``sqlalchemy`` optional dependency back to ``1.4.36`` (:issue:`57049`) - The :meth:`Series.str.decode` has gained the argument ``dtype`` to control the dtype of the result (:issue:`60940`) - The :meth:`~Series.cumsum`, :meth:`~Series.cummin`, and :meth:`~Series.cummax` reductions are now implemented for ``StringDtype`` columns (:issue:`60633`) - The :meth:`~Series.sum` reduction is now implemented for ``StringDtype`` columns (:issue:`59853`) diff --git a/environment.yml b/environment.yml index 0c170d05316f6..704bf5d767b86 100644 --- a/environment.yml +++ b/environment.yml @@ -54,7 +54,7 @@ dependencies: - pyxlsb>=1.0.10 - s3fs>=2022.11.0 - scipy>=1.10.0 - - sqlalchemy>=2.0.0 + - sqlalchemy>=1.4.36 - tabulate>=0.9.0 - xarray>=2022.12.0, <=2024.9.0 - xlrd>=2.0.1 diff --git a/pandas/compat/_optional.py b/pandas/compat/_optional.py index 6b90389a62056..1d5a68c8f5d8a 100644 --- a/pandas/compat/_optional.py +++ b/pandas/compat/_optional.py @@ -47,7 +47,7 @@ "pyxlsb": "1.0.10", "s3fs": "2022.11.0", "scipy": "1.10.0", - "sqlalchemy": "2.0.0", + "sqlalchemy": "1.4.36", "tables": "3.8.0", "tabulate": "0.9.0", "xarray": "2022.12.0", diff --git a/pyproject.toml b/pyproject.toml index b17a76d700b89..7db85f0037d33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,9 +72,9 @@ hdf5 = [# blosc only available on conda (https://github.com/Blosc/python-blosc/i #'blosc>=1.20.1', 'tables>=3.8.0'] spss = ['pyreadstat>=1.2.0'] -postgresql = ['SQLAlchemy>=2.0.0', 'psycopg2>=2.9.6', 'adbc-driver-postgresql>=0.10.0'] -mysql = ['SQLAlchemy>=2.0.0', 'pymysql>=1.0.2'] -sql-other = ['SQLAlchemy>=2.0.0', 'adbc-driver-postgresql>=0.10.0', 'adbc-driver-sqlite>=0.8.0'] +postgresql = ['SQLAlchemy>=1.4.36', 'psycopg2>=2.9.6', 'adbc-driver-postgresql>=0.10.0'] +mysql = ['SQLAlchemy>=1.4.36', 'pymysql>=1.0.2'] +sql-other = ['SQLAlchemy>=1.4.36', 'adbc-driver-postgresql>=0.10.0', 'adbc-driver-sqlite>=0.8.0'] html = ['beautifulsoup4>=4.11.2', 'html5lib>=1.1', 'lxml>=4.9.2'] xml = ['lxml>=4.9.2'] plot = ['matplotlib>=3.6.3'] @@ -113,7 +113,7 @@ all = ['adbc-driver-postgresql>=0.10.0', 'qtpy>=2.3.0', 'scipy>=1.10.0', 's3fs>=2022.11.0', - 'SQLAlchemy>=2.0.0', + 'SQLAlchemy>=1.4.36', 'tables>=3.8.0', 'tabulate>=0.9.0', 'xarray>=2022.12.0', diff --git a/requirements-dev.txt b/requirements-dev.txt index c386a5a9c8c6e..5607f2fe97fd9 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -43,7 +43,7 @@ pytz>=2023.4 pyxlsb>=1.0.10 s3fs>=2022.11.0 scipy>=1.10.0 -SQLAlchemy>=2.0.0 +SQLAlchemy>=1.4.36 tabulate>=0.9.0 xarray>=2022.12.0, <=2024.9.0 xlrd>=2.0.1