Skip to content

Commit e6c42b2

Browse files
committed
Change default backend
The demise of the XML-RPC backend is nigh. Signed-off-by: Stephen Finucane <stephen@that.guru>
1 parent 7b5ec00 commit e6c42b2

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

‎pwclient/shell.py‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,14 @@ def main(argv=sys.argv[1:]):
8888

8989
if backend is None:
9090
sys.stderr.write(
91-
f"The default backend will change from 'xmlrpc' to 'rest' in a "
92-
f"future version. You should explicitly set "
93-
f"'[{project_str}] backend' in pwclientrc to explicitly opt-in "
94-
f"to a specific backend\n"
91+
f"The default backend changed from 'xmlrpc' to 'rest' in 2.10.0 "
92+
f"and the 'xmlrpc' backend is now deprecated for removal. You may "
93+
f"need to migrate your configuration if you were previously "
94+
f"relying on the 'xmlrpc' backend. Explicitly set "
95+
f"'[{project_str}] backend' in pwclientrc to mute this warning\n"
9596
)
9697

97-
backend = backend or BACKEND_XMLRPC
98+
backend = backend or BACKEND_REST
9899

99100
if action in auth_actions:
100101
if backend == 'rest':
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
upgrade:
3+
- |
4+
The default backend has changed from ``xmlrpc`` to ``rest``. A warning is
5+
emitted if a backend is not explicitly indicated in ``.pwclientrc``.
6+
deprecations:
7+
- |
8+
The ``xmlrpc`` backend is deprecated for removal.

‎tests/test_shell.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,7 @@ def test_list__project_filter(mock_action, mock_api, mock_config):
720720
updates={
721721
'fakeproject': {
722722
'url': 'https://example.com/fakeproject',
723+
'backend': 'xmlrpc',
723724
}
724725
}
725726
)

0 commit comments

Comments
 (0)