Recent commits to derivepassphrase.git (9a88450ed3941eae25938053149a8bbf89c319c8) https://git.schokokeks.org/derivepassphrase.git/tree/9a88450ed3941eae25938053149a8bbf89c319c8 Recent commits feed provided by GitList. Allow the user to overwrite the current vault configuration In the "vault" derivation scheme, commands that edit or import a configuration actually merge with the existing configuration, for compatibility with the original vault(1). However, sometimes it is desired to replace the existing configuration instead, when importing or when setting a (service or global) configuration. We introduce a new `--overwrite-existing` command-line option that signals exactly that, and a `--merge-existing` option which signals the (previously implicit) default merging behavior. https://git.schokokeks.org/derivepassphrase.git/commit/9a88450ed3941eae25938053149a8bbf89c319c8 software@the13thletter.info (Marco Ricci) Thu, 12 Dec 2024 11:59:47 +0100 9a88450ed3941eae25938053149a8bbf89c319c8 Test config merging with partial service configs too Using larger numbers of settings (and services) leads to a very low probability of actually finding a viable path of action in the state machine; the run is a no-op, save for the initial setup. Presumably, we need a larger pool of readily-assembled and/or more cross-compatible objects, instead of the stepwise approach employed here with service names, settings, and configurations. This needs to be addressed in a future commit, however. https://git.schokokeks.org/derivepassphrase.git/commit/7a4f215faf88345111135676203f9e7373e2ea98 software@the13thletter.info (Marco Ricci) Thu, 12 Dec 2024 11:59:47 +0100 7a4f215faf88345111135676203f9e7373e2ea98 Merge topic branch 'pageant082' into master * t/pageant082: Explicitly support Pageant 0.82 in the test suite GitHub: Closes #14. https://git.schokokeks.org/derivepassphrase.git/commit/e97b966ecba87289b839e0fbac736f0b53782ed5 software@the13thletter.info (Marco Ricci) Mon, 09 Dec 2024 11:36:00 +0100 e97b966ecba87289b839e0fbac736f0b53782ed5 Explicitly support Pageant 0.82 in the test suite Pageant 0.82, released two weeks ago, supports both proper output buffer flushing and a "foreground" mode. Foreground mode is used to correctly isolate a spawned Pageant instance in the test suite. The test for Pageant's suitability can now be simplified to whether it is at least version 0.82, or not. Furthermore, because no published version of Pageant supports only proper output buffer flushing but not foreground mode, it is no longer necessary to arrange for debug output to be silently discarded. This further simplifies SSH agent handling considerably. Finally, we fix various mistakes in the documentation of the testing machinery. https://git.schokokeks.org/derivepassphrase.git/commit/fdef62d81b60bf2188f957874775500abc1f5a36 software@the13thletter.info (Marco Ricci) Mon, 09 Dec 2024 11:30:59 +0100 fdef62d81b60bf2188f957874775500abc1f5a36 Clean up "docs" hatch environment, also subsuming "release" https://git.schokokeks.org/derivepassphrase.git/commit/b9dd956b59b6f53a572076fea6d686f1626eeba8 software@the13thletter.info (Marco Ricci) Sun, 08 Dec 2024 19:06:33 +0100 b9dd956b59b6f53a572076fea6d686f1626eeba8 Merge topic branch 'logging' into master * t/logging: Document the switch to the logging and warning systems in the changelog https://git.schokokeks.org/derivepassphrase.git/commit/d4a0d475385ea6bd9d559eb1cd23f2f98a259cf9 software@the13thletter.info (Marco Ricci) Sun, 08 Dec 2024 19:03:08 +0100 d4a0d475385ea6bd9d559eb1cd23f2f98a259cf9 Document the switch to the logging and warning systems in the changelog https://git.schokokeks.org/derivepassphrase.git/commit/ad0fe1ec36de50d886fc4b0ed988203bc557c90f software@the13thletter.info (Marco Ricci) Sun, 08 Dec 2024 19:02:03 +0100 ad0fe1ec36de50d886fc4b0ed988203bc557c90f Refactor code to run under Python 3.9's LL(1) parser Though it does not do so by default, Python 3.9 can run with the old LL(1) parser instead of the PEG-based parser. Most importantly, the LL(1) parser does not support parenthesized context manager expressions, and this is why they have only become officially supported in Python 3.10, once the PEG-based parser became mandatory. Therefore, for compatibility, we replace every "proper" parenthesized context manager expression with equivalent explicit use of a `contextlib.ExitStack`, and every degenerate such expression by removing the parentheses. We now also explicitly test `derivepassphrase` with the LL(1) parser, for as long as Python 3.9 remains supported. While the use of a `contextlib.ExitStack` comes with additional runtime cost, by a lucky coincidence, all such proper usage of parenthesized context manager expressions is confined to the test suite, where we really don't care too much about slightly higher runtimes if it buys us more clarity, correctness and compatibility instead. https://git.schokokeks.org/derivepassphrase.git/commit/1ec3538850a7af2723f17b8ca8dfe93158b421cb software@the13thletter.info (Marco Ricci) Sun, 08 Dec 2024 17:44:25 +0100 1ec3538850a7af2723f17b8ca8dfe93158b421cb Merge topic branch 'logging' into master * t/logging: Adapt the test suite to use the logging system properly Emit new info messages and better debug messages in the exporter modules Use the logging system to emit warnings and error messages Shift option parsing and grouping machinery to a separate section Reimplement deprecated subcommands, properly, in `click` https://git.schokokeks.org/derivepassphrase.git/commit/c60c4077952fd420bc5ba0e86174e27289d96e2e software@the13thletter.info (Marco Ricci) Sun, 08 Dec 2024 12:36:36 +0100 c60c4077952fd420bc5ba0e86174e27289d96e2e Adapt the test suite to use the logging system properly Given the previous changes to warning and error reporting, the test suite needs new helper code to deal with them. Again, the changes to mosts tests are straight-forward (the location and formatting of messages changes slightly), but the new logging machinery itself now also needs to be tested... particularly the code that hooks into Python's logging system, into Python's warning system, and between those two. `pytest` actually includes test fixtures to capture and interact with warnings and logging calls, but these work on the library level: warnings are captured as warnings, logging calls are captured as log records. To be useful to application testing, it is necessary to inspect and assert both the low-level warnings/log records as well as the standard error output they ultimately translate to. The `hypothesis`-based tests need particular (manual) care, because `hypothesis` rejects tests using function-scoped `pytest` fixtures. https://git.schokokeks.org/derivepassphrase.git/commit/e1017eeffe4f16747629724b8f48ba298508ba80 software@the13thletter.info (Marco Ricci) Sat, 07 Dec 2024 09:30:38 +0100 e1017eeffe4f16747629724b8f48ba298508ba80