Python2+3: Add some actions before patching.