From 8731d4ef4dbe63a4882885ac4415c104ca3ba99c Mon Sep 17 00:00:00 2001
From: Marco Clemencic <marco.clemencic@cern.ch>
Date: Sat, 19 Sep 2020 08:31:35 +0200
Subject: [PATCH 1/4] Patch produced by modernize

---
 DaVinciSys/tests/options/DVTestInitialise.py  |  1 +
 .../DaVinciTests/QMTest/DaVinciExclusions.py  |  1 +
 .../DVTestStandardIntermediate.py             |  7 +++-
 .../TestStandardIntermediateCuts.py           |  6 ++-
 .../tests/options/DVTestDecayTreeTuple-MC.py  |  1 +
 .../options/DVTestDecayTreeTuple-TisTos.py    |  1 +
 .../tests/options/DVTestInitialise.py         |  1 +
 DaVinciTests/tests/options/DVTestReadDst.py   |  1 +
 DaVinciTests/tests/options/DVTestWriteDst.py  |  1 +
 .../tests/options/DaVinci-1000events.py       |  1 +
 .../tests/options/DisableLoKiCacheFunctors.py |  1 +
 .../options/DisableLoKiPythonFunctors.py      |  1 +
 .../tests/options/EnableCaloReprocessing.py   |  1 +
 .../tests/options/EnableFPEAuditor.py         |  1 +
 .../PID/DaVinci-DST-ANNPID-Upgrade-Test.py    |  1 +
 .../DaVinci-DSTUnpacking-Upgrade-Test.py      |  1 +
 .../tests/options/SimpleMuSelection.py        |  1 +
 .../DVTestTagging-Summer2017Opt-Upgrade.py    |  1 +
 .../tests/options/Upgrade/DaVinci-Options.py  |  1 +
 .../tests/options/Upgrade/Input-DST.py        |  1 +
 .../tests/options/Upgrade/Input-MDST.py       |  1 +
 .../tests/options/Upgrade/Upgrade-DB-tags.py  |  1 +
 DaVinciTests/tests/options/check_mc_output.py |  1 +
 DaVinciTests/tests/options/db-global-2010.py  |  1 +
 DaVinciTests/tests/options/db-latest-2010.py  |  1 +
 DaVinciTests/tests/options/dimuon_testfile.py |  1 +
 DaVinciTests/tests/options/dtfdict.py         |  8 ++--
 .../tests/options/fsrs/davinci-merge.py       |  1 +
 .../tests/options/fsrs/test-genfsr.py         |  1 +
 DaVinciTests/tests/options/gpython_algs.py    | 15 ++++---
 Phys/DaVinci/options/DaVinci-Default.py       |  1 +
 Phys/DaVinci/options/DaVinci-Example.py       |  1 +
 Phys/DaVinci/options/DaVinci-Simplest.py      |  1 +
 Phys/DaVinci/options/DaVinciTestData.py       |  1 +
 Phys/DaVinci/python/DaVinci/Configuration.py  |  3 +-
 Phys/Tesla/options/Turbo.py                   |  1 +
 Phys/Tesla/options/Turbo_NewLine.py           |  1 +
 Phys/Tesla/options/Turbo_THRESHOLD.py         |  1 +
 Phys/Tesla/python/Tesla/Configuration.py      | 14 ++++---
 .../tests/options/CheckTurboStreamProd.py     |  1 +
 Phys/Tesla/tests/options/DV_LineChecker.py    |  1 +
 Phys/Tesla/tests/options/DV_Upgrade_PVs.py    |  8 ++--
 Phys/Tesla/tests/options/TCK_2015RP.py        |  1 +
 Phys/Tesla/tests/options/analyseAll.py        |  6 ++-
 Phys/Tesla/tests/options/analyseInput.py      | 25 ++++++-----
 Phys/Tesla/tests/options/analyseOutput.py     | 42 ++++++++++---------
 Phys/Tesla/tests/options/containers.py        | 28 +++++++------
 Phys/Tesla/tests/options/rightList.py         |  1 +
 .../options/DisableLoKiCacheFunctors.py       |  1 +
 Phys/TurboCache/options/NoEvents.py           |  1 +
 Phys/TurboCache/options/SilenceErrors.py      |  1 +
 Phys/TurboCache/options/Streams_v4r1.py       |  1 +
 .../TurboCache/options/SuppressLogMessages.py |  1 +
 .../options/Tesla_Data_2016_forStreams_v2.py  |  1 +
 54 files changed, 138 insertions(+), 67 deletions(-)

diff --git a/DaVinciSys/tests/options/DVTestInitialise.py b/DaVinciSys/tests/options/DVTestInitialise.py
index d4fbd2678..2a527c37f 100755
--- a/DaVinciSys/tests/options/DVTestInitialise.py
+++ b/DaVinciSys/tests/options/DVTestInitialise.py
@@ -20,6 +20,7 @@ Test for DaVinci initialisation
 @author P. Koppenburg
 @date 2009-01-07
 """
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci
 DaVinci().MainOptions = ""
diff --git a/DaVinciTests/python/DaVinciTests/QMTest/DaVinciExclusions.py b/DaVinciTests/python/DaVinciTests/QMTest/DaVinciExclusions.py
index e8f1b85d1..9df6c0f20 100755
--- a/DaVinciTests/python/DaVinciTests/QMTest/DaVinciExclusions.py
+++ b/DaVinciTests/python/DaVinciTests/QMTest/DaVinciExclusions.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from GaudiTest import LineSkipper, RegexpReplacer
 from GaudiConf.QMTest.LHCbExclusions import preprocessor as LHCbPreprocessor
 
diff --git a/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py b/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py
index 4c217b8c4..0b25e142c 100644
--- a/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py
+++ b/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py
@@ -16,16 +16,19 @@
 # Author: Patrick Koppenburg <patrick.koppenburg@cern.ch>
 #
 ##############################################################################
+from __future__ import print_function
+from __future__ import absolute_import
 from DaVinci.Configuration import DaVinci
 from Gaudi.Configuration import *
 ##############################################################################
 #
 from CommonParticles import StandardBasic
 from CommonParticles import StandardIntermediate
+import six
 
 Locations = []
-for a,b in StandardIntermediate.locations.iteritems():
-    print "DVTestCommonParticles adding location", a
+for a,b in six.iteritems(StandardIntermediate.locations):
+    print("DVTestCommonParticles adding location", a)
     Locations.append(a)
 
 from Configurables import CountParticles
diff --git a/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py b/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py
index d2dcc9abc..66cfcffb2 100644
--- a/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py
+++ b/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py
@@ -15,6 +15,8 @@
    Author: Juan Palacios <palacios@physik.uzh.ch>
 """
 ##############################################################################
+from __future__ import print_function
+from __future__ import absolute_import
 from DaVinci.Configuration import DaVinci
 from Gaudi.Configuration import *
 #
@@ -23,8 +25,8 @@ from CommonParticles import StandardIntermediate
 
 List = []
 
-for a,b in StandardIntermediate.locations.iteritems():
-    print "DVTestCommonParticles adding location", a
+for a,b in StandardIntermediate.locations.iter():
+    print("DVTestCommonParticles adding location", a)
     List.append(b)                      # list of algorithms
 
 DaVinci( UserAlgorithms = List,
diff --git a/DaVinciTests/tests/options/DVTestDecayTreeTuple-MC.py b/DaVinciTests/tests/options/DVTestDecayTreeTuple-MC.py
index 333067d89..13b663c01 100755
--- a/DaVinciTests/tests/options/DVTestDecayTreeTuple-MC.py
+++ b/DaVinciTests/tests/options/DVTestDecayTreeTuple-MC.py
@@ -16,6 +16,7 @@
  #  @date 2008-03-07
  #
 
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 from GaudiKernel.SystemOfUnits import *
 ########################################################################
diff --git a/DaVinciTests/tests/options/DVTestDecayTreeTuple-TisTos.py b/DaVinciTests/tests/options/DVTestDecayTreeTuple-TisTos.py
index 59be4cce6..41396140e 100755
--- a/DaVinciTests/tests/options/DVTestDecayTreeTuple-TisTos.py
+++ b/DaVinciTests/tests/options/DVTestDecayTreeTuple-TisTos.py
@@ -16,6 +16,7 @@
  #  @date 2008-03-07
  #
 
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 from GaudiKernel.SystemOfUnits import *
 ########################################################################
diff --git a/DaVinciTests/tests/options/DVTestInitialise.py b/DaVinciTests/tests/options/DVTestInitialise.py
index c4a5e23aa..5c9961cd2 100755
--- a/DaVinciTests/tests/options/DVTestInitialise.py
+++ b/DaVinciTests/tests/options/DVTestInitialise.py
@@ -20,6 +20,7 @@ Test for DaVinci initialisation
 @author P. Koppenburg
 @date 2009-01-07
 """
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci
 
diff --git a/DaVinciTests/tests/options/DVTestReadDst.py b/DaVinciTests/tests/options/DVTestReadDst.py
index 74d231cf3..1c255f150 100755
--- a/DaVinciTests/tests/options/DVTestReadDst.py
+++ b/DaVinciTests/tests/options/DVTestReadDst.py
@@ -18,6 +18,7 @@
 # @date 2009-02-04
 #
 ########################################################################
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci
 ##############################################################################
diff --git a/DaVinciTests/tests/options/DVTestWriteDst.py b/DaVinciTests/tests/options/DVTestWriteDst.py
index c7560e255..11f7a724c 100755
--- a/DaVinciTests/tests/options/DVTestWriteDst.py
+++ b/DaVinciTests/tests/options/DVTestWriteDst.py
@@ -21,6 +21,7 @@
 # @date 2009-02-03
 #
 ##############################################################################
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci
 ##############################################################################
diff --git a/DaVinciTests/tests/options/DaVinci-1000events.py b/DaVinciTests/tests/options/DaVinci-1000events.py
index ade4d5550..693a7c8c6 100644
--- a/DaVinciTests/tests/options/DaVinci-1000events.py
+++ b/DaVinciTests/tests/options/DaVinci-1000events.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci
 
diff --git a/DaVinciTests/tests/options/DisableLoKiCacheFunctors.py b/DaVinciTests/tests/options/DisableLoKiCacheFunctors.py
index 29dfb9324..0c62b5dc3 100644
--- a/DaVinciTests/tests/options/DisableLoKiCacheFunctors.py
+++ b/DaVinciTests/tests/options/DisableLoKiCacheFunctors.py
@@ -9,5 +9,6 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 
+from __future__ import absolute_import
 from Configurables import ApplicationMgr
 ApplicationMgr().Environment['LOKI_DISABLE_CACHE'] = '1'
diff --git a/DaVinciTests/tests/options/DisableLoKiPythonFunctors.py b/DaVinciTests/tests/options/DisableLoKiPythonFunctors.py
index 14f8f50f4..2557cce52 100644
--- a/DaVinciTests/tests/options/DisableLoKiPythonFunctors.py
+++ b/DaVinciTests/tests/options/DisableLoKiPythonFunctors.py
@@ -9,5 +9,6 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 
+from __future__ import absolute_import
 from Configurables import ApplicationMgr
 ApplicationMgr().Environment['LOKI_DISABLE_PYTHON'] = '1'
diff --git a/DaVinciTests/tests/options/EnableCaloReprocessing.py b/DaVinciTests/tests/options/EnableCaloReprocessing.py
index 3e97ad3d8..f3823febe 100644
--- a/DaVinciTests/tests/options/EnableCaloReprocessing.py
+++ b/DaVinciTests/tests/options/EnableCaloReprocessing.py
@@ -9,5 +9,6 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 
+from __future__ import absolute_import
 from Configurables import PhysConf
 PhysConf().CaloReProcessing = True
diff --git a/DaVinciTests/tests/options/EnableFPEAuditor.py b/DaVinciTests/tests/options/EnableFPEAuditor.py
index c278e1b37..d0a51c5c5 100644
--- a/DaVinciTests/tests/options/EnableFPEAuditor.py
+++ b/DaVinciTests/tests/options/EnableFPEAuditor.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 
 ApplicationMgr().ExtSvc + [ "AuditorSvc" ]
diff --git a/DaVinciTests/tests/options/PID/DaVinci-DST-ANNPID-Upgrade-Test.py b/DaVinciTests/tests/options/PID/DaVinci-DST-ANNPID-Upgrade-Test.py
index 1193d553d..051fdfdd3 100755
--- a/DaVinciTests/tests/options/PID/DaVinci-DST-ANNPID-Upgrade-Test.py
+++ b/DaVinciTests/tests/options/PID/DaVinci-DST-ANNPID-Upgrade-Test.py
@@ -10,6 +10,7 @@
 ###############################################################################
 
 ########################################################################
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import GaudiSequencer
 from Configurables import DaVinci, PhysConf
diff --git a/DaVinciTests/tests/options/Packing/DaVinci-DSTUnpacking-Upgrade-Test.py b/DaVinciTests/tests/options/Packing/DaVinci-DSTUnpacking-Upgrade-Test.py
index 95716a4dd..3dd943dfc 100755
--- a/DaVinciTests/tests/options/Packing/DaVinci-DSTUnpacking-Upgrade-Test.py
+++ b/DaVinciTests/tests/options/Packing/DaVinci-DSTUnpacking-Upgrade-Test.py
@@ -10,6 +10,7 @@
 ###############################################################################
 
 ########################################################################
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import GaudiSequencer
 from Configurables import DaVinci, PhysConf
diff --git a/DaVinciTests/tests/options/SimpleMuSelection.py b/DaVinciTests/tests/options/SimpleMuSelection.py
index 8bf2ec6e2..6bb37d729 100644
--- a/DaVinciTests/tests/options/SimpleMuSelection.py
+++ b/DaVinciTests/tests/options/SimpleMuSelection.py
@@ -15,6 +15,7 @@
   Long track muons with PT > 1 GeV
 """
 
+from __future__ import absolute_import
 __author__ = 'R. Lambert'
 __date__ = 'November 2009'
 __version__ = '$Revision: 1.3 $'
diff --git a/DaVinciTests/tests/options/Tagging/DVTestTagging-Summer2017Opt-Upgrade.py b/DaVinciTests/tests/options/Tagging/DVTestTagging-Summer2017Opt-Upgrade.py
index 71a7b2c67..83d883808 100644
--- a/DaVinciTests/tests/options/Tagging/DVTestTagging-Summer2017Opt-Upgrade.py
+++ b/DaVinciTests/tests/options/Tagging/DVTestTagging-Summer2017Opt-Upgrade.py
@@ -15,6 +15,7 @@ Example Options for BTagging algorithm
 @date 2010-09-29, 2018-05-03
 """
 
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 import GaudiPython
 from Configurables import GaudiSequencer
diff --git a/DaVinciTests/tests/options/Upgrade/DaVinci-Options.py b/DaVinciTests/tests/options/Upgrade/DaVinci-Options.py
index d94e1186b..39da83700 100644
--- a/DaVinciTests/tests/options/Upgrade/DaVinci-Options.py
+++ b/DaVinciTests/tests/options/Upgrade/DaVinci-Options.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Configurables import DaVinci
 DaVinci().TupleFile = 'DV-Ntuple.root'
 DaVinci().HistogramFile = 'DV-Histos.root'
diff --git a/DaVinciTests/tests/options/Upgrade/Input-DST.py b/DaVinciTests/tests/options/Upgrade/Input-DST.py
index c639d4029..0c6a8672e 100644
--- a/DaVinciTests/tests/options/Upgrade/Input-DST.py
+++ b/DaVinciTests/tests/options/Upgrade/Input-DST.py
@@ -8,5 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Configurables import DaVinci
 DaVinci().InputType = 'DST'
diff --git a/DaVinciTests/tests/options/Upgrade/Input-MDST.py b/DaVinciTests/tests/options/Upgrade/Input-MDST.py
index 708990a43..e1d8bf497 100644
--- a/DaVinciTests/tests/options/Upgrade/Input-MDST.py
+++ b/DaVinciTests/tests/options/Upgrade/Input-MDST.py
@@ -8,5 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Configurables import DaVinci
 DaVinci().InputType = 'MDST'
diff --git a/DaVinciTests/tests/options/Upgrade/Upgrade-DB-tags.py b/DaVinciTests/tests/options/Upgrade/Upgrade-DB-tags.py
index 22f14be88..0bcbe7ebf 100644
--- a/DaVinciTests/tests/options/Upgrade/Upgrade-DB-tags.py
+++ b/DaVinciTests/tests/options/Upgrade/Upgrade-DB-tags.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Configurables import LHCbApp, CondDB
 LHCbApp().DDDBtag = "dddb-20171126"
 LHCbApp().CondDBtag = "sim-20171127-vc-md100"
diff --git a/DaVinciTests/tests/options/check_mc_output.py b/DaVinciTests/tests/options/check_mc_output.py
index 3c7f42416..395caa385 100644
--- a/DaVinciTests/tests/options/check_mc_output.py
+++ b/DaVinciTests/tests/options/check_mc_output.py
@@ -10,6 +10,7 @@
 ###############################################################################
 """Check ntuples made from Turbo MC input for correct truth-matching."""
 from __future__ import print_function
+from __future__ import absolute_import
 import sys
 
 import ROOT
diff --git a/DaVinciTests/tests/options/db-global-2010.py b/DaVinciTests/tests/options/db-global-2010.py
index 081e9305c..f3d4ac46d 100644
--- a/DaVinciTests/tests/options/db-global-2010.py
+++ b/DaVinciTests/tests/options/db-global-2010.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import LHCbApp, CondDB, DDDBConf
 
diff --git a/DaVinciTests/tests/options/db-latest-2010.py b/DaVinciTests/tests/options/db-latest-2010.py
index 5ebb18ea8..c23387fe0 100644
--- a/DaVinciTests/tests/options/db-latest-2010.py
+++ b/DaVinciTests/tests/options/db-latest-2010.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import LHCbApp, CondDB, DDDBConf
 
diff --git a/DaVinciTests/tests/options/dimuon_testfile.py b/DaVinciTests/tests/options/dimuon_testfile.py
index 7618baf7d..5467424d8 100644
--- a/DaVinciTests/tests/options/dimuon_testfile.py
+++ b/DaVinciTests/tests/options/dimuon_testfile.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from PRConfig import TestFileDB
 from Configurables import DaVinci
 
diff --git a/DaVinciTests/tests/options/dtfdict.py b/DaVinciTests/tests/options/dtfdict.py
index 8dbc713b9..bf5fd9561 100644
--- a/DaVinciTests/tests/options/dtfdict.py
+++ b/DaVinciTests/tests/options/dtfdict.py
@@ -14,6 +14,8 @@
 Test of the DFTDict module
 """
 
+from __future__ import absolute_import
+from __future__ import print_function
 __author__ = "Davide Fazzini davide.fazzini@cern.ch"
 
 from Configurables import DaVinci
@@ -70,7 +72,7 @@ sel = get_selection_sequence('Bd2JpsiKstarSel')
 seq.Members += [sel.sequence()]
 tuple_input = sel.outputLocation()
 
-print "sequence test: passed"
+print("sequence test: passed")
 
 # make a tuple
 tpl = DecayTreeTuple("Bd2JpsiKstar")
@@ -99,7 +101,7 @@ DictTuple.Cons.Substitutions = {
     'J/psi(1S) -> mu+ ^mu-' : 'e-',
     }
 
-print "LoKi__Hybrid__Dict2Tuple test: passed"
+print("LoKi__Hybrid__Dict2Tuple test: passed")
 
 # Add LoKiFunctors to the tool chain,
 # these functors will be applied to the refitted decay tree
@@ -114,7 +116,7 @@ DictTuple.Cons.dict.Variables = {
     "Cons_PZ"                  : "PZ",
     }
 
-print "LoKi__Hybrid__DictOfFunctors test: passed"
+print("LoKi__Hybrid__DictOfFunctors test: passed")
 
 # add the tuple to the main sequence
 seq.Members += [tpl]
diff --git a/DaVinciTests/tests/options/fsrs/davinci-merge.py b/DaVinciTests/tests/options/fsrs/davinci-merge.py
index 6f78a868f..cb1221ad2 100644
--- a/DaVinciTests/tests/options/fsrs/davinci-merge.py
+++ b/DaVinciTests/tests/options/fsrs/davinci-merge.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import InputCopyStream
 
diff --git a/DaVinciTests/tests/options/fsrs/test-genfsr.py b/DaVinciTests/tests/options/fsrs/test-genfsr.py
index 1690ae4a5..51f30372d 100644
--- a/DaVinciTests/tests/options/fsrs/test-genfsr.py
+++ b/DaVinciTests/tests/options/fsrs/test-genfsr.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 
 from Configurables import GaudiSequencer
diff --git a/DaVinciTests/tests/options/gpython_algs.py b/DaVinciTests/tests/options/gpython_algs.py
index 57044c99d..54615ecca 100755
--- a/DaVinciTests/tests/options/gpython_algs.py
+++ b/DaVinciTests/tests/options/gpython_algs.py
@@ -23,7 +23,10 @@
 ##
 ## Configurables:
 ##
+from __future__ import print_function
+from __future__ import absolute_import
 from Configurables import DaVinci, MessageSvc
+from six.moves import range
 dv = DaVinci(
     DataType = "Upgrade",
     Simulation = True,
@@ -78,18 +81,18 @@ for i in range(10) :
     gaudi.run(1)
 
     alg   = gaudi.algorithm('KAONS')
-    print ' [%d] KAONS      initialized? %s [counterintuitive]' % ( i , alg._ialg.isInitialized () )
-    print ' [%d] KAONS         executed? %s '                   % ( i , isExecuted(alg) )
+    print(' [%d] KAONS      initialized? %s [counterintuitive]' % ( i , alg._ialg.isInitialized () ))
+    print(' [%d] KAONS         executed? %s '                   % ( i , isExecuted(alg) ))
 
 
-    print ' without fix in $LOKICORE/src/AlgFunctors.cpp following  lines produce segmentation violation'
+    print(' without fix in $LOKICORE/src/AlgFunctors.cpp following  lines produce segmentation violation')
     fun1 = ALG_EXECUTED ( mainseq )
     fun2 = ALG_PASSED   ( mainseq )
     fun3 = ALG_ENABLED  ( mainseq )
 
-    print ' [%d] main sequence executed? %s ' % ( i , fun1() )
-    print ' [%d] main sequence   passed? %s ' % ( i , fun2() )
-    print ' [%d] main sequence  enabled? %s ' % ( i , fun3() )
+    print(' [%d] main sequence executed? %s ' % ( i , fun1() ))
+    print(' [%d] main sequence   passed? %s ' % ( i , fun2() ))
+    print(' [%d] main sequence  enabled? %s ' % ( i , fun3() ))
 
 
 exit()
diff --git a/Phys/DaVinci/options/DaVinci-Default.py b/Phys/DaVinci/options/DaVinci-Default.py
index df0cbceb7..a6f13cdc4 100644
--- a/Phys/DaVinci/options/DaVinci-Default.py
+++ b/Phys/DaVinci/options/DaVinci-Default.py
@@ -16,6 +16,7 @@
 # Author: Juan Palacios <juan.palacios@nikhef.nl>
 #
 ##############################################################################
+from __future__ import absolute_import
 from Configurables import DaVinci
 ##############################################################################
 d = DaVinci()
diff --git a/Phys/DaVinci/options/DaVinci-Example.py b/Phys/DaVinci/options/DaVinci-Example.py
index 8f7b7c2ba..82339d08d 100644
--- a/Phys/DaVinci/options/DaVinci-Example.py
+++ b/Phys/DaVinci/options/DaVinci-Example.py
@@ -18,6 +18,7 @@
  # @author P. Koppenburg based on previous versions
  #
 ##
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci, FilterDesktop, CombineParticles, OfflineVertexFitter
 from PhysSelPython.Wrappers import AutomaticData, Selection, SelectionSequence, DataOnDemand
diff --git a/Phys/DaVinci/options/DaVinci-Simplest.py b/Phys/DaVinci/options/DaVinci-Simplest.py
index e37777be8..59f048d20 100644
--- a/Phys/DaVinci/options/DaVinci-Simplest.py
+++ b/Phys/DaVinci/options/DaVinci-Simplest.py
@@ -17,6 +17,7 @@
 ########################################################################
 
 
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci
 
diff --git a/Phys/DaVinci/options/DaVinciTestData.py b/Phys/DaVinci/options/DaVinciTestData.py
index 650c3e3cc..e6c4c8acb 100644
--- a/Phys/DaVinci/options/DaVinciTestData.py
+++ b/Phys/DaVinci/options/DaVinciTestData.py
@@ -16,6 +16,7 @@
  # @author P. Koppenburg
  #
 ##
+from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci
 
diff --git a/Phys/DaVinci/python/DaVinci/Configuration.py b/Phys/DaVinci/python/DaVinci/Configuration.py
index cdbf8e1ab..e27386ea7 100644
--- a/Phys/DaVinci/python/DaVinci/Configuration.py
+++ b/Phys/DaVinci/python/DaVinci/Configuration.py
@@ -11,6 +11,7 @@
 """
 High level configuration tools for DaVinci
 """
+from __future__ import absolute_import
 __version__ = "$Id: Configuration.py,v 1.125 2010-09-10 11:31:19 jpalac Exp $"
 __author__ = "Juan Palacios <juan.palacios@nikhef.nl>"
 
@@ -650,7 +651,7 @@ class DaVinci(LHCbConfigurableUser) :
         def _set_root_in_tes_ ( s , root  ) :
             #
             if isinstance ( s , str ) : return
-            prps = s.getProperties().keys()
+            prps = list(s.getProperties().keys())
             if 'RootInTES' in prps :
                 if not s.isPropertySet ( 'RootInTES' ) :
                     log.info ( "Set RootInTES=%s for %s" % ( root , s.getName() ) )
diff --git a/Phys/Tesla/options/Turbo.py b/Phys/Tesla/options/Turbo.py
index 51d6b7f8f..9f62989ca 100755
--- a/Phys/Tesla/options/Turbo.py
+++ b/Phys/Tesla/options/Turbo.py
@@ -11,6 +11,7 @@
 # SAMPLE FOR TUTORIAL: RunningTesla
 # FOR LATEST SCRIPT SEE Turbo_NewLine.py
 
+from __future__ import absolute_import
 from Configurables import Tesla 
 from Gaudi.Configuration import *
 
diff --git a/Phys/Tesla/options/Turbo_NewLine.py b/Phys/Tesla/options/Turbo_NewLine.py
index d72c6e685..960282f88 100755
--- a/Phys/Tesla/options/Turbo_NewLine.py
+++ b/Phys/Tesla/options/Turbo_NewLine.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Configurables import Tesla 
 from Gaudi.Configuration import *
 
diff --git a/Phys/Tesla/options/Turbo_THRESHOLD.py b/Phys/Tesla/options/Turbo_THRESHOLD.py
index 4d6dde263..63b862ad5 100755
--- a/Phys/Tesla/options/Turbo_THRESHOLD.py
+++ b/Phys/Tesla/options/Turbo_THRESHOLD.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Configurables import Tesla 
 from Gaudi.Configuration import *
 
diff --git a/Phys/Tesla/python/Tesla/Configuration.py b/Phys/Tesla/python/Tesla/Configuration.py
index dcf677f53..3e3abd6f1 100644
--- a/Phys/Tesla/python/Tesla/Configuration.py
+++ b/Phys/Tesla/python/Tesla/Configuration.py
@@ -8,6 +8,8 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
+from __future__ import print_function
 import logging as log
 import os
 import re
@@ -518,14 +520,14 @@ class Tesla(LHCbConfigurableUser):
                     raise ValueError("Multiple instances of type "+PRtype+" have been detected")
 
                 trackTruthSeq = self._configureTrackTruth(assocpp,matchedTracks[0])
-                print("Adding additional PR protoparticles for truth matching: "+matchedProtos[0])
+                print(("Adding additional PR protoparticles for truth matching: "+matchedProtos[0]))
                 assocpp.InputData += [ matchedProtos[0] ]
                 ChargedProtoSeq.Members+=[trackTruthSeq]
 
             # Add container of merged long and downstream PersistReco PPs
             # TODO this should be in the list in the configuration file
             assocpp.InputData += ['Hlt2/Protos/Charged']
-            print("Adding additional PR protoparticles for truth matching: "+assocpp.InputData[-1])
+            print(("Adding additional PR protoparticles for truth matching: "+assocpp.InputData[-1]))
             trackTruthSeq = self._configureTrackTruth(assocpp, '/Event/Hlt2/TrackFitted/Charged')
             ChargedProtoSeq.Members += [trackTruthSeq]
 
@@ -812,12 +814,12 @@ class Tesla(LHCbConfigurableUser):
         prescale = lines_dict.get('prescale', None)
         turboRepLoc="Turbo/DecReports"+stream
         if prescale:
-            print "Requested to prescale stream: "+stream
+            print("Requested to prescale stream: "+stream)
             # if line not in dictionary, give it a prescale of 1
             for line in lines:
                 if line not in prescale:
                     prescale[line]=1.0
-            print prescale
+            print(prescale)
             prescaleVersion = lines_dict.get('prescaleVersion', None)
             pscaler = TurboPrescaler("TurboPrescaler"+stream)
             pscaler.FilterOutput=True
@@ -1209,7 +1211,7 @@ class Tesla(LHCbConfigurableUser):
             psandvs_packer = PackParticlesAndVertices(
                 namer('TurboPacker'),
                 InputStream=turbo_base,
-                VetoedContainers=prpacking_stream.inputs.values()
+                VetoedContainers=list(prpacking_stream.inputs.values())
             )
             packers.append(psandvs_packer)
 
@@ -1380,7 +1382,7 @@ class Tesla(LHCbConfigurableUser):
         # Load the raw event format dictionaries
         RawEventFormatConf().loadIfRequired()
 
-        locs = RawEventLocationsToBanks(output_format).keys()
+        locs = list(RawEventLocationsToBanks(output_format).keys())
         return [os.path.join('/Event', l) + '#1' for l in locs]
 
     def __apply_configuration__(self):
diff --git a/Phys/Tesla/tests/options/CheckTurboStreamProd.py b/Phys/Tesla/tests/options/CheckTurboStreamProd.py
index 6d6c9c28b..5eb15bb4b 100644
--- a/Phys/Tesla/tests/options/CheckTurboStreamProd.py
+++ b/Phys/Tesla/tests/options/CheckTurboStreamProd.py
@@ -17,6 +17,7 @@ Run with e.g.
 
 """
 from __future__ import print_function
+from __future__ import absolute_import
 import argparse
 import json
 import re
diff --git a/Phys/Tesla/tests/options/DV_LineChecker.py b/Phys/Tesla/tests/options/DV_LineChecker.py
index db252eeb4..ef459f315 100644
--- a/Phys/Tesla/tests/options/DV_LineChecker.py
+++ b/Phys/Tesla/tests/options/DV_LineChecker.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Configurables import DaVinci
 from Configurables import TeslaLineChecker
 from Configurables import CondDB
diff --git a/Phys/Tesla/tests/options/DV_Upgrade_PVs.py b/Phys/Tesla/tests/options/DV_Upgrade_PVs.py
index aa887d28c..506381f97 100644
--- a/Phys/Tesla/tests/options/DV_Upgrade_PVs.py
+++ b/Phys/Tesla/tests/options/DV_Upgrade_PVs.py
@@ -8,6 +8,8 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
+from __future__ import print_function
 from Gaudi.Configuration import *
 from LHCbKernel.Configuration import *
 from Configurables import GaudiSequencer,RawEventJuggler
@@ -57,7 +59,7 @@ while True:
     gaudi.run(1)
     #
     if not tes['/Event/DAQ/RawEvent']:
-        print "End of file"
+        print("End of file")
         break
     #
     n=0
@@ -69,6 +71,6 @@ while True:
         continue
 
     if not tes[vertLoc]:
-        print tes["Hlt2/SelReports"]
-        print "ERROR: PVs have not been created"
+        print(tes["Hlt2/SelReports"])
+        print("ERROR: PVs have not been created")
         break
diff --git a/Phys/Tesla/tests/options/TCK_2015RP.py b/Phys/Tesla/tests/options/TCK_2015RP.py
index cbd27719a..4ea046737 100644
--- a/Phys/Tesla/tests/options/TCK_2015RP.py
+++ b/Phys/Tesla/tests/options/TCK_2015RP.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Configurables import Tesla 
 Tesla().Pack = True
 Tesla().DataType = '2015'
diff --git a/Phys/Tesla/tests/options/analyseAll.py b/Phys/Tesla/tests/options/analyseAll.py
index 36c9416f0..fffefc17e 100644
--- a/Phys/Tesla/tests/options/analyseAll.py
+++ b/Phys/Tesla/tests/options/analyseAll.py
@@ -8,14 +8,16 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from subprocess import call
 import os
-execfile(os.path.expandvars("$TESLAROOT/tests/options/streams.py"))
+import six
+exec(compile(open(os.path.expandvars("$TESLAROOT/tests/options/streams.py"), "rb").read(), os.path.expandvars("$TESLAROOT/tests/options/streams.py"), 'exec'))
 exit_code = call(["python",os.path.expandvars("$TESLAROOT/tests/options/analyseInput.py")])
 if exit_code:
     exit( exit_code )
 
-for stream,lines in turbo_streams.iteritems():
+for stream,lines in six.iteritems(turbo_streams):
     exit_code = call(["python",os.path.expandvars("$TESLAROOT/tests/options/analyseOutput.py"),stream])
     if exit_code:
         exit( exit_code )
diff --git a/Phys/Tesla/tests/options/analyseInput.py b/Phys/Tesla/tests/options/analyseInput.py
index f5d5c430b..05d79f1f0 100644
--- a/Phys/Tesla/tests/options/analyseInput.py
+++ b/Phys/Tesla/tests/options/analyseInput.py
@@ -8,6 +8,8 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
+from __future__ import print_function
 import sys
 
 import GaudiPython as GP
@@ -20,6 +22,9 @@ from Configurables import (
   CondDB
 )
 from DAQSys.Decoders import DecoderDB
+import six
+from six.moves import map
+from six.moves import range
         
 
 lhcbApp = LHCbApp()
@@ -46,11 +51,11 @@ appMgr = GP.AppMgr()
 
 evt = appMgr.evtsvc()
 import os
-execfile(os.path.expandvars("$TESLAROOT/tests/options/streams.py"))
+exec(compile(open(os.path.expandvars("$TESLAROOT/tests/options/streams.py"), "rb").read(), os.path.expandvars("$TESLAROOT/tests/options/streams.py"), 'exec'))
 
 decsPerStream = {}
 evtsPerStream = {}
-for stream, lines in turbo_streams.iteritems():
+for stream, lines in six.iteritems(turbo_streams):
     decsPerStream[stream] = 0
     evtsPerStream[stream] = 0
 
@@ -61,7 +66,7 @@ def routing_bits(rawevent):
     assert rbbanks.size() == 1  # stop if we have multiple rb banks                                                     
     d = rbbanks[rbbanks.size() - 1].data()  # get last bank                                                             
     bits = "{:032b}{:032b}{:032b}".format(d[2], d[1], d[0])
-    return map(int, reversed(bits))
+    return list(map(int, reversed(bits)))
 
 # Number of events has to be the same as in TeslaStepsStreams.py
 for i in range(0,500):
@@ -77,28 +82,28 @@ for i in range(0,500):
     if not evt["DAQ/ODIN"]:
         break
     if not evt["Hlt2/DecReports"]:
-        print "ERROR: Hlt2 dec report missing"
+        print("ERROR: Hlt2 dec report missing")
         continue
     else:
         found = {}
-        for stream, lines in turbo_streams.iteritems():
+        for stream, lines in six.iteritems(turbo_streams):
             found[stream] = False
 
-        for name,dec in evt["Hlt2/DecReports"].decReports().iteritems():
+        for name,dec in six.iteritems(evt["Hlt2/DecReports"].decReports()):
             if name == 'Hlt2Global':
                 continue
             if dec.decision()==1:
-                for stream, lines in turbo_streams.iteritems():
+                for stream, lines in six.iteritems(turbo_streams):
                     if name[:-8] in lines["lines"]:
                         decsPerStream[stream] = decsPerStream[stream] + 1
                         found[stream] = True
                         
-        for stream, lines in turbo_streams.iteritems():
+        for stream, lines in six.iteritems(turbo_streams):
             if found[stream]:
                 evtsPerStream[stream] =  evtsPerStream[stream] + 1
 
-print decsPerStream
-print evtsPerStream
+print(decsPerStream)
+print(evtsPerStream)
 import pickle
 pickle.dump( decsPerStream, open( "decsPerStream.p", "wb" ) )
 pickle.dump( evtsPerStream, open( "evtsPerStream.p", "wb" ) )
diff --git a/Phys/Tesla/tests/options/analyseOutput.py b/Phys/Tesla/tests/options/analyseOutput.py
index da8a9a505..e7195ecc5 100644
--- a/Phys/Tesla/tests/options/analyseOutput.py
+++ b/Phys/Tesla/tests/options/analyseOutput.py
@@ -8,6 +8,8 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
+from __future__ import print_function
 import sys
 
 import GaudiPython as GP
@@ -21,6 +23,8 @@ from Configurables import (
   CondDB
 )
 from DAQSys.Decoders import DecoderDB
+import six
+from six.moves import range
         
 
 lhcbApp = LHCbApp()
@@ -54,14 +58,14 @@ appMgr = GP.AppMgr()
 evt = appMgr.evtsvc()
 import os
 import sys
-execfile(os.path.expandvars("$TESLAROOT/tests/options/streams.py"))
+exec(compile(open(os.path.expandvars("$TESLAROOT/tests/options/streams.py"), "rb").read(), os.path.expandvars("$TESLAROOT/tests/options/streams.py"), 'exec'))
 
 lines = turbo_streams[stream]["lines"]
 lines = [line+"Decision" for line in lines]
-print lines
+print(lines)
 decLocation = "Hlt2/DecReports"
 if turbo_streams[stream]["prescale"] != None:
-    print "Prescaled stream"
+    print("Prescaled stream")
     decLocation = turboReports
     
 
@@ -77,11 +81,11 @@ for i in range(0,10000):
     if not evt["DAQ/ODIN"]:
         break
     if not evt[decLocation]:
-        print "ERROR: Hlt2 dec report missing. Location ", decLocation
+        print("ERROR: Hlt2 dec report missing. Location ", decLocation)
         continue
     else:
         allEvents = allEvents + 1
-        for name,dec in evt[decLocation].decReports().iteritems():
+        for name,dec in six.iteritems(evt[decLocation].decReports()):
             if name == 'Hlt2Global':
                 continue
             if dec.decision()==1:
@@ -99,36 +103,36 @@ for i in range(0,10000):
     assert (inStream or not offStream), "ERROR: Should not contain events of other streams"
 
 
-print "##### SUMMARY #####"
-print "All Events ",allEvents, ", events in stream", streamEvents, ", postive line decisions ", streamDecs
+print("##### SUMMARY #####")
+print("All Events ",allEvents, ", events in stream", streamEvents, ", postive line decisions ", streamDecs)
 
 if allEvents != streamEvents:
-    print "ERROR: More events than should be in stream"
+    print("ERROR: More events than should be in stream")
 
 import pickle
 decsPerStream = pickle.load( open( "decsPerStream.p", "rb" ) )
 evtsPerStream = pickle.load( open( "evtsPerStream.p", "rb" ) )
 if turbo_streams[stream]["prescale"] == None:
     if decsPerStream[stream] != streamDecs:
-        print "ERROR : Number of input decision different to output"
-        print "Should be ", decsPerStream[stream]
+        print("ERROR : Number of input decision different to output")
+        print("Should be ", decsPerStream[stream])
         assert False
     if evtsPerStream[stream] != streamEvents:
-        print "ERROR : Number of input events different to output"
-        print "Should be ", evntsPerStream[stream]
+        print("ERROR : Number of input events different to output")
+        print("Should be ", evntsPerStream[stream])
         assert False
 
 else:
-    print "INFO : Stream contains prescaled lines"
-    print "Input decsions were ", decsPerStream[stream]
-    print "Effective prescaling : ", float(streamDecs)/decsPerStream[stream]
+    print("INFO : Stream contains prescaled lines")
+    print("Input decsions were ", decsPerStream[stream])
+    print("Effective prescaling : ", float(streamDecs)/decsPerStream[stream])
     if streamDecs >= decsPerStream[stream] :
-        print "ERROR : No prescaling applied"
+        print("ERROR : No prescaling applied")
         assert False
         
-    print "Input events were ", evtsPerStream[stream]
-    print "Effective prescaling : ", float(streamEvents)/evtsPerStream[stream]
+    print("Input events were ", evtsPerStream[stream])
+    print("Effective prescaling : ", float(streamEvents)/evtsPerStream[stream])
     if streamEvents >= evtsPerStream[stream] :
-        print "ERROR : No prescaling applied"
+        print("ERROR : No prescaling applied")
         assert False
 
diff --git a/Phys/Tesla/tests/options/containers.py b/Phys/Tesla/tests/options/containers.py
index cb711f761..5f0b1a225 100644
--- a/Phys/Tesla/tests/options/containers.py
+++ b/Phys/Tesla/tests/options/containers.py
@@ -11,6 +11,8 @@
 # Options file for the QMTest to check that the containers have not
 # changed, either in values or in size.
 
+from __future__ import absolute_import
+from __future__ import print_function
 from Configurables import Tesla
 from Gaudi.Configuration import *
 
@@ -99,7 +101,7 @@ while n<1000:
     #
     gaudi.run(1)
     if not tes['/Event/DAQ/RawEvent']:
-        print "End of file"
+        print("End of file")
         break
     #
     gaudi.executeEvent()
@@ -136,15 +138,15 @@ meanSizeProto = i_protoTot / n_pop
 meanDLLK = meanDLLK / ( i_protoTot )
 
 # print container sizes and mean of interested quantities
-print "Particle Check ***********************************"
-print "Average mass = "+str(round(meanMass,1))
-print "Average container size = "+str(round(meanSizePart,1))
-print "Track Check **************************************"
-print "Average chi2 = "+str(round(meanTrackChi2,2))
-print "Average container size = "+str(round(meanSizeTrack,1))
-print "Vertex Check *************************************"
-print "Average chi2 = "+str(round(meanVertexChi2,3))
-print "Average container size = "+str(round(meanSizeVert,1))
-print "Proto Check **************************************"
-print "Average DLLK = "+str(round(meanDLLK,3))
-print "Average container size = "+str(round(meanSizeProto,1))
+print("Particle Check ***********************************")
+print("Average mass = "+str(round(meanMass,1)))
+print("Average container size = "+str(round(meanSizePart,1)))
+print("Track Check **************************************")
+print("Average chi2 = "+str(round(meanTrackChi2,2)))
+print("Average container size = "+str(round(meanSizeTrack,1)))
+print("Vertex Check *************************************")
+print("Average chi2 = "+str(round(meanVertexChi2,3)))
+print("Average container size = "+str(round(meanSizeVert,1)))
+print("Proto Check **************************************")
+print("Average DLLK = "+str(round(meanDLLK,3)))
+print("Average container size = "+str(round(meanSizeProto,1)))
diff --git a/Phys/Tesla/tests/options/rightList.py b/Phys/Tesla/tests/options/rightList.py
index 8a16a3de2..1095075e2 100644
--- a/Phys/Tesla/tests/options/rightList.py
+++ b/Phys/Tesla/tests/options/rightList.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Configurables import TeslaLineChecker
 list = ["Hlt2BottomoniumDiKstarTurbo"
 ,"Hlt2CharmHadD02KmPipTurbo"
diff --git a/Phys/TurboCache/options/DisableLoKiCacheFunctors.py b/Phys/TurboCache/options/DisableLoKiCacheFunctors.py
index 29dfb9324..0c62b5dc3 100644
--- a/Phys/TurboCache/options/DisableLoKiCacheFunctors.py
+++ b/Phys/TurboCache/options/DisableLoKiCacheFunctors.py
@@ -9,5 +9,6 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 
+from __future__ import absolute_import
 from Configurables import ApplicationMgr
 ApplicationMgr().Environment['LOKI_DISABLE_CACHE'] = '1'
diff --git a/Phys/TurboCache/options/NoEvents.py b/Phys/TurboCache/options/NoEvents.py
index 1406b15ed..a748f8700 100644
--- a/Phys/TurboCache/options/NoEvents.py
+++ b/Phys/TurboCache/options/NoEvents.py
@@ -8,5 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Tesla.Configuration import Tesla
 Tesla().EvtMax = 0
diff --git a/Phys/TurboCache/options/SilenceErrors.py b/Phys/TurboCache/options/SilenceErrors.py
index 5ddada99e..7bbc801ea 100644
--- a/Phys/TurboCache/options/SilenceErrors.py
+++ b/Phys/TurboCache/options/SilenceErrors.py
@@ -9,5 +9,6 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 # -*- coding: utf-8 -*-
+from __future__ import absolute_import
 from Gaudi.Configuration import MessageSvc, FATAL
 MessageSvc(OutputLevel=FATAL)
diff --git a/Phys/TurboCache/options/Streams_v4r1.py b/Phys/TurboCache/options/Streams_v4r1.py
index 928d767bf..9c99aaa32 100644
--- a/Phys/TurboCache/options/Streams_v4r1.py
+++ b/Phys/TurboCache/options/Streams_v4r1.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from TurboStreamProd.streams import turbo_streams
 from Tesla.Configuration import Tesla
 Tesla().Streams = turbo_streams["2016"]
diff --git a/Phys/TurboCache/options/SuppressLogMessages.py b/Phys/TurboCache/options/SuppressLogMessages.py
index 37e68acd8..7c86c2dac 100644
--- a/Phys/TurboCache/options/SuppressLogMessages.py
+++ b/Phys/TurboCache/options/SuppressLogMessages.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 import logging
 from GaudiKernel.ProcessJobOptions import GetConsoleHandler
 
diff --git a/Phys/TurboCache/options/Tesla_Data_2016_forStreams_v2.py b/Phys/TurboCache/options/Tesla_Data_2016_forStreams_v2.py
index 25a423732..d856c01bf 100755
--- a/Phys/TurboCache/options/Tesla_Data_2016_forStreams_v2.py
+++ b/Phys/TurboCache/options/Tesla_Data_2016_forStreams_v2.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+from __future__ import absolute_import
 from Tesla.Configuration import Tesla
 Tesla().Pack = True
 Tesla().InputType = "RAW"
-- 
GitLab


From 1955185eab3852edc6532f5be5c34513f05722ab Mon Sep 17 00:00:00 2001
From: Marco Clemencic <marco.clemencic@cern.ch>
Date: Sat, 19 Sep 2020 08:34:31 +0200
Subject: [PATCH 2/4] Remove "absolute_import", not needed

---
 DaVinciSys/tests/options/DVTestInitialise.py                     | 1 -
 DaVinciTests/python/DaVinciTests/QMTest/DaVinciExclusions.py     | 1 -
 .../tests/options/CommonParticles/DVTestStandardIntermediate.py  | 1 -
 .../options/CommonParticles/TestStandardIntermediateCuts.py      | 1 -
 DaVinciTests/tests/options/DVTestDecayTreeTuple-MC.py            | 1 -
 DaVinciTests/tests/options/DVTestDecayTreeTuple-TisTos.py        | 1 -
 DaVinciTests/tests/options/DVTestInitialise.py                   | 1 -
 DaVinciTests/tests/options/DVTestReadDst.py                      | 1 -
 DaVinciTests/tests/options/DVTestWriteDst.py                     | 1 -
 DaVinciTests/tests/options/DaVinci-1000events.py                 | 1 -
 DaVinciTests/tests/options/DisableLoKiCacheFunctors.py           | 1 -
 DaVinciTests/tests/options/DisableLoKiPythonFunctors.py          | 1 -
 DaVinciTests/tests/options/EnableCaloReprocessing.py             | 1 -
 DaVinciTests/tests/options/EnableFPEAuditor.py                   | 1 -
 .../tests/options/PID/DaVinci-DST-ANNPID-Upgrade-Test.py         | 1 -
 .../tests/options/Packing/DaVinci-DSTUnpacking-Upgrade-Test.py   | 1 -
 DaVinciTests/tests/options/SimpleMuSelection.py                  | 1 -
 .../tests/options/Tagging/DVTestTagging-Summer2017Opt-Upgrade.py | 1 -
 DaVinciTests/tests/options/Upgrade/DaVinci-Options.py            | 1 -
 DaVinciTests/tests/options/Upgrade/Input-DST.py                  | 1 -
 DaVinciTests/tests/options/Upgrade/Input-MDST.py                 | 1 -
 DaVinciTests/tests/options/Upgrade/Upgrade-DB-tags.py            | 1 -
 DaVinciTests/tests/options/check_mc_output.py                    | 1 -
 DaVinciTests/tests/options/db-global-2010.py                     | 1 -
 DaVinciTests/tests/options/db-latest-2010.py                     | 1 -
 DaVinciTests/tests/options/dimuon_testfile.py                    | 1 -
 DaVinciTests/tests/options/dtfdict.py                            | 1 -
 DaVinciTests/tests/options/fsrs/davinci-merge.py                 | 1 -
 DaVinciTests/tests/options/fsrs/test-genfsr.py                   | 1 -
 DaVinciTests/tests/options/gpython_algs.py                       | 1 -
 Phys/DaVinci/options/DaVinci-Default.py                          | 1 -
 Phys/DaVinci/options/DaVinci-Example.py                          | 1 -
 Phys/DaVinci/options/DaVinci-Simplest.py                         | 1 -
 Phys/DaVinci/options/DaVinciTestData.py                          | 1 -
 Phys/DaVinci/python/DaVinci/Configuration.py                     | 1 -
 Phys/Tesla/options/Turbo.py                                      | 1 -
 Phys/Tesla/options/Turbo_NewLine.py                              | 1 -
 Phys/Tesla/options/Turbo_THRESHOLD.py                            | 1 -
 Phys/Tesla/python/Tesla/Configuration.py                         | 1 -
 Phys/Tesla/tests/options/CheckTurboStreamProd.py                 | 1 -
 Phys/Tesla/tests/options/DV_LineChecker.py                       | 1 -
 Phys/Tesla/tests/options/DV_Upgrade_PVs.py                       | 1 -
 Phys/Tesla/tests/options/TCK_2015RP.py                           | 1 -
 Phys/Tesla/tests/options/analyseAll.py                           | 1 -
 Phys/Tesla/tests/options/analyseInput.py                         | 1 -
 Phys/Tesla/tests/options/analyseOutput.py                        | 1 -
 Phys/Tesla/tests/options/containers.py                           | 1 -
 Phys/Tesla/tests/options/rightList.py                            | 1 -
 Phys/TurboCache/options/DisableLoKiCacheFunctors.py              | 1 -
 Phys/TurboCache/options/NoEvents.py                              | 1 -
 Phys/TurboCache/options/SilenceErrors.py                         | 1 -
 Phys/TurboCache/options/Streams_v4r1.py                          | 1 -
 Phys/TurboCache/options/SuppressLogMessages.py                   | 1 -
 Phys/TurboCache/options/Tesla_Data_2016_forStreams_v2.py         | 1 -
 54 files changed, 54 deletions(-)

diff --git a/DaVinciSys/tests/options/DVTestInitialise.py b/DaVinciSys/tests/options/DVTestInitialise.py
index 2a527c37f..d4fbd2678 100755
--- a/DaVinciSys/tests/options/DVTestInitialise.py
+++ b/DaVinciSys/tests/options/DVTestInitialise.py
@@ -20,7 +20,6 @@ Test for DaVinci initialisation
 @author P. Koppenburg
 @date 2009-01-07
 """
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci
 DaVinci().MainOptions = ""
diff --git a/DaVinciTests/python/DaVinciTests/QMTest/DaVinciExclusions.py b/DaVinciTests/python/DaVinciTests/QMTest/DaVinciExclusions.py
index 9df6c0f20..e8f1b85d1 100755
--- a/DaVinciTests/python/DaVinciTests/QMTest/DaVinciExclusions.py
+++ b/DaVinciTests/python/DaVinciTests/QMTest/DaVinciExclusions.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from GaudiTest import LineSkipper, RegexpReplacer
 from GaudiConf.QMTest.LHCbExclusions import preprocessor as LHCbPreprocessor
 
diff --git a/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py b/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py
index 0b25e142c..b4ff7d29c 100644
--- a/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py
+++ b/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py
@@ -17,7 +17,6 @@
 #
 ##############################################################################
 from __future__ import print_function
-from __future__ import absolute_import
 from DaVinci.Configuration import DaVinci
 from Gaudi.Configuration import *
 ##############################################################################
diff --git a/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py b/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py
index 66cfcffb2..3aa6134d9 100644
--- a/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py
+++ b/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py
@@ -16,7 +16,6 @@
 """
 ##############################################################################
 from __future__ import print_function
-from __future__ import absolute_import
 from DaVinci.Configuration import DaVinci
 from Gaudi.Configuration import *
 #
diff --git a/DaVinciTests/tests/options/DVTestDecayTreeTuple-MC.py b/DaVinciTests/tests/options/DVTestDecayTreeTuple-MC.py
index 13b663c01..333067d89 100755
--- a/DaVinciTests/tests/options/DVTestDecayTreeTuple-MC.py
+++ b/DaVinciTests/tests/options/DVTestDecayTreeTuple-MC.py
@@ -16,7 +16,6 @@
  #  @date 2008-03-07
  #
 
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 from GaudiKernel.SystemOfUnits import *
 ########################################################################
diff --git a/DaVinciTests/tests/options/DVTestDecayTreeTuple-TisTos.py b/DaVinciTests/tests/options/DVTestDecayTreeTuple-TisTos.py
index 41396140e..59be4cce6 100755
--- a/DaVinciTests/tests/options/DVTestDecayTreeTuple-TisTos.py
+++ b/DaVinciTests/tests/options/DVTestDecayTreeTuple-TisTos.py
@@ -16,7 +16,6 @@
  #  @date 2008-03-07
  #
 
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 from GaudiKernel.SystemOfUnits import *
 ########################################################################
diff --git a/DaVinciTests/tests/options/DVTestInitialise.py b/DaVinciTests/tests/options/DVTestInitialise.py
index 5c9961cd2..c4a5e23aa 100755
--- a/DaVinciTests/tests/options/DVTestInitialise.py
+++ b/DaVinciTests/tests/options/DVTestInitialise.py
@@ -20,7 +20,6 @@ Test for DaVinci initialisation
 @author P. Koppenburg
 @date 2009-01-07
 """
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci
 
diff --git a/DaVinciTests/tests/options/DVTestReadDst.py b/DaVinciTests/tests/options/DVTestReadDst.py
index 1c255f150..74d231cf3 100755
--- a/DaVinciTests/tests/options/DVTestReadDst.py
+++ b/DaVinciTests/tests/options/DVTestReadDst.py
@@ -18,7 +18,6 @@
 # @date 2009-02-04
 #
 ########################################################################
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci
 ##############################################################################
diff --git a/DaVinciTests/tests/options/DVTestWriteDst.py b/DaVinciTests/tests/options/DVTestWriteDst.py
index 11f7a724c..c7560e255 100755
--- a/DaVinciTests/tests/options/DVTestWriteDst.py
+++ b/DaVinciTests/tests/options/DVTestWriteDst.py
@@ -21,7 +21,6 @@
 # @date 2009-02-03
 #
 ##############################################################################
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci
 ##############################################################################
diff --git a/DaVinciTests/tests/options/DaVinci-1000events.py b/DaVinciTests/tests/options/DaVinci-1000events.py
index 693a7c8c6..ade4d5550 100644
--- a/DaVinciTests/tests/options/DaVinci-1000events.py
+++ b/DaVinciTests/tests/options/DaVinci-1000events.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci
 
diff --git a/DaVinciTests/tests/options/DisableLoKiCacheFunctors.py b/DaVinciTests/tests/options/DisableLoKiCacheFunctors.py
index 0c62b5dc3..29dfb9324 100644
--- a/DaVinciTests/tests/options/DisableLoKiCacheFunctors.py
+++ b/DaVinciTests/tests/options/DisableLoKiCacheFunctors.py
@@ -9,6 +9,5 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 
-from __future__ import absolute_import
 from Configurables import ApplicationMgr
 ApplicationMgr().Environment['LOKI_DISABLE_CACHE'] = '1'
diff --git a/DaVinciTests/tests/options/DisableLoKiPythonFunctors.py b/DaVinciTests/tests/options/DisableLoKiPythonFunctors.py
index 2557cce52..14f8f50f4 100644
--- a/DaVinciTests/tests/options/DisableLoKiPythonFunctors.py
+++ b/DaVinciTests/tests/options/DisableLoKiPythonFunctors.py
@@ -9,6 +9,5 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 
-from __future__ import absolute_import
 from Configurables import ApplicationMgr
 ApplicationMgr().Environment['LOKI_DISABLE_PYTHON'] = '1'
diff --git a/DaVinciTests/tests/options/EnableCaloReprocessing.py b/DaVinciTests/tests/options/EnableCaloReprocessing.py
index f3823febe..3e97ad3d8 100644
--- a/DaVinciTests/tests/options/EnableCaloReprocessing.py
+++ b/DaVinciTests/tests/options/EnableCaloReprocessing.py
@@ -9,6 +9,5 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 
-from __future__ import absolute_import
 from Configurables import PhysConf
 PhysConf().CaloReProcessing = True
diff --git a/DaVinciTests/tests/options/EnableFPEAuditor.py b/DaVinciTests/tests/options/EnableFPEAuditor.py
index d0a51c5c5..c278e1b37 100644
--- a/DaVinciTests/tests/options/EnableFPEAuditor.py
+++ b/DaVinciTests/tests/options/EnableFPEAuditor.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 
 ApplicationMgr().ExtSvc + [ "AuditorSvc" ]
diff --git a/DaVinciTests/tests/options/PID/DaVinci-DST-ANNPID-Upgrade-Test.py b/DaVinciTests/tests/options/PID/DaVinci-DST-ANNPID-Upgrade-Test.py
index 051fdfdd3..1193d553d 100755
--- a/DaVinciTests/tests/options/PID/DaVinci-DST-ANNPID-Upgrade-Test.py
+++ b/DaVinciTests/tests/options/PID/DaVinci-DST-ANNPID-Upgrade-Test.py
@@ -10,7 +10,6 @@
 ###############################################################################
 
 ########################################################################
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import GaudiSequencer
 from Configurables import DaVinci, PhysConf
diff --git a/DaVinciTests/tests/options/Packing/DaVinci-DSTUnpacking-Upgrade-Test.py b/DaVinciTests/tests/options/Packing/DaVinci-DSTUnpacking-Upgrade-Test.py
index 3dd943dfc..95716a4dd 100755
--- a/DaVinciTests/tests/options/Packing/DaVinci-DSTUnpacking-Upgrade-Test.py
+++ b/DaVinciTests/tests/options/Packing/DaVinci-DSTUnpacking-Upgrade-Test.py
@@ -10,7 +10,6 @@
 ###############################################################################
 
 ########################################################################
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import GaudiSequencer
 from Configurables import DaVinci, PhysConf
diff --git a/DaVinciTests/tests/options/SimpleMuSelection.py b/DaVinciTests/tests/options/SimpleMuSelection.py
index 6bb37d729..8bf2ec6e2 100644
--- a/DaVinciTests/tests/options/SimpleMuSelection.py
+++ b/DaVinciTests/tests/options/SimpleMuSelection.py
@@ -15,7 +15,6 @@
   Long track muons with PT > 1 GeV
 """
 
-from __future__ import absolute_import
 __author__ = 'R. Lambert'
 __date__ = 'November 2009'
 __version__ = '$Revision: 1.3 $'
diff --git a/DaVinciTests/tests/options/Tagging/DVTestTagging-Summer2017Opt-Upgrade.py b/DaVinciTests/tests/options/Tagging/DVTestTagging-Summer2017Opt-Upgrade.py
index 83d883808..71a7b2c67 100644
--- a/DaVinciTests/tests/options/Tagging/DVTestTagging-Summer2017Opt-Upgrade.py
+++ b/DaVinciTests/tests/options/Tagging/DVTestTagging-Summer2017Opt-Upgrade.py
@@ -15,7 +15,6 @@ Example Options for BTagging algorithm
 @date 2010-09-29, 2018-05-03
 """
 
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 import GaudiPython
 from Configurables import GaudiSequencer
diff --git a/DaVinciTests/tests/options/Upgrade/DaVinci-Options.py b/DaVinciTests/tests/options/Upgrade/DaVinci-Options.py
index 39da83700..d94e1186b 100644
--- a/DaVinciTests/tests/options/Upgrade/DaVinci-Options.py
+++ b/DaVinciTests/tests/options/Upgrade/DaVinci-Options.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Configurables import DaVinci
 DaVinci().TupleFile = 'DV-Ntuple.root'
 DaVinci().HistogramFile = 'DV-Histos.root'
diff --git a/DaVinciTests/tests/options/Upgrade/Input-DST.py b/DaVinciTests/tests/options/Upgrade/Input-DST.py
index 0c6a8672e..c639d4029 100644
--- a/DaVinciTests/tests/options/Upgrade/Input-DST.py
+++ b/DaVinciTests/tests/options/Upgrade/Input-DST.py
@@ -8,6 +8,5 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Configurables import DaVinci
 DaVinci().InputType = 'DST'
diff --git a/DaVinciTests/tests/options/Upgrade/Input-MDST.py b/DaVinciTests/tests/options/Upgrade/Input-MDST.py
index e1d8bf497..708990a43 100644
--- a/DaVinciTests/tests/options/Upgrade/Input-MDST.py
+++ b/DaVinciTests/tests/options/Upgrade/Input-MDST.py
@@ -8,6 +8,5 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Configurables import DaVinci
 DaVinci().InputType = 'MDST'
diff --git a/DaVinciTests/tests/options/Upgrade/Upgrade-DB-tags.py b/DaVinciTests/tests/options/Upgrade/Upgrade-DB-tags.py
index 0bcbe7ebf..22f14be88 100644
--- a/DaVinciTests/tests/options/Upgrade/Upgrade-DB-tags.py
+++ b/DaVinciTests/tests/options/Upgrade/Upgrade-DB-tags.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Configurables import LHCbApp, CondDB
 LHCbApp().DDDBtag = "dddb-20171126"
 LHCbApp().CondDBtag = "sim-20171127-vc-md100"
diff --git a/DaVinciTests/tests/options/check_mc_output.py b/DaVinciTests/tests/options/check_mc_output.py
index 395caa385..3c7f42416 100644
--- a/DaVinciTests/tests/options/check_mc_output.py
+++ b/DaVinciTests/tests/options/check_mc_output.py
@@ -10,7 +10,6 @@
 ###############################################################################
 """Check ntuples made from Turbo MC input for correct truth-matching."""
 from __future__ import print_function
-from __future__ import absolute_import
 import sys
 
 import ROOT
diff --git a/DaVinciTests/tests/options/db-global-2010.py b/DaVinciTests/tests/options/db-global-2010.py
index f3d4ac46d..081e9305c 100644
--- a/DaVinciTests/tests/options/db-global-2010.py
+++ b/DaVinciTests/tests/options/db-global-2010.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import LHCbApp, CondDB, DDDBConf
 
diff --git a/DaVinciTests/tests/options/db-latest-2010.py b/DaVinciTests/tests/options/db-latest-2010.py
index c23387fe0..5ebb18ea8 100644
--- a/DaVinciTests/tests/options/db-latest-2010.py
+++ b/DaVinciTests/tests/options/db-latest-2010.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import LHCbApp, CondDB, DDDBConf
 
diff --git a/DaVinciTests/tests/options/dimuon_testfile.py b/DaVinciTests/tests/options/dimuon_testfile.py
index 5467424d8..7618baf7d 100644
--- a/DaVinciTests/tests/options/dimuon_testfile.py
+++ b/DaVinciTests/tests/options/dimuon_testfile.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from PRConfig import TestFileDB
 from Configurables import DaVinci
 
diff --git a/DaVinciTests/tests/options/dtfdict.py b/DaVinciTests/tests/options/dtfdict.py
index bf5fd9561..701aa2189 100644
--- a/DaVinciTests/tests/options/dtfdict.py
+++ b/DaVinciTests/tests/options/dtfdict.py
@@ -14,7 +14,6 @@
 Test of the DFTDict module
 """
 
-from __future__ import absolute_import
 from __future__ import print_function
 __author__ = "Davide Fazzini davide.fazzini@cern.ch"
 
diff --git a/DaVinciTests/tests/options/fsrs/davinci-merge.py b/DaVinciTests/tests/options/fsrs/davinci-merge.py
index cb1221ad2..6f78a868f 100644
--- a/DaVinciTests/tests/options/fsrs/davinci-merge.py
+++ b/DaVinciTests/tests/options/fsrs/davinci-merge.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import InputCopyStream
 
diff --git a/DaVinciTests/tests/options/fsrs/test-genfsr.py b/DaVinciTests/tests/options/fsrs/test-genfsr.py
index 51f30372d..1690ae4a5 100644
--- a/DaVinciTests/tests/options/fsrs/test-genfsr.py
+++ b/DaVinciTests/tests/options/fsrs/test-genfsr.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 
 from Configurables import GaudiSequencer
diff --git a/DaVinciTests/tests/options/gpython_algs.py b/DaVinciTests/tests/options/gpython_algs.py
index 54615ecca..aac47ddfd 100755
--- a/DaVinciTests/tests/options/gpython_algs.py
+++ b/DaVinciTests/tests/options/gpython_algs.py
@@ -24,7 +24,6 @@
 ## Configurables:
 ##
 from __future__ import print_function
-from __future__ import absolute_import
 from Configurables import DaVinci, MessageSvc
 from six.moves import range
 dv = DaVinci(
diff --git a/Phys/DaVinci/options/DaVinci-Default.py b/Phys/DaVinci/options/DaVinci-Default.py
index a6f13cdc4..df0cbceb7 100644
--- a/Phys/DaVinci/options/DaVinci-Default.py
+++ b/Phys/DaVinci/options/DaVinci-Default.py
@@ -16,7 +16,6 @@
 # Author: Juan Palacios <juan.palacios@nikhef.nl>
 #
 ##############################################################################
-from __future__ import absolute_import
 from Configurables import DaVinci
 ##############################################################################
 d = DaVinci()
diff --git a/Phys/DaVinci/options/DaVinci-Example.py b/Phys/DaVinci/options/DaVinci-Example.py
index 82339d08d..8f7b7c2ba 100644
--- a/Phys/DaVinci/options/DaVinci-Example.py
+++ b/Phys/DaVinci/options/DaVinci-Example.py
@@ -18,7 +18,6 @@
  # @author P. Koppenburg based on previous versions
  #
 ##
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci, FilterDesktop, CombineParticles, OfflineVertexFitter
 from PhysSelPython.Wrappers import AutomaticData, Selection, SelectionSequence, DataOnDemand
diff --git a/Phys/DaVinci/options/DaVinci-Simplest.py b/Phys/DaVinci/options/DaVinci-Simplest.py
index 59f048d20..e37777be8 100644
--- a/Phys/DaVinci/options/DaVinci-Simplest.py
+++ b/Phys/DaVinci/options/DaVinci-Simplest.py
@@ -17,7 +17,6 @@
 ########################################################################
 
 
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci
 
diff --git a/Phys/DaVinci/options/DaVinciTestData.py b/Phys/DaVinci/options/DaVinciTestData.py
index e6c4c8acb..650c3e3cc 100644
--- a/Phys/DaVinci/options/DaVinciTestData.py
+++ b/Phys/DaVinci/options/DaVinciTestData.py
@@ -16,7 +16,6 @@
  # @author P. Koppenburg
  #
 ##
-from __future__ import absolute_import
 from Gaudi.Configuration import *
 from Configurables import DaVinci
 
diff --git a/Phys/DaVinci/python/DaVinci/Configuration.py b/Phys/DaVinci/python/DaVinci/Configuration.py
index e27386ea7..5b65ce238 100644
--- a/Phys/DaVinci/python/DaVinci/Configuration.py
+++ b/Phys/DaVinci/python/DaVinci/Configuration.py
@@ -11,7 +11,6 @@
 """
 High level configuration tools for DaVinci
 """
-from __future__ import absolute_import
 __version__ = "$Id: Configuration.py,v 1.125 2010-09-10 11:31:19 jpalac Exp $"
 __author__ = "Juan Palacios <juan.palacios@nikhef.nl>"
 
diff --git a/Phys/Tesla/options/Turbo.py b/Phys/Tesla/options/Turbo.py
index 9f62989ca..51d6b7f8f 100755
--- a/Phys/Tesla/options/Turbo.py
+++ b/Phys/Tesla/options/Turbo.py
@@ -11,7 +11,6 @@
 # SAMPLE FOR TUTORIAL: RunningTesla
 # FOR LATEST SCRIPT SEE Turbo_NewLine.py
 
-from __future__ import absolute_import
 from Configurables import Tesla 
 from Gaudi.Configuration import *
 
diff --git a/Phys/Tesla/options/Turbo_NewLine.py b/Phys/Tesla/options/Turbo_NewLine.py
index 960282f88..d72c6e685 100755
--- a/Phys/Tesla/options/Turbo_NewLine.py
+++ b/Phys/Tesla/options/Turbo_NewLine.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Configurables import Tesla 
 from Gaudi.Configuration import *
 
diff --git a/Phys/Tesla/options/Turbo_THRESHOLD.py b/Phys/Tesla/options/Turbo_THRESHOLD.py
index 63b862ad5..4d6dde263 100755
--- a/Phys/Tesla/options/Turbo_THRESHOLD.py
+++ b/Phys/Tesla/options/Turbo_THRESHOLD.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Configurables import Tesla 
 from Gaudi.Configuration import *
 
diff --git a/Phys/Tesla/python/Tesla/Configuration.py b/Phys/Tesla/python/Tesla/Configuration.py
index 3e3abd6f1..9f52d4344 100644
--- a/Phys/Tesla/python/Tesla/Configuration.py
+++ b/Phys/Tesla/python/Tesla/Configuration.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from __future__ import print_function
 import logging as log
 import os
diff --git a/Phys/Tesla/tests/options/CheckTurboStreamProd.py b/Phys/Tesla/tests/options/CheckTurboStreamProd.py
index 5eb15bb4b..6d6c9c28b 100644
--- a/Phys/Tesla/tests/options/CheckTurboStreamProd.py
+++ b/Phys/Tesla/tests/options/CheckTurboStreamProd.py
@@ -17,7 +17,6 @@ Run with e.g.
 
 """
 from __future__ import print_function
-from __future__ import absolute_import
 import argparse
 import json
 import re
diff --git a/Phys/Tesla/tests/options/DV_LineChecker.py b/Phys/Tesla/tests/options/DV_LineChecker.py
index ef459f315..db252eeb4 100644
--- a/Phys/Tesla/tests/options/DV_LineChecker.py
+++ b/Phys/Tesla/tests/options/DV_LineChecker.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Configurables import DaVinci
 from Configurables import TeslaLineChecker
 from Configurables import CondDB
diff --git a/Phys/Tesla/tests/options/DV_Upgrade_PVs.py b/Phys/Tesla/tests/options/DV_Upgrade_PVs.py
index 506381f97..62dd9d527 100644
--- a/Phys/Tesla/tests/options/DV_Upgrade_PVs.py
+++ b/Phys/Tesla/tests/options/DV_Upgrade_PVs.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from __future__ import print_function
 from Gaudi.Configuration import *
 from LHCbKernel.Configuration import *
diff --git a/Phys/Tesla/tests/options/TCK_2015RP.py b/Phys/Tesla/tests/options/TCK_2015RP.py
index 4ea046737..cbd27719a 100644
--- a/Phys/Tesla/tests/options/TCK_2015RP.py
+++ b/Phys/Tesla/tests/options/TCK_2015RP.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Configurables import Tesla 
 Tesla().Pack = True
 Tesla().DataType = '2015'
diff --git a/Phys/Tesla/tests/options/analyseAll.py b/Phys/Tesla/tests/options/analyseAll.py
index fffefc17e..84eb554cf 100644
--- a/Phys/Tesla/tests/options/analyseAll.py
+++ b/Phys/Tesla/tests/options/analyseAll.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from subprocess import call
 import os
 import six
diff --git a/Phys/Tesla/tests/options/analyseInput.py b/Phys/Tesla/tests/options/analyseInput.py
index 05d79f1f0..b615d577d 100644
--- a/Phys/Tesla/tests/options/analyseInput.py
+++ b/Phys/Tesla/tests/options/analyseInput.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from __future__ import print_function
 import sys
 
diff --git a/Phys/Tesla/tests/options/analyseOutput.py b/Phys/Tesla/tests/options/analyseOutput.py
index e7195ecc5..a43078497 100644
--- a/Phys/Tesla/tests/options/analyseOutput.py
+++ b/Phys/Tesla/tests/options/analyseOutput.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from __future__ import print_function
 import sys
 
diff --git a/Phys/Tesla/tests/options/containers.py b/Phys/Tesla/tests/options/containers.py
index 5f0b1a225..1c2999b08 100644
--- a/Phys/Tesla/tests/options/containers.py
+++ b/Phys/Tesla/tests/options/containers.py
@@ -11,7 +11,6 @@
 # Options file for the QMTest to check that the containers have not
 # changed, either in values or in size.
 
-from __future__ import absolute_import
 from __future__ import print_function
 from Configurables import Tesla
 from Gaudi.Configuration import *
diff --git a/Phys/Tesla/tests/options/rightList.py b/Phys/Tesla/tests/options/rightList.py
index 1095075e2..8a16a3de2 100644
--- a/Phys/Tesla/tests/options/rightList.py
+++ b/Phys/Tesla/tests/options/rightList.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Configurables import TeslaLineChecker
 list = ["Hlt2BottomoniumDiKstarTurbo"
 ,"Hlt2CharmHadD02KmPipTurbo"
diff --git a/Phys/TurboCache/options/DisableLoKiCacheFunctors.py b/Phys/TurboCache/options/DisableLoKiCacheFunctors.py
index 0c62b5dc3..29dfb9324 100644
--- a/Phys/TurboCache/options/DisableLoKiCacheFunctors.py
+++ b/Phys/TurboCache/options/DisableLoKiCacheFunctors.py
@@ -9,6 +9,5 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 
-from __future__ import absolute_import
 from Configurables import ApplicationMgr
 ApplicationMgr().Environment['LOKI_DISABLE_CACHE'] = '1'
diff --git a/Phys/TurboCache/options/NoEvents.py b/Phys/TurboCache/options/NoEvents.py
index a748f8700..1406b15ed 100644
--- a/Phys/TurboCache/options/NoEvents.py
+++ b/Phys/TurboCache/options/NoEvents.py
@@ -8,6 +8,5 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Tesla.Configuration import Tesla
 Tesla().EvtMax = 0
diff --git a/Phys/TurboCache/options/SilenceErrors.py b/Phys/TurboCache/options/SilenceErrors.py
index 7bbc801ea..5ddada99e 100644
--- a/Phys/TurboCache/options/SilenceErrors.py
+++ b/Phys/TurboCache/options/SilenceErrors.py
@@ -9,6 +9,5 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 # -*- coding: utf-8 -*-
-from __future__ import absolute_import
 from Gaudi.Configuration import MessageSvc, FATAL
 MessageSvc(OutputLevel=FATAL)
diff --git a/Phys/TurboCache/options/Streams_v4r1.py b/Phys/TurboCache/options/Streams_v4r1.py
index 9c99aaa32..928d767bf 100644
--- a/Phys/TurboCache/options/Streams_v4r1.py
+++ b/Phys/TurboCache/options/Streams_v4r1.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from TurboStreamProd.streams import turbo_streams
 from Tesla.Configuration import Tesla
 Tesla().Streams = turbo_streams["2016"]
diff --git a/Phys/TurboCache/options/SuppressLogMessages.py b/Phys/TurboCache/options/SuppressLogMessages.py
index 7c86c2dac..37e68acd8 100644
--- a/Phys/TurboCache/options/SuppressLogMessages.py
+++ b/Phys/TurboCache/options/SuppressLogMessages.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 import logging
 from GaudiKernel.ProcessJobOptions import GetConsoleHandler
 
diff --git a/Phys/TurboCache/options/Tesla_Data_2016_forStreams_v2.py b/Phys/TurboCache/options/Tesla_Data_2016_forStreams_v2.py
index d856c01bf..25a423732 100755
--- a/Phys/TurboCache/options/Tesla_Data_2016_forStreams_v2.py
+++ b/Phys/TurboCache/options/Tesla_Data_2016_forStreams_v2.py
@@ -8,7 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-from __future__ import absolute_import
 from Tesla.Configuration import Tesla
 Tesla().Pack = True
 Tesla().InputType = "RAW"
-- 
GitLab


From 52dae1f35698165b4f660e7dbe02f1c3ce29b5c2 Mon Sep 17 00:00:00 2001
From: Marco Clemencic <marco.clemencic@cern.ch>
Date: Sat, 19 Sep 2020 07:34:00 +0000
Subject: [PATCH 3/4] Avoid unnecessary changes

---
 .../CommonParticles/DVTestStandardIntermediate.py |  3 +--
 .../TestStandardIntermediateCuts.py               |  2 +-
 DaVinciTests/tests/options/gpython_algs.py        |  1 -
 Phys/DaVinci/python/DaVinci/Configuration.py      |  2 +-
 Phys/Tesla/python/Tesla/Configuration.py          |  2 +-
 Phys/Tesla/tests/options/analyseAll.py            |  3 +--
 Phys/Tesla/tests/options/analyseInput.py          | 15 ++++++---------
 Phys/Tesla/tests/options/analyseOutput.py         |  4 +---
 8 files changed, 12 insertions(+), 20 deletions(-)

diff --git a/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py b/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py
index b4ff7d29c..271c25785 100644
--- a/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py
+++ b/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py
@@ -23,10 +23,9 @@ from Gaudi.Configuration import *
 #
 from CommonParticles import StandardBasic
 from CommonParticles import StandardIntermediate
-import six
 
 Locations = []
-for a,b in six.iteritems(StandardIntermediate.locations):
+for a,b in StandardIntermediate.locations.items():
     print("DVTestCommonParticles adding location", a)
     Locations.append(a)
 
diff --git a/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py b/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py
index 3aa6134d9..8a53f9de7 100644
--- a/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py
+++ b/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py
@@ -24,7 +24,7 @@ from CommonParticles import StandardIntermediate
 
 List = []
 
-for a,b in StandardIntermediate.locations.iter():
+for a,b in StandardIntermediate.locations.items():
     print("DVTestCommonParticles adding location", a)
     List.append(b)                      # list of algorithms
 
diff --git a/DaVinciTests/tests/options/gpython_algs.py b/DaVinciTests/tests/options/gpython_algs.py
index aac47ddfd..a0de6624f 100755
--- a/DaVinciTests/tests/options/gpython_algs.py
+++ b/DaVinciTests/tests/options/gpython_algs.py
@@ -25,7 +25,6 @@
 ##
 from __future__ import print_function
 from Configurables import DaVinci, MessageSvc
-from six.moves import range
 dv = DaVinci(
     DataType = "Upgrade",
     Simulation = True,
diff --git a/Phys/DaVinci/python/DaVinci/Configuration.py b/Phys/DaVinci/python/DaVinci/Configuration.py
index 5b65ce238..94063ca86 100644
--- a/Phys/DaVinci/python/DaVinci/Configuration.py
+++ b/Phys/DaVinci/python/DaVinci/Configuration.py
@@ -650,7 +650,7 @@ class DaVinci(LHCbConfigurableUser) :
         def _set_root_in_tes_ ( s , root  ) :
             #
             if isinstance ( s , str ) : return
-            prps = list(s.getProperties().keys())
+            prps = set(s.getProperties())
             if 'RootInTES' in prps :
                 if not s.isPropertySet ( 'RootInTES' ) :
                     log.info ( "Set RootInTES=%s for %s" % ( root , s.getName() ) )
diff --git a/Phys/Tesla/python/Tesla/Configuration.py b/Phys/Tesla/python/Tesla/Configuration.py
index 9f52d4344..235aaa2ad 100644
--- a/Phys/Tesla/python/Tesla/Configuration.py
+++ b/Phys/Tesla/python/Tesla/Configuration.py
@@ -1381,7 +1381,7 @@ class Tesla(LHCbConfigurableUser):
         # Load the raw event format dictionaries
         RawEventFormatConf().loadIfRequired()
 
-        locs = list(RawEventLocationsToBanks(output_format).keys())
+        locs = list(RawEventLocationsToBanks(output_format))
         return [os.path.join('/Event', l) + '#1' for l in locs]
 
     def __apply_configuration__(self):
diff --git a/Phys/Tesla/tests/options/analyseAll.py b/Phys/Tesla/tests/options/analyseAll.py
index 84eb554cf..256310a88 100644
--- a/Phys/Tesla/tests/options/analyseAll.py
+++ b/Phys/Tesla/tests/options/analyseAll.py
@@ -10,13 +10,12 @@
 ###############################################################################
 from subprocess import call
 import os
-import six
 exec(compile(open(os.path.expandvars("$TESLAROOT/tests/options/streams.py"), "rb").read(), os.path.expandvars("$TESLAROOT/tests/options/streams.py"), 'exec'))
 exit_code = call(["python",os.path.expandvars("$TESLAROOT/tests/options/analyseInput.py")])
 if exit_code:
     exit( exit_code )
 
-for stream,lines in six.iteritems(turbo_streams):
+for stream,lines in turbo_streams.items():
     exit_code = call(["python",os.path.expandvars("$TESLAROOT/tests/options/analyseOutput.py"),stream])
     if exit_code:
         exit( exit_code )
diff --git a/Phys/Tesla/tests/options/analyseInput.py b/Phys/Tesla/tests/options/analyseInput.py
index b615d577d..a2cd2b91e 100644
--- a/Phys/Tesla/tests/options/analyseInput.py
+++ b/Phys/Tesla/tests/options/analyseInput.py
@@ -21,9 +21,6 @@ from Configurables import (
   CondDB
 )
 from DAQSys.Decoders import DecoderDB
-import six
-from six.moves import map
-from six.moves import range
         
 
 lhcbApp = LHCbApp()
@@ -54,7 +51,7 @@ exec(compile(open(os.path.expandvars("$TESLAROOT/tests/options/streams.py"), "rb
 
 decsPerStream = {}
 evtsPerStream = {}
-for stream, lines in six.iteritems(turbo_streams):
+for stream, lines in turbo_streams.items():
     decsPerStream[stream] = 0
     evtsPerStream[stream] = 0
 
@@ -65,7 +62,7 @@ def routing_bits(rawevent):
     assert rbbanks.size() == 1  # stop if we have multiple rb banks                                                     
     d = rbbanks[rbbanks.size() - 1].data()  # get last bank                                                             
     bits = "{:032b}{:032b}{:032b}".format(d[2], d[1], d[0])
-    return list(map(int, reversed(bits)))
+    return [int(b) for b in reversed(bits)]
 
 # Number of events has to be the same as in TeslaStepsStreams.py
 for i in range(0,500):
@@ -85,19 +82,19 @@ for i in range(0,500):
         continue
     else:
         found = {}
-        for stream, lines in six.iteritems(turbo_streams):
+        for stream, lines in turbo_streams.items():
             found[stream] = False
 
-        for name,dec in six.iteritems(evt["Hlt2/DecReports"].decReports()):
+        for name,dec in evt["Hlt2/DecReports"].decReports().items():
             if name == 'Hlt2Global':
                 continue
             if dec.decision()==1:
-                for stream, lines in six.iteritems(turbo_streams):
+                for stream, lines in turbo_streams.items():
                     if name[:-8] in lines["lines"]:
                         decsPerStream[stream] = decsPerStream[stream] + 1
                         found[stream] = True
                         
-        for stream, lines in six.iteritems(turbo_streams):
+        for stream, lines in turbo_streams.items():
             if found[stream]:
                 evtsPerStream[stream] =  evtsPerStream[stream] + 1
 
diff --git a/Phys/Tesla/tests/options/analyseOutput.py b/Phys/Tesla/tests/options/analyseOutput.py
index a43078497..d842e81cc 100644
--- a/Phys/Tesla/tests/options/analyseOutput.py
+++ b/Phys/Tesla/tests/options/analyseOutput.py
@@ -22,8 +22,6 @@ from Configurables import (
   CondDB
 )
 from DAQSys.Decoders import DecoderDB
-import six
-from six.moves import range
         
 
 lhcbApp = LHCbApp()
@@ -84,7 +82,7 @@ for i in range(0,10000):
         continue
     else:
         allEvents = allEvents + 1
-        for name,dec in six.iteritems(evt[decLocation].decReports()):
+        for name,dec in evt[decLocation].decReports().items():
             if name == 'Hlt2Global':
                 continue
             if dec.decision()==1:
-- 
GitLab


From 04e43ba9547c3cffa8de7239aeb0bf3e295da31d Mon Sep 17 00:00:00 2001
From: Marco Clemencic <marco.clemencic@cern.ch>
Date: Sat, 19 Sep 2020 14:57:40 +0200
Subject: [PATCH 4/4] Update copyright date

---
 .../tests/options/CommonParticles/DVTestStandardIntermediate.py | 2 +-
 .../options/CommonParticles/TestStandardIntermediateCuts.py     | 2 +-
 DaVinciTests/tests/options/dtfdict.py                           | 2 +-
 DaVinciTests/tests/options/gpython_algs.py                      | 2 +-
 Phys/DaVinci/python/DaVinci/Configuration.py                    | 2 +-
 Phys/Tesla/python/Tesla/Configuration.py                        | 2 +-
 Phys/Tesla/tests/options/DV_Upgrade_PVs.py                      | 2 +-
 Phys/Tesla/tests/options/analyseAll.py                          | 2 +-
 Phys/Tesla/tests/options/analyseInput.py                        | 2 +-
 Phys/Tesla/tests/options/analyseOutput.py                       | 2 +-
 Phys/Tesla/tests/options/containers.py                          | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py b/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py
index 271c25785..c67f93873 100644
--- a/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py
+++ b/DaVinciTests/tests/options/CommonParticles/DVTestStandardIntermediate.py
@@ -1,5 +1,5 @@
 ###############################################################################
-# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration      #
+# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
 # This software is distributed under the terms of the GNU General Public      #
 # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
diff --git a/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py b/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py
index 8a53f9de7..79975acc7 100644
--- a/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py
+++ b/DaVinciTests/tests/options/CommonParticles/TestStandardIntermediateCuts.py
@@ -1,5 +1,5 @@
 ###############################################################################
-# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration      #
+# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
 # This software is distributed under the terms of the GNU General Public      #
 # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
diff --git a/DaVinciTests/tests/options/dtfdict.py b/DaVinciTests/tests/options/dtfdict.py
index 701aa2189..00e8c8c34 100644
--- a/DaVinciTests/tests/options/dtfdict.py
+++ b/DaVinciTests/tests/options/dtfdict.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 ###############################################################################
-# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration      #
+# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
 # This software is distributed under the terms of the GNU General Public      #
 # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
diff --git a/DaVinciTests/tests/options/gpython_algs.py b/DaVinciTests/tests/options/gpython_algs.py
index a0de6624f..e14801924 100755
--- a/DaVinciTests/tests/options/gpython_algs.py
+++ b/DaVinciTests/tests/options/gpython_algs.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 ###############################################################################
-# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration      #
+# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
 # This software is distributed under the terms of the GNU General Public      #
 # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
diff --git a/Phys/DaVinci/python/DaVinci/Configuration.py b/Phys/DaVinci/python/DaVinci/Configuration.py
index 94063ca86..70150a3fd 100644
--- a/Phys/DaVinci/python/DaVinci/Configuration.py
+++ b/Phys/DaVinci/python/DaVinci/Configuration.py
@@ -1,5 +1,5 @@
 ###############################################################################
-# (c) Copyright 2000-2019 CERN for the benefit of the LHCb Collaboration      #
+# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
 # This software is distributed under the terms of the GNU General Public      #
 # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
diff --git a/Phys/Tesla/python/Tesla/Configuration.py b/Phys/Tesla/python/Tesla/Configuration.py
index 235aaa2ad..98efb0b66 100644
--- a/Phys/Tesla/python/Tesla/Configuration.py
+++ b/Phys/Tesla/python/Tesla/Configuration.py
@@ -1,5 +1,5 @@
 ###############################################################################
-# (c) Copyright 2000-2019 CERN for the benefit of the LHCb Collaboration      #
+# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
 # This software is distributed under the terms of the GNU General Public      #
 # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
diff --git a/Phys/Tesla/tests/options/DV_Upgrade_PVs.py b/Phys/Tesla/tests/options/DV_Upgrade_PVs.py
index 62dd9d527..f4e319701 100644
--- a/Phys/Tesla/tests/options/DV_Upgrade_PVs.py
+++ b/Phys/Tesla/tests/options/DV_Upgrade_PVs.py
@@ -1,5 +1,5 @@
 ###############################################################################
-# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration      #
+# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
 # This software is distributed under the terms of the GNU General Public      #
 # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
diff --git a/Phys/Tesla/tests/options/analyseAll.py b/Phys/Tesla/tests/options/analyseAll.py
index 256310a88..82aa0b342 100644
--- a/Phys/Tesla/tests/options/analyseAll.py
+++ b/Phys/Tesla/tests/options/analyseAll.py
@@ -1,5 +1,5 @@
 ###############################################################################
-# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration      #
+# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
 # This software is distributed under the terms of the GNU General Public      #
 # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
diff --git a/Phys/Tesla/tests/options/analyseInput.py b/Phys/Tesla/tests/options/analyseInput.py
index a2cd2b91e..48fae6365 100644
--- a/Phys/Tesla/tests/options/analyseInput.py
+++ b/Phys/Tesla/tests/options/analyseInput.py
@@ -1,5 +1,5 @@
 ###############################################################################
-# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration      #
+# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
 # This software is distributed under the terms of the GNU General Public      #
 # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
diff --git a/Phys/Tesla/tests/options/analyseOutput.py b/Phys/Tesla/tests/options/analyseOutput.py
index d842e81cc..151ed575a 100644
--- a/Phys/Tesla/tests/options/analyseOutput.py
+++ b/Phys/Tesla/tests/options/analyseOutput.py
@@ -1,5 +1,5 @@
 ###############################################################################
-# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration      #
+# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
 # This software is distributed under the terms of the GNU General Public      #
 # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
diff --git a/Phys/Tesla/tests/options/containers.py b/Phys/Tesla/tests/options/containers.py
index 1c2999b08..c825ba2f2 100644
--- a/Phys/Tesla/tests/options/containers.py
+++ b/Phys/Tesla/tests/options/containers.py
@@ -1,5 +1,5 @@
 ###############################################################################
-# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration      #
+# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
 # This software is distributed under the terms of the GNU General Public      #
 # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
-- 
GitLab