Skip to content

Commit 46e1dc4

Browse files
mroeschkeyehoshuadimarsky
authored andcommitted
DEPS: Bump optional dependencies (pandas-dev#47048)
1 parent f36f22c commit 46e1dc4

File tree

11 files changed

+99
-139
lines changed

11 files changed

+99
-139
lines changed

ci/deps/actions-38-minimum_versions.yaml

+23-24
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,37 @@ dependencies:
2020
- numpy=1.18.5
2121
- pytz=2020.1
2222

23-
# optional dependencies, markupsafe for jinja2
24-
- beautifulsoup4=4.8.2
25-
- blosc=1.20.1
26-
- bottleneck=1.3.1
23+
# optional dependencies
24+
- beautifulsoup4=4.9.3
25+
- blosc=1.21.0
26+
- bottleneck=1.3.2
2727
- brotlipy=0.7.0
2828
- fastparquet=0.4.0
29-
- fsspec=0.7.4
29+
- fsspec=2021.05.0
3030
- html5lib=1.1
31-
- hypothesis=5.5.3
32-
- gcsfs=0.6.0
33-
- jinja2=2.11
34-
- lxml=4.5.0
35-
- markupsafe=2.0.1
31+
- hypothesis=6.13.0
32+
- gcsfs=2021.05.0
33+
- jinja2=3.0.0
34+
- lxml=4.6.3
3635
- matplotlib=3.3.2
37-
- numba=0.50.1
38-
- numexpr=2.7.1
36+
- numba=0.53.1
37+
- numexpr=2.7.3
3938
- odfpy=1.4.1
40-
- openpyxl=3.0.3
41-
- pandas-gbq=0.14.0
42-
- psycopg2=2.8.4
39+
- openpyxl=3.0.7
40+
- pandas-gbq=0.15.0
41+
- psycopg2=2.8.6
4342
- pyarrow=1.0.1
44-
- pymysql=0.10.1
45-
- pyreadstat=1.1.0
43+
- pymysql=1.0.2
44+
- pyreadstat=1.1.2
4645
- pytables=3.6.1
4746
- python-snappy=0.6.0
48-
- pyxlsb=1.0.6
49-
- s3fs=0.4.0
50-
- scipy=1.4.1
51-
- sqlalchemy=1.4.0
52-
- tabulate=0.8.7
53-
- xarray=0.15.1
47+
- pyxlsb=1.0.8
48+
- s3fs=2021.05.0
49+
- scipy=1.7.1
50+
- sqlalchemy=1.4.16
51+
- tabulate=0.8.9
52+
- xarray=0.19.0
5453
- xlrd=2.0.1
55-
- xlsxwriter=1.2.2
54+
- xlsxwriter=1.4.3
5655
- xlwt=1.3.0
5756
- zstandard=0.15.2

doc/source/whatsnew/v1.5.0.rst

+44-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,50 @@ If installed, we now require:
363363
+=================+=================+==========+=========+
364364
| mypy (dev) | 0.950 | | X |
365365
+-----------------+-----------------+----------+---------+
366-
366+
| beautifulsoup4 | 4.9.3 | | X |
367+
+-----------------+-----------------+----------+---------+
368+
| blosc | 1.21.0 | | X |
369+
+-----------------+-----------------+----------+---------+
370+
| bottleneck | 1.3.2 | | X |
371+
+-----------------+-----------------+----------+---------+
372+
| fsspec | 2021.05.0 | | X |
373+
+-----------------+-----------------+----------+---------+
374+
| hypothesis | 6.13.0 | | X |
375+
+-----------------+-----------------+----------+---------+
376+
| gcsfs | 2021.05.0 | | X |
377+
+-----------------+-----------------+----------+---------+
378+
| jinja2 | 3.0.0 | | X |
379+
+-----------------+-----------------+----------+---------+
380+
| lxml | 4.6.3 | | X |
381+
+-----------------+-----------------+----------+---------+
382+
| numba | 0.53.1 | | X |
383+
+-----------------+-----------------+----------+---------+
384+
| numexpr | 2.7.3 | | X |
385+
+-----------------+-----------------+----------+---------+
386+
| openpyxl | 3.0.7 | | X |
387+
+-----------------+-----------------+----------+---------+
388+
| pandas-gbq | 0.15.0 | | X |
389+
+-----------------+-----------------+----------+---------+
390+
| psycopg2 | 2.8.6 | | X |
391+
+-----------------+-----------------+----------+---------+
392+
| pymysql | 1.0.2 | | X |
393+
+-----------------+-----------------+----------+---------+
394+
| pyreadstat | 1.1.2 | | X |
395+
+-----------------+-----------------+----------+---------+
396+
| pyxlsb | 1.0.8 | | X |
397+
+-----------------+-----------------+----------+---------+
398+
| s3fs | 2021.05.0 | | X |
399+
+-----------------+-----------------+----------+---------+
400+
| scipy | 1.7.1 | | X |
401+
+-----------------+-----------------+----------+---------+
402+
| sqlalchemy | 1.4.16 | | X |
403+
+-----------------+-----------------+----------+---------+
404+
| tabulate | 0.8.9 | | X |
405+
+-----------------+-----------------+----------+---------+
406+
| xarray | 0.19.0 | | X |
407+
+-----------------+-----------------+----------+---------+
408+
| xlsxwriter | 1.4.3 | | X |
409+
+-----------------+-----------------+----------+---------+
367410

368411
For `optional libraries <https://pandas.pydata.org/docs/getting_started/install.html>`_ the general recommendation is to use the latest version.
369412
The following table lists the lowest version per library that is currently being tested throughout the development of pandas.

pandas/compat/_optional.py

+22-23
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,39 @@
1010
# Update install.rst when updating versions!
1111

1212
VERSIONS = {
13-
"bs4": "4.8.2",
14-
"blosc": "1.20.1",
15-
"bottleneck": "1.3.1",
13+
"bs4": "4.9.3",
14+
"blosc": "1.21.0",
15+
"bottleneck": "1.3.2",
1616
"brotli": "0.7.0",
1717
"fastparquet": "0.4.0",
18-
"fsspec": "0.7.4",
18+
"fsspec": "2021.05.0",
1919
"html5lib": "1.1",
20-
"hypothesis": "5.5.3",
21-
"gcsfs": "0.6.0",
22-
"jinja2": "2.11",
23-
"lxml.etree": "4.5.0",
24-
"markupsafe": "2.0.1",
20+
"hypothesis": "6.13.0",
21+
"gcsfs": "2021.05.0",
22+
"jinja2": "3.0.0",
23+
"lxml.etree": "4.6.3",
2524
"matplotlib": "3.3.2",
26-
"numba": "0.50.1",
27-
"numexpr": "2.7.1",
25+
"numba": "0.53.1",
26+
"numexpr": "2.7.3",
2827
"odfpy": "1.4.1",
29-
"openpyxl": "3.0.3",
30-
"pandas_gbq": "0.14.0",
31-
"psycopg2": "2.8.4", # (dt dec pq3 ext lo64)
32-
"pymysql": "0.10.1",
28+
"openpyxl": "3.0.7",
29+
"pandas_gbq": "0.15.0",
30+
"psycopg2": "2.8.6", # (dt dec pq3 ext lo64)
31+
"pymysql": "1.0.2",
3332
"pyarrow": "1.0.1",
34-
"pyreadstat": "1.1.0",
33+
"pyreadstat": "1.1.2",
3534
"pytest": "6.0",
36-
"pyxlsb": "1.0.6",
37-
"s3fs": "0.4.0",
38-
"scipy": "1.4.1",
35+
"pyxlsb": "1.0.8",
36+
"s3fs": "2021.05.0",
37+
"scipy": "1.7.1",
3938
"snappy": "0.6.0",
40-
"sqlalchemy": "1.4.0",
39+
"sqlalchemy": "1.4.16",
4140
"tables": "3.6.1",
42-
"tabulate": "0.8.7",
43-
"xarray": "0.15.1",
41+
"tabulate": "0.8.9",
42+
"xarray": "0.19.0",
4443
"xlrd": "2.0.1",
4544
"xlwt": "1.3.0",
46-
"xlsxwriter": "1.2.2",
45+
"xlsxwriter": "1.4.3",
4746
"zstandard": "0.15.2",
4847
}
4948

-10.1 KB
Binary file not shown.

pandas/tests/io/excel/__init__.py

-15
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
import pytest
22

3-
from pandas.compat._optional import (
4-
get_version,
5-
import_optional_dependency,
6-
)
7-
8-
from pandas.util.version import Version
9-
103
pytestmark = [
114
pytest.mark.filterwarnings(
125
# Looks like tree.getiterator is deprecated in favor of tree.iter
@@ -25,11 +18,3 @@
2518
"ignore:.*In xlrd >= 2.0, only the xls format is supported:FutureWarning"
2619
),
2720
]
28-
29-
30-
if import_optional_dependency("xlrd", errors="ignore") is None:
31-
xlrd_version = None
32-
else:
33-
import xlrd
34-
35-
xlrd_version = Version(get_version(xlrd))

pandas/tests/io/excel/test_readers.py

+1-20
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
Series,
2222
)
2323
import pandas._testing as tm
24-
from pandas.tests.io.excel import xlrd_version
25-
from pandas.util.version import Version
2624

2725
read_ext_params = [".xls", ".xlsx", ".xlsm", ".xlsb", ".ods"]
2826
engine_params = [
@@ -69,12 +67,7 @@ def _is_valid_engine_ext_pair(engine, read_ext: str) -> bool:
6967
return False
7068
if read_ext == ".xlsb" and engine != "pyxlsb":
7169
return False
72-
if (
73-
engine == "xlrd"
74-
and xlrd_version is not None
75-
and xlrd_version >= Version("2")
76-
and read_ext != ".xls"
77-
):
70+
if engine == "xlrd" and read_ext != ".xls":
7871
return False
7972
return True
8073

@@ -1527,18 +1520,6 @@ def test_excel_read_binary_via_read_excel(self, read_ext, engine):
15271520
expected = pd.read_excel("test1" + read_ext, engine=engine)
15281521
tm.assert_frame_equal(result, expected)
15291522

1530-
@pytest.mark.skipif(
1531-
xlrd_version is not None and xlrd_version >= Version("2"),
1532-
reason="xlrd no longer supports xlsx",
1533-
)
1534-
def test_excel_high_surrogate(self):
1535-
# GH 23809
1536-
expected = DataFrame(["\udc88"], columns=["Column1"])
1537-
1538-
# should not produce a segmentation violation
1539-
actual = pd.read_excel("high_surrogate.xlsx", engine="xlrd")
1540-
tm.assert_frame_equal(expected, actual)
1541-
15421523
@pytest.mark.parametrize("filename", ["df_empty.xlsx", "df_equals.xlsx"])
15431524
def test_header_with_index_col(self, filename):
15441525
# GH 33476

pandas/tests/io/excel/test_writers.py

+1-13
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
option_context,
2222
)
2323
import pandas._testing as tm
24-
from pandas.util.version import Version
2524

2625
from pandas.io.excel import (
2726
ExcelFile,
@@ -1091,8 +1090,7 @@ def test_comment_empty_line(self, path):
10911090
result = pd.read_excel(path, comment="#")
10921091
tm.assert_frame_equal(result, expected)
10931092

1094-
def test_datetimes(self, path, request):
1095-
openpyxl = pytest.importorskip("openpyxl")
1093+
def test_datetimes(self, path):
10961094
# Test writing and reading datetimes. For issue #9139. (xref #9185)
10971095
datetimes = [
10981096
datetime(2013, 1, 13, 1, 2, 3),
@@ -1110,16 +1108,6 @@ def test_datetimes(self, path, request):
11101108

11111109
write_frame = DataFrame({"A": datetimes})
11121110
write_frame.to_excel(path, "Sheet1")
1113-
if (path.endswith("xlsx") or path.endswith("xlsm")) and Version(
1114-
openpyxl.__version__
1115-
) < Version("3.0.6"):
1116-
request.node.add_marker(
1117-
pytest.mark.xfail(
1118-
reason="Defaults to openpyxl and fails with "
1119-
"floating point error on datetimes; may be fixed on "
1120-
"newer versions of openpyxl - GH #38644"
1121-
)
1122-
)
11231111
read_frame = pd.read_excel(path, sheet_name="Sheet1", header=0)
11241112

11251113
tm.assert_series_equal(write_frame["A"], read_frame["A"])

pandas/tests/io/excel/test_xlrd.py

+6-20
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
import pandas as pd
88
import pandas._testing as tm
9-
from pandas.tests.io.excel import xlrd_version
10-
from pandas.util.version import Version
119

1210
from pandas.io.excel import ExcelFile
1311
from pandas.io.excel._base import inspect_excel_format
@@ -20,11 +18,7 @@
2018
)
2119

2220

23-
# error: Unsupported operand types for <= ("Version" and "None")
24-
if xlrd_version >= Version("2"): # type: ignore[operator]
25-
exts = [".xls"]
26-
else:
27-
exts = [".xls", ".xlsx", ".xlsm"]
21+
exts = [".xls"]
2822

2923

3024
@pytest.fixture(params=exts)
@@ -77,19 +71,11 @@ def test_read_excel_warning_with_xlsx_file(datapath):
7771
path = datapath("io", "data", "excel", "test1.xlsx")
7872
has_openpyxl = import_optional_dependency("openpyxl", errors="ignore") is not None
7973
if not has_openpyxl:
80-
if xlrd_version >= Version("2"):
81-
with pytest.raises(
82-
ValueError,
83-
match="Your version of xlrd is ",
84-
):
85-
pd.read_excel(path, "Sheet1", engine=None)
86-
else:
87-
with tm.assert_produces_warning(
88-
FutureWarning,
89-
raise_on_extra_warnings=False,
90-
match="The xlrd engine is no longer maintained",
91-
):
92-
pd.read_excel(path, "Sheet1", engine=None)
74+
with pytest.raises(
75+
ValueError,
76+
match="Your version of xlrd is ",
77+
):
78+
pd.read_excel(path, "Sheet1", engine=None)
9379
else:
9480
with tm.assert_produces_warning(None):
9581
pd.read_excel(path, "Sheet1", engine=None)

pandas/tests/io/formats/style/test_highlight.py

-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ def test_highlight_quantile(styler, kwargs):
188188
assert result == expected
189189

190190

191-
@pytest.mark.skipif(np.__version__[:4] in ["1.16", "1.17"], reason="Numpy Issue #14831")
192191
@pytest.mark.parametrize(
193192
"f,kwargs",
194193
[

pandas/tests/io/test_fsspec.py

+1-17
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import numpy as np
44
import pytest
55

6-
from pandas.compat._optional import VERSIONS
7-
86
from pandas import (
97
DataFrame,
108
date_range,
@@ -294,21 +292,7 @@ def test_stata_options(fsspectest):
294292

295293

296294
@td.skip_if_no("tabulate")
297-
def test_markdown_options(request, fsspectest):
298-
import fsspec
299-
300-
# error: Library stubs not installed for "tabulate"
301-
# (or incompatible with Python 3.8)
302-
import tabulate # type: ignore[import]
303-
304-
request.node.add_marker(
305-
pytest.mark.xfail(
306-
fsspec.__version__ == VERSIONS["fsspec"]
307-
and tabulate.__version__ == VERSIONS["tabulate"],
308-
reason="Fails on the min version build",
309-
raises=FileNotFoundError,
310-
)
311-
)
295+
def test_markdown_options(fsspectest):
312296
df = DataFrame({"a": [0]})
313297
df.to_markdown("testmem://afile", storage_options={"test": "md_write"})
314298
assert fsspectest.test[0] == "md_write"

pandas/tests/series/methods/test_interpolate.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
isna,
1313
)
1414
import pandas._testing as tm
15-
from pandas.util.version import Version
1615

1716

1817
@pytest.fixture(
@@ -791,11 +790,8 @@ def test_interpolate_timedelta_index(self, request, interp_methods_ind):
791790
df = pd.DataFrame([0, 1, np.nan, 3], index=ind)
792791

793792
method, kwargs = interp_methods_ind
794-
import scipy
795793

796-
if method in {"cubic", "zero"} or (
797-
method == "barycentric" and Version(scipy.__version__) < Version("1.5.0")
798-
):
794+
if method in {"cubic", "zero"}:
799795
request.node.add_marker(
800796
pytest.mark.xfail(
801797
reason=f"{method} interpolation is not supported for TimedeltaIndex"

0 commit comments

Comments
 (0)