From dab3ec71fab211c79fffafab93dade06226cab65 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 10 Jan 2024 21:24:47 +0100 Subject: [PATCH] Use warnings from the warnings library --- python/podio/frame.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/podio/frame.py b/python/podio/frame.py index a1425922e..51de9c9e3 100644 --- a/python/podio/frame.py +++ b/python/podio/frame.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """Module for the python bindings of the podio::Frame""" -import sys +import warnings import cppyy import ROOT @@ -125,8 +125,8 @@ def collections(self): Returns: tuple(str): The names of the available collections from this Frame. """ - print('WARNING: collections is deprecated, use getAvailableCollections() (like in C++) instead', - file=sys.stderr) + warnings.warn('WARNING: collections is deprecated use getAvailableCollections()' + ' (like in C++) instead', FutureWarning) return self.getAvailableCollections() def get(self, name):