From 1a368a38e77e1b4ccab9dadcbe8cf2164c941916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Wed, 25 Jan 2023 18:42:12 +0100 Subject: [PATCH] Add explicit deprecation warning --- osclib/core.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/osclib/core.py b/osclib/core.py index fd036c7f..108f580f 100644 --- a/osclib/core.py +++ b/osclib/core.py @@ -61,6 +61,14 @@ def get_request_list_with_history( apiurl, project='', package='', req_who='', req_state=('new', 'review', 'declined'), req_type=None, exclude_target_projects=[]): """using an xpath search to get full request history. deprecated copy of old code from osc 0.x.""" + + import warnings + warnings.warn( + "get_request_list_with_history() uses an xpath search, which is slow. consider porting to" + "use osc.core.get_request_collection() instead.", + DeprecationWarning + ) + xpath = '' if 'all' not in req_state: for state in req_state: