Recent commits to derivepassphrase.git (37a84d7952f9b6a09b4404cf36ea6c2b5dd2a020) https://git.schokokeks.org/derivepassphrase.git/tree/37a84d7952f9b6a09b4404cf36ea6c2b5dd2a020 Recent commits feed provided by GitList. Accomodate known slow tests in hypothesis deadline With coverage measurement enabled, program execution can slow down by a factor of roughly 40 if the Python tracer is used, instead of the C tracer. In some configurations, only the Python tracer is available. To avoid timing out on tests that otherwise would be okay with default settings, manually reset those tests' deadline to 40 times their original value; currently only one test is affected. https://git.schokokeks.org/derivepassphrase.git/commit/37a84d7952f9b6a09b4404cf36ea6c2b5dd2a020 software@the13thletter.info (Marco Ricci) Tue, 01 Oct 2024 11:36:02 +0200 37a84d7952f9b6a09b4404cf36ea6c2b5dd2a020 Fix awkward parametrization declaration for SSH agent client tests Instead of introducing a static method, calling it to obtain test parameters, then removing it again, use a declaration within the `pytest.mark.parametrize` decorator arguments, even if that is supposedly more difficult to read (I wouldn't agree). Among the readability benefits (primarily because of compactness), the imperative version via a static method throws errors on Python 3.9, presumably because the `staticmethod` object itself is being returned, not the bound method object, and the former isn't callable in Python 3.9. On a related note, a future import for annotations was missing as well. https://git.schokokeks.org/derivepassphrase.git/commit/0bdfe96ea10f82e3e3f91b5cddfd92369d7bf180 software@the13thletter.info (Marco Ricci) Tue, 01 Oct 2024 10:15:36 +0200 0bdfe96ea10f82e3e3f91b5cddfd92369d7bf180 Merge topic branch 'hypothesis' into master * t/hypothesis: Add hypothesis-based tests for SSH wire format serialization https://git.schokokeks.org/derivepassphrase.git/commit/7f1a2688085588bc44c39306a88f9691ee2142db software@the13thletter.info (Marco Ricci) Mon, 30 Sep 2024 15:42:48 +0200 7f1a2688085588bc44c39306a88f9691ee2142db Add hypothesis-based tests for SSH wire format serialization https://git.schokokeks.org/derivepassphrase.git/commit/d85d25eaa422dbbd6b4c5798c6fcec0aac5413e6 software@the13thletter.info (Marco Ricci) Mon, 30 Sep 2024 15:41:53 +0200 d85d25eaa422dbbd6b4c5798c6fcec0aac5413e6 Merge topic branch 'typing-fixes' into master * t/typing-fixes: Add changelog entries for Buffer support and documentation fix Fix bad documentation for SSHAgentClient.request return value Add proper support for Buffer types in the SSH agent client Add explicit example in hypothesis test, for test coverage Overhaul the validation function for vault(1) configurations https://git.schokokeks.org/derivepassphrase.git/commit/0065c6f5679b86d514a09306b3b76d31a4f39168 software@the13thletter.info (Marco Ricci) Mon, 30 Sep 2024 15:18:53 +0200 0065c6f5679b86d514a09306b3b76d31a4f39168 Add changelog entries for Buffer support and documentation fix https://git.schokokeks.org/derivepassphrase.git/commit/320cc9a7f1ff7097b812adcf9c76d6a0ebb48dfe software@the13thletter.info (Marco Ricci) Mon, 30 Sep 2024 15:18:00 +0200 320cc9a7f1ff7097b812adcf9c76d6a0ebb48dfe Fix bad documentation for SSHAgentClient.request return value https://git.schokokeks.org/derivepassphrase.git/commit/005bd61e75457254319a3136ccc5365100258258 software@the13thletter.info (Marco Ricci) Mon, 30 Sep 2024 15:03:05 +0200 005bd61e75457254319a3136ccc5365100258258 Add proper support for Buffer types in the SSH agent client As of Python 3.12, any custom Python class can declare support for the buffer protocol. So instead of special-casing `bytes` and `bytearray`, and ignoring all other types, support arbitrary classes with buffer protocol support. Furthermore, explicitly return bytes objects (i.e., read-only copies) of all involved byte strings, because the buffer protocol ensures that copies are relatively cheap. https://git.schokokeks.org/derivepassphrase.git/commit/0dcc1a8c0b8b2ae2574d9d94ddba81fb203fe888 software@the13thletter.info (Marco Ricci) Mon, 30 Sep 2024 14:35:47 +0200 0dcc1a8c0b8b2ae2574d9d94ddba81fb203fe888 Add explicit example in hypothesis test, for test coverage The test coverage otherwise gets flaky. https://git.schokokeks.org/derivepassphrase.git/commit/9e573fa48b3adf6a3bb23b30bf421e885a27f39b software@the13thletter.info (Marco Ricci) Mon, 30 Sep 2024 10:40:45 +0200 9e573fa48b3adf6a3bb23b30bf421e885a27f39b Overhaul the validation function for vault(1) configurations Rewrite `derivepassphrase._types.is_vault_config` into a proper, validation function `validate_vault_config` that throws errors, and optionally disallows extension or unknown settings. The old `is_vault_config` function is then implemented in terms of the new function. Use this opportunity to change the return annotation to `typing_extensions.TypeIs`, because that is what was semantically intended anyway. Naturally, throwing actual errors instead of returning `False` means that the error handling gets bulkier and more fine-grained. Which in turn means that extra tests are necessary to stay at high test coverage levels. https://git.schokokeks.org/derivepassphrase.git/commit/2f800b2a75841f37e5ffa2b7f50deaed3137cc10 software@the13thletter.info (Marco Ricci) Mon, 30 Sep 2024 10:25:58 +0200 2f800b2a75841f37e5ffa2b7f50deaed3137cc10