Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Why is Python specified as a dependency? #2551

Closed
2 tasks done
janjagusch opened this issue Jun 12, 2020 · 2 comments
Closed
2 tasks done

Why is Python specified as a dependency? #2551

janjagusch opened this issue Jun 12, 2020 · 2 comments
Labels
kind/question User questions (candidates for conversion to discussion)

Comments

@janjagusch
Copy link

  • 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"
@abn
Copy link
Member

abn commented Jun 19, 2020

@janjagusch this is as per current design. Python is in-effect a dependency of the project. From this perspective, it makes sense where it is at. Any parsers of the poetry config section should treat python as a reserved key. Do you think one of the other sections make better sense?

@hobofan
Copy link

hobofan commented Sep 22, 2020

Coming from other languages I would rather expect it to be a key of the tool.poetry section, and seeing it as a dependency was definitely confusing at first. I think a key under build-system might also be understandable, though I guess that section is standardized via a PEP.

A short survey of other language package managers:

@finswimmer finswimmer added the kind/question User questions (candidates for conversion to discussion) label Sep 23, 2020
@python-poetry python-poetry locked and limited conversation to collaborators Feb 13, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
kind/question User questions (candidates for conversion to discussion)
Projects
None yet
Development

No branches or pull requests

4 participants