Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,17 @@ <h3 id="advantages">Advantages of wheels</h3>
<h2 id="about-list">What is this list?</h2>
<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>
<ul>
<li><span class="text-success">Green</span> packages offer wheels,</li>
<li><span class="text-success">Green</span> packages offer wheels compatible with the newest Python version (updated shortly before its final release),</li>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Let's mention the actual version from NEWEST_PYTHON_VER somewhere, please

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's displayed when you hover over the green packages on the list. However I agree, it could be made more visible.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I amended this on the line 77 of the diff

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd like this as:

Suggested change
<li><span class="text-success">Green</span> packages offer wheels compatible with the newest Python version (updated shortly before its final release),</li>
<li><span class="text-success">Green</span> packages offer wheels (either universal, or built for Python 3.13),</li>

I want to avoid adding any kind of template generation, but I'm open to the idea of adding a new key into the JSON to represent the targeted Python version though, if you're happy to include that?

"updated shortly before its final release"

I'm on the fence about the idea of updating the Python version on this website before Python does so. If and when that's done, I think it would need a clearer call-out to explain why, and I think it would deserve its own PR.

<li><span class="text-warning">Orange</span> packages offer older wheels,</li>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this may be clearer as:

Suggested change
<li><span class="text-warning">Orange</span> packages offer older wheels,</li>
<li><span class="text-warning">Orange</span> packages offer wheels built for older Python versions,</li>

<li><span class="text-muted">White</span> packages have no wheel archives uploaded (yet!).</li>
</ul>
<p>Currently, Python 3.13 is considered the newest Python version.</p>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Is it possible to use the NEWEST_PYTHON_VER value here? Otherwise I am afraid the version might get out of sync later.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, we'd have to generate index.html from a template rather than use the file verbatim as it is now. So I guess that would require pulling jinja2 and adding the generating machinery? Maybe there is an easier way?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned above, I think we can put this version in the explanation of the green packages, so will not need this line here.

<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>
<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.
<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>
<h2 id="creating-new-version-wheels">My package is orange. What can I do?</h2>
<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>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this section to after the "My package is white" section, please?

I'd like to make some changes to the wording here:

Suggested change
<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>
<p>This indicates that your package doesn't yet publish the wheels compatible with the latest Python. Consider releasing a new compatible build or version, to make it possible for users of your package to update Python.</p>

For the following paragraph: I don't know much about the stable ABI, and I think it's worth going into a little more detail about the impact that porting would make. Would it mean that it's possible to release a universal wheel?

<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>
<h2 id="creating-wheels">My package is white. What can I do?</h2>
<h3 id="pure-wheel">Pure Python</h3>
<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>
Expand Down
19 changes: 18 additions & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@

SESSION = requests.Session()

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


def get_json_url(package_name):
return BASE_URL + "/" + package_name + "/json"
Expand All @@ -31,6 +36,7 @@ def annotate_wheels(packages):
for index, package in enumerate(packages):
print(index + 1, num_packages, package["name"])
has_wheel = False
has_newest_wheel = False
url = get_json_url(package["name"])
response = SESSION.get(url)
if response.status_code != 200:
Expand All @@ -40,13 +46,24 @@ def annotate_wheels(packages):
for download in data["urls"]:
if download["packagetype"] == "bdist_wheel":
has_wheel = True
abi_tag = download["filename"].split("-")[-2]
# wheel can be universal or compiled for the specific Python version
# there can be additional letters at the end of the abi tag
# e.g. "cp313t" built for free-threading
if abi_tag in ["none", "abi3"] or abi_tag.startswith(NEWEST_PYTHON_ABI_TAG):
has_newest_wheel = True
package["wheel"] = has_wheel
package["newest_wheel"] = has_newest_wheel

# Display logic. I know, I'm sorry.
package["value"] = 1
if has_wheel:
if has_newest_wheel:
package["css_class"] = "success"
package["icon"] = "\u2713" # Check mark
package["title"] = f"This package provides a wheel compatible with Python {NEWEST_PYTHON_VER}."
elif has_wheel:
package["css_class"] = "warning"
package["icon"] = "\u23FA" # Circle
package["title"] = "This package provides a wheel."
else:
package["css_class"] = "default"
Expand Down
6 changes: 6 additions & 0 deletions wheel.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
fill: #5CB85C;
}

.warning {
stroke: #d58512;
stroke-width: 1;
fill: #ed9c28;
}

Comment on lines +7 to +12
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In light of this historical comment, I wonder if there may be a more broadly accessible colour than orange here.

.default {
stroke: #cccccc;
stroke-width: 1;
Expand Down