Skip to content

Commit

Permalink
Use warnings from the warnings library
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Jan 10, 2024
1 parent d948e9e commit dab3ec7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/podio/frame.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit dab3ec7

Please sign in to comment.