Skip to content

Commit

Permalink
pytest-lsp Release v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed May 19, 2023
1 parent 417a062 commit 30c6854
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 21 deletions.
4 changes: 2 additions & 2 deletions lib/pytest-lsp/.bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[bumpversion]
current_version = 0.2.1
current_version = 0.3.0
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(.dev(?P<dev>\d+))?
serialize =
serialize =
{major}.{minor}.{patch}.dev{dev}
{major}.{minor}.{patch}

Expand Down
40 changes: 40 additions & 0 deletions lib/pytest-lsp/CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
v0.3.0 - 2023-05-19
-------------------

Features
^^^^^^^^

- ``@pytest_lsp.fixture`` now supports the ``yield`` statement, allowing the ``client`` fixture definition to be responsible for initialising and shutting down the LSP session granting the test author full control over the contents of the ``initialize`` request.

This is a breaking change, see the documentation for details and `this PR <https://github.com/swyddfa/esbonio/pull/571>`_ for an example migration. (`#47 <https://github.com/swyddfa/lsp-devtools/issues/47>`_)
- 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.

If an issue is detected, pytest-lsp will emit an ``LspSpecificationWarning``

**Note:** This relies on a dedicated ``check_xxx`` function being written for each request so only a subset of the LSP spec is currently supported. (`#57 <https://github.com/swyddfa/lsp-devtools/issues/57>`_)


Docs
^^^^

- Add getting started guide (`#47 <https://github.com/swyddfa/lsp-devtools/issues/47>`_)
- Add note on redefining the ``event_loop`` fixture to match the client fixture's scope (`#49 <https://github.com/swyddfa/lsp-devtools/issues/49>`_)
- Add documentation on the built in features of the test LSP client (`#50 <https://github.com/swyddfa/lsp-devtools/issues/50>`_)
- Add example on using parameterised fixtures to test with multiple clients (`#51 <https://github.com/swyddfa/lsp-devtools/issues/51>`_)


Misc
^^^^

- 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. (`#44 <https://github.com/swyddfa/lsp-devtools/issues/44>`_)


Removed
^^^^^^^

- Helper methods like ``completion_request`` and ``notify_did_open`` have been removed.
The equivalent methods provided by the LSP specification like ``text_document_completion_async`` and ``text_document_did_open`` should be used directly.

See `this PR <https://github.com/swyddfa/esbonio/pull/571>`_ for an example migration. (`#56 <https://github.com/swyddfa/lsp-devtools/issues/56>`_)


v0.2.1 - 2023-01-14
-------------------

Expand Down
1 change: 0 additions & 1 deletion lib/pytest-lsp/changes/44.misc.rst

This file was deleted.

1 change: 0 additions & 1 deletion lib/pytest-lsp/changes/47.doc.rst

This file was deleted.

3 changes: 0 additions & 3 deletions lib/pytest-lsp/changes/47.feature.rst

This file was deleted.

1 change: 0 additions & 1 deletion lib/pytest-lsp/changes/49.doc.rst

This file was deleted.

1 change: 0 additions & 1 deletion lib/pytest-lsp/changes/50.doc.rst

This file was deleted.

1 change: 0 additions & 1 deletion lib/pytest-lsp/changes/51.doc.rst

This file was deleted.

4 changes: 0 additions & 4 deletions lib/pytest-lsp/changes/56.removed.rst

This file was deleted.

5 changes: 0 additions & 5 deletions lib/pytest-lsp/changes/57.feature.rst

This file was deleted.

2 changes: 1 addition & 1 deletion lib/pytest-lsp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pytest-lsp"
version = "0.2.1"
version = "0.3.0"
description = "pytest plugin for end-to-end testing of language servers"
readme = "README.md"
requires-python = ">=3.7"
Expand Down
2 changes: 1 addition & 1 deletion lib/pytest-lsp/pytest_lsp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import importlib.resources as resources # type: ignore[no-redef]


__version__ = "0.2.1"
__version__ = "0.3.0"
logger = logging.getLogger(__name__)


Expand Down

0 comments on commit 30c6854

Please sign in to comment.