Skip to content

Commit 81eae93

Browse files
committed
Display the packages with wheels compatible with the newest Python
Motivation: Every year, the Fedora Python contributors open a bunch of issues to upstream projects to ask them to publish the new Python wheels early. This update will increase the visibility of the projects that need our attention and may serve as a gentle nudge for the project authors to not stay behind the rest of the ecosystem.
1 parent fb1d09e commit 81eae93

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,16 @@ <h3 id="advantages">Advantages of wheels</h3>
7070
<h2 id="about-list">What is this list?</h2>
7171
<p>This site shows the top 360 most-downloaded packages on <a href="https://pypi.org/">PyPI</a> showing which have been uploaded as wheel archives.</p>
7272
<ul>
73-
<li><span class="text-success">Green</span> packages offer wheels,</li>
73+
<li><span class="text-success">Green</span> packages offer wheels compatible with the newest Python version (updated shortly before its final release),</li>
74+
<li><span class="text-warning">Orange</span> packages offer older wheels,</li>
7475
<li><span class="text-muted">White</span> packages have no wheel archives uploaded (yet!).</li>
7576
</ul>
7677
<p>Packages that are known to be deprecated are not included. (For example distribute). If your package is incorrectly listed, please <a href="https://github.com/meshy/pythonwheels/issues/">create a ticket</a>.</p>
7778
<p>This used to show the all-time most-downloaded packages. The all-time list is no longer available, and the packages in <a href="https://hugovk.github.io/top-pypi-packages/">the last-30-days list</a> will change to reflect more closely what the Python community is using.
7879
<p>This is not the official website for wheels, just a nice visual way to measure adoption. To see the authoritative guide on wheels and other aspects of Python packaging, see the <a href="https://packaging.python.org">Python Packaging User Guide</a>.</p>
80+
<h2 id="creating-new-version-wheels">My package is orange. What can I do?</h2>
81+
<p>If you have a package that doesn't publish the wheels for the newest Python yet, consider releasing them on PyPI. This will make it possible for Python users to start developing with a new Python version from the day of its release.</p>
82+
<p>Alternatively, you can consider porting your project to the <a href="https://docs.python.org/3/c-api/stable.html#stable-application-binary-interface">stable ABI</a>.</p>
7983
<h2 id="creating-wheels">My package is white. What can I do?</h2>
8084
<h3 id="pure-wheel">Pure Python</h3>
8185
<p>If you have a pure Python package that is not using 2to3 for Python 3 support, you've got it easy. Make sure Wheel is installed&hellip;</p>

utils.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020

2121
SESSION = requests.Session()
2222

23+
# Updated ~ when the release candidates start to appear
24+
# Goal: to have as many as possible wheels ready to use from the day it's released
25+
NEWEST_PYTHON_VER = "3.13"
26+
NEWEST_PYTHON_ABI_TAG = "cp313"
27+
2328

2429
def get_json_url(package_name):
2530
return BASE_URL + "/" + package_name + "/json"
@@ -31,6 +36,7 @@ def annotate_wheels(packages):
3136
for index, package in enumerate(packages):
3237
print(index + 1, num_packages, package["name"])
3338
has_wheel = False
39+
has_newest_wheel = False
3440
url = get_json_url(package["name"])
3541
response = SESSION.get(url)
3642
if response.status_code != 200:
@@ -40,13 +46,24 @@ def annotate_wheels(packages):
4046
for download in data["urls"]:
4147
if download["packagetype"] == "bdist_wheel":
4248
has_wheel = True
49+
abi_tag = download["filename"].split("-")[-2]
50+
# wheel can be universal or compiled for the specific Python version
51+
# there can be additional letters at the end of the abi tag
52+
# e.g. "cp313t" built for free-threading
53+
if abi_tag in ["none", "abi3"] or abi_tag.startswith(NEWEST_PYTHON_ABI_TAG):
54+
has_newest_wheel = True
4355
package["wheel"] = has_wheel
56+
package["newest_wheel"] = has_newest_wheel
4457

4558
# Display logic. I know, I'm sorry.
4659
package["value"] = 1
47-
if has_wheel:
60+
if has_newest_wheel:
4861
package["css_class"] = "success"
4962
package["icon"] = "\u2713" # Check mark
63+
package["title"] = f"This package provides a wheel compatible with Python {NEWEST_PYTHON_VER}."
64+
elif has_wheel:
65+
package["css_class"] = "warning"
66+
package["icon"] = "\u23FA" # Circle
5067
package["title"] = "This package provides a wheel."
5168
else:
5269
package["css_class"] = "default"

wheel.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
fill: #5CB85C;
55
}
66

7+
.warning {
8+
stroke: #d58512;
9+
stroke-width: 1;
10+
fill: #ed9c28;
11+
}
12+
713
.default {
814
stroke: #cccccc;
915
stroke-width: 1;

0 commit comments

Comments
 (0)