Skip to content

Why is Python specified as a dependency? #2551

@janjagusch

Description

@janjagusch
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Issue

I was wondering why poetry specifies the compatible Python version in the tool.poetry.dependencies section, together with actual Python package dependencies. Is there any fundamental reason for that?

I am asking because this can cause issues for automatic dependency updating tools like renovate, where this currently triggers the following warning:

Failed to look up dependency python

Of course this can easily be fixed downstream. It just made me wonder why this is the desired behavior.


Example of a pyproject.toml file created with poetry init:

[tool.poetry]
name = "my-project"
version = "0.1.0"
description = ""

[tool.poetry.dependencies]
python = "^3.7"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/questionUser questions (candidates for conversion to discussion)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions