extras_require behaving differently in setuptools 36.2.1, breaking Twisted test
See original GitHub issueThis Twisted test started failing this morning with setuptools 36.2.1:
https://github.com/twisted/twisted/blob/trunk/src/twisted/python/test/test_setup.py#L76
def test_distributeTakesExtrasRequire(self):
"""
Setuptools' Distribution object parses and stores its C{extras_require}
argument as an attribute.
"""
extras = dict(im_an_extra_dependency="thing")
attrs = dict(extras_require=extras)
distribution = Distribution(attrs)
self.assertEqual(
extras,
distribution.extras_require
)
With this:
===============================================================================
[FAIL]
Traceback (most recent call last):
File "/Users/crodrigues/twisted1/src/twisted/python/test/test_setup.py", line 86, in test_distributeTakesExtrasRequire
distribution.extras_require
File "/Users/crodrigues/twisted1/src/twisted/trial/_synctest.py", line 432, in assertEqual
super(_Assertions, self).assertEqual(first, second, msg)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 515, in assertEqual
assertion_func(first, second, msg=msg)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 837, in assertDictEqual
self.fail(self._formatMessage(msg, standardMsg))
twisted.trial.unittest.FailTest: {'im_an_extra_dependency': 'thing'} != {'im_an_extra_dependency': ['thing']}
- {'im_an_extra_dependency': 'thing'}
+ {'im_an_extra_dependency': ['thing']}
? + +
twisted.python.test.test_setup.OptionalDependenciesTests.test_distributeTakesExtrasRequire
-------------------------------------------------------------------------------
Looks like the value in the dictionary is now being converted to a list, whereas before it was not.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Install setuptools 36.2.1 through exception #1101 - GitHub
The problem occurs when upgrading/downgrading setuptools from 36.2.0, with pip, and from source. What command do you use?
Read more >Does pip handle extras_requires from setuptools/distribute ...
If I run python setup.py install on package B, which uses setuptools. command. easy_install under the hood, the extras_requires is correctly resolved, and ......
Read more >Dependencies Management in Setuptools
There are three types of dependency styles offered by setuptools: 1) build system requirement, 2) required dependency and 3) optional dependency.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep sorry, I updated my comment above, it’s
d.items()
in the lambda.I’ll close this for now, because https://github.com/twisted/twisted/pull/847 seems to work. I don’t know if other setuptools users will hit this, but keep an eye out for it.