You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@hamilton.apache.org by "Exudev (via GitHub)" <gi...@apache.org> on 2026/05/12 20:42:42 UTC

[PR] Fix/python 3.14 test exclusions [hamilton]

Exudev opened a new pull request, #1587:
URL: https://github.com/apache/hamilton/pull/1587

   <!-- SPDX-License-Identifier: Apache-2.0 -->
   
   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
   
   - [x] PR has an informative and human-readable title (this will be pulled into the release notes)
   - [x] Changes are limited to a single goal (no scope creep)
   - [x] Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
   - [x] Any _change_ in functionality is tested (Test suite health verified)
   - [ ] New functions are documented (N/A - maintenance PR)
   - [x] Placeholder code is flagged / future TODOs are captured in comments
   - [x] Project documentation has been updated if adding/changing functionality.
   
   <img width="917" height="864" alt="Screenshot 2026-05-12 at 4 34 57 PM" src="https://github.com/user-attachments/assets/54a0e2ca-0063-4df7-aa05-9423311f5b0b" />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@hamilton.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix/python 3.14 test exclusions [hamilton]

Posted by "Exudev (via GitHub)" <gi...@apache.org>.
Exudev commented on PR #1587:
URL: https://github.com/apache/hamilton/pull/1587#issuecomment-4661801188

   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 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@hamilton.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix/python 3.14 test exclusions [hamilton]

Posted by "Exudev (via GitHub)" <gi...@apache.org>.
Exudev commented on code in PR #1587:
URL: https://github.com/apache/hamilton/pull/1587#discussion_r3382099752


##########
plugin_tests/h_dask/conftest.py:
##########
@@ -18,6 +18,16 @@
 # dask_expr got made default, except for python 3.9 and below
 import sys
 
+# Skip tests that require packages not yet available on Python 3.14
+collect_ignore = []
+if sys.version_info >= (3, 14):
+    collect_ignore.extend(
+        [
+            # dask - no Python 3.14 support yet

Review Comment:
   Hey, my bad. The exit code 5 in GHA was because this branch was explicitly ignoring test_h_dask.py on python >= 3.14 in plugin_tests/h_dask/conftest.py. Since that was the only test file in the directory, pytest collected 0 tests and exited with 5.
   
   I've reverted that exclusion and re-enabled the dask tests in GHA. All tests pass locally now. About to push



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@hamilton.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix/python 3.14 test exclusions [hamilton]

Posted by "Exudev (via GitHub)" <gi...@apache.org>.
Exudev commented on PR #1587:
URL: https://github.com/apache/hamilton/pull/1587#issuecomment-4436019314

   @skrawcz 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@hamilton.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix/python 3.14 test exclusions [hamilton]

Posted by "jernejfrank (via GitHub)" <gi...@apache.org>.
jernejfrank commented on code in PR #1587:
URL: https://github.com/apache/hamilton/pull/1587#discussion_r3382064185


##########
tests/conftest.py:
##########


Review Comment:
   Similar here, I was not able to reproduce the problem on py3.14



##########
plugin_tests/h_dask/conftest.py:
##########
@@ -18,6 +18,16 @@
 # dask_expr got made default, except for python 3.9 and below
 import sys
 
+# Skip tests that require packages not yet available on Python 3.14
+collect_ignore = []
+if sys.version_info >= (3, 14):
+    collect_ignore.extend(
+        [
+            # dask - no Python 3.14 support yet

Review Comment:
   Could you let me know why?
   
   Just ran it on my end and it seems to be no problem
   ```
   Fed ~/code/hamilton main ?1 ❯ uv run pytest plugin_tests/h_dask                                                                                                                                                                                                          11s 16:55:37
   ================================================================================================================================ test session starts =================================================================================================================================
   platform linux -- Python 3.14.5, pytest-9.0.3, pluggy-1.6.0
   rootdir: /home/jfrank/code/hamilton
   configfile: pyproject.toml
   plugins: typeguard-4.5.2, asyncio-1.4.0, anyio-4.13.0, cov-7.1.0
   asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
   collected 38 items
   
   plugin_tests/h_dask/test_h_dask.py ......................................                                                                                                                                                                                                      [100%]
   
   ================================================================================================================================== warnings summary ==================================================================================================================================
   .venv/lib64/python3.14/site-packages/pyspark/pandas/__init__.py:43
     /home/jfrank/code/hamilton/.venv/lib64/python3.14/site-packages/pyspark/pandas/__init__.py:43: UserWarning: 'PYARROW_IGNORE_TIMEZONE' environment variable was not set. It is required to set this environment variable to '1' in both driver and executor sides if you use pyarrow>=2.0.0. pandas-on-Spark will set it for you but it does not work if there is a Spark context already launched.
       warnings.warn(
   
   -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
   =========================================================================================================================== 38 passed, 1 warning in 22.32s ===========================================================================================================================
   
   
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@hamilton.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix/python 3.14 test exclusions [hamilton]

Posted by "jernejfrank (via GitHub)" <gi...@apache.org>.
jernejfrank merged PR #1587:
URL: https://github.com/apache/hamilton/pull/1587


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@hamilton.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix/python 3.14 test exclusions [hamilton]

Posted by "Exudev (via GitHub)" <gi...@apache.org>.
Exudev commented on code in PR #1587:
URL: https://github.com/apache/hamilton/pull/1587#discussion_r3382099752


##########
plugin_tests/h_dask/conftest.py:
##########
@@ -18,6 +18,16 @@
 # dask_expr got made default, except for python 3.9 and below
 import sys
 
+# Skip tests that require packages not yet available on Python 3.14
+collect_ignore = []
+if sys.version_info >= (3, 14):
+    collect_ignore.extend(
+        [
+            # dask - no Python 3.14 support yet

Review Comment:
   Hey, my bad. The exit code 5 in GHA was because this branch was explicitly ignoring test_h_dask.py on python >= 3.14 in plugin_tests/h_dask/conftest.py. Since that was the only test file in the directory, pytest collected 0 tests and exited with 5.
   
   I've reverted that exclusion and re-enabled the dask tests in GHA. All tests pass locally now. About to push



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@hamilton.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix/python 3.14 test exclusions [hamilton]

Posted by "jernejfrank (via GitHub)" <gi...@apache.org>.
jernejfrank commented on code in PR #1587:
URL: https://github.com/apache/hamilton/pull/1587#discussion_r3369527348


##########
ui/frontend/package-lock.json:
##########


Review Comment:
   Can you remove this? Rest of the PR is about python tests and this deals with typescript frontend.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@hamilton.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix/python 3.14 test exclusions [hamilton]

Posted by "Exudev (via GitHub)" <gi...@apache.org>.
Exudev commented on code in PR #1587:
URL: https://github.com/apache/hamilton/pull/1587#discussion_r3370520935


##########
ui/frontend/package-lock.json:
##########


Review Comment:
   done :D 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@hamilton.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix/python 3.14 test exclusions [hamilton]

Posted by "jernejfrank (via GitHub)" <gi...@apache.org>.
jernejfrank commented on code in PR #1587:
URL: https://github.com/apache/hamilton/pull/1587#discussion_r3383621201


##########
uv.lock:
##########


Review Comment:
   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



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@hamilton.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org