https://git.schokokeks.org/derivepassphrase.git/tree/f78506ee23c6ee6d55ab3ab2bdec8ba12c861d1b Recent commits to derivepassphrase.git (f78506ee23c6ee6d55ab3ab2bdec8ba12c861d1b) 2025-01-16T01:50:18+01:00 tag:gitlist.org,2012:commit/f78506ee23c6ee6d55ab3ab2bdec8ba12c861d1b Add changelog entry for the recent renaming and recasting of some type 2025-01-16T01:50:18+01:00 Marco Ricci software@the13thletter.info <pre>&lt;/pre&gt; tag:gitlist.org,2012:commit/032d431a1d6d6fe31749fb281c030e4825eab62d Fix usage of `mypy --python-version=3.9` and friends 2025-01-16T01:28:57+01:00 Marco Ricci software@the13thletter.info <pre>On the one hand, use a small stub file for `tomli`, because `mypy` is run from all sorts of `hatch` environments or Python virtual environments that are not set up correctly with `tomli`. On the other hand, type checking cannot rely on `try`-`except`-`ImportError` blocks working for type inference purposes, so variables imported as such need an explicit declaration. (In this specific case, this could be alleviated with explicit Python version checks, but I find that decidedly unpythonic.) &lt;/pre&gt; tag:gitlist.org,2012:commit/d4d62b2708b2895095ff9e2ca71f2d370755d156 Make key pairs, key sets and key-comment pairs generic 2025-01-16T01:05:38+01:00 Marco Ricci software@the13thletter.info <pre>Parametrize `_types.SSHKeyCommentPair`, `_types.StoreroomKeyPair` and `_types.StoreroomMasterKeys` over the exact `Buffer` type being used. Also supply a `.toreadonly()` method (similar to `memoryview.toreadonly()`) that converts all `Buffer`s to `bytes` objects. &lt;/pre&gt; tag:gitlist.org,2012:commit/11a492e7d9c86097a31c97d78d9751f1d82db377 Convert `tests.SSHTestKey` into a named tuple 2025-01-16T00:55:16+01:00 Marco Ricci software@the13thletter.info <pre>Again, this makes the notation more readable, and allows test keys to contain methods. Use this to group keys into always suitable keys and other keys, instead of having to manually define appropriate tables. &lt;/pre&gt; tag:gitlist.org,2012:commit/3389da68ea507ff9bd0d12562e04cb883e9997b9 Move storeroom helper types into `_types` module, as named tuples 2025-01-15T21:07:32+01:00 Marco Ricci software@the13thletter.info <pre>Move `exporter.storeroom.KeyPair` and `exporter.storeroom.MasterKeys` into the `_types` module, as `StoreroomKeyPair` and `StoreroomMasterKeys`, respectively. Also convert them from `TypedDict` to `NamedTuple`. Also rename `_types.KeyCommentPair` to `_types.SSHKeyCommentPair` for consistency. &lt;/pre&gt; tag:gitlist.org,2012:commit/b65b618949ca77aa0ad481ae2a517d0b469a4d9f Fix formatting and linting issues 2025-01-15T20:09:20+01:00 Marco Ricci software@the13thletter.info <pre>&lt;/pre&gt; tag:gitlist.org,2012:commit/e9c19afa34ddb3a061c243fc8b5eeca83b3f6ba5 Merge topic branch 'l10n-machinery' into master 2025-01-15T19:31:19+01:00 Marco Ricci software@the13thletter.info <pre>* t/l10n-machinery: Convert translatable string construction in enums to positional args only Normalize and unwrap translatable strings (messages and comments) Add hypothesis-based tests for l10n machinery Fix obvious coverage failures among the translatable strings machinery Split off comments in translatable string enum value constructor Sort arguments to translatable string enum value constructor Issue new context IDs for translatable messages Fix debug output of messages with trimmed filenames Support SOURCE_DATE_EPOCH for .po file generation Move translation string preparation into the TranslatableString class Properly support trimmed filenames in translation strings Generate debug translations automatically, in code and on the command-line Hide translation template enums behind a type alias &lt;/pre&gt; tag:gitlist.org,2012:commit/e1e0c1a37cd712bd6a346820d67ba2e2d24400a3 Convert translatable string construction in enums to positional args only 2025-01-15T19:23:47+01:00 Marco Ricci software@the13thletter.info <pre>This too makes the rendered code more readable by elliding repetitive information. &lt;/pre&gt; tag:gitlist.org,2012:commit/f38b80e71b72c46036ddccd2dc7c5cfbb6a4daf2 Normalize and unwrap translatable strings (messages and comments) 2025-01-15T16:01:44+01:00 Marco Ricci software@the13thletter.info <pre>Rewrite one-paragraph comments and strings as one-line strings, with implicit line continuation if necessary. This is how they would appear anyway if printed via `repr`, and in the `mkdocstrings`-extracted API documentation. Further trim the "TRANSLATORS:" prefix from comments; it is added automatically during `.po` file writing as necessary. Some minor changes to the docstrings have also been made: * `Label` - `VAULT_METAVAR_SERVICE`: Trim `as "service_metavar"` from the` comments for consistency. * DebugMsgTemplate - `VAULT_NATIVE_EVP_BYTESTOKEY_RESULT`: Use the correct message. - `VAULT_NATIVE_CHECKING_MAC_DETAILS`, `VAULT_NATIVE_V02_PAYLOAD_MAC_POSTPROCESSING`: Fix reference to `InfoMsgTemplate.VAULT_NATIVE_PARSING_IV_PAYLOAD_AND_MAC` * InfoMsgTemplate - `VAULT_NATIVE_PARSING_IV_PAYLOAD_MAC`: Use "these terms" instead of "this term". The diff is hard to read in normal "line" mode, but much clearer if read in "word-diff" mode (with quotes also treated as whitespace). &lt;/pre&gt; tag:gitlist.org,2012:commit/d21c0bed73ae46bd06b004f5c0c1621b729e6fab Add hypothesis-based tests for l10n machinery 2025-01-14T03:06:58+01:00 Marco Ricci software@the13thletter.info <pre>This specifically tests the `DebugTranslations` object, and various asserted properties of `TranslatedStrings` and `TranslatableStrings` such as hashability and equality under various modifications (e.g. trimming the filename). To further support this, `TranslatedStrings` now know their own format string replacement fields (except for `%`-formatted strings), and the `DebugTranslations` class now uses that knowledge instead of duplicating it inline. Additionally, because `TranslatedString`s are always interpolated, there is a new `TranslatedString.constant` constructor for `str` templates which ensures that nothing is interpolated. Some code branches previously excluded from coverage are now considered again. &lt;/pre&gt;