-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore support for pkginfo 1.11 #1123
base: main
Are you sure you want to change the base?
Conversation
53f0216
to
71346e0
Compare
Well, shoot. It seems that after allowing pkginfo 1.11, the type checks are failing. It seems that |
Random thought: is there a reason this can't constrain |
My thought was that there are probably users still reliant on older versions, so it would be nice to have at least one release transition where users aren't forced to the newer version. I absolutely agree that after twine stabilizes, we might bump the dependency on pkginfo (and remove the compatibility logic). I coded it in such a way as to make it easy to remove the compatibility logic. I also observed that there's already an open issue #1070 tracking the move to pkginfo 1.10, so that issue would need to be addressed first (or simultaneously) with the move to 1.11. |
1ca93e2
to
a0fdb54
Compare
a0fdb54
to
a0da730
Compare
I don't understand why the coverage tests are failing. They weren't failing before. Maybe the upstream changes pushed the coverage marginally lower and now these changes push them even lower? Since the coverage failures are for total coverage and not diff coverage, it's difficult for me to see what changes in this PR have contributed to the failing check. |
Due to #1121, I'm unable to locally assess the coverage issues. |
Applied this PR as a patch, in Debian's twine. |
To get this moving again, perhaps can just reduce the coverage target at Line 22 in ae71822
96 since this does not appear to demonstrably reduce the coverage? Maybe just a rounding difference?
|
That's trivially worked around with
|
The new addition is:
|
For now, this approach retains the current behavior that an unrecognized metadata version will fail with an error.
This approach splits out the detection based on the version of pkginfo. Starting with pkginfo 1.11, it now properly detects when a metadata version is unrecognized and errors on that condition explicitly. For backward compatibility, until pkginfo 1.11 is the minimum, the check will still provide guidance to consider the metadata version when fields are missing.
Closes #1116