Skip to content

Commit

Permalink
Add compatability notes for 1.x -> 2.x & 2.x -> 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizzadar committed Sep 25, 2024
1 parent 1ef3741 commit dade4d2
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,30 @@ pyinfra aims to be compatible with all Unix-like operating systems and is curren
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.


## Upgrading pyinfra from ``2.x`` -> ``3.x``

- Rename `_use_sudo_password` argument to `_sudo_password`
- Deploy decorator must be called:

```py
# Old, 2.x decorator
@deploy
def mydeploy():
...

# New, 3.x decorator
@deploy()
def mydeploy():
...
```

- Remove `@winrm` connector, will come back as [`pyinfra-windows`](https://github.com/pyinfra-dev/pyinfra-windows)

## Upgrading pyinfra from ``1.x`` -> ``2.x``

- Python 2.7 (finally!), 3.5 support dropped, Python 3.6 is now the minimum required version
- 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

## Upgrading pyinfra from ``0.x`` -> ``1.x``

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`.
Expand Down

0 comments on commit dade4d2

Please sign in to comment.