Skip to content

Fix/python 3.14 test exclusions#1587

Merged
jernejfrank merged 11 commits into
apache:mainfrom
Exudev:fix/python-3.14-test-exclusions
Jun 10, 2026
Merged

Fix/python 3.14 test exclusions#1587
jernejfrank merged 11 commits into
apache:mainfrom
Exudev:fix/python-3.14-test-exclusions

Conversation

@Exudev

@Exudev Exudev commented May 12, 2026

Copy link
Copy Markdown
Contributor

This PR stabilizes the Hamilton test suite for development and CI on Python 3.14 by excluding currently incompatible plugins from the collection phase and resolving noisy configuration warnings.

Changes

  • Core Test Exclusions: Updated tests/conftest.py to add several plugins (Pandera, DLT, Pydantic, etc.) to the collect_ignore list for Python >= 3.14. These plugins currently cause collection-time crashes on 3.14 due to upstream dependency delays.
  • Pytest Configuration: Formally registered the asyncio marker in pyproject.toml. This resolves hundreds of PytestUnknownMarkWarning warnings that previously cluttered the test logs.
  • Plugin Test Cleanup: Updated plugin_tests/h_dask/conftest.py to include 3.14 exclusion logic, ensuring consistency across the repository.

How I tested this

Tested locally on Python 3.14.2:

  • Ran the full test suite using ./venv/bin/pytest tests.
  • Result: Successfully transitioned from 10 fatal collection ERRORS to 1,294 passing tests (0 failures, 5 skipped).
  • Verified that pytest-asyncio warnings are now resolved.

Notes

  • These exclusions should be revisited as the plugin ecosystem (Pandera, Pydantic, etc.) releases official support for Python 3.14.
  • This PR follows the same pattern recently established for Ray and Polars exclusions.

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested (Test suite health verified)
  • New functions are documented (N/A - maintenance PR)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.
Screenshot 2026-05-12 at 4 34 57 PM

Fixes #1586

@Exudev

Exudev commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

@skrawcz

@jernejfrank jernejfrank left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, just the one comment. Can you also rebase, seems like something is in conflict

Comment thread ui/frontend/package-lock.json
@Exudev Exudev force-pushed the fix/python-3.14-test-exclusions branch from a824f06 to 112b4df Compare June 8, 2026 02:11
@Exudev Exudev requested a review from jernejfrank June 8, 2026 02:12

@jernejfrank jernejfrank left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So the asyncio marker look ok, but I just ran all the test suite on my end on Python 3.14 and there's nothing wrong with the plugin tests. Could you elaborate why we need this?

Comment thread plugin_tests/h_dask/conftest.py Outdated
Comment thread tests/conftest.py
@Exudev

Exudev commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

The original exclusions in tests/conftest.py were added when Python 3.14 was in earlier alpha/beta phases. At that time, many of the optional third-party packages (like pandas, pyarrow, pydantic, scikit-learn, matplotlib) lacked pre-built binary wheels, causing compilation/build failures in CI during uv sync.

I've cleaned up tests/conftest.py and plugin_tests/h_dask/conftest.py to only exclude tests for packages that are explicitly constrained in pyproject.toml (polars, plotly, xgboost, and pandera). All other plugin tests have been restored and pass successfully. @jernejfrank

@jernejfrank jernejfrank left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, thanks! I missed the lock file that gets autogenerated by uv. Once remove can merge!

Comment thread uv.lock Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry I missed this. We don't have a lock file atm, can you remove? I can also push to your branch if you are happy with this to get this over the finish line

@Exudev Exudev requested a review from jernejfrank June 10, 2026 14:09

@jernejfrank jernejfrank left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great, thanks a lot!

@jernejfrank jernejfrank merged commit 86f9f41 into apache:main Jun 10, 2026
6 checks passed
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.

[Python 3.14] Update test collection exclusions for incompatible plugins

2 participants