make patch_detail python3-compatible