chatmail icon indicating copy to clipboard operation
chatmail copied to clipboard

Prepare for pyinfra 3

Open link2xt opened this issue 1 year ago • 1 comments

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

link2xt avatar Feb 13 '24 19:02 link2xt

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.

missytake avatar Feb 14 '24 11:02 missytake

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.

hpk42 avatar Jul 04 '24 20:07 hpk42

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.

missytake avatar Jul 23 '24 13:07 missytake

#214 seems to be unneeded as everything still works so they probably make pyinfra 3 backward-compatible.

link2xt avatar Jul 24 '24 05:07 link2xt

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

link2xt avatar Jul 24 '24 05:07 link2xt