Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/2.0.0/),
- Corrected a bug in `language_tool_python.config_file.LanguageToolConfig` where directory paths were incorrectly rejected by the path validator.
- Fixed a bug in `LanguageTool._start_server_on_free_port` where `_url` was not updated when retrying on a different port, causing all subsequent server requests to target the wrong (original) port.
- Fixed a bug in `LanguageTool._query_server` where `RateLimitError` was only raised when the rate-limit response body was invalid JSON, a valid JSON body with status 426 was silently returned as data instead (for now, the body from LanguageTool for rate-limiting responses is "Upgrade Required", which is not valid JSON, but this may change in the future).
- Fixed a bug in `LanguageTool._terminate_server` where `_RUNNING_SERVER_PROCESSES.remove()` could raise `ValueError` if the server process was not yet in the list or was no longer in it.

### Removed
- **Breaking:** Removed all functions and classes previously deprecated in v3.3.0:
Expand Down
3 changes: 2 additions & 1 deletion src/language_tool_python/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,8 @@ def _terminate_server(self) -> None:
if self._server:
logger.info("Terminating LanguageTool server on port %s", self._port)
_kill_processes([self._server])
_RUNNING_SERVER_PROCESSES.remove(self._server)
with contextlib.suppress(ValueError):
_RUNNING_SERVER_PROCESSES.remove(self._server)
Comment thread
mdevolde marked this conversation as resolved.

if self._server.stdin:
self._server.stdin.close()
Expand Down
Loading