This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xtreak
Recipients TilmanKrummeck, dstufft, eric.araujo, xtreak
Date 2018-10-19.20:36:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1539981408.03.0.788709270274.issue35027@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for the report. It was made as a TypeError in https://bugs.python.org/issue19610#msg306853 in the commit to check for list explicitly [0] . Then since it broke a lot of packages as seen in the discussion and now it accepts string and list later at https://bugs.python.org/issue19610#msg307622 and commit [1] . 

I think Distribution doc was changed to reflect the change and setup doc had the old one indicating TypeError . So I guess it's a documentation fix that needs to be done. Using an integer for classifier gives me a warning and also eventually a TypeError on master and Python 3.7 . I am proposing this to be an easy doc fix. Would you like to raise a PR?

The doc is at https://github.com/python/cpython/blob/master/Doc/distutils/setupscript.rst


# Using classifier=1 in setup.py gives warning and then a TypeError. String is acceptable as per the original report

../cpython/python.exe setup.py sdist
Warning: 'classifiers' should be a list, got type 'int'
Traceback (most recent call last):
  File "setup.py", line 3, in <module>
    setup(name='foo',
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/distutils/dist.py", line 267, in __init__
    getattr(self.metadata, "set_" + key)(val)
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/distutils/dist.py", line 1215, in set_classifiers
    self.classifiers = _ensure_list(value, 'classifiers')
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/distutils/dist.py", line 40, in _ensure_list
    value = list(value)
TypeError: 'int' object is not iterable


[0] https://github.com/python/cpython/commit/dcaed6b2d954786eb5369ec2e8dfdeefe3cdc6ae#diff-d9afd486aff62306cb23cb8be2d4458eR1218

[1] https://github.com/python/cpython/commit/8837dd092fe5ad5184889104e8036811ed839f98#diff-d9afd486aff62306cb23cb8be2d4458eR30


Hope this helps!
History
Date User Action Args
2018-10-19 20:36:48xtreaksetrecipients: + xtreak, eric.araujo, dstufft, TilmanKrummeck
2018-10-19 20:36:48xtreaksetmessageid: <1539981408.03.0.788709270274.issue35027@psf.upfronthosting.co.za>
2018-10-19 20:36:48xtreaklinkissue35027 messages
2018-10-19 20:36:47xtreakcreate