diff --git a/ci/deps/actions-310.yaml b/ci/deps/actions-310.yaml index ffa7732c604a0..638aaedecf2b5 100644 --- a/ci/deps/actions-310.yaml +++ b/ci/deps/actions-310.yaml @@ -27,7 +27,6 @@ dependencies: - beautifulsoup4>=4.11.1 - blosc>=1.21.0 - bottleneck>=1.3.4 - - brotlipy>=0.7.0 - fastparquet>=0.8.1 - fsspec>=2022.05.0 - html5lib>=1.1 @@ -47,7 +46,6 @@ dependencies: - pymysql>=1.0.2 - pyreadstat>=1.1.5 - pytables>=3.7.0 - - python-snappy>=0.6.1 - pyxlsb>=1.0.9 - s3fs>=2022.05.0 - scipy>=1.8.1 diff --git a/ci/deps/actions-311-downstream_compat.yaml b/ci/deps/actions-311-downstream_compat.yaml index 5a6a26c2e1ad8..4d925786c22d6 100644 --- a/ci/deps/actions-311-downstream_compat.yaml +++ b/ci/deps/actions-311-downstream_compat.yaml @@ -28,7 +28,6 @@ dependencies: - beautifulsoup4>=4.11.1 - blosc>=1.21.0 - bottleneck>=1.3.4 - - brotlipy>=0.7.0 - fastparquet>=0.8.1 - fsspec>=2022.05.0 - html5lib>=1.1 @@ -48,7 +47,6 @@ dependencies: - pymysql>=1.0.2 - pyreadstat>=1.1.5 - pytables>=3.7.0 - - python-snappy>=0.6.1 - pyxlsb>=1.0.9 - s3fs>=2022.05.0 - scipy>=1.8.1 diff --git a/ci/deps/actions-311.yaml b/ci/deps/actions-311.yaml index 9d60d734db5b3..698107341c26d 100644 --- a/ci/deps/actions-311.yaml +++ b/ci/deps/actions-311.yaml @@ -27,7 +27,6 @@ dependencies: - beautifulsoup4>=4.11.1 - blosc>=1.21.0 - bottleneck>=1.3.4 - - brotlipy>=0.7.0 - fastparquet>=0.8.1 - fsspec>=2022.05.0 - html5lib>=1.1 @@ -47,7 +46,6 @@ dependencies: - pymysql>=1.0.2 - pyreadstat>=1.1.5 # - pytables>=3.7.0, 3.8.0 is first version that supports 3.11 - - python-snappy>=0.6.1 - pyxlsb>=1.0.9 - s3fs>=2022.05.0 - scipy>=1.8.1 diff --git a/ci/deps/actions-39-minimum_versions.yaml b/ci/deps/actions-39-minimum_versions.yaml index 0e2fcf87c2d6e..a0aafb1d772a7 100644 --- a/ci/deps/actions-39-minimum_versions.yaml +++ b/ci/deps/actions-39-minimum_versions.yaml @@ -29,7 +29,6 @@ dependencies: - beautifulsoup4=4.11.1 - blosc=1.21.0 - bottleneck=1.3.4 - - brotlipy=0.7.0 - fastparquet=0.8.1 - fsspec=2022.05.0 - html5lib=1.1 @@ -49,7 +48,6 @@ dependencies: - pymysql=1.0.2 - pyreadstat=1.1.5 - pytables=3.7.0 - - python-snappy=0.6.1 - pyxlsb=1.0.9 - s3fs=2022.05.0 - scipy=1.8.1 diff --git a/ci/deps/actions-39.yaml b/ci/deps/actions-39.yaml index 6ea0d41b947dc..6c6b1de165496 100644 --- a/ci/deps/actions-39.yaml +++ b/ci/deps/actions-39.yaml @@ -27,7 +27,6 @@ dependencies: - beautifulsoup4>=4.11.1 - blosc>=1.21.0 - bottleneck>=1.3.4 - - brotlipy>=0.7.0 - fastparquet>=0.8.1 - fsspec>=2022.05.0 - html5lib>=1.1 @@ -47,7 +46,6 @@ dependencies: - pymysql>=1.0.2 - pyreadstat>=1.1.5 - pytables>=3.7.0 - - python-snappy>=0.6.1 - pyxlsb>=1.0.9 - s3fs>=2022.05.0 - scipy>=1.8.1 diff --git a/ci/deps/circle-310-arm64.yaml b/ci/deps/circle-310-arm64.yaml index df4e8e285bd02..d436e90fa6186 100644 --- a/ci/deps/circle-310-arm64.yaml +++ b/ci/deps/circle-310-arm64.yaml @@ -27,7 +27,6 @@ dependencies: - beautifulsoup4>=4.11.1 - blosc>=1.21.0 - bottleneck>=1.3.4 - - brotlipy>=0.7.0 - fastparquet>=0.8.1 - fsspec>=2022.05.0 - html5lib>=1.1 @@ -48,7 +47,6 @@ dependencies: - pymysql>=1.0.2 # - pyreadstat>=1.1.5 not available on ARM - pytables>=3.7.0 - - python-snappy>=0.6.1 - pyxlsb>=1.0.9 - s3fs>=2022.05.0 - scipy>=1.8.1 diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst index 0ab0391ac78a9..ae7c9d4ea9c62 100644 --- a/doc/source/getting_started/install.rst +++ b/doc/source/getting_started/install.rst @@ -412,8 +412,6 @@ Installable with ``pip install "pandas[compression]"`` ========================= ================== =============== ============================================================= Dependency Minimum Version pip extra Notes ========================= ================== =============== ============================================================= -brotli 0.7.0 compression Brotli compression -python-snappy 0.6.1 compression Snappy compression Zstandard 0.17.0 compression Zstandard compression ========================= ================== =============== ============================================================= diff --git a/environment.yml b/environment.yml index 3a0da0bfc703d..1a9dffb55bca7 100644 --- a/environment.yml +++ b/environment.yml @@ -27,7 +27,6 @@ dependencies: # optional dependencies - beautifulsoup4>=4.11.1 - blosc - - brotlipy>=0.7.0 - bottleneck>=1.3.4 - fastparquet>=0.8.1 - fsspec>=2022.05.0 @@ -48,7 +47,6 @@ dependencies: - pymysql>=1.0.2 - pyreadstat>=1.1.5 - pytables>=3.7.0 - - python-snappy>=0.6.1 - pyxlsb>=1.0.9 - s3fs>=2022.05.0 - scipy>=1.8.1 diff --git a/pandas/compat/_optional.py b/pandas/compat/_optional.py index fe4e6457ff08c..c5792fa1379fe 100644 --- a/pandas/compat/_optional.py +++ b/pandas/compat/_optional.py @@ -18,7 +18,6 @@ "bs4": "4.11.1", "blosc": "1.21.0", "bottleneck": "1.3.4", - "brotli": "0.7.0", "dataframe-api-compat": "0.1.7", "fastparquet": "0.8.1", "fsspec": "2022.05.0", @@ -41,7 +40,6 @@ "pyxlsb": "1.0.9", "s3fs": "2022.05.0", "scipy": "1.8.1", - "snappy": "0.6.1", "sqlalchemy": "1.4.36", "tables": "3.7.0", "tabulate": "0.8.10", @@ -60,12 +58,10 @@ INSTALL_MAPPING = { "bs4": "beautifulsoup4", "bottleneck": "Bottleneck", - "brotli": "brotlipy", "jinja2": "Jinja2", "lxml.etree": "lxml", "odf": "odfpy", "pandas_gbq": "pandas-gbq", - "snappy": "python-snappy", "sqlalchemy": "SQLAlchemy", "tables": "pytables", } @@ -75,13 +71,6 @@ def get_version(module: types.ModuleType) -> str: version = getattr(module, "__version__", None) if version is None: - if module.__name__ == "brotli": - # brotli doesn't contain attributes to confirm it's version - return "" - if module.__name__ == "snappy": - # snappy doesn't contain attributes to confirm it's version - # See https://github.com/andrix/python-snappy/pull/119 - return "" raise ImportError(f"Can't determine version for {module.__name__}") if module.__name__ == "psycopg2": # psycopg2 appends " (dt dec pq3 ext lo64)" to it's version diff --git a/pandas/core/frame.py b/pandas/core/frame.py index c2a3d9285386e..25fc5bd6664f5 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -2916,10 +2916,7 @@ def to_parquet( 'pyarrow' is unavailable. compression : str or None, default 'snappy' Name of the compression to use. Use ``None`` for no compression. - The supported compression methods actually depend on which engine - is used. For 'pyarrow', 'snappy', 'gzip', 'brotli', 'lz4', 'zstd' - are all supported. For 'fastparquet', only 'gzip' and 'snappy' are - supported. + Supported options: 'snappy', 'gzip', 'brotli', 'lz4', 'zstd'. index : bool, default None If ``True``, include the dataframe's index(es) in the file output. If ``False``, they will not be written to the file. diff --git a/pandas/io/parquet.py b/pandas/io/parquet.py index 91987e6531261..f51b98a929440 100644 --- a/pandas/io/parquet.py +++ b/pandas/io/parquet.py @@ -444,10 +444,7 @@ def to_parquet( if you wish to use its implementation. compression : {{'snappy', 'gzip', 'brotli', 'lz4', 'zstd', None}}, default 'snappy'. Name of the compression to use. Use ``None`` - for no compression. The supported compression methods actually - depend on which engine is used. For 'pyarrow', 'snappy', 'gzip', - 'brotli', 'lz4', 'zstd' are all supported. For 'fastparquet', - only 'gzip' and 'snappy' are supported. + for no compression. index : bool, default None If ``True``, include the dataframe's index(es) in the file output. If ``False``, they will not be written to the file. diff --git a/pandas/tests/io/test_parquet.py b/pandas/tests/io/test_parquet.py index fcc1c218a149d..a4c6cfcf9fe0e 100644 --- a/pandas/tests/io/test_parquet.py +++ b/pandas/tests/io/test_parquet.py @@ -404,12 +404,6 @@ def test_columns_dtypes(self, engine): @pytest.mark.parametrize("compression", [None, "gzip", "snappy", "brotli"]) def test_compression(self, engine, compression): - if compression == "snappy": - pytest.importorskip("snappy") - - elif compression == "brotli": - pytest.importorskip("brotli") - df = pd.DataFrame({"A": [1, 2, 3]}) check_round_trip(df, engine, write_kwargs={"compression": compression}) diff --git a/pyproject.toml b/pyproject.toml index c28f9259c749c..9af86a6bdcd16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,13 +81,12 @@ xml = ['lxml>=4.8.0'] plot = ['matplotlib>=3.6.1'] output_formatting = ['jinja2>=3.1.2', 'tabulate>=0.8.10'] clipboard = ['PyQt5>=5.15.6', 'qtpy>=2.2.0'] -compression = ['brotlipy>=0.7.0', 'python-snappy>=0.6.1', 'zstandard>=0.17.0'] +compression = ['zstandard>=0.17.0'] consortium-standard = ['dataframe-api-compat>=0.1.7'] all = ['beautifulsoup4>=4.11.1', # blosc only available on conda (https://github.com/Blosc/python-blosc/issues/297) #'blosc>=1.21.0', 'bottleneck>=1.3.4', - 'brotlipy>=0.7.0', 'dataframe-api-compat>=0.1.7', 'fastparquet>=0.8.1', 'fsspec>=2022.05.0', @@ -110,7 +109,6 @@ all = ['beautifulsoup4>=4.11.1', 'pytest>=7.3.2', 'pytest-xdist>=2.2.0', 'pytest-asyncio>=0.17.0', - 'python-snappy>=0.6.1', 'pyxlsb>=1.0.9', 'qtpy>=2.2.0', 'scipy>=1.8.1', diff --git a/requirements-dev.txt b/requirements-dev.txt index 0944acbc36c9b..be02007a36333 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -16,7 +16,6 @@ numpy pytz beautifulsoup4>=4.11.1 blosc -brotlipy>=0.7.0 bottleneck>=1.3.4 fastparquet>=0.8.1 fsspec>=2022.05.0 @@ -37,7 +36,6 @@ pyarrow>=7.0.0 pymysql>=1.0.2 pyreadstat>=1.1.5 tables>=3.7.0 -python-snappy>=0.6.1 pyxlsb>=1.0.9 s3fs>=2022.05.0 scipy>=1.8.1 diff --git a/scripts/tests/data/deps_expected_random.yaml b/scripts/tests/data/deps_expected_random.yaml index 35d7fe74806a9..c70025f8f019d 100644 --- a/scripts/tests/data/deps_expected_random.yaml +++ b/scripts/tests/data/deps_expected_random.yaml @@ -26,7 +26,6 @@ dependencies: - beautifulsoup4>=5.9.3 - blosc - bottleneck>=1.3.2 - - brotlipy>=0.7.0 - fastparquet>=0.6.3 - fsspec>=2021.07.0 - html5lib>=1.1 @@ -45,7 +44,6 @@ dependencies: - pymysql>=1.0.2 - pyreadstat>=1.1.2 - pytables>=3.6.1 - - python-snappy>=0.6.0 - pyxlsb>=1.0.8 - s3fs>=2021.08.0 - scipy>=1.7.1 diff --git a/scripts/tests/data/deps_minimum.toml b/scripts/tests/data/deps_minimum.toml index 6f56ca498794b..b43815a982139 100644 --- a/scripts/tests/data/deps_minimum.toml +++ b/scripts/tests/data/deps_minimum.toml @@ -77,12 +77,11 @@ xml = ['lxml>=4.6.3'] plot = ['matplotlib>=3.6.1'] output_formatting = ['jinja2>=3.0.0', 'tabulate>=0.8.9'] clipboard = ['PyQt5>=5.15.1', 'qtpy>=2.2.0'] -compression = ['brotlipy>=0.7.0', 'python-snappy>=0.6.0', 'zstandard>=0.15.2'] +compression = ['zstandard>=0.15.2'] all = ['beautifulsoup4>=5.9.3', # blosc only available on conda (https://github.com/Blosc/python-blosc/issues/297) #'blosc>=1.21.0', 'bottleneck>=1.3.2', - 'brotlipy>=0.7.0', 'fastparquet>=0.6.3', 'fsspec>=2021.07.0', 'gcsfs>=2021.07.0', @@ -104,7 +103,6 @@ all = ['beautifulsoup4>=5.9.3', 'pytest>=7.3.2', 'pytest-xdist>=2.2.0', 'pytest-asyncio>=0.17.0', - 'python-snappy>=0.6.0', 'pyxlsb>=1.0.8', 'qtpy>=2.2.0', 'scipy>=1.7.1', diff --git a/scripts/tests/data/deps_unmodified_random.yaml b/scripts/tests/data/deps_unmodified_random.yaml index 405762d33f53e..503eb3c7c7734 100644 --- a/scripts/tests/data/deps_unmodified_random.yaml +++ b/scripts/tests/data/deps_unmodified_random.yaml @@ -26,7 +26,6 @@ dependencies: - beautifulsoup4 - blosc - bottleneck>=1.3.2 - - brotlipy - fastparquet>=0.6.3 - fsspec>=2021.07.0 - html5lib>=1.1 @@ -45,7 +44,6 @@ dependencies: - pymysql>=1.0.2 - pyreadstat>=1.1.2 - pytables>=3.6.1 - - python-snappy>=0.6.0 - pyxlsb>=1.0.8 - s3fs>=2021.08.0 - scipy>=1.7.1