Skip to content

Commit 23dc3b8

Browse files
authored
docs(CHANGELOG): make changelog keepachangelog compliant (jxmorris12#199)
1 parent 27493eb commit 23dc3b8

4 files changed

Lines changed: 119 additions & 29 deletions

File tree

‎.github/pull_request_template.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ If applicable, include links to any relevant documentation, articles, or resourc
2424
- [ ] Documentation update (changes to documentation only)
2525
- [ ] Refactor / code style update (non-breaking change that improves code structure or readability)
2626
- [ ] Tests / CI improvement (adding or updating tests or CI configuration only)
27+
- [ ] Chore / maintenance (non-breaking change that does not affect functionality, such as updating dependencies or fixing typos)
2728
- [ ] Other (please describe):
2829

2930
## Checklist
@@ -32,3 +33,4 @@ If applicable, include links to any relevant documentation, articles, or resourc
3233
- [ ] Updated any relevant documentation.
3334
- [ ] Added comments to your code where necessary.
3435
- [ ] Formatted your code, run the linters, checked types and tests.
36+
- [ ] Added your changes to the [CHANGELOG](./CHANGELOG.md) file, if applicable.

‎CHANGELOG.md‎

Lines changed: 113 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,54 @@
1-
# language_tool_python Changelog
1+
# Changelog
22

3-
## 3.4.0 (2026-05-15)
4-
- Corrected a bug in `language_tool_python.server.LanguageTool.check` where the LT `/check` endpoint was queried with GET instead of POST.
5-
- Corrected a bug in `language_tool_python.config_file.LanguageToolConfig` where config keys and values could contain line breaks or end with an odd number of backslashes.
6-
- Corrected the default LT download version (from `latest` snapshot to release `6.8`).
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/2.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
9+
### Added
10+
- Added `premium_key` property to `language_tool_python.server.LanguageTool` to attach a premium API key for LanguageTool API requests.
11+
- Added `premium_username` property to `language_tool_python.server.LanguageTool` to attach a username for premium LanguageTool API requests.
12+
- Added `language_tool_python.match.is_check_match` type guard function to verify that a value is a `CheckMatch` (type from `language_tool_python._internals`).
13+
- Added `language_tool_python.config_file.ConfigValue` public type alias representing all accepted value types for `LanguageToolConfig`.
14+
15+
### Changed
16+
- **Breaking:** Dropped Python 3.9 support, now supports Python 3.10-3.15.
17+
- **Breaking:** Moved internal utilities to a private `_internals` subpackage:
18+
- `language_tool_python.safe_zip` -> `language_tool_python._internals.safe_zip`
19+
- `language_tool_python.utils.parse_url` -> `language_tool_python._internals.utils.parse_url`
20+
- `language_tool_python.utils.get_env_int` -> `language_tool_python._internals.utils.get_env_int`
21+
- `language_tool_python.utils.get_env_float` -> `language_tool_python._internals.utils.get_env_float`
22+
- `language_tool_python.utils.get_language_tool_download_path` -> `language_tool_python._internals.utils.get_language_tool_download_path`
23+
- `language_tool_python.utils.get_locale_language` -> `language_tool_python._internals.utils.get_locale_language`
24+
- `language_tool_python.utils.kill_process_force` -> `language_tool_python._internals.utils.kill_process_force`
25+
- Removed `packaging` as a runtime dependency.
26+
- **Breaking:** Narrowed the type of the `config` parameter of `language_tool_python.config_file.LanguageToolConfig.__init__` from `dict[str, Any]` to `Mapping[str, ConfigValue]`.
27+
- **Breaking:** Changed return type of `language_tool_python.download_lt.LocalLanguageTool.version_into` and `language_tool_python.download_lt.ReleaseLocalLanguageTool.version_into` from `packaging.version.Version` to `tuple[int, int]`.
28+
- Replaced `toml` dependency with `tomli` for Python < 3.11 (fallback for the stdlib `tomllib`).
29+
- Added `typing_extensions` as a dependency for Python < 3.13 (fallback for the stdlib `warnings.deprecated`).
30+
31+
### Fixed
32+
- Corrected a bug in `language_tool_python.config_file.LanguageToolConfig` where directory paths were incorrectly rejected by the path validator.
33+
34+
### Removed
35+
- **Breaking:** Removed all functions and classes previously deprecated in v3.3.0:
36+
- `language_tool_python.download_lt.get_common_prefix`
37+
- `language_tool_python.download_lt.http_get`
38+
- `language_tool_python.download_lt.unzip_file`
39+
- `language_tool_python.download_lt.download_zip`
40+
- `language_tool_python.download_lt.download_lt`
41+
- `language_tool_python.utils.find_existing_language_tool_downloads`
42+
- `language_tool_python.utils.get_language_tool_directory`
43+
- `language_tool_python.utils.get_server_cmd`
44+
- `language_tool_python.utils.get_jar_info`
45+
- `language_tool_python.match.auto_type`
46+
47+
## [3.4.0] - 2026-05-15
48+
49+
> Security hardening for LT downloads: SHA-256 integrity verification, safe ZIP extraction, configurable size limits, and support for LT releases 6.7+.
50+
51+
### Added
752
- Added SHA-256 verification for downloaded LT zip files.
853
- Added a bundled `language_tool_python/integrity.toml` manifest containing SHA-256 checksums for LT release/archive downloads.
954
- Added new env variables for LT download verification:
@@ -12,7 +57,6 @@
1257
- `LTP_BYPASS_VERIFIED_DOWNLOADS`
1358
- Added a maximum download size limit for LT zip files, configurable with `LTP_MAX_DOWNLOAD_BYTES`.
1459
- Added `language_tool_python.safe_zip.SafeZipExtractor` and `language_tool_python.safe_zip.SafeZipLimits` to extract ZIP files safely.
15-
- 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.
1660
- Added new env variables for safe ZIP extraction limits:
1761
- `LTP_SAFE_ZIP_MAX_ARCHIVE_BYTES`
1862
- `LTP_SAFE_ZIP_MAX_EXTRACTED_BYTES`
@@ -24,81 +68,124 @@
2468
- Added `LTP_DOWNLOAD_HOST_NEW_RELEASES` to override the new LT release download host.
2569
- Added `language_tool_python.utils.get_env_int` and `language_tool_python.utils.get_env_float`.
2670

27-
## 3.3.1 (2026-05-10)
71+
### Changed
72+
- Edited the default LT download version (from `latest` snapshot to release `6.8`).
73+
- 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.
74+
75+
### Fixed
76+
- Corrected a bug in `language_tool_python.server.LanguageTool.check` where the LT `/check` endpoint was queried with GET instead of POST.
77+
- Corrected a bug in `language_tool_python.config_file.LanguageToolConfig` where config keys and values could contain line breaks or end with an odd number of backslashes.
78+
79+
## [3.3.1] - 2026-05-10
80+
81+
### Changed
2882
- 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.
2983

30-
## 3.3.0 (2026-03-07)
31-
- Corrected a bug in `language_tool_python.server.LanguageTool._get_valid_spelling_file_path` where the spelling file was always the one for English, even when the LT instance was configured for a different language.
32-
- Corrected a bug in `language_tool_python.server.LanguageTool` where, even if you specified a `language_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).
33-
- Corrected the necessary java version for old LT releases (from 1.8 to 1.9).
84+
## [3.3.0] - 2026-03-07
85+
86+
### Added
3487
- Added an abstract class `LocalLanguageTool` that expose an common interface for subclasses who implements some type of LT download.
3588
- Added `ReleaseLocalLanguageTool` class (implementation of `LocalLanguageTool`) that implements the downloading of LT from release/archive page.
3689
- Added `SnapshotLocalLanguageTool` class (implementation of `LocalLanguagetool`) that implements the downloading of LT from snapshot page.
90+
91+
### Changed
3792
- Edited the low limit of the supported LT version (now at release 4.0).
93+
94+
### Deprecated
3895
- Deprecated some funcs (they remain available until version 4.0.0):
3996
- `language_tool_python.download_lt.get_common_prefix`
4097
- `language_tool_python.download_lt.http_get`
4198
- `language_tool_python.download_lt.unzip_file`
4299
- `language_tool_python.download_lt.download_zip`
43100
- `language_tool_python.download_lt.download_lt`
44101
- `language_tool_python.utils.find_existing_language_tool_downloads`
45-
- `language_tool_python.utils._extract_version`
46102
- `language_tool_python.utils.get_language_tool_directory`
47103
- `language_tool_python.utils.get_server_cmd`
48104
- `language_tool_python.utils.get_jar_info`
49105

50-
## 3.2.2 (2026-01-02)
106+
### Fixed
107+
- Corrected a bug in `language_tool_python.server.LanguageTool._get_valid_spelling_file_path` where the spelling file was always the one for English, even when the LT instance was configured for a different language.
108+
- Corrected a bug in `language_tool_python.server.LanguageTool` where, even if you specified a `language_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).
109+
- Corrected the necessary java version for old LT releases (from 1.8 to 1.9).
110+
111+
## [3.2.2] - 2026-01-02
112+
113+
### Fixed
51114
- Corrected a bug in `language_tool_python.download_lt.http_get` by adding proper handling of HTTP 403 and other non 200 status codes by raising `language_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.
52115

53-
## 3.2.1 (2025-12-30)
116+
## [3.2.1] - 2025-12-30
117+
118+
### Fixed
54119
- Corrected a bug in `language_tool_python.server._kill_processes` where processes were not being properly waited for after being killed, potentially leading to zombie processes.
55120

56-
## 3.2.0 (2025-12-18)
121+
## [3.2.0] - 2025-12-18
122+
123+
### Added
57124
- Added a `check_matching_regions` method in `language_tool_python.server.LanguageTool`.
58125

59-
## 3.1.0 (2025-11-23)
126+
## [3.1.0] - 2025-11-23
127+
128+
### Added
60129
- Added an optional parameter to `LanguageTool` (`proxies`).
61130
- Added an `proxies` attribute to `LanguageTool` (This attribute is used by the `LanguageTool._query_server` method).
62131
- Added new read-only properties to `LanguageTool`:
63132
- `url`
64133
- `is_remote`
65134
- `host`
66135
- `port`
136+
137+
### Changed
67138
- Edited the documentation of the `LanguageTool` class to improve clarity.
68139

69-
## 3.0.0 (2025-11-20)
140+
## [3.0.0] - 2025-11-20
70141

71-
### What's New:
72-
- Corrected a bug when the default locale is POSIX default (C).
73-
- Corrected a bug when closing `LanguageTool` instances (deadlocks).
74-
- Corrected a bug when comparing LT versions (e.g., '5.8' vs '5.10').
142+
> Major rewrite: snake_case naming conventions, strict Python types, dedicated `exceptions` module, logging, and online documentation.
143+
144+
### Added
75145
- Added new possible values in LT config (`trustXForwardForHeader`, `suggestionsEnabled` and lang keys).
76146
- Added a warning if you forget to explicitly close a `LanguageTool` instance.
77147
- Added online documentation for the package.
78148
- Added logging (and logs) in the package.
79149
- Added raising `exceptions.TimeoutError` in `download_lt.http_get`.
80150
- Added `packaging` as a dependency.
81-
- Moved exception classes to a separate `exceptions` module (no more importable from `utils`).
82-
- Edited raised exceptions in some methods/functions:
151+
152+
### Changed
153+
- **Breaking:** Moved exception classes to a separate `exceptions` module (no more importable from `utils`).
154+
- **Breaking:** Edited raised exceptions in some methods/functions:
83155
- from `AssertionError` to `ValueError` in `config_file.LanguageToolConfig.__init__`
84156
- from `AssertionError` to `exceptions.PathError` in `download_lt.download_lt`
85157
- from `AssertionError` to `ValueError` in `download_lt.download_lt`
86158
- from `AssertionError` to `ValueError` in `server.LanguageTool.__init__`
87159
- from `AssertionError` to `ValueError` in `utils.kill_process_force`
88-
- Edited some camelCase attributes/methods to snake_case:
160+
- **Breaking:** Edited some camelCase attributes/methods to snake_case:
89161
- `server.LanguageTool.motherTongue` to `server.LanguageTool.mother_tongue`
90162
- `server.LanguageTool.newSpellings` to `server.LanguageTool.new_spellings`
91163
- `match.Match.ruleId` to `match.Match.rule_id`
92164
- `match.Match.offsetInContext` to `match.Match.offset_in_context`
93165
- `match.Match.errorLength` to `match.Match.error_length`
94166
- `match.Match.ruleIssueType` to `match.Match.rule_issue_type`
95167
- `match.Match.matchedText` to `match.Match.matched_text`
96-
- Edited types of some params:
168+
- **Breaking:** Edited types of some params:
97169
- `directory_to_extract_to` in `dowload_lt.unzip_file` from `str` to `Path`
98170
- `directory` in `download_lt.download_zip` from `str` to `Path`
99171
- `download_folder` in `utils.find_existing_language_tool_downloads` from `str` to `Path`
100-
- Edited return types of some methods/functions:
172+
- **Breaking:** Edited return types of some methods/functions:
101173
- from `str` to `Path` in `utils.get_language_tool_download_path`
102174
- from `list[str]` to `list[Path]` in `utils.find_existing_language_tool_downloads`
103175
- from `str` to `Path` in `utils.get_language_tool_directory`
104176
- from `tuple[str, str]` to `tuple[Path, Path]` in `utils.get_jar_info`
177+
178+
### Fixed
179+
- Corrected a bug when the default locale is POSIX default (C).
180+
- Corrected a bug when closing `LanguageTool` instances (deadlocks).
181+
- Corrected a bug when comparing LT versions (e.g., '5.8' vs '5.10').
182+
183+
[Unreleased]: https://github.com/jxmorris12/language_tool_python/compare/3.4.0...HEAD
184+
[3.4.0]: https://github.com/jxmorris12/language_tool_python/compare/3.3.1...3.4.0
185+
[3.3.1]: https://github.com/jxmorris12/language_tool_python/compare/3.3.0...3.3.1
186+
[3.3.0]: https://github.com/jxmorris12/language_tool_python/compare/3.2.2...3.3.0
187+
[3.2.2]: https://github.com/jxmorris12/language_tool_python/compare/3.2.1...3.2.2
188+
[3.2.1]: https://github.com/jxmorris12/language_tool_python/compare/3.2.0...3.2.1
189+
[3.2.0]: https://github.com/jxmorris12/language_tool_python/compare/3.1.0...3.2.0
190+
[3.1.0]: https://github.com/jxmorris12/language_tool_python/compare/3.0.0...3.1.0
191+
[3.0.0]: https://github.com/jxmorris12/language_tool_python/compare/2.9.5...3.0.0

‎CONTRIBUTING.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The best contributions are those that try to resolve the [issues](https://github
1616

1717
### 2. Fork the repository and make your changes
1818

19-
If you want to contribute, you first need to fork the repo (and preferably create a branch with a name that says something about the changes you're going to make).
19+
If you want to contribute, you first need to fork the repo and create a branch with a name that says something about the changes you're going to make (e.g., `fix/issue-123`, `feature/new-function`).
2020

2121
To start developing, you can install all the necessary packages in your python environment with this command (optional dependencies will be installed):
2222
```shell
@@ -47,9 +47,10 @@ Please do not manually bump the version number in [pyproject.toml](./pyproject.t
4747
Before pushing and creating your pull request, you should make sure you've done the following:
4848

4949
- Updated any relevant tests.
50-
- Updated any relevant documentation. This includes docstrings and [README](./README.md) file.
50+
- Updated any relevant documentation. This includes docstrings, [README](./README.md) file, and [sphinx documentation](./docs/source/references).
5151
- Added comments to your code where necessary (especially if the code is not self-explanatory).
5252
- Formatted your code, run the linters and tests.
53+
- Added your changes to the [CHANGELOG](./CHANGELOG.md) file, if applicable. You have to follow the [Keep a Changelog](https://keepachangelog.com/en/2.0.0/) format for this, and make sure to add your changes under the "Unreleased" section.
5354

5455
### 4. Create your pull request
5556

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ For the full API reference, configuration options, CLI usage, and more examples,
9494

9595
## Versioning
9696

97-
This project follows [Semantic Versioning](https://semver.org/) (`MAJOR.MINOR.PATCH`):
97+
This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html) (`MAJOR.MINOR.PATCH`):
9898

9999
- **PATCH** - backwards-compatible bug fixes.
100100
- **MINOR** - new backwards-compatible features.

0 commit comments

Comments
 (0)