From 489a322f2a80566da4a236c4888cf32d8b977a5a Mon Sep 17 00:00:00 2001 From: Nitish Satyavolu Date: Thu, 20 Feb 2025 23:40:46 -0800 Subject: [PATCH 1/4] BUG: Revert SQLAlchemy minimum version back to 1.4.36 --- ci/deps/actions-310-minimum_versions.yaml | 2 +- ci/deps/actions-310.yaml | 2 +- ci/deps/actions-311-downstream_compat.yaml | 2 +- ci/deps/actions-311.yaml | 2 +- ci/deps/actions-312.yaml | 2 +- doc/source/getting_started/install.rst | 2 +- environment.yml | 2 +- pandas/compat/_optional.py | 2 +- pyproject.toml | 2 +- requirements-dev.txt | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) 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/environment.yml b/environment.yml index 69647a436e3ad..0107cfc93a9fb 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 b7d53b0d8934a..b106431daf081 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 fb4d9cdb589ca..219f7a8338b4f 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 From 5d430a78b38c666a80612346003be7ee92903f91 Mon Sep 17 00:00:00 2001 From: Nitish Satyavolu Date: Fri, 21 Feb 2025 11:58:15 -0800 Subject: [PATCH 2/4] Update pyproject.toml --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b106431daf081..0b4d85c0a62f1 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'] From 67c758bd2e1bc0bc271a8b70caae99c33dd10655 Mon Sep 17 00:00:00 2001 From: "snitish.iitk@gmail.com" Date: Wed, 26 Feb 2025 13:20:00 -0600 Subject: [PATCH 3/4] Add whatsnew note to v2.3.0.rst --- doc/source/whatsnew/v2.3.0.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/source/whatsnew/v2.3.0.rst b/doc/source/whatsnew/v2.3.0.rst index 09134763977c3..06d4ab15ee2f1 100644 --- a/doc/source/whatsnew/v2.3.0.rst +++ b/doc/source/whatsnew/v2.3.0.rst @@ -37,6 +37,7 @@ Other enhancements updated to work correctly with NumPy >= 2 (:issue:`57739`) - :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`) +- 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`) From 01f2fd488c65ff45135cc47957c81c20bd4f8a26 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 10:19:07 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- doc/source/whatsnew/v2.3.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v2.3.0.rst b/doc/source/whatsnew/v2.3.0.rst index 719b43fa64156..d830dd8277ea9 100644 --- a/doc/source/whatsnew/v2.3.0.rst +++ b/doc/source/whatsnew/v2.3.0.rst @@ -37,8 +37,8 @@ Other enhancements updated to work correctly with NumPy >= 2 (:issue:`57739`) - :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`) -- Reverted the minimum version for the ``sqlalchemy`` optional dependency back to ``1.4.36`` (:issue:`57049`) - 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`)