Skip to content

Commit 645c7d2

Browse files

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

stdlib/_frozen_importlib_external.pyi

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ from _typeshed.importlib import LoaderProtocol
99
from collections.abc import Callable, Iterable, Iterator, Mapping, MutableSequence, Sequence
1010
from importlib.machinery import ModuleSpec
1111
from importlib.metadata import DistributionFinder, PathDistribution
12-
from typing import Any, Final, Literal
12+
from typing import Any, Final, Literal, overload
1313
from typing_extensions import Self, deprecated
1414

1515
if sys.version_info >= (3, 10):
@@ -26,7 +26,13 @@ else:
2626

2727
MAGIC_NUMBER: Final[bytes]
2828

29-
def cache_from_source(path: StrPath, debug_override: bool | None = None, *, optimization: Any | None = None) -> str: ...
29+
@overload
30+
@deprecated(
31+
"The `debug_override` parameter is deprecated since Python 3.5; will be removed in Python 3.15. Use `optimization` instead."
32+
)
33+
def cache_from_source(path: StrPath, debug_override: bool, *, optimization: None = None) -> str: ...
34+
@overload
35+
def cache_from_source(path: StrPath, debug_override: None = None, *, optimization: Any | None = None) -> str: ...
3036
def source_from_cache(path: StrPath) -> str: ...
3137
def decode_source(source_bytes: ReadableBuffer) -> str: ...
3238
def spec_from_file_location(

0 commit comments

Comments
 (0)