diff --git a/GaudiExamples/options/CustomAppFromOptions.py b/GaudiExamples/options/CustomAppFromOptions.py index 056534404da806d1fbf0d4fc3e0c12daa6f7e9a6..a52a50b63f567e2bb5593d06bbbec107b81bdd73 100644 --- a/GaudiExamples/options/CustomAppFromOptions.py +++ b/GaudiExamples/options/CustomAppFromOptions.py @@ -12,7 +12,11 @@ # # The custom application class is implemented in C++ via ROOT interpreter -import cppyy +# Workaround for ROOT-10769 +import warnings +with warnings.catch_warnings(): + warnings.simplefilter("ignore") + import cppyy # - we have to load GaudiKernel get the base class cppyy.gbl.gSystem.Load("libGaudiKernel.so") diff --git a/GaudiExamples/scripts/ArrayProperties.py b/GaudiExamples/scripts/ArrayProperties.py index 26f3c9439605f0b85397e6f01d0111c229da2e58..27fabf45158658f4d3dba0921ef91224ceef345a 100755 --- a/GaudiExamples/scripts/ArrayProperties.py +++ b/GaudiExamples/scripts/ArrayProperties.py @@ -47,7 +47,11 @@ if '__main__' == __name__: print(__doc__, __author__) # make sure cling can generate all required methods in Gaudi::Property - import cppyy + # Workaround for ROOT-10769 + import warnings + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + import cppyy cppyy.gbl.gInterpreter.Declare('#define NO_C_ARRAY_AS_PROPERTY_WARNING') cppyy.gbl.gInterpreter.Declare('#include "GaudiKernel/CArrayAsProperty.h"') diff --git a/GaudiExamples/scripts/ExtendedProperties2.py b/GaudiExamples/scripts/ExtendedProperties2.py index 17a8468cd3f86c171015f18afe3310097c985f22..ec595fa4fa743a56a4b73316626021279f503ee3 100755 --- a/GaudiExamples/scripts/ExtendedProperties2.py +++ b/GaudiExamples/scripts/ExtendedProperties2.py @@ -49,7 +49,11 @@ if '__main__' == __name__: print(__doc__, __author__) # make sure cling can generate all required methods in Gaudi::Property - import cppyy + # Workaround for ROOT-10769 + import warnings + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + import cppyy for h in ("GaudiKernel/SVectorAsProperty.h", "GaudiKernel/VectorsAsProperty.h"): cppyy.gbl.gInterpreter.Declare('#include "%s"' % h) diff --git a/GaudiPython/python/GaudiPython/Bindings.py b/GaudiPython/python/GaudiPython/Bindings.py index cd0034133ec614c9294cab8d7a867127c6c1508a..c48f14511058b7183e98628b06dc28dbcc63e242 100644 --- a/GaudiPython/python/GaudiPython/Bindings.py +++ b/GaudiPython/python/GaudiPython/Bindings.py @@ -32,12 +32,11 @@ import sys import string import warnings import re -try: + +# Workaround for ROOT-10769 +with warnings.catch_warnings(): + warnings.simplefilter("ignore") import cppyy -except ImportError: - # FIXME: backward compatibility - print("# WARNING: using PyCintex as cppyy implementation") - import PyCintex as cppyy if sys.version_info >= (3, ): # Python 2 compatibility diff --git a/GaudiPython/tests/scripts/test_helpers_import.py b/GaudiPython/tests/scripts/test_helpers_import.py index 9d68007d3b9260b7e82710cbbee1b83ad0c88601..afb33f8ff5e6a7931a984e720f4d85c2ef632bb5 100644 --- a/GaudiPython/tests/scripts/test_helpers_import.py +++ b/GaudiPython/tests/scripts/test_helpers_import.py @@ -9,6 +9,10 @@ # or submit itself to any jurisdiction. # ##################################################################################### """Load the GaudiPython::Helper struct to check for Cling warnings.""" -import cppyy +# Workaround for ROOT-10769 +import warnings +with warnings.catch_warnings(): + warnings.simplefilter("ignore") + import cppyy cppyy.gbl.GaudiPython.Helper