Skip to content

Commit 2e7103e

Browse files
committed
docs(CHANGES): Overhaul migrations and changes for v0.28.0
1 parent a1e76e8 commit 2e7103e

File tree

2 files changed

+57
-22
lines changed

2 files changed

+57
-22
lines changed

CHANGES

+24-22
Original file line numberDiff line numberDiff line change
@@ -16,50 +16,52 @@ $ pip install --user --upgrade --pre libtmux
1616

1717
## libtmux 0.28.0 (2024-02-14)
1818

19-
### Breaking changes
19+
### Breaking change
2020

21-
#### `Session.new_window()` + `Window.split_window()`: No longer attaches by default
21+
#### {meth}`Session.new_window()` + {meth}`Window.split_window()` no longer attaches by default (#523)
2222

23-
- 0.28 +: Now _defaults_ to `attach=False`.
24-
- 0.27.1 and before: _defaults_ to `attach=True`.
23+
- 0.28.0 and greater: Defaults to `attach=False`.
24+
- 0.27.1 and below: Defaults to `attach=True`.
2525

26-
Pass `attach=True` for the old behavior.
26+
For the old behavior in 0.28.0 and beyond, pass `attach=True` explicitly.
2727

28-
#### `Pane.resize_pane()` renamed to `Pane.resize()`: (#523)
28+
#### `Pane.resize_pane()` renamed to {meth}`Pane.resize()` (#523)
2929

30-
This convention will be more consistent with `Window.resize()`.
30+
This convention will be more consistent with {meth}`Window.resize()`.
3131

32-
#### `Pane.resize_pane()`: Params changed (#523)
32+
#### {meth}`Pane.resize_pane()`'s params changed (#523)
3333

3434
- No longer accepts `-U`, `-D`, `-L`, `-R` directly, instead accepts
35-
`ResizeAdjustmentDirection`.
35+
{class}`~libtmux.constants.ResizeAdjustmentDirection` (see below).
3636

3737
### New features
3838

39-
#### `Pane.resize()`: Improved param coverage (#523)
39+
#### Improvements to resizing (#523)
4040

41-
- Learned to accept adjustments via `adjustment_direction` w/
42-
`ResizeAdjustmentDirection` + `adjustment`.
41+
- {meth}`Pane.resize()`:
4342

44-
- Learned to accept manual `height` and / or `width` (columns/rows or percentage)
43+
- Accept adjustments via `adjustment_direction` w/
44+
{class}`~libtmux.constants.ResizeAdjustmentDirection` + `adjustment`.
4545

46-
- Zoom (and unzoom)
46+
- Learned to accept manual `height` and / or `width` (columns/rows or percentage)
4747

48-
#### `Window.resize_window()`: New Method (#523)
48+
- Zoom (and unzoom)
4949

50-
If `Pane.resize_pane()` (now `Pane.resize()`) didn't work before, try resizing the window.
50+
- {meth}`Window.resize()`: Newly added
5151

52-
### Bug fixes
52+
Tip: If {meth}`Pane.resize()` was not taking affect <= 0.27.1, try to resize with
53+
{meth}`Window.resize()` first.
5354

54-
#### `Window.refresh()` and `Pane.refresh()`: Refresh more underlying state (#523)
55+
### Bug fixes
5556

56-
#### `Obj._refresh`: Allow passing args (#523)
57+
- {meth}`Window.refresh()` and {meth}`Pane.refresh()`: Refresh more underlying state (#523)
58+
- {meth}`Obj._refresh`: Allow passing args (#523)
5759

58-
e.g. `-a` (all) to `list-panes` and `list-windows`
60+
e.g. `-a` (all) to `list-panes` and `list-windows`
5961

60-
#### `Server.panes`: Fix listing of panes (#523)
62+
- `Server.panes`: Fix listing of panes (#523)
6163

62-
Would list only panes in attached session, rather than all in a server.
64+
Would list only panes in attached session, rather than all in a server.
6365

6466
### Improvement
6567

MIGRATION

+33
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,39 @@ _Migration instructions for the upcoming release will be added here_
2525

2626
<!-- Maintainers and contributors: insert migration notes for the next release here -->
2727

28+
## 0.28.0: Resizing and detached by default (2024-02-15)
29+
30+
#### Detach by default
31+
32+
- {meth}`Session.new_window()` + {meth}`Window.split_window()` no longer attaches by default (#523)
33+
34+
- 0.28.0 and greater: Defaults to `attach=False`.
35+
- 0.27.1 and below: Defaults to `attach=True`.
36+
37+
For the old behavior in 0.28.0 and beyond, pass `attach=True` explicitly.
38+
39+
#### Resizing panes
40+
41+
- `Pane.resize_pane()` renamed to {meth}`Pane.resize()` (via #523)
42+
43+
This convention will be more consistent with {meth}`Window.resize()`.
44+
- {meth}`Pane.resize_pane()`'s params changed (#523)
45+
46+
- No longer accepts `-U`, `-D`, `-L`, `-R` directly, instead accepts
47+
{class}`~libtmux.constants.ResizeAdjustmentDirection` (see below).
48+
49+
- 0.27.1 and below: `pane.resize_pane("-D", 20)`, `pane.resize_pane("-R", 20)`
50+
51+
- 0.28.0 and beyond:
52+
53+
```python
54+
from libtmux.constants import ResizeAdjustmentDirection
55+
pane.resize_pane(adjustment_direction=ResizeAdjustmentDirection.Down, adjustment=25)
56+
pane.resize_pane(
57+
adjustment_direction=ResizeAdjustmentDirection.Right, adjustment=25
58+
)
59+
```
60+
2861
## 0.17.0: Simplified attributes (2022-12-26)
2962

3063
### Finding objects / relations

0 commit comments

Comments
 (0)