Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/12744.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed typing compatibility with Python 3.9 or less -- replaced `typing.Self` with `typing_extensions.Self` -- by :user:`Avasam`
3 changes: 2 additions & 1 deletion src/_pytest/doctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@

if TYPE_CHECKING:
import doctest
from typing import Self

from typing_extensions import Self

DOCTEST_REPORT_CHOICE_NONE = "none"
DOCTEST_REPORT_CHOICE_CDIFF = "cdiff"
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@


if TYPE_CHECKING:
from typing import Self
from typing_extensions import Self

# Imported here due to circular import.
from _pytest.main import Session
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@


if TYPE_CHECKING:
from typing import Self
from typing_extensions import Self


def pytest_addoption(parser: Parser) -> None:
Expand Down
Loading