From e49880b67990c6f74f3ec034cff79623bb5ce21c Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Thu, 31 Mar 2022 09:35:49 -0500 Subject: [PATCH] Add Python 3.10 support (#8566) * Add Python 3.10 job to test suite CI * Ignore numpy.distutils deprecation warning * Fix filterwarnings ordering * Don't include fastparquet in Python 3.10 environment * setup.py * Add 3.10 build for import checks * Update CI dependencies Various packages have fixed issues and/or added Python 3.10 support. So refresh them based on their latest status. * Fixup distributed test * Drop `setuptools` version constraint * Include Thomas' feedback Co-authored-by: Thomas Grainger Co-authored-by: John Kirkham Co-authored-by: Jim Crist-Harif Co-authored-by: Thomas Grainger --- .github/workflows/additional.yml | 2 +- .github/workflows/tests.yml | 2 +- continuous_integration/environment-3.10.yaml | 69 ++++++++++++++++++++ continuous_integration/environment-3.9.yaml | 4 +- dask/tests/test_distributed.py | 2 +- setup.cfg | 2 + setup.py | 11 +++- 7 files changed, 86 insertions(+), 6 deletions(-) create mode 100644 continuous_integration/environment-3.10.yaml diff --git a/.github/workflows/additional.yml b/.github/workflows/additional.yml index 416b54917b3..801ca3bdc7e 100644 --- a/.github/workflows/additional.yml +++ b/.github/workflows/additional.yml @@ -108,7 +108,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9"] + python-version: ["3.8", "3.9", "3.10"] steps: - name: Checkout source uses: actions/checkout@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1e99b7ccd44..3b745f618da 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: os: ["windows-latest", "ubuntu-latest", "macos-latest"] - python-version: ["3.8", "3.9"] + python-version: ["3.8", "3.9", "3.10"] env: PYTHON_VERSION: ${{ matrix.python-version }} diff --git a/continuous_integration/environment-3.10.yaml b/continuous_integration/environment-3.10.yaml new file mode 100644 index 00000000000..b2dee79aaed --- /dev/null +++ b/continuous_integration/environment-3.10.yaml @@ -0,0 +1,69 @@ +# This job includes coverage +name: test-environment +channels: + - conda-forge + - nodefaults +dependencies: + # required dependencies + - python=3.10 + - packaging + - numpy + - pandas + # test dependencies + - pre-commit + - pytest + - pytest-cov + - pytest-rerunfailures + - pytest-xdist + - moto + - flask + - fastparquet>=0.8.0 + - h5py + - pytables + - zarr + - tiledb-py + # resolver was pulling in old versions, so hard-coding floor + # https://github.com/dask/dask/pull/8505 + - tiledb>=2.5.0 + - xarray + - fsspec + - sqlalchemy>=1.4.0 + - pyarrow + - coverage + - jsonschema + # other -- IO + # Not available for Python 3.9+ on conda-forge + # - bcolz + - blosc + - boto3 + - botocore + - bokeh + - httpretty + - aiohttp + # Need recent version of s3fs to support newer aiobotocore versions + # https://github.com/dask/s3fs/issues/514 + - s3fs>=2021.8.0 + - cloudpickle + - crick + - cytoolz + - distributed + - ipython + - lz4 + - numba + - partd + - psutil + - requests + - scikit-image + - scikit-learn + - scipy + - toolz + - python-snappy + - sparse + - cachey + - python-graphviz + - python-xxhash + - mmh3 + - jinja2 + - pip + - pip: + - git+https://github.com/dask/distributed diff --git a/continuous_integration/environment-3.9.yaml b/continuous_integration/environment-3.9.yaml index d6a70f3b057..c6e5903dd2e 100644 --- a/continuous_integration/environment-3.9.yaml +++ b/continuous_integration/environment-3.9.yaml @@ -7,8 +7,8 @@ dependencies: # required dependencies - python=3.9 - packaging - - numpy - - pandas + - numpy=1.21 + - pandas=1.3 # test dependencies - pre-commit - pytest diff --git a/dask/tests/test_distributed.py b/dask/tests/test_distributed.py index 55804293748..fcd5fc5419a 100644 --- a/dask/tests/test_distributed.py +++ b/dask/tests/test_distributed.py @@ -259,7 +259,7 @@ async def f(): z = await y.persist() assert len(z.dask) == 1 - asyncio.get_event_loop().run_until_complete(f()) + asyncio.run(f()) @gen_cluster(client=True) diff --git a/setup.cfg b/setup.cfg index a5c43f08f45..1f51af0d3c8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -50,6 +50,8 @@ filterwarnings = error:::pandas[.*] error:::numpy[.*] error:::distributed[.*] + # From https://github.com/numpy/numpy/issues/20225 + ignore:The distutils\.sysconfig module is deprecated, use sysconfig instead:DeprecationWarning:numpy xfail_strict=true [metadata] diff --git a/setup.py b/setup.py index 328fb7e54fc..5527c6fbc7c 100755 --- a/setup.py +++ b/setup.py @@ -70,10 +70,19 @@ license="BSD", keywords="task-scheduling parallel numpy pandas pydata", classifiers=[ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", - "License :: OSI Approved :: BSD License", + "Programming Language :: Python :: 3.10", + "Topic :: Scientific/Engineering", + "Topic :: System :: Distributed Computing", ], packages=packages + tests, long_description=open("README.rst").read() if exists("README.rst") else "",