pyinfra 3.0.dev0__tar.gz → 3.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. pyinfra-3.0.1/CHANGELOG.md +73 -0
  2. {pyinfra-3.0.dev0/pyinfra.egg-info → pyinfra-3.0.1}/PKG-INFO +75 -24
  3. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/README.md +15 -20
  4. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/api/__init__.py +3 -0
  5. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/api/arguments.py +115 -97
  6. pyinfra-3.0.1/pyinfra/api/arguments_typed.py +80 -0
  7. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/api/command.py +5 -3
  8. pyinfra-3.0.1/pyinfra/api/config.py +231 -0
  9. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/api/connectors.py +5 -2
  10. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/api/deploy.py +19 -19
  11. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/api/exceptions.py +35 -4
  12. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/api/facts.py +62 -86
  13. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/api/host.py +102 -15
  14. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/api/inventory.py +4 -0
  15. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/api/operation.py +184 -118
  16. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/api/operations.py +66 -113
  17. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/api/state.py +53 -34
  18. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/api/util.py +64 -33
  19. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/connectors/base.py +65 -20
  20. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/connectors/chroot.py +15 -13
  21. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/connectors/docker.py +62 -72
  22. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/connectors/dockerssh.py +20 -19
  23. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/connectors/local.py +32 -22
  24. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/connectors/ssh.py +162 -86
  25. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/connectors/sshuserclient/client.py +1 -1
  26. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/connectors/terraform.py +57 -39
  27. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/connectors/util.py +26 -27
  28. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/connectors/vagrant.py +27 -26
  29. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/context.py +1 -0
  30. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/apk.py +7 -2
  31. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/apt.py +15 -7
  32. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/brew.py +28 -13
  33. pyinfra-3.0.1/pyinfra/facts/bsdinit.py +20 -0
  34. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/cargo.py +6 -3
  35. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/choco.py +8 -4
  36. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/deb.py +21 -9
  37. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/dnf.py +11 -6
  38. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/docker.py +30 -5
  39. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/files.py +49 -33
  40. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/gem.py +7 -2
  41. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/git.py +14 -21
  42. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/gpg.py +4 -1
  43. pyinfra-3.0.1/pyinfra/facts/hardware.py +411 -0
  44. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/launchd.py +7 -2
  45. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/lxd.py +8 -2
  46. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/mysql.py +19 -12
  47. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/npm.py +3 -1
  48. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/openrc.py +8 -2
  49. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/pacman.py +13 -5
  50. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/pip.py +2 -0
  51. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/pkg.py +5 -1
  52. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/pkgin.py +7 -2
  53. pyinfra-3.0.dev0/pyinfra/facts/postgresql.py → pyinfra-3.0.1/pyinfra/facts/postgres.py +12 -10
  54. pyinfra-3.0.1/pyinfra/facts/postgresql.py +11 -0
  55. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/rpm.py +21 -15
  56. pyinfra-3.0.1/pyinfra/facts/runit.py +70 -0
  57. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/selinux.py +12 -4
  58. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/server.py +240 -82
  59. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/snap.py +8 -2
  60. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/systemd.py +37 -13
  61. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/sysvinit.py +7 -4
  62. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/upstart.py +7 -2
  63. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/util/packaging.py +3 -2
  64. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/vzctl.py +8 -4
  65. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/xbps.py +7 -2
  66. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/yum.py +10 -5
  67. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/zypper.py +9 -4
  68. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/apk.py +5 -3
  69. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/apt.py +28 -25
  70. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/brew.py +60 -29
  71. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/bsdinit.py +6 -4
  72. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/cargo.py +3 -1
  73. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/choco.py +3 -1
  74. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/dnf.py +16 -20
  75. pyinfra-3.0.1/pyinfra/operations/docker.py +339 -0
  76. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/files.py +187 -168
  77. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/gem.py +3 -1
  78. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/git.py +23 -25
  79. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/iptables.py +33 -25
  80. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/launchd.py +5 -6
  81. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/lxd.py +7 -4
  82. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/mysql.py +59 -55
  83. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/npm.py +8 -1
  84. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/openrc.py +5 -3
  85. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/pacman.py +6 -7
  86. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/pip.py +19 -12
  87. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/pkg.py +3 -1
  88. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/pkgin.py +5 -3
  89. pyinfra-3.0.dev0/pyinfra/operations/postgresql.py → pyinfra-3.0.1/pyinfra/operations/postgres.py +44 -42
  90. pyinfra-3.0.1/pyinfra/operations/postgresql.py +30 -0
  91. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/puppet.py +3 -1
  92. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/python.py +8 -19
  93. pyinfra-3.0.1/pyinfra/operations/runit.py +182 -0
  94. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/selinux.py +47 -29
  95. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/server.py +138 -67
  96. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/snap.py +3 -1
  97. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/ssh.py +18 -16
  98. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/systemd.py +18 -12
  99. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/sysvinit.py +7 -5
  100. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/upstart.py +7 -5
  101. pyinfra-3.0.1/pyinfra/operations/util/__init__.py +12 -0
  102. pyinfra-3.0.1/pyinfra/operations/util/docker.py +177 -0
  103. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/util/files.py +24 -16
  104. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/util/packaging.py +54 -38
  105. pyinfra-3.0.1/pyinfra/operations/util/service.py +46 -0
  106. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/vzctl.py +12 -10
  107. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/xbps.py +5 -3
  108. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/yum.py +15 -19
  109. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/zypper.py +9 -10
  110. pyinfra-3.0.1/pyinfra/version.py +9 -0
  111. {pyinfra-3.0.dev0 → pyinfra-3.0.1/pyinfra.egg-info}/PKG-INFO +75 -24
  112. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra.egg-info/SOURCES.txt +8 -13
  113. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra.egg-info/entry_points.txt +0 -3
  114. pyinfra-3.0.1/pyinfra.egg-info/requires.txt +67 -0
  115. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra_cli/__main__.py +4 -3
  116. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra_cli/commands.py +3 -2
  117. pyinfra-3.0.1/pyinfra_cli/exceptions.py +163 -0
  118. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra_cli/inventory.py +52 -31
  119. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra_cli/log.py +10 -2
  120. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra_cli/main.py +88 -65
  121. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra_cli/prints.py +37 -109
  122. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra_cli/util.py +15 -10
  123. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyproject.toml +1 -7
  124. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/setup.cfg +1 -1
  125. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/setup.py +20 -23
  126. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_api/test_api.py +2 -0
  127. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_api/test_api_arguments.py +9 -9
  128. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_api/test_api_deploys.py +15 -19
  129. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_api/test_api_facts.py +4 -5
  130. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_api/test_api_operations.py +18 -20
  131. pyinfra-3.0.1/tests/test_api/test_api_util.py +61 -0
  132. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_cli/test_cli.py +14 -50
  133. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_cli/test_cli_deploy.py +10 -12
  134. pyinfra-3.0.1/tests/test_cli/test_cli_exceptions.py +86 -0
  135. pyinfra-3.0.1/tests/test_cli/test_cli_inventory.py +66 -0
  136. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_cli/util.py +1 -1
  137. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_connectors/test_dockerssh.py +11 -8
  138. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_connectors/test_ssh.py +88 -23
  139. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_connectors/test_sshuserclient.py +1 -1
  140. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_connectors/test_terraform.py +11 -8
  141. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_connectors/test_vagrant.py +6 -6
  142. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_operations.py +4 -3
  143. pyinfra-3.0.dev0/CHANGELOG.md +0 -11
  144. pyinfra-3.0.dev0/pyinfra/api/config.py +0 -131
  145. pyinfra-3.0.dev0/pyinfra/connectors/ansible.py +0 -175
  146. pyinfra-3.0.dev0/pyinfra/connectors/mech.py +0 -189
  147. pyinfra-3.0.dev0/pyinfra/connectors/pyinfrawinrmsession/__init__.py +0 -28
  148. pyinfra-3.0.dev0/pyinfra/connectors/winrm.py +0 -312
  149. pyinfra-3.0.dev0/pyinfra/facts/bsdinit.py +0 -17
  150. pyinfra-3.0.dev0/pyinfra/facts/hardware.py +0 -363
  151. pyinfra-3.0.dev0/pyinfra/facts/windows.py +0 -366
  152. pyinfra-3.0.dev0/pyinfra/facts/windows_files.py +0 -90
  153. pyinfra-3.0.dev0/pyinfra/operations/util/service.py +0 -54
  154. pyinfra-3.0.dev0/pyinfra/operations/windows.py +0 -59
  155. pyinfra-3.0.dev0/pyinfra/operations/windows_files.py +0 -538
  156. pyinfra-3.0.dev0/pyinfra/version.py +0 -6
  157. pyinfra-3.0.dev0/pyinfra.egg-info/requires.txt +0 -70
  158. pyinfra-3.0.dev0/pyinfra_cli/exceptions.py +0 -131
  159. pyinfra-3.0.dev0/tests/__init__.py +0 -12
  160. pyinfra-3.0.dev0/tests/paramiko_util.py +0 -103
  161. pyinfra-3.0.dev0/tests/test_api/test_api_util.py +0 -22
  162. pyinfra-3.0.dev0/tests/test_cli/test_cli_exceptions.py +0 -55
  163. pyinfra-3.0.dev0/tests/test_connectors/__init__.py +0 -0
  164. pyinfra-3.0.dev0/tests/test_connectors/test_ansible.py +0 -64
  165. pyinfra-3.0.dev0/tests/test_connectors/test_mech.py +0 -126
  166. pyinfra-3.0.dev0/tests/util.py +0 -404
  167. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/LICENSE.md +0 -0
  168. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/MANIFEST.in +0 -0
  169. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/__init__.py +0 -0
  170. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/__main__.py +0 -0
  171. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/api/connect.py +0 -0
  172. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/connectors/__init__.py +0 -0
  173. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/connectors/ssh_util.py +0 -0
  174. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/connectors/sshuserclient/__init__.py +0 -0
  175. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/connectors/sshuserclient/config.py +0 -0
  176. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/__init__.py +0 -0
  177. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/iptables.py +0 -0
  178. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/util/__init__.py +0 -0
  179. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/util/databases.py +0 -0
  180. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/facts/util/win_files.py +0 -0
  181. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/local.py +0 -0
  182. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/operations/__init__.py +0 -0
  183. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/progress.py +0 -0
  184. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra/py.typed +0 -0
  185. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra.egg-info/dependency_links.txt +0 -0
  186. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra.egg-info/top_level.txt +0 -0
  187. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra_cli/__init__.py +0 -0
  188. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/pyinfra_cli/virtualenv.py +0 -0
  189. {pyinfra-3.0.dev0/pyinfra/operations/util → pyinfra-3.0.1/tests/test_api}/__init__.py +0 -0
  190. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_api/test_api_command.py +0 -0
  191. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_api/test_api_config.py +0 -0
  192. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_api/test_api_host.py +0 -0
  193. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_api/test_api_inventory.py +0 -0
  194. {pyinfra-3.0.dev0/tests/test_api → pyinfra-3.0.1/tests/test_cli}/__init__.py +0 -0
  195. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_cli/test_cli_util.py +0 -0
  196. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_cli/test_context_objects.py +0 -0
  197. {pyinfra-3.0.dev0/tests/test_cli → pyinfra-3.0.1/tests/test_connectors}/__init__.py +0 -0
  198. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_connectors/test_chroot.py +0 -0
  199. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_connectors/test_docker.py +0 -0
  200. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_connectors/test_local.py +0 -0
  201. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_connectors/test_util.py +0 -0
  202. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_facts.py +0 -0
  203. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_global_arguments.py +0 -0
  204. {pyinfra-3.0.dev0 → pyinfra-3.0.1}/tests/test_operations_utils.py +0 -0
@@ -0,0 +1,73 @@
1
+ # v3.0.1
2
+
3
+ - Switch to `command -v` not `which` in `server.Which` fact (@lemmi)
4
+ - Fix detection of xbps in `server.packages` operation (@romain-dartigues)
5
+ - Fix argument typo in operations doc (@scoufman)
6
+ - Add expanded note about detected changes + hidden side effects during execution
7
+ - Fix missing global arguments in group data files
8
+ - Fix `--group-data` CLI argument behaviour
9
+ - Remove unused/dead `--quiet` flag
10
+
11
+ # v3.0
12
+
13
+ Welcome to pyinfra v3! This version is the biggest overhaul of pyinfra since it was created back in 2015. Most v2 deployment code should be automatically compatible, but as always be aware. Major changes:
14
+
15
+ ### Runtime operation execution
16
+
17
+ pyinfra now executes operations at runtime, rather than pre-generating commands. Although the change isn't noticeable this fixes an entire class of bugs and confusion. See the [limitations](https://docs.pyinfra.com/en/2.x/deploy-process.html#limitations) section in the v2 docs. All of those issues are now a thing of the past.
18
+
19
+ This represents a huge overhaul of pyinfra's internals and should be a huge improvement for users.
20
+
21
+ Care has been taken to reduce the overhead of this change which still supports the same diffs and change proposal mechanism.
22
+
23
+ ### CLI flow & prompts
24
+
25
+ The pyinfra CLI will now prompt (instead of ignore, or immediately exit) when problems are encountered, allowing the user to choose to continue. Additionally an approval step is added before executing changes (this can be skipped with `-y` or setting the `PYINFRA_YES` environment variable).
26
+
27
+ ### Extendable connectors API, typing overhaul
28
+
29
+ v3 of pyinfra includes for the first time a (mostly) typed internal API with proper support for IDE linting. There's a whole new connectors API that provides a framework for building new connectors.
30
+
31
+ ### Breaking changes
32
+
33
+ - Rename `_use_sudo_password` argument to `_sudo_password`
34
+ - Remove `winrm` connector and `windows*` operations/facts, moving to [`pyinfra-windows`](https://github.com/pyinfra-dev/pyinfra-windows)
35
+ - The deploy decorator must now be called, ie used as `@deploy()`, and is now typed
36
+ - Remove broken Ansible inventory connector
37
+
38
+ ### Operations & Facts
39
+
40
+ - Add `docker.container`, `docker.image`, `docker.volume`, `docker.network` & `docker.prune` operations (@apecnascimento)
41
+ - Add `runit.service` operation and `RunitStatus` fact (@lemmi)
42
+ - Add `TmpDir` fact
43
+ - Add `services` argument to systemd facts for filtering
44
+ - Add type hints for all the operations (@stone-w4tch3r)
45
+ - Lowercase pip packages properly (PEP-0426)
46
+ - Rename `postgresql` -> `postgres` operations & facts (old ones still work)
47
+ - Improve IP/MAC parsing in `NetworkDevices` fact (@sudoBash418)
48
+ - Enable getting `Home` fact for other users (@matthijskooijman)
49
+ - Use users correct home directory in `server.user_authorized_keys` operation (@matthijskooijman)
50
+ - Fix `destination`/`not_destination` arguments in `iptables.rule` operation
51
+ - Fix remote dirs when executing from Windows in `files.sync` operation (@Renerick)
52
+ - Fix quoting of systemd unit names (@martenlienen)
53
+
54
+ ### Other Changes
55
+
56
+ - Add new `_if` global argument to control operation execution at runtime
57
+ - Add `--debug-all` flag to set debug logging for all packages
58
+ - Retry SSH connections on failure (configurable, see [SSH connector](https://docs.pyinfra.com/en/3.x/connectors/ssh.html#available-data)) (@fwiesel)
59
+ - Documentation typo fixes (@szepeviktor, @sudoBash418)
60
+ - Fix handling of binary files in Docker connector (@matthijskooijman)
61
+ - Add `will_change` attribute and `did_change` context manager to `OperationMeta`
62
+ - Replace use of `pkg_resources` with `importlib.metadata` (@diazona)
63
+ - Fix identifying Python inventory files as modules (@martenlienen)
64
+ - Fix typed arguments order (@cdleonard)
65
+ - Check that fact commands don't take global arguments (@martenlienen)
66
+
67
+ # v2.x
68
+
69
+ [See this file in the `2.x` branch](https://github.com/Fizzadar/pyinfra/blob/2.x/CHANGELOG.md).
70
+
71
+ # v1.x
72
+
73
+ [See this file in the `1.x` branch](https://github.com/Fizzadar/pyinfra/blob/1.x/CHANGELOG.md).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyinfra
3
- Version: 3.0.dev0
3
+ Version: 3.0.1
4
4
  Summary: pyinfra automates/provisions/manages/deploys infrastructure.
5
5
  Home-page: https://pyinfra.com
6
6
  Author: Nick / Fizzadar
@@ -16,19 +16,75 @@ Classifier: Intended Audience :: Information Technology
16
16
  Classifier: License :: OSI Approved :: MIT License
17
17
  Classifier: Operating System :: OS Independent
18
18
  Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.7
20
19
  Classifier: Programming Language :: Python :: 3.8
21
20
  Classifier: Programming Language :: Python :: 3.9
22
21
  Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
23
24
  Classifier: Topic :: System :: Systems Administration
24
25
  Classifier: Topic :: System :: Installation/Setup
25
26
  Classifier: Topic :: Utilities
27
+ Requires-Python: >=3.8
26
28
  Description-Content-Type: text/markdown
29
+ License-File: LICENSE.md
30
+ Requires-Dist: gevent>=1.5
31
+ Requires-Dist: paramiko<4,>=2.7
32
+ Requires-Dist: click>2
33
+ Requires-Dist: jinja2<4,>2
34
+ Requires-Dist: python-dateutil<3,>2
35
+ Requires-Dist: setuptools
36
+ Requires-Dist: configparser
37
+ Requires-Dist: pywinrm
38
+ Requires-Dist: typeguard
39
+ Requires-Dist: distro<2,>=1.6
40
+ Requires-Dist: packaging>=16.1
41
+ Requires-Dist: graphlib_backport; python_version < "3.9"
42
+ Requires-Dist: typing-extensions; python_version < "3.11"
43
+ Requires-Dist: importlib_metadata>=3.6; python_version < "3.10"
27
44
  Provides-Extra: test
45
+ Requires-Dist: pytest==8.2.1; extra == "test"
46
+ Requires-Dist: coverage==7.5.1; extra == "test"
47
+ Requires-Dist: pytest-cov==5.0.0; extra == "test"
48
+ Requires-Dist: black==24.4.2; extra == "test"
49
+ Requires-Dist: isort==5.13.2; extra == "test"
50
+ Requires-Dist: flake8==7.0.0; extra == "test"
51
+ Requires-Dist: flake8-black==0.3.6; extra == "test"
52
+ Requires-Dist: flake8-isort==6.1.1; extra == "test"
53
+ Requires-Dist: mypy; extra == "test"
54
+ Requires-Dist: types-cryptography; extra == "test"
55
+ Requires-Dist: types-paramiko; extra == "test"
56
+ Requires-Dist: types-python-dateutil; extra == "test"
57
+ Requires-Dist: types-PyYAML; extra == "test"
58
+ Requires-Dist: types-setuptools; extra == "test"
28
59
  Provides-Extra: docs
60
+ Requires-Dist: pyinfra-guzzle_sphinx_theme==0.16; extra == "docs"
61
+ Requires-Dist: myst-parser==2.0.0; extra == "docs"
62
+ Requires-Dist: sphinx==6.2.1; extra == "docs"
29
63
  Provides-Extra: dev
30
- Provides-Extra: ansible
31
- License-File: LICENSE.md
64
+ Requires-Dist: pytest==8.2.1; extra == "dev"
65
+ Requires-Dist: coverage==7.5.1; extra == "dev"
66
+ Requires-Dist: pytest-cov==5.0.0; extra == "dev"
67
+ Requires-Dist: black==24.4.2; extra == "dev"
68
+ Requires-Dist: isort==5.13.2; extra == "dev"
69
+ Requires-Dist: flake8==7.0.0; extra == "dev"
70
+ Requires-Dist: flake8-black==0.3.6; extra == "dev"
71
+ Requires-Dist: flake8-isort==6.1.1; extra == "dev"
72
+ Requires-Dist: mypy; extra == "dev"
73
+ Requires-Dist: types-cryptography; extra == "dev"
74
+ Requires-Dist: types-paramiko; extra == "dev"
75
+ Requires-Dist: types-python-dateutil; extra == "dev"
76
+ Requires-Dist: types-PyYAML; extra == "dev"
77
+ Requires-Dist: types-setuptools; extra == "dev"
78
+ Requires-Dist: pyinfra-guzzle_sphinx_theme==0.16; extra == "dev"
79
+ Requires-Dist: myst-parser==2.0.0; extra == "dev"
80
+ Requires-Dist: sphinx==6.2.1; extra == "dev"
81
+ Requires-Dist: wheel; extra == "dev"
82
+ Requires-Dist: twine; extra == "dev"
83
+ Requires-Dist: ipython; extra == "dev"
84
+ Requires-Dist: ipdb; extra == "dev"
85
+ Requires-Dist: ipdbplugin; extra == "dev"
86
+ Requires-Dist: flake8-spellcheck==0.12.1; extra == "dev"
87
+ Requires-Dist: redbaron; extra == "dev"
32
88
 
33
89
  <p align="center">
34
90
  <a href="https://pyinfra.com">
@@ -36,47 +92,42 @@ License-File: LICENSE.md
36
92
  </a>
37
93
  </p>
38
94
 
39
- <p align="center">
40
- <em>pyinfra automates infrastructure super fast at massive scale<br />ad-hoc command execution, service deployment, configuration management and more</em>
95
+ <p>
96
+ pyinfra turns Python code into shell commands and runs them on your servers. Execute ad-hoc commands and write declarative operations. Target SSH servers, local machine and Docker containers. Fast and scales from one server to thousands. Think <code>ansible</code> but Python instead of YAML, and a lot faster.
41
97
  </p>
42
98
 
43
99
  ---
44
100
 
45
- <p align="center">
46
- <a href="https://docs.pyinfra.com"><strong>Documentation</strong></a> &rArr;
101
+ <h3>
47
102
  <a href="https://docs.pyinfra.com/page/getting-started.html"><strong>Getting Started</strong></a> &bull;
48
- <a href="https://docs.pyinfra.com/page/examples.html"><strong>Examples</strong></a> &bull;
103
+ <a href="https://github.com/pyinfra-dev/pyinfra-examples"><strong>Examples Repo</strong></a> &bull;
104
+ <a href="https://matrix.to/#/#pyinfra:matrix.org"><strong>Chat on Matrix</strong></a>
105
+ </h3>
106
+ <p>
107
+ <a href="https://docs.pyinfra.com"><strong>Documentation</strong></a> &bull;
49
108
  <a href="https://docs.pyinfra.com/page/support.html"><strong>Help & Support</strong></a> &bull;
50
109
  <a href="https://docs.pyinfra.com/page/contributing.html"><strong>Contributing</strong></a>
51
110
  </p>
52
111
 
53
- <p align="center">
54
- Chat (both bridged) &rArr;
55
- <a href="https://matrix.to/#/#pyinfra:matrix.org"><strong><code>#pyinfra</code> on Matrix</strong></a> &bull;
56
- <a href="https://discord.gg/w3XxuKw"><strong>Discord</strong></a>
57
- </p>
58
-
59
112
  ---
60
113
 
61
114
  Why pyinfra? Design features include:
62
115
 
63
116
  + 🚀 **Super fast** execution over thousands of hosts with predictable performance.
64
117
  + 🚨 **Instant debugging** with realtime stdin/stdout/stderr output (`-vvv`).
65
- + 🔄 **Idempotent operations** that enable diffs and `--dry` runs before executing any changes.
66
- + 📦 **Extendable** with _any_ Python package as configured & written in standard Python.
67
- + 💻 **Agentless execution** against SSH/Docker/subprocess/WinRM hosts.
68
- + 🔌 **Integrated** with Docker, Terraform, Vagrant/Mech & Ansible out of the box.
69
-
70
- When you run pyinfra you'll see something like ([non animated version](https://pyinfra.com/static/example_deploy.png)):
118
+ + 🔄 **Idempotent operations** that enable diffs and dry runs before making changes.
119
+ + 📦 **Extendable** with the entire Python package ecosystem.
120
+ + 💻 **Agentless execution** against anything with shell access.
121
+ + 🔌 **Integrated** with connectors for Docker, Terraform, Vagrant and more.
71
122
 
72
123
  <img width="100%" src="https://pyinfra.com/static/example_deploy.gif" />
73
124
 
74
125
  ## Quickstart
75
126
 
76
- Install pyinfra with [`pipx`](https://pipxproject.github.io/pipx/) (recommended) or `pip`:
127
+ Install pyinfra with `pip`:
77
128
 
78
129
  ```
79
- pipx install pyinfra
130
+ pip install pyinfra
80
131
  ```
81
132
 
82
133
  Now you can execute commands on hosts via SSH:
@@ -85,7 +136,7 @@ Now you can execute commands on hosts via SSH:
85
136
  pyinfra my-server.net exec -- echo "hello world"
86
137
  ```
87
138
 
88
- Or execute in Docker, on the local machine, and other [connectors](https://docs.pyinfra.com/page/connectors.html):
139
+ Or target Docker containers, the local machine, and other [connectors](https://docs.pyinfra.com/page/connectors.html):
89
140
 
90
141
  ```sh
91
142
  pyinfra @docker/ubuntu exec -- echo "Hello world"
@@ -4,47 +4,42 @@
4
4
  </a>
5
5
  </p>
6
6
 
7
- <p align="center">
8
- <em>pyinfra automates infrastructure super fast at massive scale<br />ad-hoc command execution, service deployment, configuration management and more</em>
7
+ <p>
8
+ pyinfra turns Python code into shell commands and runs them on your servers. Execute ad-hoc commands and write declarative operations. Target SSH servers, local machine and Docker containers. Fast and scales from one server to thousands. Think <code>ansible</code> but Python instead of YAML, and a lot faster.
9
9
  </p>
10
10
 
11
11
  ---
12
12
 
13
- <p align="center">
14
- <a href="https://docs.pyinfra.com"><strong>Documentation</strong></a> &rArr;
13
+ <h3>
15
14
  <a href="https://docs.pyinfra.com/page/getting-started.html"><strong>Getting Started</strong></a> &bull;
16
- <a href="https://docs.pyinfra.com/page/examples.html"><strong>Examples</strong></a> &bull;
15
+ <a href="https://github.com/pyinfra-dev/pyinfra-examples"><strong>Examples Repo</strong></a> &bull;
16
+ <a href="https://matrix.to/#/#pyinfra:matrix.org"><strong>Chat on Matrix</strong></a>
17
+ </h3>
18
+ <p>
19
+ <a href="https://docs.pyinfra.com"><strong>Documentation</strong></a> &bull;
17
20
  <a href="https://docs.pyinfra.com/page/support.html"><strong>Help & Support</strong></a> &bull;
18
21
  <a href="https://docs.pyinfra.com/page/contributing.html"><strong>Contributing</strong></a>
19
22
  </p>
20
23
 
21
- <p align="center">
22
- Chat (both bridged) &rArr;
23
- <a href="https://matrix.to/#/#pyinfra:matrix.org"><strong><code>#pyinfra</code> on Matrix</strong></a> &bull;
24
- <a href="https://discord.gg/w3XxuKw"><strong>Discord</strong></a>
25
- </p>
26
-
27
24
  ---
28
25
 
29
26
  Why pyinfra? Design features include:
30
27
 
31
28
  + 🚀 **Super fast** execution over thousands of hosts with predictable performance.
32
29
  + 🚨 **Instant debugging** with realtime stdin/stdout/stderr output (`-vvv`).
33
- + 🔄 **Idempotent operations** that enable diffs and `--dry` runs before executing any changes.
34
- + 📦 **Extendable** with _any_ Python package as configured & written in standard Python.
35
- + 💻 **Agentless execution** against SSH/Docker/subprocess/WinRM hosts.
36
- + 🔌 **Integrated** with Docker, Terraform, Vagrant/Mech & Ansible out of the box.
37
-
38
- When you run pyinfra you'll see something like ([non animated version](https://pyinfra.com/static/example_deploy.png)):
30
+ + 🔄 **Idempotent operations** that enable diffs and dry runs before making changes.
31
+ + 📦 **Extendable** with the entire Python package ecosystem.
32
+ + 💻 **Agentless execution** against anything with shell access.
33
+ + 🔌 **Integrated** with connectors for Docker, Terraform, Vagrant and more.
39
34
 
40
35
  <img width="100%" src="https://pyinfra.com/static/example_deploy.gif" />
41
36
 
42
37
  ## Quickstart
43
38
 
44
- Install pyinfra with [`pipx`](https://pipxproject.github.io/pipx/) (recommended) or `pip`:
39
+ Install pyinfra with `pip`:
45
40
 
46
41
  ```
47
- pipx install pyinfra
42
+ pip install pyinfra
48
43
  ```
49
44
 
50
45
  Now you can execute commands on hosts via SSH:
@@ -53,7 +48,7 @@ Now you can execute commands on hosts via SSH:
53
48
  pyinfra my-server.net exec -- echo "hello world"
54
49
  ```
55
50
 
56
- Or execute in Docker, on the local machine, and other [connectors](https://docs.pyinfra.com/page/connectors.html):
51
+ Or target Docker containers, the local machine, and other [connectors](https://docs.pyinfra.com/page/connectors.html):
57
52
 
58
53
  ```sh
59
54
  pyinfra @docker/ubuntu exec -- echo "Hello world"
@@ -11,6 +11,9 @@ from .config import Config # noqa: F401 # pragma: no cover
11
11
  from .deploy import deploy # noqa: F401 # pragma: no cover
12
12
  from .exceptions import DeployError # noqa: F401 # pragma: no cover
13
13
  from .exceptions import ( # noqa: F401
14
+ FactError,
15
+ FactTypeError,
16
+ FactValueError,
14
17
  InventoryError,
15
18
  OperationError,
16
19
  OperationTypeError,