https://git.schokokeks.org/derivepassphrase.git/tree/6372560fd2c27a91c55769659a1748a0cc3ca5d1 Recent commits to derivepassphrase.git (6372560fd2c27a91c55769659a1748a0cc3ca5d1) 2025-03-16T13:33:37+01:00 tag:gitlist.org,2012:commit/6372560fd2c27a91c55769659a1748a0cc3ca5d1 Update translations template 2025-03-16T13:33:37+01:00 Marco Ricci software@the13thletter.info <pre>&lt;/pre&gt; tag:gitlist.org,2012:commit/cd3c72db9b6457dc6757effa209693ce10dd4dbd Merge topic branch 'vault-cli-objectification' into master 2025-03-16T13:23:38+01:00 Marco Ricci software@the13thletter.info <pre>* vault-cli-objectification: Reimplement the `vault` CLI as methods of a context object &lt;/pre&gt; tag:gitlist.org,2012:commit/7261f505d57249ef54b8c66a30efb57890ba70a7 Reimplement the `vault` CLI as methods of a context object 2025-03-16T13:23:05+01:00 Marco Ricci software@the13thletter.info <pre>Introduce a "vault context" object holding the associated data for the call to the `derivepassphrase vault` CLI, and implement the actual CLI as a collection of methods on this object. The "vault context" object mostly just wraps the click context object and encodes the dispatch table for the CLI operations. The main advantage of this modelling is the much smaller size per, and lower cyclomatic complexity of, each CLI operation. As an implementation detail, the old implementation of the `get_user_config` inner function's error handling branch for `OSError` had coverage testing purely by accident, because `get_user_config` was being called unconditionally, very early in the CLI control flow. The refactored CLI however reads the user configuration only as needed for the specific operation. So this error handling branch needs a new, separate test. As a further implementation detail, the `is_param_set` inner function no longer caches its result, because it is now an object method: `functools.cache` explicitly documents that adding a cache to object methods causes a circular reference between the cache and the object via the `self` parameter. Given the actual contents of this function, there appears to be little point in working around this memory issue just to outfit an already cheap operation (a single `Mapping.get` call) with a cache. As yet another further implementation detail, checking for misleading passphrases should work even if the passed configuration snippet is not technically a `dict`, but rather a `Mapping`. Finally, due to the vault context object now wrapping the click context, it is possible (and sensible) to wrap the logging calls into methods of the vault context object so that less out-of-bounds information needs to be passed to the logger explicitly at the call site. &lt;/pre&gt; tag:gitlist.org,2012:commit/47e3b46d01ffffe4a24ec7e73f4c0833fa0e4ca0 Merge topic branch 'hatch-test-matrix' into master 2025-03-13T13:32:54+01:00 Marco Ricci software@the13thletter.info <pre>* hatch-test-matrix: Add PyPy 3.11 to the test matrix &lt;/pre&gt; tag:gitlist.org,2012:commit/af40d3b552a6dec8b42833ecc2dfd32c8894f76e Add PyPy 3.11 to the test matrix 2025-03-13T13:21:20+01:00 Marco Ricci software@the13thletter.info <pre>&lt;/pre&gt; tag:gitlist.org,2012:commit/a4ad05723414662d9df1607034c5dd7d646f1b49 Merge topic branch 'concurrency-audit' into master 2025-03-13T13:18:24+01:00 Marco Ricci software@the13thletter.info <pre>* concurrency-audit: Document the results of the concurrency audit Lock the derivepassphrase CLI against concurrent updating Lock derivepassphrase internals against concurrent updating GitHub: Closes #22. &lt;/pre&gt; tag:gitlist.org,2012:commit/77e030e7f8bbefea236a0a0a1682efb558fe0225 Document the results of the concurrency audit 2025-03-13T13:17:03+01:00 Marco Ricci software@the13thletter.info <pre>&lt;/pre&gt; tag:gitlist.org,2012:commit/78e5b9a8cc2bbb89f353e2bbec41da405c5b0ad2 Lock the derivepassphrase CLI against concurrent updating 2025-03-02T16:27:06+01:00 Marco Ricci software@the13thletter.info <pre>In a very coarse manner, after command-line parsing, detect whether the CLI operation is a read-write operation or a read-only one, and if it is read-write, run the whole operation while holding a lock. The lock is held on a temporary file whose basename is dependent on the full path to the `derivepassphrase` configuration directory. The file is stored in the system temporary directory if possible, and will be synchronized using `msvcrt.locking` or `fcntl.flock`, whichever is appropriate. Coverage checking for the Windows-specific application code is disabled because we have no Windows runners for the test suite. The test suite itself merely adds tests for the temporary directory function, but is otherwise unchanged. &lt;/pre&gt; tag:gitlist.org,2012:commit/108aaae9f0cf3b1c6e9ff12e9c401418962beca4 Lock derivepassphrase internals against concurrent updating 2025-02-28T20:08:07+01:00 Marco Ricci software@the13thletter.info <pre>Specifically, protect the attributes of Sequin and VaultNativeConfigParser objects (and derived objects) from concurrent modification via threading locks, and document that they are thread-safe. &lt;/pre&gt; tag:gitlist.org,2012:commit/dc2aea28893dadd6cd5956a0cb15b6bdb2633387 Merge branch 'documentation-fixes' 2025-02-21T22:52:10+01:00 Marco Ricci software@the13thletter.info <pre>* documentation-fixes: Document version output contents in the manpages Update the `--help` and `--version` texts in the manpages Consult the version output in the documentation where it makes sense Mention support for other Python distributions in README Fix a minor documentation nitpick in the tests Update the install instructions in the README Re-consolidate test parametrizations for notes-related tests Fix minor formatting errors in the manpages Fix minor nitpicks in tests &lt;/pre&gt;