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.

Remove hardcoded `python-version-support-pypi` badge

See original GitHub issue

At present the badge used for showing supported python-version(s) is hard coded. There is a simpler alternative: use python-version-support-pypi badge that auto-updates the information based on PyPI release. This requires the use of classifiers in setup.py.

The package on PyPI does not show any python version. For clarity, please see the comparison between doubtlab and alibi-detect on supported python version(s) from PyPI.

Screenshot:

image

For doublab

PyPI - Supported Python Version

For alibi-detect

PyPI - Supported Python Version

Suggested Fix

To fix this you need something like this. Please decide on the list of classifiers (see below) that you would like to use.

# file: setup.py

setup(
	...
	...
	...
    classifiers=[
        "Intended Audience :: Science/Research",
        'Operating System :: OS Independent',
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "License :: OSI Approved :: Apache 2.0 License",
        "Topic :: Scientific/Engineering",
    ],
)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ascillitoecommented, Mar 17, 2022

Moving this to the 0.9.1 milestone so it will pick up the setup.py classifiers released in 0.9.0.

1reaction
sugatoraycommented, Feb 3, 2022

Yes, for now, until you push the changes made in setup.py to pypi, you will need to use the code for the badge used previously.

If you can push a pre-release to pypi, that will also work. However, if anyone tries to install the package, then the latest release (not prerelease) will be downloaded.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PyPI: Python version from classifiers vs. requires_python #5551
I have already created a PR regarding two different badges. Seeing as making a combined badge versus two separate badges is still in...
Read more >
How to add badges in your pypi project - Thomas-Cokelaer.info
1. pypi badge. To get the pypi badge, go to https://badge.fury.io/for/py page and enter the name of a valid package. Select the code...
Read more >
7. Releasing your package
Your code's version could be any unique string that states the version (e.g., “v1”), ... Once your package is on PyPI , you...
Read more >
bumpver - PyPI
With the CLI command bumpver , you can search for and update version strings in your project files. It has a flexible pattern...
Read more >
How to Publish an Open-Source Python Package to PyPI
Note: The source code as shown and explained in this section is a simplified—but fully functional—version of the Real Python feed reader.
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