Lsp-devtools

Latest version: v0.2.2

Safety actively analyzes 623909 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.4.0

Features

- The test ``LanguageClient`` now supports ``workspace/configuration`` requests ([90](https://github.com/swyddfa/lsp-devtools/issues/90))
- pytest-lsp's ``LanguageClient`` is now able to handle ``window/workDoneProgress/create`` requests. ([91](https://github.com/swyddfa/lsp-devtools/issues/91))
- ``pytest-lsp`` is now able to integrate with ``lsp-devtools``, run ``pytest`` with the ``--lsp-devtools`` flag to enable the integration. ([97](https://github.com/swyddfa/lsp-devtools/issues/97))

Enhancements

- It is now possible to select a specific version of a client when using the ``client_capabilities()`` function.
e.g. ``client-namelatest``, ``client-namev2`` or ``client-name2.1.3``. ``pytest-lsp`` will choose the latest available version of the client that satisfies the given constraint. ([101](https://github.com/swyddfa/lsp-devtools/issues/101))

Client Capabilities

- Add client capabilities for Neovim versions ``v0.7.0`` and ``v0.8.0`` ([89](https://github.com/swyddfa/lsp-devtools/issues/89))
- Add client capabilities for Neovim ``v0.9.1`` ([100](https://github.com/swyddfa/lsp-devtools/issues/100))

0.2.2

Enhancements

- Added formatters `json` and `json-compact` that can be used within format strings. ([130](https://github.com/swyddfa/lsp-devtools/issues/130))
- When not printing messages to stdout, the `lsp-devtools record` command now displays a nice visualisation of the traffic between client and server - so that you can see that it's doing something ([134](https://github.com/swyddfa/lsp-devtools/issues/134))

Fixes

- The `lsp-devtools record` command will now produce valid JSON when using the `--to-file` option without an explicitly provided format string. ([130](https://github.com/swyddfa/lsp-devtools/issues/130))
- The `lsp-devtools agent` now watches for the when the server process exits and closes itself down also. ([132](https://github.com/swyddfa/lsp-devtools/issues/132))
- Commands like `lsp-devtools record` should now exit cleanly when hitting `Ctrl-C` ([133](https://github.com/swyddfa/lsp-devtools/issues/133))

pytest-lsp-v0.4.0

0.2.1

Enhancements

- If the agent is unable to connect to a server app immediately, it will now retry indefinitely until it succeeds or the language server exits ([77](https://github.com/swyddfa/lsp-devtools/issues/77))
- It is now possible to select completion items in the ``lsp-devtools client`` ([108](https://github.com/swyddfa/lsp-devtools/issues/108))
- Commands like ``lsp-devtools record`` and ``lsp-devtools inspect`` will no longer exit/stop capturing messages after the first LSP session exits ([110](https://github.com/swyddfa/lsp-devtools/issues/110))

pytest-lsp-v0.3.1
<h1 class="title">v0.3.1 - 2023-10-06</h1>

<p>
This release includes some minor breaking changes if you were using the lower-level APIs e.g <tt>make_client_server</tt>.
</p>
<p>
See <a href="https://github.com/swyddfa/esbonio/commit/8565add660ad015c989cd3c4a251dede92525997">this commit</a> for a sample migration
</p>

<div class="section" id="enhancements">
<h1>Enhancements</h1>
<ul class="simple">
<li>pytest-lsp's <tt class="docutils literal">LanguageClient</tt> is now based on the one provided by <tt class="docutils literal">pygls</tt>.
The main benefit is that the server connection is now based on an <tt class="docutils literal">asyncio.subprocess.Process</tt> removing the need for pytest-lsp to constantly check to see if the server is still running. (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/61">#61</a>)</li>
<li>Fixtures created with the <cite>&64;pytest_lsp.fixture</cite> decorator can now request additional pytest fixtures (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/71">#71</a>)</li>
<li>It is now possible to set the environment variables that the server under test is launched with. (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/72">#72</a>)</li>
<li>It is now possible to test any JSON-RPC based server with <tt class="docutils literal"><span class="pre">pytest-lsp</span></tt>.
Note however, this support will only ever extend to managing the client-server connection. (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/73">#73</a>)</li>
</ul>
</div>
<div class="section" id="misc">
<h1>Misc</h1>
<ul class="simple">
<li><tt class="docutils literal">make_test_client</tt> has been renamed to <tt class="docutils literal">make_test_lsp_client</tt> (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/73">#73</a>)</li>
<li>Drop support for Python 3.7, add support for Python 3.12 (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/75">#75</a>)</li>
</ul>
</div>

0.2.0

<h1 class="title">v0.2.0 - 2023-10-06</h1>

<div class="section" id="features">
<h1>Features</h1>
<ul class="simple">
<li><strong>Experimental</strong> Add proof of concept <tt class="docutils literal"><span class="pre">lsp-devtools</span> client</tt> command that builds on textual's <tt class="docutils literal">TextArea</tt> widget to offer an interactive language server client. (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/83">#83</a>)</li>
</ul>
</div>
<div class="section" id="fixes">
<h1>Fixes</h1>
<ul class="simple">
<li>The <tt class="docutils literal"><span class="pre">lsp-devtools</span> agent</tt> command no longer fails to exit once an LSP session closes. (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/17">#17</a>)</li>
<li><tt class="docutils literal"><span class="pre">lsp-devtools</span> record</tt> no longer emits a <tt class="docutils literal">ResourceWarning</tt> (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/28">#28</a>)</li>
<li>As a consequence of the new architecture, commands like <tt class="docutils literal"><span class="pre">lsp-devtools</span> record</tt> no longer miss the start of an LSP session (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/29">#29</a>)</li>
<li><tt class="docutils literal"><span class="pre">lsp-devtools</span> agent</tt> no longer emits <tt class="docutils literal">Unable to send data, no available transport!</tt> messages (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/38">#38</a>)</li>
</ul>
</div>
<div class="section" id="misc">
<h1>Misc</h1>
<ul>
<li><p class="first">The <tt class="docutils literal"><span class="pre">lsp-devtools</span> agent</tt> now uses a TCP connection, which should make distribution easier (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/37">#37</a>)</p>
</li>
<li><p class="first">Drop Python 3.7 support (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/77">#77</a>)</p>
</li>
<li><p class="first">The <tt class="docutils literal"><span class="pre">lsp-devtools</span> capabilities</tt> command has been removed in favour of <tt class="docutils literal"><span class="pre">lsp-devtools</span> record</tt></p>
<p>The <tt class="docutils literal"><span class="pre">lsp-devtools</span> tui</tt> command has been renamed to <tt class="docutils literal"><span class="pre">lsp-devtools</span> inspect</tt> (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/83">#83</a>)</p>
</li>
</ul>
</div>


pytest-lsp-v0.3.0
<h1 class="title">v0.3.0 - 2023-05-19</h1>

<div class="section" id="features">
<h1>Features</h1>
<ul>
<li><p class="first"><tt class="docutils literal">&64;pytest_lsp.fixture</tt> now supports the <tt class="docutils literal">yield</tt> statement, allowing the <tt class="docutils literal">client</tt> fixture definition to be responsible for initialising and shutting down the LSP session granting the test author full control over the contents of the <tt class="docutils literal">initialize</tt> request.</p>
<p>This is a breaking change, see the documentation for details and <a class="reference external" href="https://github.com/swyddfa/esbonio/pull/571">this PR</a> for an example migration. (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/47">#47</a>)</p>
</li>
<li><p class="first">If a client's capabilities has been set, pytest-lsp will automatically check the server's response to see if it is compatible with the capabilities the client provided.</p>
<p>If an issue is detected, pytest-lsp will emit an <tt class="docutils literal">LspSpecificationWarning</tt></p>
<p><strong>Note:</strong> This relies on a dedicated <tt class="docutils literal">check_xxx</tt> function being written for each request so only a subset of the LSP spec is currently supported. (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/57">#57</a>)</p>
</li>
</ul>
</div>
<div class="section" id="docs">
<h1>Docs</h1>
<ul class="simple">
<li>Add getting started guide (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/47">#47</a>)</li>
<li>Add note on redefining the <tt class="docutils literal">event_loop</tt> fixture to match the client fixture's scope (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/49">#49</a>)</li>
<li>Add documentation on the built in features of the test LSP client (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/50">#50</a>)</li>
<li>Add example on using parameterised fixtures to test with multiple clients (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/51">#51</a>)</li>
</ul>
</div>
<div class="section" id="misc">
<h1>Misc</h1>
<ul class="simple">
<li>The client-server connection is now managed by a single asyncio event loop, rather than spinning up multiple threads, resulting in a much simpler architecture. (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/44">#44</a>)</li>
</ul>
</div>
<div class="section" id="removed">
<h1>Removed</h1>
<ul>
<li><p class="first">Helper methods like <tt class="docutils literal">completion_request</tt> and <tt class="docutils literal">notify_did_open</tt> have been removed.
The equivalent methods provided by the LSP specification like <tt class="docutils literal">text_document_completion_async</tt> and <tt class="docutils literal">text_document_did_open</tt> should be used directly.</p>
<p>See <a class="reference external" href="https://github.com/swyddfa/esbonio/pull/571">this PR</a> for an example migration. (<a class="reference external" href="https://github.com/swyddfa/lsp-devtools/issues/56">#56</a>)</p>
</li>
</ul>
</div>


pytest-lsp-v0.2.1
<h1 class="title">v0.2.1 - 2023-01-14</h1>
<h2 class="subtitle" id="fixes">Fixes</h2>

<ul class="simple">
<li>Ensure that the test client returns a <tt class="docutils literal">ShowDocumentResult</tt> for <tt class="docutils literal">window/showDocument</tt> requests. (<a class="reference external" href="https://github.com/alcarney/lsp-devtools/issues/34">#34</a>)</li>
</ul>

0.1.1

<h1 class="title">v0.1.1 - 2023-01-14</h1>
<h2 class="subtitle" id="fixes">Fixes</h2>

<ul class="simple">
<li>Fix PyPi packaging (<a class="reference external" href="https://github.com/alcarney/lsp-devtools/issues/33">#33</a>)</li>
</ul>


pytest-lsp-v0.2.0
<h1 class="title">v0.2.0 - 2023-01-10</h1>

<div class="section" id="features">
<h1>Features</h1>
<ul class="simple">
<li>The <tt class="docutils literal">LanguageClient</tt> now exposes methods covering the full LSP spec thanks to autogenerating its client from type definitions provided by <tt class="docutils literal">lsprotocol</tt> (<a class="reference external" href="https://github.com/alcarney/lsp-devtools/issues/25">#25</a>)</li>
</ul>
</div>
<div class="section" id="misc">
<h1>Misc</h1>
<ul>
<li><p class="first">Support for Python 3.6 has been dropped.</p>
<p>Support for Python 3.11 has been added.</p>
<p>Upgraded to pygls 1.0. (<a class="reference external" href="https://github.com/alcarney/lsp-devtools/issues/25">#25</a>)</p>
</li>
</ul>
</div>

0.1.0

<h1 class="title">v0.1.0 - 2023-01-10</h1>

<div class="section" id="features">
<h1>Features</h1>
<ul>
<li><p class="first">Updated <tt class="docutils literal">record</tt> command.</p>
<p>It is now capable of live streaming messages sent between a client and server to stdout, plain text files or a SQLite database.</p>
<p>It also offers a number of filters for selecting the messages you wish to record, as well as a (WIP!) format string syntax for controlling how messages are formatted. (<a class="reference external" href="https://github.com/alcarney/lsp-devtools/issues/26">#26</a>)</p>
</li>
<li><p class="first">Add <tt>tui</tt> command.</p>
<p>A proof of concept devtools TUI implemented in textual, that live updates with the LSP messages sent between client and server!</p>
<p>Requires the server be wrapped in an <tt class="docutils literal">agent</tt>. (<a class="reference external" href="https://github.com/alcarney/lsp-devtools/issues/27">#27</a>)</p>
</li>
</ul>
</div>
<div class="section" id="misc">
<h1>Misc</h1>
<ul class="simple">
<li>Migrated to <tt class="docutils literal">v1.0</tt> (<a class="reference external" href="https://github.com/alcarney/lsp-devtools/issues/26">#26</a>)</li>
</ul>
</div>


pytest-lsp-v0.1.3
<h1 class="title">v0.1.3 - 2022-10-15</h1>
<h2 class="subtitle" id="fixes">Fixes</h2>

<ul class="simple">
<li><ul class="first">
<li>Check that server provided for testing doesn't crash within the first 0.1 seconds</li>
<li>Return <cite>INITIALIZE</cite> response from <cite>ClientServer.start()</cite>. This allows tests to assert against the server's <cite>INITIALIZE</cite> response without resending the <cite>INITIALIZE</cite> request in the actual test. (<a class="reference external" href="https://github.com/alcarney/lsp-devtools/issues/22">#22</a>)</li>
</ul>
</li>
</ul>


pytest-lsp-v0.1.2
<h1 class="title">v0.1.2 - 2022-07-18</h1>
<h2 class="subtitle" id="enhancements">Enhancements</h2>

<ul class="simple">
<li>Add helpers for <tt class="docutils literal">textDocument/implementation</tt> requests (<a class="reference external" href="https://github.com/alcarney/lsp-devtools/issues/15">#15</a>)</li>
</ul>


pytest-lsp-v0.1.1
<h1 class="title">v0.1.1 - 2022-07-17</h1>
<h2 class="subtitle" id="misc">Misc</h2>

<ul class="simple">
<li>Remove upper bound on required <tt class="docutils literal">pygls</tt> version (<a class="reference external" href="https://github.com/alcarney/lsp-devtools/issues/14">#14</a>)</li>
</ul>

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.