Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 2.19 KB

7469.feature.rst

File metadata and controls

25 lines (21 loc) · 2.19 KB

The types of objects used in pytest's API are now exported so they may be used in type annotations.

The newly-exported types are:

Constructing most of them directly is not supported; they are only meant for use in type annotations. Doing so will emit a deprecation warning, and may become a hard-error in pytest 8.0.

Subclassing them is also not supported. This is not currently enforced at runtime, but is detected by type-checkers such as mypy.