Skip to content

Commit eb7613c

Browse files
committed
docs(MIGRATION) Note move of test helpers
1 parent 3806e1c commit eb7613c

File tree

1 file changed

+41
-5
lines changed

1 file changed

+41
-5
lines changed

MIGRATION

+41-5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,41 @@ _Detailed migration steps for the next version will be posted here._
2525

2626
<!-- To the maintainers and contributors: please add migration details for the upcoming release here -->
2727

28+
## libtmux 0.45.x (Yet to be released)
29+
30+
### Test helpers: Module moves
31+
32+
Test helper functionality has been split into focused modules (#XXX):
33+
34+
- `libtmux.test` module split into:
35+
- `libtmux.test.constants`: Test-related constants (`TEST_SESSION_PREFIX`, etc.)
36+
- `libtmux.test.environment`: Environment variable mocking
37+
- `libtmux.test.random`: Random string generation utilities
38+
- `libtmux.test.temporary`: Temporary session/window management
39+
40+
**Breaking**: Import paths have changed. Update imports:
41+
42+
```python
43+
# Old (0.45.x and earlier)
44+
from libtmux.test import (
45+
TEST_SESSION_PREFIX,
46+
get_test_session_name,
47+
get_test_window_name,
48+
namer,
49+
temp_session,
50+
temp_window,
51+
EnvironmentVarGuard,
52+
)
53+
```
54+
55+
```python
56+
# New (0.46.0+)
57+
from libtmux.test.constants import TEST_SESSION_PREFIX
58+
from libtmux.test.environment import EnvironmentVarGuard
59+
from libtmux.test.random import get_test_session_name, get_test_window_name, namer
60+
from libtmux.test.temporary import temp_session, temp_window
61+
```
62+
2863
## 0.35.0: Commands require explicit targets (2024-03-17)
2964

3065
### Commands require explicit targets (#535)
@@ -64,13 +99,11 @@ _Detailed migration steps for the next version will be posted here._
6499
### Renamings (#527)
65100

66101
- `Session.attached_window` renamed to {meth}`Session.active_window`
67-
- `Session.attached_window` deprecated
102+
- `Session.attached_window` deprecated
68103
- `Session.attached_pane` renamed to {meth}`Session.active_pane`
69-
- `Session.attached_pane` deprecated
104+
- `Session.attached_pane` deprecated
70105
- `Window.attached_pane` renamed to {meth}`Window.active_pane`
71-
- `Window.attached_pane` deprecated
72-
73-
106+
- `Window.attached_pane` deprecated
74107

75108
## 0.28.0: Resizing and detached by default (2024-02-15)
76109

@@ -88,6 +121,7 @@ _Detailed migration steps for the next version will be posted here._
88121
- `Pane.resize_pane()` renamed to {meth}`Pane.resize()` (via #523)
89122

90123
This convention will be more consistent with {meth}`Window.resize()`.
124+
91125
- {meth}`Pane.resize_pane()`'s params changed (#523)
92126

93127
- No longer accepts `-U`, `-D`, `-L`, `-R` directly, instead accepts
@@ -129,9 +163,11 @@ _Detailed migration steps for the next version will be posted here._
129163
- 0.16 and below: `window['id']`
130164

131165
0.17 and after: `window.id`
166+
132167
- 0.16 and below: `window.get('id')`
133168

134169
0.17 and after: `window.id`
170+
135171
- 0.16 and below: `window.get('id', None)`
136172

137173
0.17 and after: `getattr(window, 'id', None)`

0 commit comments

Comments
 (0)