Skip to content

Better handling of linting/packaging dependencies#680

Open
DimitriPapadopoulos wants to merge 1 commit intopypa:mainfrom
DimitriPapadopoulos:flit_version
Open

Better handling of linting/packaging dependencies#680
DimitriPapadopoulos wants to merge 1 commit intopypa:mainfrom
DimitriPapadopoulos:flit_version

Conversation

@DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Feb 27, 2026

Basic support for PEP 639 requires flit 3.11.

The minimal version is specified in two different places, only the first one had been updated:

wheel/pyproject.toml

Lines 1 to 2 in 56223f6

[build-system]
requires = ["flit_core >=3.11,<4"]

wheel/pyproject.toml

Lines 139 to 140 in 56223f6

[tool.tox.env.pkg]
deps = ["build", "flit >= 3.8"]

I wonder whether a single occurrence of the minimal version is possible... It appears it should be possible to specify all dependencies in a single place. Modernize dependency handling to achieve that.

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.14%. Comparing base (56223f6) to head (2c483ce).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #680   +/-   ##
=======================================
  Coverage   55.14%   55.14%           
=======================================
  Files          15       15           
  Lines        1206     1206           
=======================================
  Hits          665      665           
  Misses        541      541           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DimitriPapadopoulos DimitriPapadopoulos changed the title Bump minimal flit version everywhere Better handling of linting/packaging dependencies Feb 27, 2026
- Basic support for PEP 639 requires flit version 3.11. Specify it in
  a single place, the [build-system] section - tox should be able to
  read it from there.
- Intoduce a new dependency group for linting, and instruct tox to use
  it to install linting dependencies. Dependency groups require tox 4.
Copy link
Contributor

@agronholm agronholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not convinced yet.


[tool.tox]
env_list = ["py39", "py310", "py311", "py312", "py313", "py314", "pypy3", "lint", "pkg"]
requires = ["tox>=4"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dependency groups are supported only from v4.22 onwards.

Suggested change
requires = ["tox>=4"]
requires = ["tox>=4.22"]

[tool.tox.env.lint]
depends = []
deps = ["pre-commit"]
dependency_groups = "lint"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the point of moving this to a dependency group? I don't see any benefit.

commands = [["pre-commit", "run", "-a"]]

[tool.tox.env.pkg]
deps = ["build", "flit >= 3.8"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you actually test this? I did, and it breaks the pkg environment because flit and build are no longer available at run-time.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants