Skip to content

Updating pyproject.toml with maximum Python version #376

Closed

Description

@bprobert97

Raised in #367.

At the time of writing, labthings-fastapi supports Python 3.10, 3.11, 3.11 and 3.12. We mention this in the installation instructions updated in #367 but we do not enforce a maximum python version on the pyproject.toml. We only enforce the minimum version of >= 3.10. The only limitation on python 3.14 or greater is our current version of pydatic core, which only supports up to python 3.13.

This may require discussion as this is a stricter limitation and one that may require more frequent updates.

Activity

  1. rwb27 commented on Aug 5, 2026

    @rwb27
    Collaborator

    Doing a little reading, I see a couple of articles that suggest this is a bad idea:

    https://iscinumpy.dev/post/bound-version-constraints/#pinning-the-python-version-is-special

    As the only reason we don't support 3.14 is an upstream problem, I think we are probably better declaring it in docs (which you've done) but not adding a hard cap in our metadata. That way, when pydantic is fixed, we don't have to do anything.

    @bprobert97 are you happy to close this.

  2. bprobert97 commented on Aug 5, 2026

    @bprobert97
    ContributorAuthor

    Yeah that makes sense, less work for the future is always a good thing too. I think we are planning on updating pydantic soon(?) so that also makes this less of a long term issue

  3. rwb27 commented on Aug 5, 2026

    @rwb27
    Collaborator

    Thinking some more, while I think we don't want to cap the Python version, we probably do want to specify the supported minor versions in metadata. I propose using classifiers to do this.

    Using classifiers is purely informational - it creates none of the pip problems that requires-python gets into. It does, however, show up in PyPI and make it very obvious what we do and don't support. I'll make a PR.

  4. rwb27 commented on Aug 5, 2026

    @rwb27
    Collaborator

    pydantic isn't pinned, we are awaiting a new release I think. I don't know when they will support 3.14 but when they do, I think all we'd need to do is add 3.14 to the CI matrix :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions