Repository: dask/dask
Pull request #10939 (2024-02-20 12:34:12)

Use Python 3.12 as reference environment
- Blocked by and incorporates #10891
- Follow-up: #10893

github-actions[bot]: ## Unit Test Results
_See [test report](https://dask.github.io/dask/test_report.html) for an extended history of previous test failures. This is useful for diagnosing flaky tests._

     15 files  ± 0       15 suites  ±0   3h 20m 36s :stopwatch: + 5m 4s
 13 111 tests + 2   12 180 :white_check_mark: + 3     931 :zzz: ±0  0 :x:  - 1 
162 347 runs  +34  145 793 :white_check_mark: +33  16 554 :zzz: +2  0 :x:  - 1 

Results for commit d1c3cf59. ± Comparison against base commit 67ecd26b.

<details>
  <summary>This pull request <b>removes</b> 1 and <b>adds</b> 3 tests. <i>Note that renamed tests count towards both.</i></summary>

```
dask.tests.test_docs ‑ test_development_guidelines_matches_ci
```

```
dask.tests.test_docs ‑ test_development_guidelines_matches_ci[.github/workflows/additional.yml]
dask.tests.test_docs ‑ test_development_guidelines_matches_ci[.github/workflows/upstream.yml]
dask.tests.test_docs ‑ test_development_guidelines_matches_ci[docs/source/develop.rst]
```
</details>

[test-results]:data:application/gzip;base64,H4sIACel1GUC/02MSQ7DIBAEv2JxzoExi5l8JiIsEoqXCMPJyt9DiG18rOpWbcSH0a3k3oG4dWTNITWyOeoUlvnHPWWyqLKmujMAOPixZmPqCRRt8hXeRSJrP6/DWFT7uBiXuJuY51qWPePDzmeZiwHZKf9lkELww13Sla9ls0xTSAWIBcOMF6gtc84gWqEVeu41laiGJ7WOS66VI58vUWXa3xkBAAA=


Patch:
diff --git a/.github/workflows/additional.yml b/.github/workflows/additional.yml
index e2d4438f4..d8bd3f11d 100644
--- a/.github/workflows/additional.yml
+++ b/.github/workflows/additional.yml
@@ -22,8 +22,7 @@ jobs:
           miniforge-version: latest
           use-mamba: true
           channel-priority: strict
-          python-version: "3.11"
-          environment-file: continuous_integration/environment-3.11.yaml
+          environment-file: continuous_integration/environment-3.12.yaml
           activate-environment: test-environment
           auto-activate-base: false
 
diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml
index 100096817..21cffde94 100644
--- a/.github/workflows/upstream.yml
+++ b/.github/workflows/upstream.yml
@@ -56,7 +56,7 @@ jobs:
           miniforge-version: latest
           use-mamba: true
           channel-priority: strict
-          environment-file: continuous_integration/environment-3.11.yaml
+          environment-file: continuous_integration/environment-3.12.yaml
           activate-environment: test-environment
           auto-activate-base: false
 
diff --git a/continuous_integration/environment-3.10.yaml b/continuous_integration/environment-3.10.yaml
index 82f301b36..77e73a66d 100644
--- a/continuous_integration/environment-3.10.yaml
+++ b/continuous_integration/environment-3.10.yaml
@@ -68,8 +68,8 @@ dependencies:
   - sparse
   - cachey
   - python-graphviz
-  - python-xxhash
   - python-cityhash
+  - python-xxhash
   - mmh3
   - jinja2
   - pip
diff --git a/continuous_integration/environment-3.11.yaml b/continuous_integration/environment-3.11.yaml
index f15c8ea38..16a8f9c3a 100644
--- a/continuous_integration/environment-3.11.yaml
+++ b/continuous_integration/environment-3.11.yaml
@@ -26,6 +26,7 @@ dependencies:
   - mimesis
   - numpy
   - pandas
+  - numba
   - flask
   - fastparquet
   - h5py
@@ -41,7 +42,7 @@ dependencies:
   - pyarrow>=13
   - coverage
   - jsonschema
-  # # other -- IO
+  # other -- IO
   - boto3
   - botocore
   - bokeh
@@ -59,7 +60,6 @@ dependencies:
   - ipywidgets<8.0.5
   - ipykernel<6.22.0
   - lz4
-  - numba
   - psutil
   - requests
   - scikit-image
diff --git a/continuous_integration/environment-3.12.yaml b/continuous_integration/environment-3.12.yaml
index c2a528358..fac2a8f5f 100644
--- a/continuous_integration/environment-3.12.yaml
+++ b/continuous_integration/environment-3.12.yaml
@@ -26,6 +26,7 @@ dependencies:
   - mimesis
   - numpy
   - pandas
+  - numba
   - flask
   - fastparquet
   - h5py
@@ -41,7 +42,7 @@ dependencies:
   - pyarrow>=13
   - coverage
   - jsonschema
-  # # other -- IO
+  # other -- IO
   - boto3
   - botocore
   - bokeh
@@ -59,7 +60,6 @@ dependencies:
   - ipywidgets<8.0.5
   - ipykernel<6.22.0
   - lz4
-  # - numba no support for 3.12
   - psutil
   - requests
   - scikit-image
@@ -69,8 +69,7 @@ dependencies:
   - sparse
   - cachey
   - python-graphviz
-  # Not available on macOS for Python 3.12 yet
-  # - python-cityhash
+  - python-cityhash
   - python-xxhash
   - mmh3
   - jinja2
diff --git a/continuous_integration/environment-3.9.yaml b/continuous_integration/environment-3.9.yaml
index 4a0b9043a..d383afb09 100644
--- a/continuous_integration/environment-3.9.yaml
+++ b/continuous_integration/environment-3.9.yaml
@@ -68,8 +68,8 @@ dependencies:
   - sparse
   - cachey
   - python-graphviz
-  - python-xxhash
   - python-cityhash
+  - python-xxhash
   - mmh3
   - jinja2
   - pip
diff --git a/docs/source/develop.rst b/docs/source/develop.rst
index a680895ff..bf48d4d41 100644
--- a/docs/source/develop.rst
+++ b/docs/source/develop.rst
@@ -108,7 +108,7 @@ pip or conda_
 
 ``conda``::
 
-  conda env create -n dask-dev -f continuous_integration/environment-3.11.yaml
+  conda env create -n dask-dev -f continuous_integration/environment-3.12.yaml
   conda activate dask-dev
   python -m pip install --no-deps -e .
 
@@ -133,7 +133,7 @@ language support, testing, documentation, and style.
 Python Versions
 ~~~~~~~~~~~~~~~
 
-Dask supports Python versions 3.9, 3.10 and 3.11.
+Dask supports Python versions 3.9 to 3.12.
 Name changes are handled by the :file:`dask/compatibility.py` file.
 
 .. _develop-test:


Test patch:
diff --git a/dask/tests/test_docs.py b/dask/tests/test_docs.py
index 4869dca24..21b5db6ec 100644
--- a/dask/tests/test_docs.py
+++ b/dask/tests/test_docs.py
@@ -5,20 +5,21 @@ from pathlib import Path
 import pytest
 
 
-def test_development_guidelines_matches_ci():
+@pytest.mark.parametrize(
+    "filename",
+    [
+        "docs/source/develop.rst",
+        ".github/workflows/additional.yml",
+        ".github/workflows/upstream.yml",
+    ],
+)
+def test_development_guidelines_matches_ci(filename):
     """When the environment.yaml changes in CI, make sure to change it in the docs as well"""
     root_dir = Path(__file__).parent.parent.parent
 
     if not (root_dir / ".github" / "workflows").exists():
         pytest.skip("Test can only be run on an editable install")
 
-    development_doc_file = root_dir / "docs" / "source" / "develop.rst"
-    additional_ci_file = root_dir / ".github" / "workflows" / "additional.yml"
-    upstream_ci_file = root_dir / ".github" / "workflows" / "upstream.yml"
-    latest_env = "environment-3.11.yaml"
-
-    for filename in [development_doc_file, additional_ci_file, upstream_ci_file]:
-        with open(filename, encoding="utf8") as f:
-            assert any(
-                latest_env in line for line in f
-            ), f"{latest_env} not found in {filename}"
+    latest_env = "environment-3.12.yaml"
+    with open(root_dir / filename, encoding="utf8") as f:
+        assert latest_env in f.read()