Skip to content

Commit 8fab5a2

Browse files
authored
Increase support window of all dependencies (#4296)
* Increase support windows of dependencies * what's new * trivial * Bump setuptools to 38.4 * Bump dask back to 2.9 * Work around pandas vs sphinx incompatibility * Black
1 parent 7daad4f commit 8fab5a2

File tree

9 files changed

+43
-16
lines changed

9 files changed

+43
-16
lines changed

ci/min_deps_check.py

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,21 @@
2323
"pytest-env",
2424
}
2525

26-
POLICY_MONTHS = {"python": 42, "numpy": 24, "pandas": 12, "scipy": 12}
27-
POLICY_MONTHS_DEFAULT = 6
28-
26+
POLICY_MONTHS = {"python": 42, "numpy": 24, "setuptools": 42}
27+
POLICY_MONTHS_DEFAULT = 12
28+
POLICY_OVERRIDE = {
29+
# dask < 2.9 has trouble with nan-reductions
30+
# TODO remove this special case and the matching note in installing.rst
31+
# after January 2021.
32+
"dask": (2, 9),
33+
"distributed": (2, 9),
34+
# setuptools-scm doesn't work with setuptools < 36.7 (Nov 2017).
35+
# The conda metadata is malformed for setuptools < 38.4 (Jan 2018)
36+
# (it's missing a timestamp which prevents this tool from working).
37+
# TODO remove this special case and the matching note in installing.rst
38+
# after July 2021.
39+
"setuptools": (38, 4),
40+
}
2941
has_errors = False
3042

3143

@@ -151,6 +163,11 @@ def process_pkg(
151163
policy_minor = minor
152164
policy_published_actual = published
153165

166+
try:
167+
policy_major, policy_minor = POLICY_OVERRIDE[pkg]
168+
except KeyError:
169+
pass
170+
154171
if (req_major, req_minor) < (policy_major, policy_minor):
155172
status = "<"
156173
elif (req_major, req_minor) > (policy_major, policy_minor):

ci/requirements/py36-bare-minimum.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ dependencies:
1010
- pytest-env
1111
- numpy=1.15
1212
- pandas=0.25
13-
- setuptools=41.2
13+
- setuptools=38.4

ci/requirements/py36-min-all-deps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ dependencies:
4343
- rasterio=1.0
4444
- scipy=1.3
4545
- seaborn=0.9
46-
- setuptools=41.2
46+
- setuptools=38.4
4747
# - sparse # See py36-min-nep18.yml
4848
- toolz=0.10
4949
- zarr=2.3

ci/requirements/py36-min-nep18.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ dependencies:
1515
- pytest
1616
- pytest-cov
1717
- pytest-env
18-
- scipy=1.2
19-
- setuptools=41.2
18+
- scipy=1.3
19+
- setuptools=38.4
2020
- sparse=0.8

doc/installing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Required dependencies
77
---------------------
88

99
- Python (3.6 or later)
10-
- setuptools
10+
- setuptools (38.4 or later)
1111
- `numpy <http://www.numpy.org/>`__ (1.15 or later)
1212
- `pandas <http://pandas.pydata.org/>`__ (0.25 or later)
1313

@@ -93,16 +93,16 @@ dependencies:
9393

9494
- **Python:** 42 months
9595
(`NEP-29 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_)
96+
- **setuptools:** 42 months (but no older than 38.4)
9697
- **numpy:** 24 months
9798
(`NEP-29 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_)
98-
- **pandas:** 12 months
99-
- **scipy:** 12 months
99+
- **dask and dask.distributed:** 12 months (but no older than 2.9)
100100
- **sparse, pint** and other libraries that rely on
101101
`NEP-18 <https://numpy.org/neps/nep-0018-array-function-protocol.html>`_
102102
for integration: very latest available versions only, until the technology will have
103103
matured. This extends to dask when used in conjunction with any of these libraries.
104104
numpy >=1.17.
105-
- **all other libraries:** 6 months
105+
- **all other libraries:** 12 months
106106

107107
The above should be interpreted as *the minor version (X.Y) initially published no more
108108
than N months ago*. Patch versions (x.y.Z) are not pinned, and only the latest available

doc/whats-new.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ New Features
3232
property for :py:class:`CFTimeIndex` and show ``calendar`` and ``length`` in
3333
:py:meth:`CFTimeIndex.__repr__` (:issue:`2416`, :pull:`4092`)
3434
`Aaron Spring <https://github.com/aaronspring>`_.
35+
- Relaxed the :ref:`mindeps_policy` to support:
36+
37+
- all versions of setuptools released in the last 42 months (but no older than 38.4)
38+
- all versions of dask and dask.distributed released in the last 12 months (but no
39+
older than 2.9)
40+
- all versions of other packages released in the last 12 months
41+
42+
All are up from 6 months (:issue:`4295`)
43+
`Guido Imperiale <https://github.com/crusaderky>`_.
3544
- Use a wrapped array's ``_repr_inline_`` method to construct the collapsed ``repr``
3645
of :py:class:`DataArray` and :py:class:`Dataset` objects and
3746
document the new method in :doc:`internals`. (:pull:`4248`).

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
numpy >= 1.15
66
pandas >= 0.25
7-
setuptools >= 41.2
7+
setuptools >= 38.4

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ python_requires = >=3.6
7676
install_requires =
7777
numpy >= 1.15
7878
pandas >= 0.25
79-
setuptools >= 41.2 # For pkg_resources
79+
setuptools >= 38.4 # For pkg_resources
8080
setup_requires =
81-
setuptools >= 41.2
81+
setuptools >= 38.4
8282
setuptools_scm
8383

8484
[options.package_data]

xarray/tests/test_duck_array_ops.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
arm_xfail,
3434
assert_array_equal,
3535
has_dask,
36+
has_scipy,
3637
raises_regex,
3738
requires_cftime,
3839
requires_dask,
@@ -767,8 +768,8 @@ def test_timedelta_to_numeric(td):
767768
@pytest.mark.parametrize("use_dask", [True, False])
768769
@pytest.mark.parametrize("skipna", [True, False])
769770
def test_least_squares(use_dask, skipna):
770-
if use_dask and not has_dask:
771-
pytest.skip("requires dask")
771+
if use_dask and (not has_dask or not has_scipy):
772+
pytest.skip("requires dask and scipy")
772773
lhs = np.array([[1, 2], [1, 2], [3, 2]])
773774
rhs = DataArray(np.array([3, 5, 7]), dims=("y",))
774775

0 commit comments

Comments
 (0)