def __init__(self, requirement_string):
try:<EOL><INDENT>super(Requirement, self).__init__(requirement_string)<EOL><DEDENT>except packaging.requirements.InvalidRequirement as e:<EOL><INDENT>raise RequirementParseError(str(e))<EOL><DEDENT>self.unsafe_name = self.name<EOL>project_name = safe_name(self.name)<EOL>self.project_name, self.key = project_name, project_name.lower()<EOL>self.specs = [<EOL>(spec.operator, spec.version) for spec in self.specifier]<EOL>self.extras = tuple(map(safe_extra, self.extras))<EOL>self.hashCmp = (<EOL>self.key,<EOL>self.specifier,<EOL>frozenset(self.extras),<EOL>str(self.marker) if self.marker else None,<EOL>)<EOL>self.__hash = hash(self.hashCmp)<EOL>
DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!