Skip to content

Fix snappy version #46347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/deps/actions-310.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ dependencies:
- pytables
- pyarrow
- pyreadstat
- python-snappy
- pyxlsb
- s3fs
- scipy
- snappy
- sqlalchemy
- tabulate
- xarray
Expand Down
6 changes: 3 additions & 3 deletions ci/deps/actions-38-downstream_compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ dependencies:
- odfpy
- pandas-gbq
- psycopg2
- pymysql
- pytables
- pyarrow
- pymysql
- pyreadstat
- pytables
- python-snappy
- pyxlsb
- s3fs
- scipy
- snappy
- sqlalchemy
- tabulate
- xarray
Expand Down
6 changes: 3 additions & 3 deletions ci/deps/actions-38-minimum_versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ dependencies:
- openpyxl=3.0.3
- pandas-gbq=0.14.0
- psycopg2=2.8.4
- pymysql=0.10.1
- pytables=3.6.1
- pyarrow=1.0.1
- pymysql=0.10.1
- pyreadstat=1.1.0
- pytables=3.6.1
- python-snappy=0.6.0
- pyxlsb=1.0.6
- s3fs=0.4.0
- scipy=1.4.1
- snappy=1.1.8
- sqlalchemy=1.4.0
- tabulate=0.8.7
- xarray=0.15.1
Expand Down
6 changes: 3 additions & 3 deletions ci/deps/actions-38.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ dependencies:
- odfpy
- pandas-gbq
- psycopg2
- pymysql
- pytables
- pyarrow
- pymysql
- pyreadstat
- pytables
- python-snappy
- pyxlsb
- s3fs
- scipy
- snappy
- sqlalchemy
- tabulate
- xarray
Expand Down
4 changes: 2 additions & 2 deletions ci/deps/actions-39.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ dependencies:
- pandas-gbq
- psycopg2
- pymysql
- pytables
- pyarrow
- pyreadstat
- pytables
- python-snappy
- pyxlsb
- s3fs
- scipy
- snappy
- sqlalchemy
- tabulate
- xarray
Expand Down
2 changes: 1 addition & 1 deletion doc/source/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,6 @@ Compression
Dependency Minimum Version Notes
========================= ================== =============================================================
brotli 0.7.0 Brotli compression
snappy 1.1.8 Snappy compression
python-snappy 0.6.0 Snappy compression
Zstandard 0.15.2 Zstandard compression
========================= ================== =============================================================
11 changes: 8 additions & 3 deletions pandas/compat/_optional.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"pyxlsb": "1.0.6",
"s3fs": "0.4.0",
"scipy": "1.4.1",
"snappy": "1.1.8",
"snappy": "0.6.0",
"sqlalchemy": "1.4.0",
"tables": "3.6.1",
"tabulate": "0.8.7",
Expand All @@ -53,12 +53,13 @@
"bs4": "beautifulsoup4",
"bottleneck": "Bottleneck",
"brotli": "brotlipy",
"jinja2": "Jinja2",
"lxml.etree": "lxml",
"odf": "odfpy",
"pandas_gbq": "pandas-gbq",
"tables": "pytables",
"snappy": "python-snappy",
"sqlalchemy": "SQLAlchemy",
"jinja2": "Jinja2",
"tables": "pytables",
}


Expand All @@ -72,6 +73,10 @@ def get_version(module: types.ModuleType) -> str:
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

snappy.__version__ for me says "3.0.3"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you confusing it with https://snappy.math.uic.edu/?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good catch!

# 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
Expand Down