Skip to content

Commit 85f4878

Browse files
authored
DEPS: clean outdated version compat, sync min versions (#41576)
1 parent 441beef commit 85f4878

19 files changed

+41
-55
lines changed

ci/deps/actions-37-db-min.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# tools
88
- cython>=0.29.21
9-
- pytest>=5.0.1
9+
- pytest>=6.0
1010
- pytest-cov
1111
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0

ci/deps/actions-37-db.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# tools
88
- cython>=0.29.21
9-
- pytest>=5.0.1
9+
- pytest>=6.0
1010
- pytest-xdist>=1.21
1111
- hypothesis>=3.58.0
1212
- pytest-cov>=2.10.1 # this is only needed in the coverage build, ref: GH 35737
@@ -25,7 +25,7 @@ dependencies:
2525
- flask
2626
- nomkl
2727
- numexpr
28-
- numpy=1.16.*
28+
- numpy=1.17.*
2929
- odfpy
3030
- openpyxl
3131
- pandas-gbq

ci/deps/actions-37-locale_slow.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies:
77

88
# tools
99
- cython>=0.29.21
10-
- pytest>=5.0.1
10+
- pytest>=6.0
1111
- pytest-cov
1212
- pytest-xdist>=1.21
1313
- hypothesis>=3.58.0
@@ -17,13 +17,13 @@ dependencies:
1717
- bottleneck=1.2.*
1818
- lxml
1919
- matplotlib=3.0.0
20-
- numpy=1.16.*
20+
- numpy=1.17.*
2121
- openpyxl=3.0.0
2222
- python-dateutil
2323
- python-blosc
2424
- pytz=2017.3
2525
- scipy
26-
- sqlalchemy=1.2.8
26+
- sqlalchemy=1.3.0
2727
- xlrd=1.2.0
2828
- xlsxwriter=1.0.2
2929
- xlwt=1.3.0

ci/deps/actions-37-slow.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies:
77

88
# tools
99
- cython>=0.29.21
10-
- pytest>=5.0.1
10+
- pytest>=6.0
1111
- pytest-cov
1212
- pytest-xdist>=1.21
1313
- hypothesis>=3.58.0

ci/deps/actions-37.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies:
77

88
# tools
99
- cython>=0.29.21
10-
- pytest>=5.0.1
10+
- pytest>=6.0
1111
- pytest-cov
1212
- pytest-xdist>=1.21
1313
- hypothesis>=3.58.0

ci/deps/actions-38-locale.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# tools
88
- cython>=0.29.21
9-
- pytest>=5.0.1
9+
- pytest>=6.0
1010
- pytest-cov
1111
- pytest-xdist>=1.21
1212
- pytest-asyncio>=0.12.0
@@ -20,7 +20,7 @@ dependencies:
2020
- jinja2
2121
- jedi<0.18.0
2222
- lxml
23-
- matplotlib <3.3.0
23+
- matplotlib<3.3.0
2424
- moto
2525
- nomkl
2626
- numexpr

ci/deps/actions-38-numpydev.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dependencies:
55
- python=3.8.*
66

77
# tools
8-
- pytest>=5.0.1
8+
- pytest>=6.0
99
- pytest-cov
1010
- pytest-xdist>=1.21
1111
- hypothesis>=3.58.0

ci/deps/actions-38-slow.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# tools
88
- cython>=0.29.21
9-
- pytest>=5.0.1
9+
- pytest>=6.0
1010
- pytest-cov
1111
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0

ci/deps/actions-38.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies:
77

88
# tools
99
- cython>=0.29.21
10-
- pytest>=5.0.1
10+
- pytest>=6.0
1111
- pytest-cov
1212
- pytest-xdist>=1.21
1313
- hypothesis>=3.58.0

ci/deps/actions-39.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# tools
88
- cython>=0.29.21
9-
- pytest>=5.0.1
9+
- pytest>=6.0
1010
- pytest-cov
1111
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0

ci/deps/azure-macos-37.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- python=3.7.*
77

88
# tools
9-
- pytest>=5.0.1
9+
- pytest>=6.0
1010
- pytest-xdist>=1.21
1111
- hypothesis>=3.58.0
1212
- pytest-azurepipelines

ci/deps/azure-windows-37.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies:
77

88
# tools
99
- cython>=0.29.21
10-
- pytest>=5.0.1
10+
- pytest>=6.0
1111
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0
1313
- pytest-azurepipelines

ci/deps/azure-windows-38.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies:
77

88
# tools
99
- cython>=0.29.21
10-
- pytest>=5.0.1
10+
- pytest>=6.0
1111
- pytest-xdist>=1.21
1212
- hypothesis>=3.58.0
1313
- pytest-azurepipelines

ci/deps/travis-37-arm64.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# tools
88
- cython>=0.29.21
9-
- pytest>=5.0.1
9+
- pytest>=6.0
1010
- pytest-xdist>=1.21
1111
- hypothesis>=3.58.0
1212

doc/source/whatsnew/v1.3.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ Optional libraries below the lowest tested version may still work, but are not c
618618
+-----------------+-----------------+---------+
619619
| scipy | 1.2.0 | |
620620
+-----------------+-----------------+---------+
621-
| sqlalchemy | 1.2.8 | |
621+
| sqlalchemy | 1.3.0 | X |
622622
+-----------------+-----------------+---------+
623623
| tabulate | 0.8.7 | X |
624624
+-----------------+-----------------+---------+

pandas/compat/_optional.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
"openpyxl": "3.0.0",
2323
"pandas_gbq": "0.12.0",
2424
"pyarrow": "0.17.0",
25-
"pytest": "5.0.1",
25+
"pytest": "6.0",
2626
"pyxlsb": "1.0.6",
2727
"s3fs": "0.4.0",
2828
"scipy": "1.2.0",
29-
"sqlalchemy": "1.2.8",
29+
"sqlalchemy": "1.3.0",
3030
"tables": "3.5.1",
3131
"tabulate": "0.8.7",
3232
"xarray": "0.12.3",

pandas/compat/numpy/function.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222
Union,
2323
)
2424

25-
from numpy import (
26-
__version__,
27-
ndarray,
28-
)
25+
from numpy import ndarray
2926

3027
from pandas._libs.lib import (
3128
is_bool,
@@ -38,8 +35,6 @@
3835
validate_kwargs,
3936
)
4037

41-
from pandas.util.version import Version
42-
4338

4439
class CompatValidator:
4540
def __init__(
@@ -128,10 +123,7 @@ def validate_argmax_with_skipna(skipna, args, kwargs):
128123
ARGSORT_DEFAULTS["axis"] = -1
129124
ARGSORT_DEFAULTS["kind"] = "quicksort"
130125
ARGSORT_DEFAULTS["order"] = None
131-
132-
if Version(__version__) >= Version("1.17.0"):
133-
# GH-26361. NumPy added radix sort and changed default to None.
134-
ARGSORT_DEFAULTS["kind"] = None
126+
ARGSORT_DEFAULTS["kind"] = None
135127

136128

137129
validate_argsort = CompatValidator(

pandas/core/arrays/string_arrow.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
pa_version_under3p0,
2727
pa_version_under4p0,
2828
)
29+
from pandas.compat.pyarrow import pa_version_under1p0
2930
from pandas.util._decorators import doc
3031
from pandas.util._validators import validate_fillna_kwargs
3132

@@ -52,7 +53,6 @@
5253
validate_indices,
5354
)
5455
from pandas.core.strings.object_array import ObjectStringArrayMixin
55-
from pandas.util.version import Version
5656

5757
try:
5858
import pyarrow as pa
@@ -62,7 +62,7 @@
6262
# PyArrow backed StringArrays are available starting at 1.0.0, but this
6363
# file is imported from even if pyarrow is < 1.0.0, before pyarrow.compute
6464
# and its compute functions existed. GH38801
65-
if Version(pa.__version__) >= Version("1.0.0"):
65+
if not pa_version_under1p0:
6666
import pyarrow.compute as pc
6767

6868
ARROW_CMP_FUNCS = {
@@ -232,7 +232,7 @@ def __init__(self, values):
232232
def _chk_pyarrow_available(cls) -> None:
233233
# TODO: maybe update import_optional_dependency to allow a minimum
234234
# version to be specified rather than use the global minimum
235-
if pa is None or Version(pa.__version__) < Version("1.0.0"):
235+
if pa is None or pa_version_under1p0:
236236
msg = "pyarrow>=1.0.0 is required for PyArrow backed StringArray."
237237
raise ImportError(msg)
238238

pandas/io/parquet.py

+15-21
Original file line numberDiff line numberDiff line change
@@ -210,27 +210,21 @@ def read(
210210

211211
to_pandas_kwargs = {}
212212
if use_nullable_dtypes:
213-
if Version(self.api.__version__) >= Version("0.16"):
214-
import pandas as pd
215-
216-
mapping = {
217-
self.api.int8(): pd.Int8Dtype(),
218-
self.api.int16(): pd.Int16Dtype(),
219-
self.api.int32(): pd.Int32Dtype(),
220-
self.api.int64(): pd.Int64Dtype(),
221-
self.api.uint8(): pd.UInt8Dtype(),
222-
self.api.uint16(): pd.UInt16Dtype(),
223-
self.api.uint32(): pd.UInt32Dtype(),
224-
self.api.uint64(): pd.UInt64Dtype(),
225-
self.api.bool_(): pd.BooleanDtype(),
226-
self.api.string(): pd.StringDtype(),
227-
}
228-
to_pandas_kwargs["types_mapper"] = mapping.get
229-
else:
230-
raise ValueError(
231-
"'use_nullable_dtypes=True' is only supported for pyarrow >= 0.16 "
232-
f"({self.api.__version__} is installed"
233-
)
213+
import pandas as pd
214+
215+
mapping = {
216+
self.api.int8(): pd.Int8Dtype(),
217+
self.api.int16(): pd.Int16Dtype(),
218+
self.api.int32(): pd.Int32Dtype(),
219+
self.api.int64(): pd.Int64Dtype(),
220+
self.api.uint8(): pd.UInt8Dtype(),
221+
self.api.uint16(): pd.UInt16Dtype(),
222+
self.api.uint32(): pd.UInt32Dtype(),
223+
self.api.uint64(): pd.UInt64Dtype(),
224+
self.api.bool_(): pd.BooleanDtype(),
225+
self.api.string(): pd.StringDtype(),
226+
}
227+
to_pandas_kwargs["types_mapper"] = mapping.get
234228
manager = get_option("mode.data_manager")
235229
if manager == "array":
236230
to_pandas_kwargs["split_blocks"] = True # type: ignore[assignment]

0 commit comments

Comments
 (0)