Skip to content

[DNM] Use @dataclass(slots=True) (needs Python >=3.14)#9254

Draft
crusaderky wants to merge 1 commit intodask:mainfrom
crusaderky:dataclass_slots
Draft

[DNM] Use @dataclass(slots=True) (needs Python >=3.14)#9254
crusaderky wants to merge 1 commit intodask:mainfrom
crusaderky:dataclass_slots

Conversation

@crusaderky
Copy link
Copy Markdown
Collaborator

@crusaderky crusaderky commented May 3, 2026

Follow-up to #8793 and #8824
Python 3.10 introduces @dataclass(slots=True).

[EDIT]

@dataclass(slots=True) is broken in older version of Python whenever subclassing is involved.
It is fixed in Python 3.14.

@crusaderky crusaderky requested a review from fjetter as a code owner May 3, 2026 15:16
@crusaderky crusaderky marked this pull request as draft May 3, 2026 16:05
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2026

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

    14 files   -     16      14 suites   - 16   2h 6m 35s ⏱️ - 8h 40m 11s
 4 068 tests  -     43   3 871 ✅  -    132   97 💤  -     8  100 ❌ + 97 
13 546 runs   - 46 236  12 598 ✅  - 44 702  549 💤  - 1 930  399 ❌ +396 

For more details on these failures, see this check.

Results for commit 9db57ef. ± Comparison against base commit ae1e686.

This pull request removes 45 and adds 2 tests. Note that renamed tests count towards both.
distributed.cli.tests.test_dask_ssh
distributed.dashboard.tests.test_components
distributed.dashboard.tests.test_scheduler_bokeh
distributed.dashboard.tests.test_worker_bokeh
distributed.deploy.tests.test_old_ssh
distributed.deploy.tests.test_ssh
distributed.diagnostics.tests.test_nvml ‑ test_1_visible_devices
distributed.diagnostics.tests.test_nvml ‑ test_2_visible_devices[0,1]
distributed.diagnostics.tests.test_nvml ‑ test_2_visible_devices[1,0]
distributed.diagnostics.tests.test_nvml ‑ test_enable_disable_nvml
…
distributed.cli.tests.test_dask_worker.test_listen_address_ipv6[tcp:..[ ‑ 1]:---nanny]
distributed.cli.tests.test_dask_worker.test_listen_address_ipv6[tcp:..[ ‑ 1]:---no-nanny]
This pull request removes 35 skipped tests and adds 2 skipped tests. Note that renamed tests count towards both.
distributed.cli.tests.test_dask_ssh
distributed.dashboard.tests.test_components
distributed.dashboard.tests.test_scheduler_bokeh
distributed.dashboard.tests.test_worker_bokeh
distributed.deploy.tests.test_old_ssh
distributed.deploy.tests.test_ssh
distributed.diagnostics.tests.test_nvml ‑ test_1_visible_devices
distributed.diagnostics.tests.test_nvml ‑ test_2_visible_devices[0,1]
distributed.diagnostics.tests.test_nvml ‑ test_2_visible_devices[1,0]
distributed.diagnostics.tests.test_nvml ‑ test_gpu_metrics
…
distributed.cli.tests.test_dask_worker.test_listen_address_ipv6[tcp:..[ ‑ 1]:---nanny]
distributed.cli.tests.test_dask_worker.test_listen_address_ipv6[tcp:..[ ‑ 1]:---no-nanny]
This pull request skips 25 tests.
distributed.cli.tests.test_dask_scheduler ‑ test_signal_handling[Signals.SIGINT]
distributed.cli.tests.test_dask_scheduler ‑ test_signal_handling[Signals.SIGTERM]
distributed.cli.tests.test_dask_spec ‑ test_signal_handling_scheduler[Signals.SIGINT]
distributed.cli.tests.test_dask_spec ‑ test_signal_handling_scheduler[Signals.SIGTERM]
distributed.cli.tests.test_dask_spec ‑ test_signal_handling_worker[Signals.SIGINT-Nanny]
distributed.cli.tests.test_dask_spec ‑ test_signal_handling_worker[Signals.SIGINT-Worker]
distributed.cli.tests.test_dask_spec ‑ test_signal_handling_worker[Signals.SIGTERM-Nanny]
distributed.cli.tests.test_dask_spec ‑ test_signal_handling_worker[Signals.SIGTERM-Worker]
distributed.cli.tests.test_dask_worker ‑ test_signal_handling[Signals.SIGINT---nanny]
distributed.cli.tests.test_dask_worker ‑ test_signal_handling[Signals.SIGINT---no-nanny]
…

♻️ This comment has been updated with latest results.

@crusaderky crusaderky changed the title Use @dataclass(slots=True) [DNM] Use @dataclass(slots=True) (needs Python >=3.14) May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant