Marco Ricci commited on 2025-06-15 13:22:32
Zeige 1 geänderte Dateien mit 132 Einfügungen und 115 Löschungen.
Rewrite the changelog (and some parts of the v0.4.0 changelog too) in imperative form, because that's what Keep a Changelog themselves use. Mark commentary for developers specifically as such, and sort it to the bottom of the section.
... | ... |
@@ -37,7 +37,9 @@ |
37 | 37 |
of the respective types above. |
38 | 38 |
|
39 | 39 |
<aside markdown><small> |
40 |
-(All entries are from the perspective of a user, not a developer.) |
|
40 |
+(All entries are from the perspective of a user of the program or the API. |
|
41 |
+As an exception, entries partaining to developers of `derivepassphrase` are |
|
42 |
+specifically marked as such.) |
|
41 | 43 |
</small></aside> |
42 | 44 |
|
43 | 45 |
[REFERENCE]: reference/index.md |
... | ... |
@@ -48,21 +50,24 @@ |
48 | 50 |
|
49 | 51 |
### Removed {#removed-in-v0.5} |
50 | 52 |
|
51 |
- - `derivepassphrase` no longer supports (automatic) colored output or |
|
52 |
- output with embedded text styling. There exist pseudo-standards (the |
|
53 |
- `NO_COLOR` and `FORCE_COLOR` environment variables) governing how to |
|
54 |
- influence this automatic detection, but they are under-specified with |
|
55 |
- regard to their interaction with each other. Until a consensus is |
|
56 |
- reached and automatic colored/styled output can be requested or rejected |
|
57 |
- reliably across different terminal programs, `derivepassphrase` will |
|
58 |
- rather emit only uncolored, unstyled, lowest-common-denominator |
|
53 |
+ - For `derivepassphrase`, remove support for (automatic) colored output or |
|
54 |
+ output with embedded text styling. |
|
55 |
+ |
|
56 |
+ This is a stopgap measure. |
|
57 |
+ There exist pseudo-standards (the `NO_COLOR` and `FORCE_COLOR` |
|
58 |
+ environment variables) governing how to influence this automatic |
|
59 |
+ detection, but they are under-specified with regard to their interaction |
|
60 |
+ with each other. |
|
61 |
+ Until a consensus is reached and automatic colored/styled output can be |
|
62 |
+ requested or rejected reliably across different terminal programs, we |
|
63 |
+ will rather emit only uncolored, unstyled, lowest-common-denominator |
|
59 | 64 |
device-independent output. |
60 | 65 |
|
61 | 66 |
### Added {#added-in-v0.5} |
62 | 67 |
|
63 |
- - [`Vault`][derivepassphrase.vault.Vault] now can report on whether two |
|
64 |
- master passphrases are interchangable with respect to the service |
|
65 |
- passphrases they can derive. |
|
68 |
+ - For the [`Vault`][derivepassphrase.vault.Vault] API, support reporting |
|
69 |
+ on whether two master passphrases are interchangable with respect to the |
|
70 |
+ service passphrases they can derive. |
|
66 | 71 |
This is an artefact of how the master passphrase is converted to the |
67 | 72 |
random bit sequence with which the service passphrases are generated. |
68 | 73 |
See the corresponding [FAQ entry: What are "interchangable passphrases" |
... | ... |
@@ -74,51 +79,51 @@ |
74 | 79 |
variants of a given master password tend to be ugly to type in, and |
75 | 80 |
because they do not have practical security implications. |
76 | 81 |
|
77 |
- - Beyond [`bytes`][] and [`bytearray`][], |
|
78 |
- [`Vault`][derivepassphrase.vault.Vault] objects now accept arbitrary |
|
82 |
+ - For the [`Vault`][derivepassphrase.vault.Vault] API, accept arbitrary |
|
79 | 83 |
[Buffer][collections.abc.Buffer] objects as passphrases or service |
80 |
- names. |
|
84 |
+ names, beyond [`bytes`][] and [`bytearray`][]. |
|
81 | 85 |
|
82 |
- - [`Vault`][derivepassphrase.vault.Vault] objects now expose [the vault |
|
83 |
- UUID][derivepassphrase.vault.Vault.UUID] and [the character |
|
84 |
- sets][derivepassphrase.vault.Vault.CHARSETS] as public attributes. |
|
86 |
+ - Expose [the vault UUID][derivepassphrase.vault.Vault.UUID] and [the |
|
87 |
+ character sets][derivepassphrase.vault.Vault.CHARSETS] as public |
|
88 |
+ attributes. |
|
85 | 89 |
|
86 |
- - `derivepassphrase vault` now supports selecting the editor interface |
|
87 |
- when editing notes via the `--modern-editor-interface` and |
|
88 |
- `--vault-legacy-editor-interface` options. |
|
90 |
+ - For `derivepassphrase vault`, support selecting the [editor |
|
91 |
+ interface](#changed-in-v0.5-editor-interface) when editing notes via the |
|
92 |
+ `--modern-editor-interface` and `--vault-legacy-editor-interface` |
|
93 |
+ options. |
|
89 | 94 |
|
90 |
- - `derivepassphrase vault` now supports printing the service notes before |
|
95 |
+ - For `derivepassphrase vault`, support printing the service notes before |
|
91 | 96 |
the passphrase, as an alternative, instead of always printing them |
92 | 97 |
*after* the passphrase. |
93 | 98 |
|
94 |
- - The tests concerning `derivepassphrase vault` and `--notes` usage have |
|
95 |
- been rewritten into [hypothesis][]-based tests where feasible. |
|
99 |
+ - In the `--version` option of `derivepassphrase` and each subcommand, |
|
100 |
+ additionally report build and environment information, such as |
|
101 |
+ supported subcommands, derivation schemes, foreign configuration formats |
|
102 |
+ and active [PEP 508 extras][PEP_508]. |
|
103 |
+ (Each subcommand only reports the items relevant to that subcommand.) |
|
96 | 104 |
|
97 |
- - The `derivepassphrase` source tree now contains scripts to ensure |
|
98 |
- consistent code quality: automatic linting, formatting and type |
|
99 |
- checking, and optional running of the test suite and building of the |
|
100 |
- documentation. The master quality control script doubles as a |
|
101 |
- servicable "pre-commit" hook for git. |
|
105 |
+ - For developers: Rewrite the tests concerning `derivepassphrase vault` |
|
106 |
+ and `--notes` usage into [hypothesis][]-based tests where feasible. |
|
102 | 107 |
|
103 |
- - The `--version` option of `derivepassphrase` and each subcommand |
|
104 |
- additionally reports build and environment information, such as |
|
105 |
- supported subcommands, derivation schemes, foreign configuration formats |
|
106 |
- and active [PEP 508 extras][PEP_508]. Each subcommand only reports the |
|
107 |
- items relevant to that subcommand. |
|
108 |
+ - For developers: Add scripts to the source tree to ensure consistent code |
|
109 |
+ quality: automatic linting, formatting and type checking, and optional |
|
110 |
+ running of the test suite and building of the documentation. |
|
111 |
+ The master quality control script doubles as a servicable (but |
|
112 |
+ heavyweight) "pre-commit" hook for git. |
|
108 | 113 |
|
109 |
-[INTERCHANGABLE_PASSPHRASES]: ../explanation/faq-vault-interchangable-passphrases.md |
|
114 |
+[INTERCHANGABLE_PASSPHRASES]: explanation/faq-vault-interchangable-passphrases.md |
|
110 | 115 |
[PEP_508]: https://peps.python.org/pep-0508/ |
111 | 116 |
[hypothesis]: https://pypi.org/project/hypothesis/ |
112 | 117 |
|
113 | 118 |
### Changed {#changed-in-v0.5} |
114 | 119 |
|
115 |
- - The export handlers for "storeroom" and "vault-native" configuration |
|
120 |
+ - Support a new, unified interface |
|
121 |
+ [`ExportVaultConfigDataFunction`][derivepassphrase.exporter.ExportVaultConfigDataFunction] |
|
122 |
+ in the export handlers for "storeroom" and "vault-native" configuration |
|
116 | 123 |
data, |
117 | 124 |
[`export_storeroom_data`][derivepassphrase.exporter.storeroom.export_storeroom_data] |
118 | 125 |
and |
119 |
- [`export_vault_native_data`][derivepassphrase.exporter.vault_native.export_vault_native_data] |
|
120 |
- configuration data now both support a unified interface: |
|
121 |
- [`ExportVaultConfigDataFunction`][derivepassphrase.exporter.ExportVaultConfigDataFunction]. |
|
126 |
+ [`export_vault_native_data`][derivepassphrase.exporter.vault_native.export_vault_native_data]. |
|
122 | 127 |
A new dispatch function |
123 | 128 |
[`export_vault_config_data`][derivepassphrase.exporter.export_vault_config_data] |
124 | 129 |
automatically calls the correct backend, based on the requested format. |
... | ... |
@@ -126,9 +131,10 @@ |
126 | 131 |
This is a **breaking API change** due to the change in function |
127 | 132 |
parameter names and return types. |
128 | 133 |
|
129 |
- - `KeyCommentPair` from [`derivepassphrase._types`][], and `KeyPair` and |
|
130 |
- `MasterKeys` from [`derivepassphrase.exporter.storeroom`][], have been |
|
131 |
- converted to [`NamedTuple`s][typing.NamedTuple] and renamed to |
|
134 |
+ - Convert `KeyCommentPair` from [`derivepassphrase._types`][], and |
|
135 |
+ `KeyPair` and `MasterKeys` from |
|
136 |
+ [`derivepassphrase.exporter.storeroom`][], to |
|
137 |
+ [`NamedTuple`s][typing.NamedTuple]. Also rename them to |
|
132 | 138 |
[`SSHKeyCommentPair`][derivepassphrase._types.SSHKeyCommentPair], |
133 | 139 |
[`StoreroomKeyPair`][derivepassphrase._types.StoreroomKeyPair] and |
134 | 140 |
[`StoreroomMasterKeys`][derivepassphrase._types.StoreroomMasterKeys], |
... | ... |
@@ -142,89 +148,101 @@ |
142 | 148 |
This is a **breaking API change** due to the removal of most functions |
143 | 149 |
from the [`derivepassphrase.cli`][] module. |
144 | 150 |
|
145 |
- - The test suite now uses a different feature matrix and different |
|
146 |
- [hypothesis][] profiles. |
|
147 |
- The slowdown caused by coverage measurement is now more accurately |
|
148 |
- estimated and adjusted for in the [hypothesis][] settings. |
|
151 |
+ - For `derivepassphrase vault`, change the handling of the notes for |
|
152 |
+ better compatibility with <i>vault</i>(1) and for better internal |
|
153 |
+ consistency: |
|
154 |
+ |
|
155 |
+ 1. Correctly require the `--config` option in addition to the `--notes` |
|
156 |
+ option to request that the service notes be edited, for |
|
157 |
+ compatibility with <i>vault</i>(1). |
|
158 |
+ Issue a warning if `--notes` is used without `--config`. |
|
159 |
+ |
|
160 |
+ 2. `notes` is now also a valid setting name for `--unset` to take. |
|
149 | 161 |
|
150 |
- - The test suite has been cleaned up, partly reorganized, and |
|
151 |
- rudimentarily documented. |
|
152 |
- Several new [hypothesis][]-based tests were also added, particularly to |
|
153 |
- test the core assumptions of the [vault][derivepassphrase.vault] |
|
154 |
- derivation scheme about sensitivity (or lack thereof) to its inputs and |
|
155 |
- its input formats. |
|
156 |
- |
|
157 |
- - `derivepassphrase vault` stores its `vault.json` data file in |
|
158 |
- pretty-printed form. This is a stopgap measure to ease debugging and |
|
159 |
- introspection until better built-in query functionality for the effective |
|
160 |
- configuration is available, because users should not be rewarded. ([#20]) |
|
161 |
- |
|
162 |
- - `derivepassphrase vault` now correctly requires the `--config` option in |
|
163 |
- addition to the `--notes` option to request that the service notes be |
|
164 |
- edited, for compatibility with vault(1). `notes` is now also a valid |
|
165 |
- setting name for `--unset` to take. Furthermore, editing the notes |
|
166 |
- successfully in any way, including no-op edits, will register the |
|
167 |
- service name as a known service to `derivepassphrase vault`, even if the |
|
168 |
- settings are otherwise empty. Finally, using plain `--notes` without |
|
169 |
- `--config` has no effect, and issues a warning to that extent. |
|
170 |
- |
|
171 |
- - `derivepassphrase vault` by default now uses an editor interface that |
|
172 |
- matches vault(1): the contents of the edited text file are used directly |
|
173 |
- as the service notes, without interpretation. Previously, we |
|
174 |
- post-processed the text file to remove comments and our instruction |
|
175 |
- texts, and interpreted an empty file as a request to abort the edit. |
|
162 |
+ 3. Editing the notes successfully in any way, including no-op edits, |
|
163 |
+ will register the service name as a known service to |
|
164 |
+ `derivepassphrase vault`, even if the settings are otherwise empty. |
|
165 |
+ |
|
166 |
+ - For `derivepassphrase vault`, by default, use an <a |
|
167 |
+ id="changed-in-v0.5-editor-interface">editor interface</a> that matches |
|
168 |
+ <i>vault</i>(1): the contents of the edited text file are used directly |
|
169 |
+ as the service notes, without interpretation. |
|
170 |
+ |
|
171 |
+ Previously, we post-processed the text file to remove comments and our |
|
172 |
+ instruction texts, and interpreted an empty file as a request to abort |
|
173 |
+ the edit. |
|
176 | 174 |
These two editor interfaces ("legacy" and "modern") can be explicitly |
177 | 175 |
selected, and for the legacy interface, which is less resilient against |
178 | 176 |
data entry or usage errors, a backup copy of the old notes content is |
179 | 177 |
made. |
180 | 178 |
|
179 |
+ - For developers: Use a different feature matrix and different |
|
180 |
+ [hypothesis][] profiles in the test suite. |
|
181 |
+ The slowdown caused by coverage measurement is now more accurately |
|
182 |
+ estimated and adjusted for in the [hypothesis][] settings. |
|
183 |
+ |
|
184 |
+ - For developers: Clean up, partly reorganize, and document the test |
|
185 |
+ suite, at least rudimentarily. |
|
186 |
+ Also add several new [hypothesis][]-based tests, particularly to test |
|
187 |
+ the core assumptions of the [vault][derivepassphrase.vault] derivation |
|
188 |
+ scheme about sensitivity (or lack thereof) to its inputs and its input |
|
189 |
+ formats. |
|
190 |
+ |
|
191 |
+ - For developers: For `derivepassphrase vault`, store our `vault.json` |
|
192 |
+ data file in pretty-printed form. |
|
193 |
+ This is a stopgap measure to ease debugging and introspection until |
|
194 |
+ better built-in query functionality for the effective configuration is |
|
195 |
+ available, because users should not be rewarded for meddling around in |
|
196 |
+ data files. ([#20]) |
|
197 |
+ |
|
181 | 198 |
[#20]: https://github.com/the-13th-letter/derivepassphrase/issues/20 |
182 | 199 |
[hypothesis]: https://pypi.org/project/hypothesis/ |
183 | 200 |
|
184 | 201 |
### Fixed {#fixed-in-v0.5} |
185 | 202 |
|
186 |
- - Shell completion for `zsh` was misbehaving in the presence of colons in |
|
187 |
- the completion item. |
|
203 |
+ - Fix the misbehaving shell completion for `zsh` in the presence of colons |
|
204 |
+ in the completion item. |
|
188 | 205 |
This was due to an overzealous workaround for |
189 | 206 |
[`pallets/click#2703`][CLICK_2703]. |
190 | 207 |
|
191 |
- - When exporting a vault configuration, `derivepassphrase vault` now |
|
192 |
- exports a pretty-printed configuration, to ease debugging and |
|
208 |
+ - For `derivepassphrase vault`, when exporting a vault configuration, |
|
209 |
+ export a pretty-printed configuration, to ease debugging and |
|
193 | 210 |
introspection. ([#20]) |
194 | 211 |
|
195 |
- - `derivepassphrase vault` now also prints the service notes (if any) when |
|
212 |
+ - For `derivepassphrase vault`, also print the service notes (if any) when |
|
196 | 213 |
deriving a service passphrase, just like vault(1) does. |
197 | 214 |
|
198 |
- - Instead of having to do this by hand, `derivepassphrase` now includes |
|
199 |
- build machinery to ensure consistency of its version number and its |
|
200 |
- diagnostic messages between the documentation and the code. |
|
215 |
+ - Lock our internals and their configuration against concurrent |
|
216 |
+ modifications. ([#22]) |
|
201 | 217 |
|
202 |
- (The canonical way to get the version number is the |
|
203 |
- [`importlib.metadata.version`][] standard library interface.) |
|
218 |
+ - Test against PyPy 3.11. |
|
204 | 219 |
|
205 |
- - `derivepassphrase` now locks its internals and its configuration against |
|
206 |
- concurrent modifications. ([#22]) |
|
220 |
+ - Test on <abbr title="Microsoft Windows">The Annoying |
|
221 |
+ OS</abbr>[^the-annoying-os] in its baseline version, i.e., without SSH |
|
222 |
+ agent functionality but with `cryptography` support. |
|
223 |
+ Fix all incompatibilities in the test suite if essential and/or |
|
224 |
+ feasible, otherwise document them as skips or expected failures. |
|
207 | 225 |
|
208 |
- - Test `derivepassphrase` against PyPy 3.11. |
|
226 |
+ (The latter case currently only concerns one single test that is |
|
227 |
+ supposed to trigger OS errors while attempting to read the |
|
228 |
+ `derivepassphrase` configuration files. |
|
229 |
+ <abbr title="Microsoft Windows">The Annoying OS</abbr> happily returns |
|
230 |
+ an empty file instead.) |
|
209 | 231 |
|
210 |
- - `derivepassphrase` now tests its locking implementation for correctness, |
|
211 |
- on both sides of the API. Specifically, we test that the respective |
|
212 |
- platform-specific locking primitives provide the requested mutual |
|
213 |
- exclusion properties, and we also test that the locking system as |
|
214 |
- a whole, when given functioning locking primitives, correctly serializes |
|
215 |
- access to the facilities it is supposed to guard. |
|
232 |
+ - For developers: Include build machinery to ensure consistency of our |
|
233 |
+ version number and our diagnostic messages between the documentation and |
|
234 |
+ the code, instead of having to check this by hand. |
|
216 | 235 |
|
217 |
- - `derivepassphrase` has been successfully tested on <abbr |
|
218 |
- title="Microsoft Windows">The Annoying OS</abbr>[^the-annoying-os] in |
|
219 |
- its baseline version, i.e., without SSH agent functionality but with |
|
220 |
- `cryptography` support. All incompatibilities in the test suite were |
|
221 |
- fixed if essential and/or feasible, or documented as skips or expected |
|
222 |
- failures if neither. |
|
236 |
+ (The canonical way to get the version number is the |
|
237 |
+ [`importlib.metadata.version`][] standard library interface.) |
|
223 | 238 |
|
224 |
- (The latter case currently only concerns one single test that is |
|
225 |
- supposed to trigger OS errors while attempting to read the |
|
226 |
- `derivepassphrase` configuration files. <abbr title="Microsoft |
|
227 |
- Windows">The Annoying OS</abbr> happily returns an empty file instead.) |
|
239 |
+ - For developers: Test our locking implementation for correctness, on both |
|
240 |
+ sides of the API. |
|
241 |
+ Specifically, test that the respective platform-specific locking |
|
242 |
+ primitives provide the requested mutual exclusion properties, and that |
|
243 |
+ the locking system as a whole, when given functioning locking |
|
244 |
+ primitives, correctly serializes access to the facilities it is supposed |
|
245 |
+ to guard. |
|
228 | 246 |
|
229 | 247 |
[^the-annoying-os]: Hat tip---and apologies---to |
230 | 248 |
[Timothée Mazzucotelli (`@pawamoy`)](https://github.com/pawamoy/) for |
... | ... |
@@ -238,16 +256,15 @@ |
238 | 256 |
|
239 | 257 |
### Added {#added-in-v0.4.0} |
240 | 258 |
|
241 |
- - Both `derivepassphrase vault` and `derivepassphrase export vault` now |
|
242 |
- support changing the amount of diagnostic output they emit via new |
|
259 |
+ - For `derivepassphrase vault` and `derivepassphrase export vault`, |
|
260 |
+ support changing the amount of diagnostic output we emit via new |
|
243 | 261 |
command-line options `--debug`, `-v`/`--verbose` and `-q`/`--quiet`. |
244 |
- Internally, this uses Python's standard [logging][] and [warnings][] |
|
262 |
+ Internally, we use Python's standard [logging][] and [warnings][] |
|
245 | 263 |
systems. |
246 | 264 |
|
247 |
- - `derivepassphrase` now uses a central configuration file, and additional |
|
248 |
- data files, some of which are service-specific. |
|
249 |
- (The `vault.json` |
|
250 |
- configuration file is now rebranded as a data file.) |
|
265 |
+ - Use a central configuration file, and additional data files, some of |
|
266 |
+ which are service-specific. |
|
267 |
+ (The `vault.json` configuration file is now rebranded as a data file.) |
|
251 | 268 |
The configuration files are user-editable, the data files are |
252 | 269 |
`derivepassphrase`-editable. |
253 | 270 |
|
... | ... |
@@ -255,22 +272,22 @@ |
255 | 272 |
`derivepassphrase` on Python 3.10 and older requires the |
256 | 273 |
[`tomli`][tomli] package. |
257 | 274 |
|
258 |
- - `derivepassphrase vault --config` now supports an `--unset` option which |
|
275 |
+ - For `derivepassphrase vault --config`, support an `--unset` option which |
|
259 | 276 |
unsets any given named setting prior to applying any other configuration |
260 | 277 |
changes. |
261 | 278 |
|
262 |
- - `derivepassphrase vault --export` can now also export the current |
|
279 |
+ - For `derivepassphrase vault --export`, support exporting the current |
|
263 | 280 |
configuration as a POSIX `sh` script, using the `--export-as=sh` option. |
264 | 281 |
The default (and previous behavior) is `--export-as=json`. |
265 | 282 |
|
266 |
- - `derivepassphrase` now includes basic support for localization: if the |
|
267 |
- necessary translations are installed, then the diagnostics and help |
|
268 |
- texts can be emitted in different languages. |
|
269 |
- Internally, this uses Python's standard [`gettext`][] system. |
|
283 |
+ - Include basic support for localization: if the necessary translations |
|
284 |
+ are installed, then the diagnostics and help texts can be emitted in |
|
285 |
+ different languages. |
|
286 |
+ Internally, we use Python's standard [`gettext`][] system. |
|
270 | 287 |
|
271 | 288 |
(As of this version, no translations have actually been prepared yet.) |
272 | 289 |
|
273 |
- - `derivepassphrase` now explicitly supports shell completion, in |
|
290 |
+ - For `derivepassphrase`, explicitly support shell completion, in |
|
274 | 291 |
particular filename and service name completion in the `export vault` |
275 | 292 |
and `vault` subcommands. |
276 | 293 |
|
277 | 294 |