I’m not sure how I could have made it much clearer, sorry. I describe in detail the multiple potential scenarios under which either the the project key corresponding to the License field or the License-Expression field would be required to be dynamic, but not the other, as well as the other problems and ambiguities this creates, right under the Rejected Idea in question, and also directly link the primary specification section that describes this, which has been present well before I revised the PEP.
For convenience, here’s the relevant except of the rejected idea that specifically discusses this:
Most importantly, it still means that per PEP 621, it is not possible to
separately mark the [project] keys corresponding to the License and
License-Expression metadata fields as dynamic. This, in turn, still
renders specifying metadata following that standard incompatible with
conversion of legacy metadata, as specified in this PEP’s
Converting legacy metadata_ section, as PEP 621 strictly prohibits the
license key from being both present (to define the existing value of
the License field, or the path to a license file, and thus able to be
converted), and specified as dynamic (which would allow tools to
use the generated value for the License-Expression field.
For the same reasons, this would make it impossible to back-fill the
License field from the License-Expression field as this PEP
currently allows (without making an exception from strict
dynamic behavior in this case), as again, marking license as dynamic
would mean it cannot be specified in the project table at all.
Furthermore, this would mean existing project source metadata specifying
license as dynamic would be ambiguous, as it would be impossible for
tools to statically determine if they are intended to conform to previous
metadata versions specifying License, or this version specifying
License-Expression. Tools would have no way of determining which field,
if either, might be filled in the resulting distribution’s core metadata.
By contrast, the present approach makes clear what the author intended,
allows tools to unambiguously determine which field(s) may be dynamically
inserted, and ensures backward compatibility such that current project
source metadata do not unknowingly specify both the old and the new field
as dynamic, and instead must do so explicitly per PEP 621’s intent.
All that said, per @pradyunsg and my previous discussion above, none of these are as hard blockers as I originally assumed; the first point still stands but is not as critical in practice as I initially framed it to be, the second point is resolved by language I included in the present version of the spec and the third point is still an issue in theory but not likely to matter as much in practice given the practical reality of current PEP 621 usage.
I agree, which I clarify above (though to note, the previous presumed hard blocker was the dynamic field handling, not the key name confusion); its just a point of likely user confusion when switching between all existing tools and PEP 621 keys, which use the same key with different syntax and semantics (and metadata field mapping).
Its not clear if you’re referring to the license key or the License field, which are two very different things for the purposes of this PEP and a critical distinction I take great pains to make and define clear and consistent terminology around (in fact, the very one that caused serious issues when interpreting PEP 621’s intent around the very point of most crucial interest here). However, either way, I think we might not be on the same page here. Per the present iteration of this PEP, as discussed at great length and agreed by all on the previous thread, the License field is not re-used for the new license expressions, so there is no backward compat impact there.
The potential issue is with the license PEP 621 key, specifically its interaction with the dynamic key and potential user confusion around its name being the same as the very different license key in other tool metadata formats, but that actual value itself is unambiguous to tooling because it was reserved for this purpose by PEP 621, as @pradyunsg makes a repeated point of. All the suggestions proposed here are well out of line with the consensus on the previous issue and what is implemented on the PEP, and are entirely orthogonal to the specific issues addressed.
Like gun enthusiasts who behave irresponsibly and ignore basic safety rules with where they point their firearm rather than treating it with the respect it deserved, as a potentially deadly weapon if not handled carefully, irresponsible package authors are if anything the potential perpetrators, not the victims here, while the latter are those downrange that the package author might not realize they are affecting. As they are the creators of their packages, and typically of most if not all of the code, the issue of licensing matters (legally and practically) least to them, whereas it does pose an issue for downrange (er, downstream) users, particularly those who are the most safe, careful and respectful about always ensuring they have permission before using, modifying and distributing others’ code.
They are welcome to use their gun as they please in their own private rural farm where it won’t hurt anyone, and teach their kids how to use it, but once they go out into the world, share their gun and use it with others, that’s where the problems for everyone arise if they don’t follow the basic rules before they shoot. And sometimes, if others contribute to their code, their very bullets ricochet back to hit them if they aren’t careful.
In any case, this is all a bit of an aside, as an aim of this PEP is to make it as simple, clear and obvious as possible for authors to add basic licensing metadata and be done with it, without dealing with different fields, ambiguities, custom classifiers, manually specifying license files, etc. And this PEP includes a simple step by step guide aimed directly at this very class of users, telling them the simplest possible approach of how to add a license and be done with it, and not have to ever worry again about it, in the least practical time.
Of course, as it also makes clear, authors are under no obligation to it at all, but if they do use it, this PEP ensures they understand and use it accurately and unambiguously. Otherwise, it is little or no better than using it at all anyway, and quite possible worse, and this PEP has ultimately failed in its most fundamental goal as established from the onset.
No, that is false
, because again, in the context of a TOML key specifying a project metadata field, “the project license” has no clear meaning, just like saying “pass the day of week to the function” has no clear meaning—do you mean the string day of week? In what form? The day number of week, as an int? A datetime object? An enum? A custom class? etc. In this case, as already mentioned before, this could mean a variety of different things (two of which are already included as options under the existing PEP 621 license field, with a third reserved). The goal of this PEP is to make adding license metadata as clear and obvious as possible, without users having to guess what they should put there.
This PEP goes to great lengths to support package authors who want to spend the minimum practical time specifying their license choice and then never needing to worry about it again (or be bothered by people asking them), by concisely describing, in plain, friendly language, step by step, exactly the minimum that such authors need to do in the most common, straightforward situations. Furthermore, it includes carefully tailored guidance for tools on how to minimize user mistakes and frustration, requires they provide helpful error messages for common cases without leaving users guessing, and includes detailed provisions for how tools can convert legacy to new license metadata automatically, and backfill legacy metadata from new metadata.
Again, if authors prefer not to specify a license, or actively refuse, this PEP makes very clear that it in no way requires them to do so at all, at any point, and explains in plain language what this means for them and their users. Of course, if users do choose to use the new gun in this PEP, it has a safety trigger that will not go off if pointed at someone, but they are by no means obligated to use it at all, and they can continue shooting away in their urban backyards with their current ones, if they so choose. This PEP, of course, cannot ethically encourage irresponsible behavior, and makes the consequences of their choices clear, but by no means does it take them away from them and seeks to make it as straightforward and painless as possible for them to make responsible ones, if they so desire.