Skip to content

Commit 578cdde

Browse files
authored
Deprecate undocumented pydoc.ispackage (#13865)
1 parent e3f0de7 commit 578cdde

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

stdlib/pydoc.pyi

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ from collections.abc import Callable, Container, Mapping, MutableMapping
66
from reprlib import Repr
77
from types import MethodType, ModuleType, TracebackType
88
from typing import IO, Any, AnyStr, Final, NoReturn, Protocol, TypeVar
9-
from typing_extensions import TypeGuard
9+
from typing_extensions import TypeGuard, deprecated
1010

1111
__all__ = ["help"]
1212

@@ -31,7 +31,14 @@ def stripid(text: str) -> str: ...
3131
def allmethods(cl: type) -> MutableMapping[str, MethodType]: ...
3232
def visiblename(name: str, all: Container[str] | None = None, obj: object = None) -> bool: ...
3333
def classify_class_attrs(object: object) -> list[tuple[str, str, type, str]]: ...
34-
def ispackage(path: str) -> bool: ...
34+
35+
if sys.version_info >= (3, 13):
36+
@deprecated("Deprecated in Python 3.13.")
37+
def ispackage(path: str) -> bool: ...
38+
39+
else:
40+
def ispackage(path: str) -> bool: ...
41+
3542
def source_synopsis(file: IO[AnyStr]) -> AnyStr | None: ...
3643
def synopsis(filename: str, cache: MutableMapping[str, tuple[int, str]] = {}) -> str | None: ...
3744

0 commit comments

Comments
 (0)