Skip to content

TST: Fix test_enforce_columns on Python 3.14#12047

Merged
jrbourbeau merged 1 commit intodask:mainfrom
QuLogic:fix-test-py314
Aug 18, 2025
Merged

TST: Fix test_enforce_columns on Python 3.14#12047
jrbourbeau merged 1 commit intodask:mainfrom
QuLogic:fix-test-py314

Conversation

@QuLogic
Copy link
Copy Markdown
Contributor

@QuLogic QuLogic commented Aug 12, 2025

Formerly, the ValueError would be raised by DataFrame.__len__ from the tuple unpacking into the function arguments. In Python 3.14, as of python/cpython@5a23994 the __len__ method is not called and the ValueError is not raised.

In any case, I don't believe the point of the test is to check __len__ due to tuple unpacking, but just general column consistency checks. It is thus sufficient to call dask.compute on the DataFrame as a whole, which will run a column consistency check in all cases.

  • [n/a] Closes #xxxx
  • Tests added / passed
  • Passes pre-commit run --all-files

Formerly, the `ValueError` would be raised by `DataFrame.__len__` from
the tuple unpacking into the function arguments. In Python 3.14, as of
python/cpython@5a23994
the `__len__` method is not called and the `ValueError` is not raised.

In any case, I don't believe the point of the test is to check `__len__`
due to tuple unpacking, but just general column consistency checks. It
is thus sufficient to call `dask.compute` on the `DataFrame` as a whole,
which will run a column consistency check in all cases.
@github-actions
Copy link
Copy Markdown
Contributor

Unit Test Results

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

      9 files  ±0        9 suites  ±0   3h 21m 8s ⏱️ - 5m 5s
 18 041 tests ±0   16 825 ✅ ±0   1 216 💤 ±0  0 ❌ ±0 
161 443 runs  ±0  149 335 ✅ +2  12 108 💤  - 2  0 ❌ ±0 

Results for commit 365d148. ± Comparison against base commit d0a9d15.

Copy link
Copy Markdown
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @QuLogic

@jrbourbeau jrbourbeau merged commit d9b5c5b into dask:main Aug 18, 2025
24 of 25 checks passed
@QuLogic QuLogic deleted the fix-test-py314 branch August 18, 2025 17:36
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.

2 participants