@@ -9,7 +9,7 @@ from _typeshed.importlib import LoaderProtocol
99from collections .abc import Callable , Iterable , Iterator , Mapping , MutableSequence , Sequence
1010from importlib .machinery import ModuleSpec
1111from importlib .metadata import DistributionFinder , PathDistribution
12- from typing import Any , Final , Literal
12+ from typing import Any , Final , Literal , overload
1313from typing_extensions import Self , deprecated
1414
1515if sys .version_info >= (3 , 10 ):
2626
2727MAGIC_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 : ...
3036def source_from_cache (path : StrPath ) -> str : ...
3137def decode_source (source_bytes : ReadableBuffer ) -> str : ...
3238def spec_from_file_location (
0 commit comments