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.

Check `python_requires` for supported python version (PEP 440)

See original GitHub issue

EDIT: Running pyroma v4.0 with default pyroma settings on a package described below using setuptools, pyroma reports no python version was specified.

It expects to find a python version in the classifiers field (setup(…, classifiers=[SOME PYTHON VERSION(S) HERE])).

There is 2 places to define supported python versions and for now pyroma only support the classifiers one.

setup(
    ....
    python_requires=">=3.8",
    ....
)

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
davidandreoletticommented, Aug 18, 2022

Would you like to submit a PR based on the suggestion above ?

@CAM-Gerlach Yes. Waiting on @regebro’s green light.

1reaction
CAM-Gerlachcommented, Aug 20, 2022

I’m surprised I missed python_requires, and that no one noticed until now. 😃

The earliest commit I can see of that particular check is 8 years old, and from the commit message, it may be older than that. That’s long before my time, but I’m not sure it was at least widely implemented by tools and adopted by users at that point, at least not like it is now.

I have no strong opinion on the weights, but I would probably set them at the same weight, personally, but if you want something different that’s fine too.

I’d in turn defer to your judgement as maintainer; its ultimately subjective anyway. My thinking is that since Requires-Python is critical for tools to avoid installing distribution versions that are broken on the user’s Python, whereas the version classifiers are just advisory only, the former would seem to be more important, but it certainly helps having both.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PEP 440 – Version Identification and Dependency Specification
Abstract. This PEP describes a scheme for identifying versions of Python software distributions, and declaring dependencies on particular versions. This ...
Read more >
python and PEP 440 - how serious is this warning about ...
Each Python package can specify its own version. Among other things, PEP440 says that a version specification should be stored in the ...
Read more >
Flit Documentation
Flit is a simple way to put Python packages and modules on PyPI. ... flit_core 3.3 is the last version supporting Python 3.4...
Read more >
History | Poetry - Python dependency management and ...
Add 3.11 to the list of available Python versions (#477). ... (poetry-core#98); Improved support for PEP 440 specific versions that do not abide...
Read more >
Should You Use Upper Bound Version Constraints?
0 in Poetry or ~=1.0 in all other tooling that follows Python standards via PEP 440). If you cap to minor versions (...
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