Skip to content

Migrating JobTransforms modules to Python 3 with futurize as a first step

To improve the visibility of the functional changes in !22401 (closed) where all changes were squashed into one commit, a new topic branch will help make everything more clear and help to identify possible errors.

First various changes concerning type checks and a safer usage of comparison operators are made for all modules:

  • Generators/EvgenJobTransforms
  • PhysicsAnalysis/PATJobTransforms
  • Reconstruction/RecJobTransforms
  • Simulation/SimuJobTransforms
  • Tools/PyJobTransforms

After applying these changes running futurize will ensure the compatibility for both Python 2/3.


  1. PyJobTransforms fully migrated + locally tested
  2. SimuJobTransforms fully migrated + locally tested
  3. RecJobTransforms fully migrated + locally tested
  4. PATJobTransforms fully migrated + locally tested
  5. EvgenJobTransforms fully migrated + locally tested


  • Validated the changes with the JobTransforms unit tests (Tools/PyJobTransforms/test/
  • Checked the build with the manual Tier0 test (
  • Checked against previously failed tests from the CI build:
    • --AMI q440 --maxEvents=5
    • --AMIConfig d1498 --inputHITSFile /cvmfs/ --inputRDO_BKGFile /cvmfs/ --outputRDOFile myRDO.pool.root --imf False --athenaopts=" --pmon=sdmonfp" --maxEvents=10
    • --AMIConfig s3126 --inputEVNTFile /cvmfs/ --outputHITSFile myHITS.pool.root --postInclude 'EVNTtoHITS:PyJobTransforms/' --imf False --maxEvents=10

Result: AthSimulation doesn't seem to support the necessary libraries for a futurize migration (yet).

Edited by Pascal Rene Baehr

Merge request reports