diff --git a/plugin/core/url.py b/plugin/core/url.py index eeff0cde7..1e9f09418 100644 --- a/plugin/core/url.py +++ b/plugin/core/url.py @@ -1,5 +1,6 @@ from __future__ import annotations from typing import Any +from typing_extensions import deprecated from urllib.parse import urljoin from urllib.parse import urlparse from urllib.request import pathname2url @@ -31,6 +32,7 @@ def view_to_uri(view: sublime.View) -> str: return filename_to_uri(file_name) +@deprecated("Use parse_uri() instead") def uri_to_filename(uri: str) -> str: """ DEPRECATED: An URI associated to a view does not necessarily have a "file:" scheme. diff --git a/plugin/session_buffer.py b/plugin/session_buffer.py index d8eb80df7..06de98ef6 100644 --- a/plugin/session_buffer.py +++ b/plugin/session_buffer.py @@ -49,6 +49,7 @@ from typing import Any, Callable, Iterable, List, Protocol from typing import cast from typing_extensions import TypeGuard +from typing_extensions import deprecated from weakref import WeakSet import sublime import time @@ -192,6 +193,7 @@ def get_view_in_group(self, group: int) -> sublime.View: return next(iter(self.session_views)).view @property + @deprecated("Use get_language_id() instead") def language_id(self) -> str: """ Deprecated: use get_language_id