Skip to content

Commit dade4d2

Browse files
committed
Add compatability notes for 1.x -> 2.x & 2.x -> 3.x
1 parent 1ef3741 commit dade4d2

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/compatibility.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,30 @@ pyinfra aims to be compatible with all Unix-like operating systems and is curren
4545
In general, the only requirement on the remote side is shell access. POSIX commands are used where possible for facts and operations, so most of the ``server`` and ``files`` operations should work anywhere POSIX.
4646

4747

48+
## Upgrading pyinfra from ``2.x`` -> ``3.x``
49+
50+
- Rename `_use_sudo_password` argument to `_sudo_password`
51+
- Deploy decorator must be called:
52+
53+
```py
54+
# Old, 2.x decorator
55+
@deploy
56+
def mydeploy():
57+
...
58+
59+
# New, 3.x decorator
60+
@deploy()
61+
def mydeploy():
62+
...
63+
```
64+
65+
- Remove `@winrm` connector, will come back as [`pyinfra-windows`](https://github.com/pyinfra-dev/pyinfra-windows)
66+
67+
## Upgrading pyinfra from ``1.x`` -> ``2.x``
68+
69+
- Python 2.7 (finally!), 3.5 support dropped, Python 3.6 is now the minimum required version
70+
- The "deploy directory" concept has been removed - everything now executes from the current working directory which removes the ambiguous magic v1 used to pick a deploy directory. A new --chdir CLI flag has been added to set the working directory before pyinfra executes
71+
4872
## Upgrading pyinfra from ``0.x`` -> ``1.x``
4973

5074
The move to `v1` removes a lot of old legacy functionality in pyinfra - there will be warnings written to the user in CLI mode if any of these are encountered. The full list can be seen [on the changelog](https://github.com/Fizzadar/pyinfra/blob/master/CHANGELOG.md#v1). In addition to these removals, `v1` brings a few major changes and deprecates the old methods. Again, pyinfra will output warnings when these are encountered, and support will be removed in `v2`.

0 commit comments

Comments
 (0)