parameters: (
      filename,  # type: str
      session,  # type: PipSession
      finder=None,  # type: Optional[PackageFinder]
      options=None,  # type: Optional[optparse.Values]
      constraint=False,  # type: bool
  )
docstring: Parse a requirements file and yield ParsedRequirement instances.
  
      :param filename:    Path or url of requirements file.
      :param session:     PipSession instance.
      :param finder:      Instance of pip.index.PackageFinder.
      :param options:     cli options.
      :param constraint:  If true, parsing a constraint file rather than
          requirements file.
docstring_summary: Parse a requirements file and yield ParsedRequirement instances.
docstring_tokens: Parse a requirements file and yield ParsedRequirement instances .
function: def parse_requirements(
      filename,  # type: str
      session,  # type: PipSession
      finder=None,  # type: Optional[PackageFinder]
      options=None,  # type: Optional[optparse.Values]
      constraint=False,  # type: bool
  ):
      # type: (...) -> Iterator[ParsedRequirement]
      """Parse a requirements file and yield ParsedRequirement instances.
  
      :param filename:    Path or url of requirements file.
      :param session:     PipSession instance.
      :param finder:      Instance of pip.index.PackageFinder.
      :param options:     cli options.
      :param constraint:  If true, parsing a constraint file rather than
          requirements file.
      """
      line_parser = get_line_parser(finder)
      parser = RequirementsFileParser(session, line_parser)
  
      for parsed_line in parser.parse(filename, constraint):
          parsed_req = handle_line(
              parsed_line,
              options=options,
              finder=finder,
              session=session
          )
          if parsed_req is not None:
              yield parsed_req
function_tokens: def parse_requirements ( filename , # type: str session , # type: PipSession finder = None , # type: Optional[PackageFinder] options = None , # type: Optional[optparse.Values] constraint = False , # type: bool ) : # type: (...) -> Iterator[ParsedRequirement] line_parser = get_line_parser ( finder ) parser = RequirementsFileParser ( session , line_parser ) for parsed_line in parser . parse ( filename , constraint ) : parsed_req = handle_line ( parsed_line , options = options , finder = finder , session = session ) if parsed_req is not None : yield parsed_req