This happens if there are more versions of the package. For example try to install pytest 6.2.0, even when using Version (6, 2, 0), the installed version is 6.2.5. I think we should differentiate between Version(6, 2) and Version(6, 2, 0), probably initializing implicit arguments to None instead of 0 and handling None everywhere in version.py.
If we do end up doing this, it probably needs to be the special case, not the default one. I seem to recall this is the behavior we want when dealing with iOS/MacOS versions, although been a bit since I was dealing with this code
<rdar://problem/83613371>
Created attachment 440633 [details] Patch
Created attachment 440647 [details] Patch for landing
Committed r283824 (242711@main): <https://commits.webkit.org/242711@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 440647 [details].
Reverted https://trac.webkit.org/changeset/283824/webkit in: https://trac.webkit.org/changeset/283850/webkit