PythonPackageNameCheck: fix TypeError on empty PyPi remote#776
PythonPackageNameCheck: fix TypeError on empty PyPi remote#776falbrechtskirchinger wants to merge 1 commit intopkgcore:masterfrom
Conversation
Skip check when the PyPI remote-id in metadata.xml is empty and add a test package. Signed-off-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
| @@ -1102,6 +1102,12 @@ def feed(self, pkgs): | |||
| if len(pypi_remotes) != 1: | |||
There was a problem hiding this comment.
Unrelated- this should be a warning IMO so we can isolate how to handle this better. That situation shouldn't exist- if it does, it points at a bad metadata.xml definition, or something (again) we should address.
|
I think you're doing the inverse of what is needed- isn't this a malformed metadata.xml per glep68? the 'value'- name- is required. If they've specified a remote-id but left that out, it's malformed. |
While I see your point regarding GLEP 68, my goal with this PR is just to stop The crash prevents |
|
Also: pkgcheck/src/pkgcheck/checks/metadata_xml.py Lines 572 to 576 in 9ecf675 |
Skip check when the PyPI
remote-idinmetadata.xmlis empty and add a test package.Addresses the following crash observed with a template
metadata.xml(<remote-id type="pypi"></remote-id>):Expected result:
The test is primarily a regression test, for which I could find no precedent.
python/dev-python/PythonMismatchedPackageName4seems a bit out of place. Should I drop it, put it elsewhere, ...?