Skip to content

Commit 0bea34e

Browse files
committed
Update WIP changelog/cut v1.4.0.dev1.
1 parent 9770256 commit 0bea34e

File tree

1 file changed

+56
-3
lines changed

1 file changed

+56
-3
lines changed

CHANGELOG.md

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,60 @@
1-
# v1.4.0.dev0
1+
# v1.4.0.dev1
2+
3+
Three major themes to this release:
4+
5+
**Explicit fact imports** - this replaces the magic `host.fact.X` variables with explicitly imported facts, for example:
6+
7+
```py
8+
# previously: host.fact.apt_sources
9+
from pyinfra.facts.apt import AptSources
10+
host.get_fact(AptSources)
11+
12+
# previously: host.fact.file('/path/to/file')
13+
from pyinfra.facts.files import File
14+
host.get_fact(File, path='/path/to/file')
15+
16+
# also now possible (previously impossible):
17+
host.get_fact(File, path='/path/to/file', sudo=True)
18+
```
19+
20+
And the CLI changes accordingly:
21+
22+
```sh
23+
# previously: pyinfra INVENTORY fact apt_sources
24+
pyinfra INVENTORY fact apt.AptSources
25+
26+
# previously: pyinfra INVENTORY fact file:/path/to/file directory:/path/to/directory
27+
pyinfra INVENTORY fact files.File path=/path/to/file files.Directory path=/path/to/directory
28+
```
29+
30+
This is not yet standard across the project and will be updated in subsequent releases. This also finally enables using third party facts in a sensible and explict manner. Overall, this is a dramatic improvement to the `pyinfra` fact mechanism.
31+
32+
**Windows operations expansion** - massive thank you to @mfrg for implementing these, huge expansion of Windows facts & operations, making it possible to really use `pyinfra` with Windows targets (additions listed below).
33+
34+
**Idempotency testing** - verification of operation idempotency (calling the same op twice outputs no commands/changes the second time) through testing and a large expansion in verified idempotency. Operations can now specify themselves as non-idempotent when expected (for example, `server.shell`).
35+
36+
Operation & fact updates:
37+
38+
+ Add `server.packages` operation - generic package management using the default OS package manager
39+
+ Add `pip.venv` operation - shortcut for `pip.virtualenv(venv=True, ...)`
40+
+ Add `server.Path` fact
41+
+ Add `rpm.RpmPackageProvides` fact & support package aliases for `yum.packages` & `dnf.packages` operations
42+
+ Add `windows_files.download`, `windows_files.put` & `windows_files.link` operations (@mfrg)
43+
+ Add `windows_files.WindowsLink`, `windows_files.WindowsSha1File`, `windows_files.WindowsSha256File` & `windows_files.WindowsMd5File` facts (@mfrg)
44+
45+
CLI updates:
46+
47+
+ New style fact gathering CLI arguments
48+
+ Prefix SSH auth flags (`--user` becomes `--ssh-user`), deprecate old versions
49+
+ Deprecate `--facts` & `--operations` CLI flags
50+
+ Deprecate `all-facts` command
51+
+ Hide deprecated options from `--help`
52+
53+
Other bits:
54+
55+
+ Show warnings when using invalid auth argument combinations (`sudo_user` without `sudo`, etc)
56+
+ Bump minimum Paramiko version to `2.7`
257

3-
+ Explicit fact imports
4-
+ ... WIP
558

659
# v1.3.12
760

0 commit comments

Comments
 (0)