-
Notifications
You must be signed in to change notification settings - Fork 46
Upload fails if classifier is tuple rather than list #670
Comments
Thank you for the report. Could you paste the exact traceback? Did you see it on PyPI or when you run |
It doesn't happen with just the There is no traceback just a message:
That is with a tuple for classifiers as per: If I change from |
Perhaps there could be a custom validator to convert tuple to list at https://github.com/pypa/warehouse/blob/57f70e977c979f0ca2a2fe640a9362eaf72898af/warehouse/forklift/legacy.py#L338 But I'm not sure if it's worth to do anything to handle tuples (or if there's a better way). It's ultimately up to @dstufft and @ewdurbin. |
Your answer makes me think I need to be clearer about why I raised this issue.
Personally, I don’t mind using a list instead of a tuple and I managed to work out why after a couple of minutes of fiddling.
However, the way the error is reported does not convey the actual cause of the error (and so is misleading).
Given that this happened on code that had previously worked fine for years then it seems possible that someone else might be affected.
I raised the issue in case someone else might be affected who did not think to try switching the classifier sequence from tuple to list.
I think you’ll admit it isn’t exactly implied by the error message, right?
Giles
|
howdy! we recently deprecated upload functionality from this codebase and it is now powered by https://github.com/pypa/warehouse and this is likely a regression introduced during that migration. would you mind filing an issue with warehouse? |
NP |
Fixes a warning on Python 3.7: Warning: 'classifiers' should be a list, got type 'tuple' Maybe it could prevent other issues too: pypi/legacy#670
This did not used to be the case.
The error message is confusing as it looks like the classifier value is not correct.
The text was updated successfully, but these errors were encountered: