Skip to content

Commit 083f33a

Browse files
committed
Deprecate get_search_path
1 parent 900248a commit 083f33a

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

README.rst

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Changelog
8484
Unreleased
8585

8686
- Drop support for Python 3.7
87+
- ``typeshed_client.finder.get_search_path()`` is now deprecated, as it is no longer useful
8788

8889
Version 2.4.0 (September 29, 2023)
8990

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def find_bundled_files() -> Iterable[str]:
4646
},
4747
license="MIT",
4848
packages=["typeshed_client"],
49-
install_requires=["importlib_resources >= 1.4.0"],
49+
install_requires=["importlib_resources >= 1.4.0", "typing-extensions>=4.5.0"],
5050
package_data={"typeshed_client": list(find_bundled_files())},
5151
classifiers=[
5252
"Development Status :: 3 - Alpha",

typeshed_client/finder.py

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
)
2323

2424
import importlib_resources
25+
from typing_extensions import deprecated
2526

2627
PythonVersion = Tuple[int, int]
2728
ModulePath = NewType("ModulePath", Tuple[str, ...])
@@ -209,6 +210,10 @@ def _get_all_stub_files_from_directory(
209210

210211

211212
@lru_cache
213+
@deprecated(
214+
"This function is not useful with the current layout of typeshed. "
215+
"It may be removed from a future version of typeshed-client."
216+
)
212217
def get_search_path(typeshed_dir: Path, pyversion: Tuple[int, int]) -> Tuple[Path, ...]:
213218
# mirrors default_lib_path in mypy/build.py
214219
path: List[Path] = []

0 commit comments

Comments
 (0)