Repository navigation
feat: Updates to make Haystack compatible with python 3.14 - #10634
Conversation
Pull Request Test Coverage Report for Build 23136127991Details
💛 - Coveralls |
|
@sjrl Out of curiosity I tried Haystack with Python 3.14 and found two additional issues to address:
|
Hey @julian-risch any idea how these errors popped up for you? I ran all unit and integration tests using our CI with python 3.14.3 and they passed except for the two I mentioned in our e2e tests. So just curious how you identified the additional issues. |
|
@julian-risch made the changes! Would appreciate another review when you have the time. |
|
|
||
|
|
||
| @pytest.mark.parametrize("batch_size", [1, 3]) | ||
| @skip_spacy |
There was a problem hiding this comment.
@julian-risch I was able to update your code to only skip the spacy test. Also required a change in the pyproject.toml in the e2e test env
…i#10634) * start adding python 3.14 support in tests * start updating tests * Add reno * Updates * Collect tests that should be skipped in python 3.14+ * run tests using python 3.14 * Revert back to 3.10 for testing * Fix flaky tests * Skip only spacy tests if python 3.14+ * switch to get_running_loop
Pipeline.run_async writes each sync component's outputs when its thread finishes, so variadic inputs arrive in completion order. Six scenarios assumed the sync order; CI on Python 3.15 hit three of them on every run. Follows the AnyOrder approach of the Python 3.14 PR (#10634). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Related Issues
Proposed Changes:
Collect tests that should be skipped when using python 3.14+. These tests should eventually be removed when the min version of python becomes 3.14.
Made some minor adjustments to type checking when handling bare Union types. Previously we were relying on
get_origin(typing.Union)to returnNone. Starting in python 3.14get_origin(typing.Union)now returnstyping.Unionso I added specific checks for handling bare Union types.How did you test it?
Notes for the reviewer
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.