Conversation
Since `{{ name }}` is already templated elsewhere, template it in the
filename of the archive too for consistency.
for more information, see https://pre-commit.ci
|
Should add the other option would be to skip templating |
|
|
||
| for pkg_url in metadata["urls"]: | ||
| if pkg_url["packagetype"] == "sdist": | ||
| name = metadata["info"]["name"] |
There was a problem hiding this comment.
AFAICT metadata is gotten by requesting JSON for a package on PyPI like so...
import json
import requests
name = "dask-cuda"
req = requests.get(f"https://pypi.org/pypi/{name}/json")
metadata = json.loads(req.content)
assert metadata["info"]["name"] == nameThis appears valid when looking at dask-cuda on PyPI
Am I missing something?
There was a problem hiding this comment.
I have often wished the upstream Warehouse data model was captured somewhere other than in the code for warehouse (e.g. an OpenAPI spec, some TypedDicts, really anything...)
There was a problem hiding this comment.
Ah good catch! Thanks Nick 🙏
Wasn't thinking about fixtures for some reason 🤦♂️
Yeah was really hoping I could find some docs describing this somewhere, but was unable 😞
There was a problem hiding this comment.
all the "truth" is out there:
- https://github.com/pypi/warehouse/blob/main/warehouse/classifiers/models.py
- https://github.com/pypi/warehouse/blob/main/warehouse/packaging/models.py
There's an open issue for documenting it, but no spec as of yet.
There was a problem hiding this comment.
as far as I remember, pypi converts the _ to -, but it does not work for all
packages that were initially specified as having the _ will just work with it. pypi api is a bit confusing
|
Also looks like |
|
I've found that an increasing number of packages' build chains will start spitting out |
|
Am ok with that. Mainly want to be consistent with whichever approach we choose |
|
Hi folks, sorry for my delay. |
|
I am a bit busy these days, I don't have much free time to take a proper look at this |
|
Toggling for CI |
|
is it still relevant? I remember that it is not using |
|
Yes as we are still handling That said, if we would rather inject the |
Description
Since
{{ name }}is already templated elsewhere, template it in the filename of the archive too for consistency.Note: This behavior was observed in comment ( conda-forge/staged-recipes#22395 (comment) )