From 8864274426361a54dd7b13f4edcf3585bc55fd03 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Thu, 21 Nov 2024 16:50:50 +0100 Subject: [PATCH] Avoid using past module for python2/3 compatibility --- FWCore/ParameterSet/python/Types.py | 2 +- FWCore/PythonUtilities/scripts/generateEDF.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/FWCore/ParameterSet/python/Types.py b/FWCore/ParameterSet/python/Types.py index 1511dcb470e8c..9afb0c86c4278 100644 --- a/FWCore/ParameterSet/python/Types.py +++ b/FWCore/ParameterSet/python/Types.py @@ -3,12 +3,12 @@ from .Mixins import _ValidatingParameterListBase, specialImportRegistry from .Mixins import saveOrigin from .ExceptionHandling import format_typename, format_outerframe -from past.builtins import long import codecs import copy import math import builtins +long = int _builtin_bool = bool class _Untracked(object): diff --git a/FWCore/PythonUtilities/scripts/generateEDF.py b/FWCore/PythonUtilities/scripts/generateEDF.py index 938308f8f0ab7..a7a75ebc16dd8 100755 --- a/FWCore/PythonUtilities/scripts/generateEDF.py +++ b/FWCore/PythonUtilities/scripts/generateEDF.py @@ -2,7 +2,6 @@ from builtins import zip from builtins import object -from past.utils import old_div from builtins import range import sys import re @@ -15,6 +14,9 @@ sepRE = re.compile (r'[\s,;:]+') nonSpaceRE = re.compile (r'\S') +def old_div(a, b): + return a // b + ########################## ## #################### ## ## ## LumiInfo Class ## ##