Skip to content

Commit 5834266

Browse files
DEP: remove python-snappy and brotli as optional dependencies (no longer used) (#54633)
* DEP: remove python-snappy as optional dependency (no longer used) * clean-up * also remove brotlipy
1 parent 70f90b7 commit 5834266

17 files changed

+4
-53
lines changed

ci/deps/actions-310.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ dependencies:
2727
- beautifulsoup4>=4.11.1
2828
- blosc>=1.21.0
2929
- bottleneck>=1.3.4
30-
- brotlipy>=0.7.0
3130
- fastparquet>=0.8.1
3231
- fsspec>=2022.05.0
3332
- html5lib>=1.1
@@ -47,7 +46,6 @@ dependencies:
4746
- pymysql>=1.0.2
4847
- pyreadstat>=1.1.5
4948
- pytables>=3.7.0
50-
- python-snappy>=0.6.1
5149
- pyxlsb>=1.0.9
5250
- s3fs>=2022.05.0
5351
- scipy>=1.8.1

ci/deps/actions-311-downstream_compat.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ dependencies:
2828
- beautifulsoup4>=4.11.1
2929
- blosc>=1.21.0
3030
- bottleneck>=1.3.4
31-
- brotlipy>=0.7.0
3231
- fastparquet>=0.8.1
3332
- fsspec>=2022.05.0
3433
- html5lib>=1.1
@@ -48,7 +47,6 @@ dependencies:
4847
- pymysql>=1.0.2
4948
- pyreadstat>=1.1.5
5049
- pytables>=3.7.0
51-
- python-snappy>=0.6.1
5250
- pyxlsb>=1.0.9
5351
- s3fs>=2022.05.0
5452
- scipy>=1.8.1

ci/deps/actions-311.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ dependencies:
2727
- beautifulsoup4>=4.11.1
2828
- blosc>=1.21.0
2929
- bottleneck>=1.3.4
30-
- brotlipy>=0.7.0
3130
- fastparquet>=0.8.1
3231
- fsspec>=2022.05.0
3332
- html5lib>=1.1
@@ -47,7 +46,6 @@ dependencies:
4746
- pymysql>=1.0.2
4847
- pyreadstat>=1.1.5
4948
# - pytables>=3.7.0, 3.8.0 is first version that supports 3.11
50-
- python-snappy>=0.6.1
5149
- pyxlsb>=1.0.9
5250
- s3fs>=2022.05.0
5351
- scipy>=1.8.1

ci/deps/actions-39-minimum_versions.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ dependencies:
2929
- beautifulsoup4=4.11.1
3030
- blosc=1.21.0
3131
- bottleneck=1.3.4
32-
- brotlipy=0.7.0
3332
- fastparquet=0.8.1
3433
- fsspec=2022.05.0
3534
- html5lib=1.1
@@ -49,7 +48,6 @@ dependencies:
4948
- pymysql=1.0.2
5049
- pyreadstat=1.1.5
5150
- pytables=3.7.0
52-
- python-snappy=0.6.1
5351
- pyxlsb=1.0.9
5452
- s3fs=2022.05.0
5553
- scipy=1.8.1

ci/deps/actions-39.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ dependencies:
2727
- beautifulsoup4>=4.11.1
2828
- blosc>=1.21.0
2929
- bottleneck>=1.3.4
30-
- brotlipy>=0.7.0
3130
- fastparquet>=0.8.1
3231
- fsspec>=2022.05.0
3332
- html5lib>=1.1
@@ -47,7 +46,6 @@ dependencies:
4746
- pymysql>=1.0.2
4847
- pyreadstat>=1.1.5
4948
- pytables>=3.7.0
50-
- python-snappy>=0.6.1
5149
- pyxlsb>=1.0.9
5250
- s3fs>=2022.05.0
5351
- scipy>=1.8.1

ci/deps/circle-310-arm64.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ dependencies:
2727
- beautifulsoup4>=4.11.1
2828
- blosc>=1.21.0
2929
- bottleneck>=1.3.4
30-
- brotlipy>=0.7.0
3130
- fastparquet>=0.8.1
3231
- fsspec>=2022.05.0
3332
- html5lib>=1.1
@@ -48,7 +47,6 @@ dependencies:
4847
- pymysql>=1.0.2
4948
# - pyreadstat>=1.1.5 not available on ARM
5049
- pytables>=3.7.0
51-
- python-snappy>=0.6.1
5250
- pyxlsb>=1.0.9
5351
- s3fs>=2022.05.0
5452
- scipy>=1.8.1

doc/source/getting_started/install.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,6 @@ Installable with ``pip install "pandas[compression]"``
412412
========================= ================== =============== =============================================================
413413
Dependency Minimum Version pip extra Notes
414414
========================= ================== =============== =============================================================
415-
brotli 0.7.0 compression Brotli compression
416-
python-snappy 0.6.1 compression Snappy compression
417415
Zstandard 0.17.0 compression Zstandard compression
418416
========================= ================== =============== =============================================================
419417

environment.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ dependencies:
2727
# optional dependencies
2828
- beautifulsoup4>=4.11.1
2929
- blosc
30-
- brotlipy>=0.7.0
3130
- bottleneck>=1.3.4
3231
- fastparquet>=0.8.1
3332
- fsspec>=2022.05.0
@@ -48,7 +47,6 @@ dependencies:
4847
- pymysql>=1.0.2
4948
- pyreadstat>=1.1.5
5049
- pytables>=3.7.0
51-
- python-snappy>=0.6.1
5250
- pyxlsb>=1.0.9
5351
- s3fs>=2022.05.0
5452
- scipy>=1.8.1

pandas/compat/_optional.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"bs4": "4.11.1",
1919
"blosc": "1.21.0",
2020
"bottleneck": "1.3.4",
21-
"brotli": "0.7.0",
2221
"dataframe-api-compat": "0.1.7",
2322
"fastparquet": "0.8.1",
2423
"fsspec": "2022.05.0",
@@ -41,7 +40,6 @@
4140
"pyxlsb": "1.0.9",
4241
"s3fs": "2022.05.0",
4342
"scipy": "1.8.1",
44-
"snappy": "0.6.1",
4543
"sqlalchemy": "1.4.36",
4644
"tables": "3.7.0",
4745
"tabulate": "0.8.10",
@@ -60,12 +58,10 @@
6058
INSTALL_MAPPING = {
6159
"bs4": "beautifulsoup4",
6260
"bottleneck": "Bottleneck",
63-
"brotli": "brotlipy",
6461
"jinja2": "Jinja2",
6562
"lxml.etree": "lxml",
6663
"odf": "odfpy",
6764
"pandas_gbq": "pandas-gbq",
68-
"snappy": "python-snappy",
6965
"sqlalchemy": "SQLAlchemy",
7066
"tables": "pytables",
7167
}
@@ -75,13 +71,6 @@ def get_version(module: types.ModuleType) -> str:
7571
version = getattr(module, "__version__", None)
7672

7773
if version is None:
78-
if module.__name__ == "brotli":
79-
# brotli doesn't contain attributes to confirm it's version
80-
return ""
81-
if module.__name__ == "snappy":
82-
# snappy doesn't contain attributes to confirm it's version
83-
# See https://github.com/andrix/python-snappy/pull/119
84-
return ""
8574
raise ImportError(f"Can't determine version for {module.__name__}")
8675
if module.__name__ == "psycopg2":
8776
# psycopg2 appends " (dt dec pq3 ext lo64)" to it's version

pandas/core/frame.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2916,10 +2916,7 @@ def to_parquet(
29162916
'pyarrow' is unavailable.
29172917
compression : str or None, default 'snappy'
29182918
Name of the compression to use. Use ``None`` for no compression.
2919-
The supported compression methods actually depend on which engine
2920-
is used. For 'pyarrow', 'snappy', 'gzip', 'brotli', 'lz4', 'zstd'
2921-
are all supported. For 'fastparquet', only 'gzip' and 'snappy' are
2922-
supported.
2919+
Supported options: 'snappy', 'gzip', 'brotli', 'lz4', 'zstd'.
29232920
index : bool, default None
29242921
If ``True``, include the dataframe's index(es) in the file output.
29252922
If ``False``, they will not be written to the file.

0 commit comments

Comments
 (0)