- Corrected a bug in
language_tool_python.server.LanguageTool._get_valid_spelling_file_pathwhere the spelling file was always the one for English, even when the LT instance was configured for a different language. - Corrected a bug in
language_tool_python.server.LanguageToolwhere, even if you specified alanguage_tool_download_version, the used LT version was always the latest one present on the system (the download was working correctly, but the downloaded version was not used). - Corrected the necessary java version for old LT releases (from 1.8 to 1.9).
- Added an abstract class
LocalLanguageToolthat expose an common interface for subclasses who implements some type of LT download. - Added
ReleaseLocalLanguageToolclass (implementation ofLocalLanguageTool) that implements the downloading of LT from release/archive page. - Added
SnapshotLocalLanguageToolclass (implementation ofLocalLanguagetool) that implements the downloading of LT from snapshot page. - Edited the low limit of the supported LT version (now at release 4.0).
- Deprecated some funcs (they remain available until version 4.0.0):
language_tool_python.download_lt.get_common_prefixlanguage_tool_python.download_lt.http_getlanguage_tool_python.download_lt.unzip_filelanguage_tool_python.download_lt.download_ziplanguage_tool_python.download_lt.download_ltlanguage_tool_python.utils.find_existing_language_tool_downloadslanguage_tool_python.utils._extract_versionlanguage_tool_python.utils.get_language_tool_directorylanguage_tool_python.utils.get_server_cmdlanguage_tool_python.utils.get_jar_info
- Corrected a bug in
language_tool_python.download_lt.http_getby adding proper handling of HTTP 403 and other non 200 status codes by raisinglanguage_tool_python.exceptions.PathError. Previously, in case of such status codes, the function would download an HTML error page instead of the expected zip file, leading to an error when attempting to unzip it.
- Corrected a bug in
language_tool_python.server._kill_processeswhere processes were not being properly waited for after being killed, potentially leading to zombie processes.
- Added a
check_matching_regionsmethod inlanguage_tool_python.server.LanguageTool.
- Added an optional parameter to
LanguageTool(proxies). - Added an
proxiesattribute toLanguageTool(This attribute is used by theLanguageTool._query_servermethod). - Added new read-only properties to
LanguageTool:urlis_remotehostport
- Edited the documentation of the
LanguageToolclass to improve clarity.
- Corrected a bug when the default locale is POSIX default (C).
- Corrected a bug when closing
LanguageToolinstances (deadlocks). - Corrected a bug when comparing LT versions (e.g., '5.8' vs '5.10').
- Added new possible values in LT config (
trustXForwardForHeader,suggestionsEnabledand lang keys). - Added a warning if you forget to explicitly close a
LanguageToolinstance. - Added online documentation for the package.
- Added logging (and logs) in the package.
- Added raising
exceptions.TimeoutErrorindownload_lt.http_get. - Added
packagingas a dependency. - Moved exception classes to a separate
exceptionsmodule (no more importable fromutils). - Edited raised exceptions in some methods/functions:
- from
AssertionErrortoValueErrorinconfig_file.LanguageToolConfig.__init__ - from
AssertionErrortoexceptions.PathErrorindownload_lt.download_lt - from
AssertionErrortoValueErrorindownload_lt.download_lt - from
AssertionErrortoValueErrorinserver.LanguageTool.__init__ - from
AssertionErrortoValueErrorinutils.kill_process_force
- from
- Edited some camelCase attributes/methods to snake_case:
server.LanguageTool.motherTonguetoserver.LanguageTool.mother_tongueserver.LanguageTool.newSpellingstoserver.LanguageTool.new_spellingsmatch.Match.ruleIdtomatch.Match.rule_idmatch.Match.offsetInContexttomatch.Match.offset_in_contextmatch.Match.errorLengthtomatch.Match.error_lengthmatch.Match.ruleIssueTypetomatch.Match.rule_issue_typematch.Match.matchedTexttomatch.Match.matched_text
- Edited types of some params:
directory_to_extract_toindowload_lt.unzip_filefromstrtoPathdirectoryindownload_lt.download_zipfromstrtoPathdownload_folderinutils.find_existing_language_tool_downloadsfromstrtoPath
- Edited return types of some methods/functions:
- from
strtoPathinutils.get_language_tool_download_path - from
List[str]toList[Path]inutils.find_existing_language_tool_downloads - from
strtoPathinutils.get_language_tool_directory - from
Tuple[str, str]toTuple[Path, Path]inutils.get_jar_info
- from