PEP 825: Add "removing ordering information" to rejected ideas#60
PEP 825: Add "removing ordering information" to rejected ideas#60mgorny wants to merge 2 commits into
Conversation
Signed-off-by: Michał Górny <mgorny@quansight.com>
Documentation build overview
740 files changed ·
|
rgommers
left a comment
There was a problem hiding this comment.
Thanks @mgorny! This is pretty good, but it can be strengthened a bit more. I made a couple of inline suggestions. In addition, I think Paul's key point was slightly broader, it was conceptual rather than practical. I'd link https://discuss.python.org/t/pep-825-wheel-variants-package-format-split-from-pep-817/106196/111 explicitly. And then in the reply, also address the conceptual part:
Essentially Paul is saying that this data, when inserted in one wheel, is saying something about "other wheels" (even these quotes are in his post). I don't think that's the case. Rather, I'd frame it as: ordering is project-level metadata, and a copy of that is made into every wheel. Similar to other project-level metadata. There is no reference to specific other wheels. And even if, for example, variant wheels covering one provider are missing from a release completely, that is fine, nothing depends on specific other wheels existing.
So, I'd frame it in this order:
- Conceptual: this is project-level metadata, and one can think of
variants.jsonas a cache - Practical: the two advantages you listed.
| 2. It enables selecting across multiple wheels without having to | ||
| generate the index-level metadata file first, which can be useful | ||
| when installing from local directories. The index-level metadata file | ||
| remains a cache file rather than a first-order data source. |
There was a problem hiding this comment.
I'd say this point that the JSON file is a cache rather than first-order data source is good to put higher up, it's a separate point to make about the design that I think is fairly strong.
| wheels is stored in a single location, and the index-level metadata | ||
| can be generated from variant wheels without additional input data. | ||
| Notably, this empowers indexes to generate it automatically without | ||
| requiring any additional client-side logic. |
There was a problem hiding this comment.
How about "without requiring publishers to upload an additional file" to be more explicit? The average reader might not know exactly what "client-side logic" means here.
|
Given how important this objection was/is, it might even be useful to extend it a bit more, addressing two questions directly: "What about inconsistency between wheels built at different times with different tooling?" I'd say the answer is something like: "This PEP requires consistency, tools SHOULD verify it, and the realistic failure mode is building different variants with different versions of build tools. That is a bad idea that can also affect every other piece of duplicated metadata (e.g., ending up with different Core Metadata versions if you do that). Also, I'd quote this, also from post 111: "it becomes possible for installers to support overrides by simply having a I'd say that that doesn't depend on removing this metadata from individual wheels, it can be done either way. |
I don't think "cache" is a right word. "Cache" implies it's only an optimization, and you can refetch the data. However, here you can't refetch it directly because there's no definite "source of data" you can access. I can't think of the correct term, though.
That's 💯 true, though it sounds a bit weird to be mentioning this in this context, since Paul's assumption that you cannot do that with the existing design was simply mistaken. That said, rereading his post; perhaps what we could do is clarify the scope of individual parts of wheel variant metadata; i.e. that the |
That sounds like a useful edit to make, perhaps it helps more readers. I also like that we're thinking about how to improve the PEP itself; even if we think a comment is mistaken, it might be caused by an explanation not as easily digestible as we think it is. |
It depends on who "you" is I guess. The source of truth is Not sure if "cache" is the ideal word either, but we should be able to explain it in words or in a little ascii diagram I'd think? |
Well, yes and no. It might be |
I'm not sure if I understand this right. Given that the input would be in |
Signed-off-by: Michał Górny <mgorny@quansight.com>
|
Okay, I've pushed my first attempt at rewording it per your feedback. I've left the "scope" problem out, to be addressed separately. |
No description provided.