python-poetry / python-poetry/poetry

Specify a different python version for a dependency group

Open
#7,299 4 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

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

Feature Request

I've started using the dependency groups (which are absolutely fantastic). Still, I have reached an issue, that some groups exist only for a particular purpose (eg, to build the documentation, or to lint the project). The issue that I'm facing is that as a library developer, I want to support all supported python versions, so I normally set my python version in something like python = "^3.7.0" (accurate as of 1/1/2023), but not all libraries that are used to build docs/lint the project support every version (eg latest flake8 only supports python>=3.8.1). But for example, flake8 plugins depend on flake8, so I have to either write the same python dependency again and again (and I would prefer not to duplicate that) or wait in order to update (which I currently do, but it seems unnecessary).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining how Poetry represents dependency groups and applies the project's Python constraint when resolving group dependencies. Define how a group-specific Python version should interact with the existing project constraint, then verify that documentation and dependency resolution cover the example involving flake8 and its plugins.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.