All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added
-D/--disable-categoriesand-E/--enable-categoriesCLI options to disable or enable LanguageTool rule categories (e.g.TYPOS,GRAMMAR).--enabled-onlynow also applies to categories specified via--enable-categories. - Added
premium_keyproperty tolanguage_tool_python.server.LanguageToolto attach a premium API key for LanguageTool API requests. - Added
premium_usernameproperty tolanguage_tool_python.server.LanguageToolto attach a username for premium LanguageTool API requests. - Added
language_tool_python.match.is_check_matchtype guard function to verify that a value is aCheckMatch(type fromlanguage_tool_python._internals). - Added
language_tool_python.config_file.ConfigValuepublic type alias representing all accepted value types forLanguageToolConfig.
- HTTP requests to the LanguageTool server now reuse a persistent
requests.Session, reducing TCP connection overhead for repeated calls to.check(). - Breaking: Dropped Python 3.9 support, now supports Python 3.10-3.15.
- Breaking: Moved internal utilities to a private
_internalssubpackage:language_tool_python.safe_zip->language_tool_python._internals.safe_ziplanguage_tool_python.utils.parse_url->language_tool_python._internals.utils.parse_urllanguage_tool_python.utils.get_env_int->language_tool_python._internals.utils.get_env_intlanguage_tool_python.utils.get_env_float->language_tool_python._internals.utils.get_env_floatlanguage_tool_python.utils.get_language_tool_download_path->language_tool_python._internals.utils.get_language_tool_download_pathlanguage_tool_python.utils.get_locale_language->language_tool_python._internals.utils.get_locale_languagelanguage_tool_python.utils.kill_process_force->language_tool_python._internals.utils.kill_process_force
- Removed
packagingas a runtime dependency. - Breaking: Narrowed the type of the
configparameter oflanguage_tool_python.config_file.LanguageToolConfig.__init__fromdict[str, Any]toMapping[str, ConfigValue]. - Breaking: Changed return type of
language_tool_python.download_lt.LocalLanguageTool.version_intoandlanguage_tool_python.download_lt.ReleaseLocalLanguageTool.version_intofrompackaging.version.Versiontotuple[int, int]. - Replaced
tomldependency withtomlifor Python < 3.11 (fallback for the stdlibtomllib). - Added
typing_extensionsas a dependency for Python < 3.13 (fallback for the stdlibwarnings.deprecated).
- Corrected a bug in
language_tool_python.config_file.LanguageToolConfigwhere directory paths were incorrectly rejected by the path validator.
- Breaking: Removed all functions and classes previously deprecated in v3.3.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.get_language_tool_directorylanguage_tool_python.utils.get_server_cmdlanguage_tool_python.utils.get_jar_infolanguage_tool_python.match.auto_type
3.4.0 - 2026-05-15
Security hardening for LT downloads: SHA-256 integrity verification, safe ZIP extraction, configurable size limits, and support for LT releases 6.7+.
- Added SHA-256 verification for downloaded LT zip files.
- Added a bundled
language_tool_python/integrity.tomlmanifest containing SHA-256 checksums for LT release/archive downloads. - Added new env variables for LT download verification:
LTP_DOWNLOAD_SHA256_<VERSION>LTP_DOWNLOAD_SHA256LTP_BYPASS_VERIFIED_DOWNLOADS
- Added a maximum download size limit for LT zip files, configurable with
LTP_MAX_DOWNLOAD_BYTES. - Added
language_tool_python.safe_zip.SafeZipExtractorandlanguage_tool_python.safe_zip.SafeZipLimitsto extract ZIP files safely. - Added new env variables for safe ZIP extraction limits:
LTP_SAFE_ZIP_MAX_ARCHIVE_BYTESLTP_SAFE_ZIP_MAX_EXTRACTED_BYTESLTP_SAFE_ZIP_MAX_MEMBERSLTP_SAFE_ZIP_MAX_MEMBER_EXTRACTED_BYTESLTP_SAFE_ZIP_MAX_MEMBER_COMPRESSION_RATIOLTP_SAFE_ZIP_MAX_TOTAL_COMPRESSION_RATIO
- Added the possibility to download LT releases 6.7 and newer from the new release page.
- Added
LTP_DOWNLOAD_HOST_NEW_RELEASESto override the new LT release download host. - Added
language_tool_python.utils.get_env_intandlanguage_tool_python.utils.get_env_float.
- Edited the default LT download version (from
latestsnapshot to release6.8). - Edited LT ZIP extraction to reject unsafe paths, symlinks, unsupported member types, duplicate paths, file/directory conflicts, oversized archives/members, suspicious compression ratios and overwrites of existing paths.
- Corrected a bug in
language_tool_python.server.LanguageTool.checkwhere the LT/checkendpoint was queried with GET instead of POST. - Corrected a bug in
language_tool_python.config_file.LanguageToolConfigwhere config keys and values could contain line breaks or end with an odd number of backslashes.
3.3.1 - 2026-05-10
- Edited the LanguageTool snapshot current version (from 6.8-SNAPSHOT to 6.9-SNAPSHOT) to allow users to retrieve automatically the latest snapshot version of LT.
3.3.0 - 2026-03-07
- 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.get_language_tool_directorylanguage_tool_python.utils.get_server_cmdlanguage_tool_python.utils.get_jar_info
- 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).
3.2.2 - 2026-01-02
- 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.
3.2.1 - 2025-12-30
- 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.
3.2.0 - 2025-12-18
- Added a
check_matching_regionsmethod inlanguage_tool_python.server.LanguageTool.
3.1.0 - 2025-11-23
- 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.
3.0.0 - 2025-11-20
Major rewrite: snake_case naming conventions, strict Python types, dedicated
exceptionsmodule, logging, and online documentation.
- 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.
- Breaking: Moved exception classes to a separate
exceptionsmodule (no more importable fromutils). - Breaking: 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
- Breaking: 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
- Breaking: Edited types of some params:
directory_to_extract_toindowload_lt.unzip_filefromstrtoPathdirectoryindownload_lt.download_zipfromstrtoPathdownload_folderinutils.find_existing_language_tool_downloadsfromstrtoPath
- Breaking: 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
- 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').