wlc 3.3.0__tar.gz → 3.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wlc-3.3.0 → wlc-3.4.0}/CHANGES.md +34 -0
- {wlc-3.3.0 → wlc-3.4.0}/PKG-INFO +2 -2
- {wlc-3.3.0 → wlc-3.4.0}/THREAT_MODEL.md +13 -10
- {wlc-3.3.0 → wlc-3.4.0}/pyproject.toml +14 -6
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_base.py +15 -0
- wlc-3.4.0/tests/test_config.py +497 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_errors.py +53 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_main.py +19 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_output.py +54 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_package.py +21 -0
- wlc-3.4.0/tests/test_project_config.py +418 -0
- wlc-3.4.0/tests/test_request_options.py +174 -0
- wlc-3.4.0/tests/test_tasks.py +280 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_wlc.py +3 -3
- {wlc-3.3.0 → wlc-3.4.0}/wlc/__init__.py +2 -0
- {wlc-3.3.0 → wlc-3.4.0}/wlc/base.py +26 -6
- {wlc-3.3.0 → wlc-3.4.0}/wlc/client.py +60 -6
- {wlc-3.3.0 → wlc-3.4.0}/wlc/config.py +89 -22
- {wlc-3.3.0 → wlc-3.4.0}/wlc/const.py +7 -1
- {wlc-3.3.0 → wlc-3.4.0}/wlc/exceptions.py +12 -0
- {wlc-3.3.0 → wlc-3.4.0}/wlc/http_debug.py +10 -1
- {wlc-3.3.0 → wlc-3.4.0}/wlc/main.py +13 -10
- {wlc-3.3.0 → wlc-3.4.0}/wlc/models.py +29 -7
- {wlc-3.3.0 → wlc-3.4.0}/wlc/output.py +11 -1
- wlc-3.4.0/wlc/request_options.py +59 -0
- wlc-3.4.0/wlc/tasks.py +61 -0
- {wlc-3.3.0 → wlc-3.4.0}/wlc/utils.py +10 -0
- {wlc-3.3.0 → wlc-3.4.0}/wlc.egg-info/PKG-INFO +2 -2
- {wlc-3.3.0 → wlc-3.4.0}/wlc.egg-info/SOURCES.txt +5 -0
- {wlc-3.3.0 → wlc-3.4.0}/wlc.egg-info/requires.txt +1 -1
- wlc-3.3.0/tests/test_config.py +0 -921
- {wlc-3.3.0 → wlc-3.4.0}/LICENSE +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/LICENSES/CC0-1.0.txt +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/LICENSES/GPL-3.0-or-later.txt +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/MANIFEST.in +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/README.md +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/SECURITY.md +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/completion/wlc +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/setup.cfg +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/__init__.py +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_category.py +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_client.py +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_config_discovery.py +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/.weblate +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/categories +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/categories-1 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/changes +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-android +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-android-file +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-android-file--GET--format=zip +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-olderweblate +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate--DELETE-- +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate--PATCH--priority=80 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-changes +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-file +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-file--GET--format=zip +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-lock +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-lock--POST--lock=0 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-lock--POST--lock=1 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-lock--POST--lock=false +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-lock--POST--lock=true +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-repository +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-repository--POST--operation=cleanup +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-repository--POST--operation=commit +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-repository--POST--operation=pull +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-repository--POST--operation=push +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-repository--POST--operation=reset +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-statistics +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-statistics--GET--page=2 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-statistics--GET--page=3 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-translations +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-translations--GET--page=2 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/components-hello-weblate-translations--POST--language_code=nl_BE +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/languages +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/languages--GET--page=2 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/languages--GET--page=3 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/languages--POST--code=tst--name=Test-Language--direction=rtl--plural=number=2--formula=n-!=-1 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects--POST--name=Hello--slug=hello--web=http---example.com---source_language=name=Malayalam--code=ml +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects--POST--name=denied_json--slug=denide_json--web=http---some-weblate-app.com- +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-acl +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-empty +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-empty-components +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-hello +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-hello--DELETE-- +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-hello-categories +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-hello-changes +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-hello-components +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-hello-components--POST--3fcd0ab4 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-hello-components--POST--c9c26539 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-hello-languages +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-hello-repository +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-hello-repository--POST--operation=cleanup +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-hello-repository--POST--operation=commit +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-hello-repository--POST--operation=pull +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-hello-repository--POST--operation=push +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-hello-repository--POST--operation=reset +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-hello-statistics +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/projects-invalid +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations--GET--page=2 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations--GET--page=3 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-android-en-units +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-android-en-units--POST--key=test-monolingual--value=-test-me- +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs--DELETE-- +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-changes +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-file +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-file--GET--format=csv +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-file--POST--3748506a +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-file--POST--5c6a101f +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-file--POST--85762547 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-file--POST--90a4957d +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-file--POST--f8672b4c +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-file--POST--fe040a0c +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-repository +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-repository--POST--operation=cleanup +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-repository--POST--operation=commit +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-repository--POST--operation=pull +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-repository--POST--operation=push +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-repository--POST--operation=reset +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-statistics +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-units +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/translations-hello-weblate-cs-units--GET--q=source%3A%3D%22mr%22 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/units +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/units-123 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/units-123--DELETE-- +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/units-123--PATCH--target=-foo---state=30 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/api/units-123--PUT--target=-foo---state=30 +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/mock/project-local-file.pot +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/section +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/weblate.ini +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_data/wlc +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_download.py +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_insecure_http.py +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_insecure_ssl.py +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_lazy_object.py +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_signatures.py +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_statistics.py +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_urls.py +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/tests/test_utils.py +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/wl +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/wlc/py.typed +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/wlc.egg-info/dependency_links.txt +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/wlc.egg-info/entry_points.txt +0 -0
- {wlc-3.3.0 → wlc-3.4.0}/wlc.egg-info/top_level.txt +0 -0
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.4.0
|
|
4
|
+
|
|
5
|
+
* Released on 23rd November 2026.
|
|
6
|
+
* Wait for queued Weblate operations to complete and report their outcome.
|
|
7
|
+
Set the wait with `--task-timeout` or `task_timeout`. The default is 30
|
|
8
|
+
minutes, and zero allows unlimited waiting. Python callers can also use
|
|
9
|
+
`Weblate.wait_for_task()` directly.
|
|
10
|
+
* Reject empty explicit configuration paths and stop with an error when the
|
|
11
|
+
selected user configuration cannot be read. Continue XDG discovery past
|
|
12
|
+
directories when a later configuration file is available.
|
|
13
|
+
* Preserve API path case when matching URL-scoped API keys and reject duplicate
|
|
14
|
+
origins in transport exception settings.
|
|
15
|
+
* Report malformed URLs and non-string URL values in API responses as client
|
|
16
|
+
errors before sending a follow-up request.
|
|
17
|
+
* Validate HTTP retry and timeout settings before sending requests.
|
|
18
|
+
* Escape additional invisible Unicode characters and surrogate code points in
|
|
19
|
+
interactive CLI output. Also escape terminal controls in interactive debug
|
|
20
|
+
logs.
|
|
21
|
+
* Updated the CA certificate bundle, development dependencies, CI actions, and
|
|
22
|
+
Docker base images.
|
|
23
|
+
|
|
3
24
|
## 3.3.0
|
|
4
25
|
|
|
5
26
|
* Released on 10th November 2026.
|
|
@@ -54,6 +75,7 @@
|
|
|
54
75
|
## 3.0.0
|
|
55
76
|
|
|
56
77
|
* Released on 8th October 2026.
|
|
78
|
+
|
|
57
79
|
* Breaking Python API changes:
|
|
58
80
|
|
|
59
81
|
* Require keyword arguments for client construction, request options,
|
|
@@ -64,10 +86,14 @@
|
|
|
64
86
|
is required.
|
|
65
87
|
* `WeblateConfig.find_config()` and `WeblateConfig.find_project_config()` now
|
|
66
88
|
return `pathlib.Path` objects instead of strings when a file is found.
|
|
89
|
+
|
|
67
90
|
* Reject cyclic category hierarchies and category nesting deeper than three
|
|
68
91
|
levels.
|
|
92
|
+
|
|
69
93
|
* Raised minimum dependency versions to exclude vulnerable releases.
|
|
94
|
+
|
|
70
95
|
* Added testing with Python 3.15 and improved type annotations.
|
|
96
|
+
|
|
71
97
|
* Updated development dependencies, CI actions, and Docker base images.
|
|
72
98
|
|
|
73
99
|
## 2.2.1
|
|
@@ -131,17 +157,25 @@
|
|
|
131
157
|
## 2.0.0
|
|
132
158
|
|
|
133
159
|
* Released on 21st April 2026.
|
|
160
|
+
|
|
134
161
|
* Possibly breaking changes:
|
|
135
162
|
|
|
136
163
|
* Renamed the retry configuration option from `method_whitelist` to `allowed_methods`.
|
|
137
164
|
* Tightened configuration loading: explicit `--config` is authoritative, missing explicit config files fail, and project discovery uses the nearest config file.
|
|
138
165
|
* Tightened URL, download, and output safety: invalid or cross-origin URLs are rejected, binary downloads to terminals are refused, and text, CSV, and HTML output is escaped.
|
|
166
|
+
|
|
139
167
|
* Added `WLC_URL` and `WLC_KEY` environment variable support.
|
|
168
|
+
|
|
140
169
|
* Added unit-level CLI commands.
|
|
170
|
+
|
|
141
171
|
* Updated models and statistics for the current Weblate API while preserving older statistics responses.
|
|
172
|
+
|
|
142
173
|
* Fixed retry configuration and request adapter wiring.
|
|
174
|
+
|
|
143
175
|
* Escaped generated HTML output ([GHSA-gx2m-mcc2-r4p3](https://github.com/WeblateOrg/wlc/security/advisories/GHSA-gx2m-mcc2-r4p3)), hardened CSV and terminal output, and redacted authorization headers from debug logs.
|
|
176
|
+
|
|
144
177
|
* Improved nested category handling, unit editing, help texts, and error messages.
|
|
178
|
+
|
|
145
179
|
* Split implementation modules, moved tests out of the installed package, and updated packaging, dependencies, Docker images, and CI.
|
|
146
180
|
|
|
147
181
|
## 1.17.2
|
{wlc-3.3.0 → wlc-3.4.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wlc
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.4.0
|
|
4
4
|
Summary: A command-line utility for Weblate, translation tool with tight version control integration
|
|
5
5
|
Author-email: Michal Čihař <michal@weblate.org>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -32,7 +32,7 @@ Requires-Python: >=3.10
|
|
|
32
32
|
Description-Content-Type: text/markdown
|
|
33
33
|
License-File: LICENSE
|
|
34
34
|
Requires-Dist: argcomplete
|
|
35
|
-
Requires-Dist: certifi>=2026.
|
|
35
|
+
Requires-Dist: certifi>=2026.11.20
|
|
36
36
|
Requires-Dist: idna>=3.15
|
|
37
37
|
Requires-Dist: python-dateutil
|
|
38
38
|
Requires-Dist: pyxdg>=0.26
|
|
@@ -22,8 +22,9 @@ CLI output, or downloaded files.
|
|
|
22
22
|
variables, user configuration, explicit configuration, upload inputs, and
|
|
23
23
|
user-selected output paths are trusted instructions. The operating system,
|
|
24
24
|
runtime, installed package, and these trusted sources are assumed intact.
|
|
25
|
-
- **Checked-out repository:** Automatic discovery loads user configuration and
|
|
26
|
-
|
|
25
|
+
- **Checked-out repository:** Automatic discovery loads user configuration first and
|
|
26
|
+
stops with an error if the selected file cannot be read. It then loads the
|
|
27
|
+
nearest eligible project configuration in the current directory or
|
|
27
28
|
a parent, stopping at the nearest repository root. On POSIX systems discovery
|
|
28
29
|
also stops at directories owned by another non-root user or writable by
|
|
29
30
|
everyone; discovered files must meet the same permission rules. Group-writable
|
|
@@ -73,6 +74,8 @@ See the [configuration documentation][configuration-docs] and
|
|
|
73
74
|
Transport exceptions require a CLI/environment setting paired with its own
|
|
74
75
|
URL, or a matching origin in trusted user or complete explicit configuration. An
|
|
75
76
|
unscoped CLI/environment exception cannot be combined with a project URL.
|
|
77
|
+
Each transport exception section accepts only one entry per normalized origin.
|
|
78
|
+
- URL-scoped keys preserve case distinctions in the API path.
|
|
76
79
|
- Authentication comes only from configured API-key sources. Automatic
|
|
77
80
|
`.netrc`/`NETRC` authentication is disabled, URL-embedded credentials are
|
|
78
81
|
rejected, and keys containing anything other than printable ASCII are
|
|
@@ -129,9 +132,9 @@ Coverage: [download tests](tests/test_download.py).
|
|
|
129
132
|
|
|
130
133
|
- Supported CLI rendering and handled diagnostics escape terminal controls and
|
|
131
134
|
the supported Unicode bidi and invisible controls on interactive streams.
|
|
132
|
-
This includes structured text/CSV values and diagnostics
|
|
133
|
-
server data. It does not promise protection against all Unicode
|
|
134
|
-
or misleading text.
|
|
135
|
+
This includes structured text/CSV values, CLI debug records, and diagnostics
|
|
136
|
+
from malformed server data. It does not promise protection against all Unicode
|
|
137
|
+
confusables or misleading text.
|
|
135
138
|
- HTML rendering escapes keys and values. CSV rendering neutralizes formula
|
|
136
139
|
prefixes, including Unicode compatibility forms and those hidden behind
|
|
137
140
|
leading controls, whitespace, marks, or common invisible characters. CSV
|
|
@@ -140,10 +143,8 @@ Coverage: [download tests](tests/test_download.py).
|
|
|
140
143
|
- Raw downloaded translation bytes are refused when standard output is an
|
|
141
144
|
interactive terminal.
|
|
142
145
|
- wlc's debug helpers redact sensitive outgoing request headers and omit request
|
|
143
|
-
bodies and uploaded contents.
|
|
144
|
-
|
|
145
|
-
and debug output does not receive the supported renderers' terminal-safety
|
|
146
|
-
guarantee. Do not put secrets in request parameters.
|
|
146
|
+
bodies and uploaded contents. URLs, request parameter values, response content,
|
|
147
|
+
and reason phrases may appear in logs. Do not put secrets in request parameters.
|
|
147
148
|
|
|
148
149
|
Handled CLI errors also mask exact configured authorization values and
|
|
149
150
|
credentials as defense in depth. Configuration syntax diagnostics omit file
|
|
@@ -190,7 +191,9 @@ Implementation and coverage: [output implementation](wlc/output.py),
|
|
|
190
191
|
server impersonation.
|
|
191
192
|
- **Availability and retries:** There are no strict limits on response size,
|
|
192
193
|
pagination, aggregate time, memory, disk use, or retry cost against a selected
|
|
193
|
-
server.
|
|
194
|
+
server. Task polling has a configurable 30-minute default deadline. Zero allows
|
|
195
|
+
unlimited polling, and an in-flight request and its retries can outlast the
|
|
196
|
+
deadline. Stopping a wait leaves the server task running. Retrying state-changing
|
|
194
197
|
methods can repeat effects. Output can be partial after failure, including
|
|
195
198
|
incomplete JSON or HTML; consumers must check the exit status.
|
|
196
199
|
- **Content and integrations:** Origin, filename, and output containment do not
|
|
@@ -13,10 +13,10 @@ lint = [
|
|
|
13
13
|
{ include-group = "pylint" }
|
|
14
14
|
]
|
|
15
15
|
pre-commit = [
|
|
16
|
-
"prek==0.5.
|
|
16
|
+
"prek==0.5.11"
|
|
17
17
|
]
|
|
18
18
|
pylint = [
|
|
19
|
-
"pylint==4.1.
|
|
19
|
+
"pylint==4.1.4"
|
|
20
20
|
]
|
|
21
21
|
test = [
|
|
22
22
|
"pytest-cov==7.1.0",
|
|
@@ -25,12 +25,19 @@ test = [
|
|
|
25
25
|
"responses==0.26.3"
|
|
26
26
|
]
|
|
27
27
|
types = [
|
|
28
|
-
"ty==0.0.
|
|
28
|
+
"ty==0.0.108",
|
|
29
29
|
"mypy==2.4.1",
|
|
30
|
-
"types-pyxdg==0.28.0.
|
|
31
|
-
"types-python-dateutil==2.9.0.
|
|
30
|
+
"types-pyxdg==0.28.0.20261122",
|
|
31
|
+
"types-python-dateutil==2.9.0.20261122",
|
|
32
32
|
"types-requests==2.33.0.20261030"
|
|
33
33
|
]
|
|
34
|
+
package-lint = [
|
|
35
|
+
"check-manifest==0.51",
|
|
36
|
+
"check-wheel-contents==0.6.3",
|
|
37
|
+
"pydistcheck==0.11.3",
|
|
38
|
+
"pyroma==5.0.1",
|
|
39
|
+
"twine==7.0.0"
|
|
40
|
+
]
|
|
34
41
|
|
|
35
42
|
[project]
|
|
36
43
|
classifiers = [
|
|
@@ -52,7 +59,7 @@ classifiers = [
|
|
|
52
59
|
]
|
|
53
60
|
dependencies = [
|
|
54
61
|
"argcomplete",
|
|
55
|
-
"certifi>=2026.
|
|
62
|
+
"certifi>=2026.11.20",
|
|
56
63
|
"idna>=3.15",
|
|
57
64
|
"python-dateutil",
|
|
58
65
|
"pyxdg>=0.26",
|
|
@@ -96,6 +103,7 @@ Twitter = "https://twitter.com/WeblateOrg"
|
|
|
96
103
|
|
|
97
104
|
[tool.check-manifest]
|
|
98
105
|
ignore = [
|
|
106
|
+
"uv.lock",
|
|
99
107
|
".dockerignore",
|
|
100
108
|
"Dockerfile",
|
|
101
109
|
".well-known/*",
|
|
@@ -17,10 +17,12 @@ from io import BytesIO, StringIO
|
|
|
17
17
|
from pathlib import Path
|
|
18
18
|
from typing import TYPE_CHECKING, Literal, NoReturn, TextIO, cast
|
|
19
19
|
from unittest import TestCase
|
|
20
|
+
from unittest.mock import patch
|
|
20
21
|
|
|
21
22
|
import responses
|
|
22
23
|
from requests.exceptions import RequestException
|
|
23
24
|
|
|
25
|
+
from wlc.config import WeblateConfig
|
|
24
26
|
from wlc.main import SettingsSource, main
|
|
25
27
|
|
|
26
28
|
if TYPE_CHECKING:
|
|
@@ -50,6 +52,19 @@ CONFIG_PARSE_ERRORS = (
|
|
|
50
52
|
)
|
|
51
53
|
|
|
52
54
|
|
|
55
|
+
def load_discovered_config(
|
|
56
|
+
directory: Path, user_config: Path | None = None, *, section: str = "weblate"
|
|
57
|
+
) -> WeblateConfig:
|
|
58
|
+
"""Load configuration using project discovery from the given directory."""
|
|
59
|
+
config = WeblateConfig(section=section)
|
|
60
|
+
with (
|
|
61
|
+
patch.object(Path, "cwd", return_value=directory),
|
|
62
|
+
patch.object(WeblateConfig, "find_config", return_value=user_config),
|
|
63
|
+
):
|
|
64
|
+
config.load()
|
|
65
|
+
return config
|
|
66
|
+
|
|
67
|
+
|
|
53
68
|
class BufferedStringIO(StringIO):
|
|
54
69
|
"""StringIO with a writable binary buffer for CLI tests."""
|
|
55
70
|
|