diff --git a/poetry.lock b/poetry.lock index 60456a0e..e939750b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "alabaster" @@ -436,13 +436,13 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "lsprotocol" -version = "2023.0.0a3" +version = "2023.0.0b1" description = "Python implementation of the Language Server Protocol." optional = false python-versions = ">=3.7" files = [ - {file = "lsprotocol-2023.0.0a3-py3-none-any.whl", hash = "sha256:2896c5a30c34846e3d5687e35715961f49bf7b92a36e4fb2b707ff65f19087f7"}, - {file = "lsprotocol-2023.0.0a3.tar.gz", hash = "sha256:d704e4e00419f74bece9795de4b34d02aa555fc0131fec49f59ac9eb46816e51"}, + {file = "lsprotocol-2023.0.0b1-py3-none-any.whl", hash = "sha256:ade2cd0fa0ede7965698cb59cd05d3adbd19178fd73e83f72ef57a032fbb9d62"}, + {file = "lsprotocol-2023.0.0b1.tar.gz", hash = "sha256:f7a2d4655cbd5639f373ddd1789807450c543341fa0a32b064ad30dbb9f510d4"}, ] [package.dependencies] @@ -761,13 +761,13 @@ testing = ["coverage (>=6.2)", "flaky (>=3.5.0)", "hypothesis (>=5.7.1)", "mypy [[package]] name = "pytz" -version = "2023.3" +version = "2023.3.post1" description = "World timezone definitions, modern and historical" optional = false python-versions = "*" files = [ - {file = "pytz-2023.3-py2.py3-none-any.whl", hash = "sha256:a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb"}, - {file = "pytz-2023.3.tar.gz", hash = "sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588"}, + {file = "pytz-2023.3.post1-py2.py3-none-any.whl", hash = "sha256:ce42d816b81b68506614c11e8937d3aa9e41007ceb50bfdcb0749b921bf646c7"}, + {file = "pytz-2023.3.post1.tar.gz", hash = "sha256:7b4fddbeb94a1eba4b557da24f19fdf9db575192544270a9101d8509f9f43d7b"}, ] [[package]] @@ -1057,13 +1057,13 @@ sortedcontainers = "*" [[package]] name = "trio-websocket" -version = "0.10.3" +version = "0.10.4" description = "WebSocket library for Trio" optional = false python-versions = ">=3.7" files = [ - {file = "trio-websocket-0.10.3.tar.gz", hash = "sha256:1a748604ad906a7dcab9a43c6eb5681e37de4793ba0847ef0bc9486933ed027b"}, - {file = "trio_websocket-0.10.3-py3-none-any.whl", hash = "sha256:a9937d48e8132ebf833019efde2a52ca82d223a30a7ea3e8d60a7d28f75a4e3a"}, + {file = "trio-websocket-0.10.4.tar.gz", hash = "sha256:e66b3db3e2453017431dfbd352081006654e1241c2a6800dc2f43d7df54d55c5"}, + {file = "trio_websocket-0.10.4-py3-none-any.whl", hash = "sha256:c7a620c4013c34b7e4477d89fe76695da1e455e4510a8d7ae13f81c632bdce1d"}, ] [package.dependencies] @@ -1153,13 +1153,13 @@ files = [ [[package]] name = "urllib3" -version = "2.0.4" +version = "2.0.5" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.7" files = [ - {file = "urllib3-2.0.4-py3-none-any.whl", hash = "sha256:de7df1803967d2c2a98e4b11bb7d6bd9210474c46e8a0401514e3a42a75ebde4"}, - {file = "urllib3-2.0.4.tar.gz", hash = "sha256:8d22f86aae8ef5e410d4f539fde9ce6b2113a001bb4d189e0aed70642d602b11"}, + {file = "urllib3-2.0.5-py3-none-any.whl", hash = "sha256:ef16afa8ba34a1f989db38e1dbbe0c302e4289a47856990d0682e374563ce35e"}, + {file = "urllib3-2.0.5.tar.gz", hash = "sha256:13abf37382ea2ce6fb744d4dad67838eec857c9f4f57009891805e0b5e123594"}, ] [package.dependencies] @@ -1285,4 +1285,4 @@ ws = ["websockets"] [metadata] lock-version = "2.0" python-versions = ">=3.7.9,<4" -content-hash = "27ee5cd8b82f9c490eed22daa698893ebaed1bd98c080ad314545e168298b6e9" +content-hash = "36d67b26c8878f526a5d76cf5f7eb8173f55b35bec57b164972a8b8ea1d98b8c" diff --git a/pygls/protocol.py b/pygls/protocol.py index 3a5b86f4..3d8c6e03 100644 --- a/pygls/protocol.py +++ b/pygls/protocol.py @@ -40,10 +40,8 @@ TYPE_CHECKING, ) -from pygls.server import WebSocketTransportAdapter - if TYPE_CHECKING: - from pygls.server import LanguageServer + from pygls.server import LanguageServer, WebSocketTransportAdapter import attrs @@ -90,7 +88,6 @@ WORKSPACE_DID_CHANGE_WORKSPACE_FOLDERS, WORKSPACE_EXECUTE_COMMAND, WORKSPACE_SEMANTIC_TOKENS_REFRESH, - PositionEncodingKind, ) from lsprotocol.types import ( ApplyWorkspaceEditParams, @@ -232,10 +229,6 @@ def default_converter(): converter.register_structure_hook(JsonRPCNotification, _params_field_structure_hook) - converter.register_structure_hook( - Union[PositionEncodingKind, str, None], lambda obj, _: obj - ) - return converter diff --git a/pygls/server.py b/pygls/server.py index 2e99fdc8..7717b84e 100644 --- a/pygls/server.py +++ b/pygls/server.py @@ -219,7 +219,7 @@ def __init__( self.loop = loop - # TODO: Will move this to `LanguageServer` in next commit + # TODO: Will move this to `LanguageServer` soon self.lsp = protocol_cls(self, converter_factory()) # type: ignore def shutdown(self): diff --git a/pyproject.toml b/pyproject.toml index 5b9e3ed2..a1eb850f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ readme = "README.md" [tool.poetry.dependencies] python = ">=3.7.9,<4" -lsprotocol = "2023.0.0a3" +lsprotocol = "2023.0.0b1" typeguard = "^3.0.0" websockets = {version = "^11.0.3", optional = true}