question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use PEP 621's [project.requires-python] field to automatically set --target-version

See original GitHub issue

PEP 621 provides project.requires-python field in pyproject.toml. I expect, that most of the tools will support this field eventually. Each code-related linter and formatter has a setting for supported python version.

Using this field would be good for tool interoperability in the future.

Related: https://github.com/psf/black/issues/751#issuecomment-778441893

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:4
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
JelleZijlstracommented, Aug 13, 2022

I wouldn’t want Black to read other config files than pyproject.toml; that’s asking for a lot of additional complexity.

2reactions
ssbarneacommented, Aug 2, 2022

I hope to see this feature being added and maybe in a way that it would make it easy to reuse in other tools as updating min-python in so many tools is a PITA and almost a guarantee that you will forget to update one of them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PEP 621 – Storing project metadata in pyproject.toml
Abstract. This PEP specifies how to write a project's core metadata in a pyproject.toml file for packaging-related tools to consume.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found