chatmail
chatmail copied to clipboard
Prepare for pyinfra 3
Pyinfra 3.0 beta version is available: https://github.com/pyinfra-dev/pyinfra/issues/987#issuecomment-1925207907
It can be tried with the following patch:
diff --git a/cmdeploy/pyproject.toml b/cmdeploy/pyproject.toml
index 060865c..4498a8f 100644
--- a/cmdeploy/pyproject.toml
+++ b/cmdeploy/pyproject.toml
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
name = "cmdeploy"
version = "0.2"
dependencies = [
- "pyinfra",
+ "pyinfra==3.0b0",
"pillow",
"qrcode",
"markdown",
Running cmdeploy run with it works, but gives a lot of warnings "Checking changed before execution can give unexpected results".
There is documentation telling to use _if now: https://docs.pyinfra.com/en/next/deploy-process.html#checking-operation-changes
Interesting that they drop the separation between fact gathering and executing operations... and that they claim this change won't be noticeable much :D
Let's keep track of the changelog before we ultimately decide to upgrade to v3: https://github.com/pyinfra-dev/pyinfra/blob/3.x/CHANGELOG.md
Prompting admins to make decisions when problems are encountered is interesting for sure, but I can also imagine that it might overwhelm some admins who don't necessarily know how pyinfra works or what exactly is happening here. It's probably not bad if they learn how this stuff works, but might lead to some friction.
Along with the closed issue let's also not keep around an open PR about pyinfra3 which will likely not see activity in 2024 and can easily be reopened if needed.
In https://github.com/deltachat/chatmail/commit/27eea671dc5016362ee569d51c061d5639e9543d, we implicitly switched to pyinfra 3. We should re-visit our usage of if statements and take a look at the other changelog items.
#214 seems to be unneeded as everything still works so they probably make pyinfra 3 backward-compatible.
Changelog is here, there are not many changes and nothing that seems like affecting our usage: https://github.com/pyinfra-dev/pyinfra/blob/3.x/CHANGELOG.md