Skip to content

Replace raise StopIteration with return - adhere to Pep 479  #2160

Closed
@goodboy

Description

As per pytest-dev/pluggy#38 and pep 479, it seems that some pluggy hook wrappers implemented in pytest are still using the soon to be deprecated raise StopIteration mechanism to signal early generator termination.

An example would be pytest_pycollect_makeitem.

As indicated in the pep all such usage should be changed to simple returns in Py3.6+.

Metadata

Assignees

No one assigned

    Labels

    type: backward compatibilitymight present some backward compatibility issues which should be carefully noted in the changelog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions