haystack icon indicating copy to clipboard operation
haystack copied to clipboard

Drop Python 3.9 support because of Python 3.9 EOL

Open julian-risch opened this issue 2 months ago • 1 comments

With EOL of Python 3.9 in October 2025, we should also move on and test with 3.10 instead of 3.9. Multiple files need to be updated:

  • https://github.com/deepset-ai/haystack/blob/main/.github/workflows/tests.yml
  • https://github.com/deepset-ai/haystack/blob/main/pyproject.toml
  • https://github.com/deepset-ai/haystack/blob/main/.github/workflows/e2e.yml
  • https://github.com/deepset-ai/haystack/blob/main/.github/workflows/slow.yml
  • https://github.com/deepset-ai/haystack/blob/main/.github/workflows/docusaurus_sync.yml
  • https://github.com/deepset-ai/haystack/blob/main/.github/workflows/minor_version_release.yml
  • https://github.com/deepset-ai/haystack/blob/main/.github/workflows/promote_unstable_docs.yml
  • https://github.com/deepset-ai/haystack/blob/main/haystack/core/component/types.py
  • https://github.com/deepset-ai/haystack/blob/main/CONTRIBUTING.md

julian-risch avatar Oct 07 '25 06:10 julian-risch

Additionally we should:

  • Consider updating these files which have code specific to handling types in python 3.9. I say consider since if we remove support for deserializing and comparing python 3.9 types like Union[str, int] then old pipelines could stop working if they use components like ConditionalRouter, OutputAdapter, etc.
  • https://github.com/deepset-ai/haystack/blob/main/haystack/utils/type_serialization.py
  • https://github.com/deepset-ai/haystack/blob/main/haystack/core/type_utils.py
  • Drop all usages of Optional and use | None instead

sjrl avatar Oct 07 '25 07:10 sjrl