Skip to content

Commit da833a1

Browse files
committed
fix: use Development Status classifier properly. #2101
1 parent 18048dd commit da833a1

File tree

2 files changed

+22
-34
lines changed

2 files changed

+22
-34
lines changed

setup.py

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -57,38 +57,26 @@ def count_contributors() -> int:
5757
return num_others
5858

5959

60-
def get_classifiers(version_info: tuple[int, int, int, str, int]) -> list[str]:
61-
"""Build the list of classifiers"""
62-
# PYVERSIONS
63-
classifier_list = textwrap.dedent("""\
64-
Environment :: Console
65-
Intended Audience :: Developers
66-
Operating System :: OS Independent
67-
Programming Language :: Python
68-
Programming Language :: Python :: 3
69-
Programming Language :: Python :: 3.10
70-
Programming Language :: Python :: 3.11
71-
Programming Language :: Python :: 3.12
72-
Programming Language :: Python :: 3.13
73-
Programming Language :: Python :: 3.14
74-
Programming Language :: Python :: 3.15
75-
Programming Language :: Python :: Free Threading :: 3 - Stable
76-
Programming Language :: Python :: Implementation :: CPython
77-
Programming Language :: Python :: Implementation :: PyPy
78-
Topic :: Software Development :: Quality Assurance
79-
Topic :: Software Development :: Testing
80-
""").splitlines()
81-
82-
if version_info[3] == "alpha":
83-
devstat = "3 - Alpha"
84-
elif version_info[3] in ["beta", "candidate"]:
85-
devstat = "4 - Beta"
86-
else:
87-
assert version_info[3] == "final"
88-
devstat = "5 - Production/Stable"
89-
classifier_list.append(f"Development Status :: {devstat}")
90-
91-
return classifier_list
60+
# PYVERSIONS
61+
CLASSIFIERS = textwrap.dedent("""\
62+
Development Status :: 5 - Production/Stable
63+
Environment :: Console
64+
Intended Audience :: Developers
65+
Operating System :: OS Independent
66+
Programming Language :: Python
67+
Programming Language :: Python :: 3
68+
Programming Language :: Python :: 3.10
69+
Programming Language :: Python :: 3.11
70+
Programming Language :: Python :: 3.12
71+
Programming Language :: Python :: 3.13
72+
Programming Language :: Python :: 3.14
73+
Programming Language :: Python :: 3.15
74+
Programming Language :: Python :: Free Threading :: 3 - Stable
75+
Programming Language :: Python :: Implementation :: CPython
76+
Programming Language :: Python :: Implementation :: PyPy
77+
Topic :: Software Development :: Quality Assurance
78+
Topic :: Software Development :: Testing
79+
""").splitlines()
9280

9381

9482
# The names of .pth files matter because they are read in lexicographic order.
@@ -221,7 +209,7 @@ def build_extension(self, ext: Any) -> None:
221209
keywords="code coverage testing",
222210
license="Apache-2.0",
223211
license_files=["LICENSE.txt"],
224-
classifiers=get_classifiers(version_data["version_info"]),
212+
classifiers=CLASSIFIERS,
225213
url="https://github.com/coveragepy/coveragepy",
226214
project_urls={
227215
"Documentation": version_data["__url__"],

tests/test_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_more_metadata(self) -> None:
5050

5151
classifiers = cast(list[str], setup_args["classifiers"])
5252
assert len(classifiers) > 7
53-
assert classifiers[-1].startswith("Development Status ::")
53+
assert classifiers[0].startswith("Development Status ::")
5454
assert "Programming Language :: Python :: %d" % sys.version_info[:1] in classifiers
5555
assert "Programming Language :: Python :: %d.%d" % sys.version_info[:2] in classifiers
5656

0 commit comments

Comments
 (0)