Commit f012485e authored by Jason R. Coombs's avatar Jason R. Coombs

Disallow unordered sequences for specifying install_requires. Fixes #458.

parent 45f6ce2a
v38.0.0
-------
* #458: In order to support deterministic builds, Setuptools no
longer allows packages to declare ``install_requires`` as
unordered sequences (sets or dicts).
v37.0.0 v37.0.0
------- -------
......
...@@ -166,6 +166,8 @@ def check_requirements(dist, attr, value): ...@@ -166,6 +166,8 @@ def check_requirements(dist, attr, value):
"""Verify that install_requires is a valid requirements list""" """Verify that install_requires is a valid requirements list"""
try: try:
list(pkg_resources.parse_requirements(value)) list(pkg_resources.parse_requirements(value))
if isinstance(value, (dict, set)):
raise TypeError("Unordered types are not allowed")
except (TypeError, ValueError) as error: except (TypeError, ValueError) as error:
tmpl = ( tmpl = (
"{attr!r} must be a string or list of strings " "{attr!r} must be a string or list of strings "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment