Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: support python 3.13 #8965

Merged
merged 4 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ next contribution!

### Setting up your development environment

*Currently, to contribute to Haystack, you must use a version of Python >=3.9 and <3.13.*
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we add a bit more explanation for why less than 3.13? Or rather say all tests (or the testing dev env) will not run locally if using python 3.13. They could theoretically contribute to Haystack still and just rely on our CI to run tests.

Copy link
Member Author

Choose a reason for hiding this comment

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


Haystack makes heavy use of [Hatch](https://hatch.pypa.io/latest/), a Python project manager that we use to set up the
virtual environments, build the project, and publish packages. As you can imagine, the first step towards becoming a
Haystack contributor is installing Hatch. There are a variety of installation methods depending on your operating system
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dynamic = ["version"]
description = "LLM framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data."
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.8,<3.13"
requires-python = ">=3.8"
Copy link
Contributor

@sjrl sjrl Mar 5, 2025

Choose a reason for hiding this comment

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

Would it be best practice to add ,<3.14? Or should we only restrict it once new versions of python come out and we figure out then that the version doesn't work?

Copy link
Member Author

@anakin87 anakin87 Mar 5, 2025

Choose a reason for hiding this comment

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

In hindsight, perhaps it was a mistake to restrict to Python <3.13 (done by me in #8547). I would prefer not to officially support python 3.14 but leave users free to experiment and report errors when this version becomes available.

Copy link
Contributor

Choose a reason for hiding this comment

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

sounds good to me!

authors = [{ name = "deepset.ai", email = "malte.pietsch@deepset.ai" }]
keywords = [
"BERT",
Expand Down Expand Up @@ -39,6 +39,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
enhancements:
- |
Haystack now officially supports Python 3.13.
Some components and integrations may not yet be compatible.
Specifically, the `NamedEntityExtractor` does not work with Python 3.13 when using the `spacy` backend.
Additionally, you may encounter issues installing `openai-whisper`, which is required by the
`LocalWhisperTranscriber` component, if you use `uv` or `poetry` for installation.
In this case, we recommend using `pip` for installation.
Loading