Skip to content

Dependabot ignores lowest python version in pyproject.toml and uses the latest instead #13424

@shachafl

Description

@shachafl

With the relative recent PR (#13215 (comment)), Dependabot uses Python 3.13 for dependencies version updates instead of Python 3.9 and completely ignores pyproject.toml, for example:

[project]
...
requires-python = ">= 3.9, <3.13"

This creates compatibility issues with dependencies for many projects as different versions of dependencies support different Python versions.

The current workaround solution is adding a .python-version file, and is not documented.
A better solution is to add a "python-version" field to the schema:

version: 2
updates:
  - package-ecosystem: "pip"
    directory: "/"
    schedule:
      interval: "weekly"
    open-pull-requests-limit: 10
    # force Dependabot to resolve using Python 3.9
    python-version: "3.9"

Metadata

Metadata

Labels

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions