diff options
author | PJ Eby <distutils-sig@python.org> | 2006-01-03 23:10:20 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2006-01-03 23:10:20 +0000 |
commit | 66f695814c317bf366e4fa2372be936d11ce1ad2 (patch) | |
tree | cbbfb2714143f7a1fbcecb28f09ac1ff946a1078 /pkg_resources.py | |
parent | a2f7cc5d1c2f6d12b5dcaf49aaa020c13f4b1cbb (diff) | |
download | external_python_setuptools-66f695814c317bf366e4fa2372be936d11ce1ad2.tar.gz external_python_setuptools-66f695814c317bf366e4fa2372be936d11ce1ad2.tar.bz2 external_python_setuptools-66f695814c317bf366e4fa2372be936d11ce1ad2.zip |
Make it clearer that Requirement.parse() is the only way for users
to create correct Requirement instances.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041909
Diffstat (limited to 'pkg_resources.py')
-rw-r--r-- | pkg_resources.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index f5b2ca63..1181ebec 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2049,9 +2049,9 @@ def _sort_dists(dists): class Requirement: - def __init__(self, project_name, specs=(), extras=()): - self.project_name = project_name - self.key = project_name.lower() + def __init__(self, project_name, specs, extras): + """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!""" + self.project_name, self.key = project_name, project_name.lower() index = [(parse_version(v),state_machine[op],op,v) for op,v in specs] index.sort() self.specs = [(op,ver) for parsed,trans,op,ver in index] |