From 487062c048809420de1b008bc9d17815a8c4fbdb Mon Sep 17 00:00:00 2001 From: Yunhua Feng Date: Fri, 21 Sep 2018 15:36:42 +0800 Subject: [PATCH] BaseTools: Remove the "from __future__ import" items Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Liming Gao --- BaseTools/Source/Python/AutoGen/AutoGen.py | 2 -- BaseTools/Source/Python/AutoGen/BuildEngine.py | 1 - BaseTools/Source/Python/AutoGen/GenC.py | 1 - BaseTools/Source/Python/AutoGen/GenMake.py | 1 - BaseTools/Source/Python/AutoGen/GenPcdDb.py | 1 - BaseTools/Source/Python/AutoGen/IdfClassObject.py | 1 - BaseTools/Source/Python/AutoGen/StrGather.py | 1 - BaseTools/Source/Python/AutoGen/UniClassObject.py | 1 - BaseTools/Source/Python/BPDG/BPDG.py | 2 -- BaseTools/Source/Python/BPDG/GenVpd.py | 1 - BaseTools/Source/Python/Common/Database.py | 1 - BaseTools/Source/Python/Common/EdkLogger.py | 1 - BaseTools/Source/Python/Common/Expression.py | 2 -- BaseTools/Source/Python/Common/LongFilePathOs.py | 1 - BaseTools/Source/Python/Common/Misc.py | 1 - BaseTools/Source/Python/Common/Parsing.py | 1 - BaseTools/Source/Python/Common/RangeExpression.py | 1 - BaseTools/Source/Python/Common/StringUtils.py | 1 - BaseTools/Source/Python/Common/TargetTxtClassObject.py | 2 -- BaseTools/Source/Python/Common/ToolDefClassObject.py | 1 - BaseTools/Source/Python/Common/VpdInfoFile.py | 1 - BaseTools/Source/Python/GenFds/AprioriSection.py | 1 - BaseTools/Source/Python/GenFds/Capsule.py | 1 - BaseTools/Source/Python/GenFds/CapsuleData.py | 1 - BaseTools/Source/Python/GenFds/CompressSection.py | 1 - BaseTools/Source/Python/GenFds/DataSection.py | 1 - BaseTools/Source/Python/GenFds/DepexSection.py | 1 - BaseTools/Source/Python/GenFds/EfiSection.py | 1 - BaseTools/Source/Python/GenFds/Fd.py | 1 - BaseTools/Source/Python/GenFds/FdfParser.py | 2 -- BaseTools/Source/Python/GenFds/FfsFileStatement.py | 1 - BaseTools/Source/Python/GenFds/FfsInfStatement.py | 1 - BaseTools/Source/Python/GenFds/Fv.py | 1 - BaseTools/Source/Python/GenFds/FvImageSection.py | 1 - BaseTools/Source/Python/GenFds/GenFds.py | 2 -- BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 1 - BaseTools/Source/Python/GenFds/GuidSection.py | 1 - BaseTools/Source/Python/GenFds/OptRomFileStatement.py | 1 - BaseTools/Source/Python/GenFds/OptRomInfStatement.py | 1 - BaseTools/Source/Python/GenFds/OptionRom.py | 1 - BaseTools/Source/Python/GenFds/Region.py | 1 - BaseTools/Source/Python/GenFds/RuleComplexFile.py | 1 - BaseTools/Source/Python/GenFds/RuleSimpleFile.py | 1 - BaseTools/Source/Python/GenFds/Section.py | 1 - BaseTools/Source/Python/GenFds/UiSection.py | 1 - BaseTools/Source/Python/GenFds/VerSection.py | 1 - BaseTools/Source/Python/GenFds/Vtf.py | 1 - BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py | 1 - BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py | 1 - .../Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKeys.py | 1 - BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py | 1 - BaseTools/Source/Python/Table/TableDataModel.py | 1 - BaseTools/Source/Python/Table/TableDec.py | 1 - BaseTools/Source/Python/Table/TableDsc.py | 1 - BaseTools/Source/Python/Table/TableEotReport.py | 1 - BaseTools/Source/Python/Table/TableFdf.py | 1 - BaseTools/Source/Python/Table/TableFile.py | 1 - BaseTools/Source/Python/Table/TableFunction.py | 1 - BaseTools/Source/Python/Table/TableIdentifier.py | 1 - BaseTools/Source/Python/Table/TableInf.py | 1 - BaseTools/Source/Python/Table/TablePcd.py | 1 - BaseTools/Source/Python/Table/TableQuery.py | 1 - BaseTools/Source/Python/Table/TableReport.py | 1 - BaseTools/Source/Python/TargetTool/TargetTool.py | 1 - BaseTools/Source/Python/Workspace/DscBuildData.py | 2 -- BaseTools/Source/Python/Workspace/InfBuildData.py | 1 - BaseTools/Source/Python/Workspace/MetaFileParser.py | 2 -- BaseTools/Source/Python/Workspace/MetaFileTable.py | 1 - BaseTools/Source/Python/Workspace/WorkspaceCommon.py | 1 - BaseTools/Source/Python/Workspace/WorkspaceDatabase.py | 1 - BaseTools/Source/Python/build/build.py | 1 - 71 files changed, 79 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 7c0bb47f77..b0aa4838e9 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -15,8 +15,6 @@ ## Import Modules # -from __future__ import print_function -from __future__ import absolute_import import Common.LongFilePathOs as os import re import os.path as path diff --git a/BaseTools/Source/Python/AutoGen/BuildEngine.py b/BaseTools/Source/Python/AutoGen/BuildEngine.py index ac7a668755..86a3c09ad5 100644 --- a/BaseTools/Source/Python/AutoGen/BuildEngine.py +++ b/BaseTools/Source/Python/AutoGen/BuildEngine.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import print_function import Common.LongFilePathOs as os import re import copy diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 09626d0b96..c189269d4d 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -13,7 +13,6 @@ ## Import Modules # -from __future__ import absolute_import import string import collections import struct diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py index b4377eef17..bf84e6c63f 100644 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -13,7 +13,6 @@ ## Import Modules # -from __future__ import absolute_import import Common.LongFilePathOs as os import sys import string diff --git a/BaseTools/Source/Python/AutoGen/GenPcdDb.py b/BaseTools/Source/Python/AutoGen/GenPcdDb.py index 876fcf1efb..fff717d579 100644 --- a/BaseTools/Source/Python/AutoGen/GenPcdDb.py +++ b/BaseTools/Source/Python/AutoGen/GenPcdDb.py @@ -10,7 +10,6 @@ # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # -from __future__ import absolute_import from io import BytesIO from Common.Misc import * from Common.StringUtils import StringToArray diff --git a/BaseTools/Source/Python/AutoGen/IdfClassObject.py b/BaseTools/Source/Python/AutoGen/IdfClassObject.py index b227b10258..f96a16abab 100644 --- a/BaseTools/Source/Python/AutoGen/IdfClassObject.py +++ b/BaseTools/Source/Python/AutoGen/IdfClassObject.py @@ -13,7 +13,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.EdkLogger as EdkLogger from Common.BuildToolError import * from Common.StringUtils import GetLineNo diff --git a/BaseTools/Source/Python/AutoGen/StrGather.py b/BaseTools/Source/Python/AutoGen/StrGather.py index 361d499076..3f384db1df 100644 --- a/BaseTools/Source/Python/AutoGen/StrGather.py +++ b/BaseTools/Source/Python/AutoGen/StrGather.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import re import Common.EdkLogger as EdkLogger from Common.BuildToolError import * diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py index 384f31b165..b435ffa569 100644 --- a/BaseTools/Source/Python/AutoGen/UniClassObject.py +++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py @@ -16,7 +16,6 @@ ## # Import Modules # -from __future__ import print_function import Common.LongFilePathOs as os, codecs, re import distutils.util import Common.EdkLogger as EdkLogger diff --git a/BaseTools/Source/Python/BPDG/BPDG.py b/BaseTools/Source/Python/BPDG/BPDG.py index 2ec1516c0a..15d4261677 100644 --- a/BaseTools/Source/Python/BPDG/BPDG.py +++ b/BaseTools/Source/Python/BPDG/BPDG.py @@ -20,8 +20,6 @@ ## # Import Modules # -from __future__ import print_function -from __future__ import absolute_import import Common.LongFilePathOs as os import sys import encodings.ascii diff --git a/BaseTools/Source/Python/BPDG/GenVpd.py b/BaseTools/Source/Python/BPDG/GenVpd.py index d7852d29ee..5dcd422f8b 100644 --- a/BaseTools/Source/Python/BPDG/GenVpd.py +++ b/BaseTools/Source/Python/BPDG/GenVpd.py @@ -13,7 +13,6 @@ # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # -from __future__ import absolute_import import Common.LongFilePathOs as os from io import BytesIO from . import StringTable as st diff --git a/BaseTools/Source/Python/Common/Database.py b/BaseTools/Source/Python/Common/Database.py index 1c543aeb41..0888edf37a 100644 --- a/BaseTools/Source/Python/Common/Database.py +++ b/BaseTools/Source/Python/Common/Database.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import sqlite3 import Common.LongFilePathOs as os diff --git a/BaseTools/Source/Python/Common/EdkLogger.py b/BaseTools/Source/Python/Common/EdkLogger.py index af7707482c..d70b24e642 100644 --- a/BaseTools/Source/Python/Common/EdkLogger.py +++ b/BaseTools/Source/Python/Common/EdkLogger.py @@ -12,7 +12,6 @@ # ## Import modules -from __future__ import absolute_import import Common.LongFilePathOs as os, sys, logging import traceback from .BuildToolError import * diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py index ff9271031b..78a8a0bb0f 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -12,8 +12,6 @@ ## Import Modules # -from __future__ import print_function -from __future__ import absolute_import from Common.GlobalData import * from CommonDataClass.Exceptions import BadExpression from CommonDataClass.Exceptions import WrnExpression diff --git a/BaseTools/Source/Python/Common/LongFilePathOs.py b/BaseTools/Source/Python/Common/LongFilePathOs.py index 53528546b7..5e409e2030 100644 --- a/BaseTools/Source/Python/Common/LongFilePathOs.py +++ b/BaseTools/Source/Python/Common/LongFilePathOs.py @@ -11,7 +11,6 @@ # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # -from __future__ import absolute_import import os from . import LongFilePathOsPath from Common.LongFilePathSupport import LongFilePath diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index 0efd8b05a8..5e7b163939 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.LongFilePathOs as os import sys import string diff --git a/BaseTools/Source/Python/Common/Parsing.py b/BaseTools/Source/Python/Common/Parsing.py index 889251b699..ad90afab80 100644 --- a/BaseTools/Source/Python/Common/Parsing.py +++ b/BaseTools/Source/Python/Common/Parsing.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import from .StringUtils import * from CommonDataClass.DataClass import * from .DataType import * diff --git a/BaseTools/Source/Python/Common/RangeExpression.py b/BaseTools/Source/Python/Common/RangeExpression.py index 407dc06ccf..5449d2d1af 100644 --- a/BaseTools/Source/Python/Common/RangeExpression.py +++ b/BaseTools/Source/Python/Common/RangeExpression.py @@ -12,7 +12,6 @@ # # Import Modules # -from __future__ import print_function from Common.GlobalData import * from CommonDataClass.Exceptions import BadExpression from CommonDataClass.Exceptions import WrnExpression diff --git a/BaseTools/Source/Python/Common/StringUtils.py b/BaseTools/Source/Python/Common/StringUtils.py index d5afde7a95..005dbd09bb 100644 --- a/BaseTools/Source/Python/Common/StringUtils.py +++ b/BaseTools/Source/Python/Common/StringUtils.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import re from . import DataType import Common.LongFilePathOs as os diff --git a/BaseTools/Source/Python/Common/TargetTxtClassObject.py b/BaseTools/Source/Python/Common/TargetTxtClassObject.py index 55a2f56482..35b170e086 100644 --- a/BaseTools/Source/Python/Common/TargetTxtClassObject.py +++ b/BaseTools/Source/Python/Common/TargetTxtClassObject.py @@ -14,8 +14,6 @@ ## # Import Modules # -from __future__ import print_function -from __future__ import absolute_import import Common.LongFilePathOs as os from . import EdkLogger from . import DataType diff --git a/BaseTools/Source/Python/Common/ToolDefClassObject.py b/BaseTools/Source/Python/Common/ToolDefClassObject.py index 05a1ddfbcc..5a961c3d94 100644 --- a/BaseTools/Source/Python/Common/ToolDefClassObject.py +++ b/BaseTools/Source/Python/Common/ToolDefClassObject.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.LongFilePathOs as os import re from . import EdkLogger diff --git a/BaseTools/Source/Python/Common/VpdInfoFile.py b/BaseTools/Source/Python/Common/VpdInfoFile.py index 0485bf482e..bae184f040 100644 --- a/BaseTools/Source/Python/Common/VpdInfoFile.py +++ b/BaseTools/Source/Python/Common/VpdInfoFile.py @@ -15,7 +15,6 @@ # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # -from __future__ import print_function import Common.LongFilePathOs as os import re import Common.EdkLogger as EdkLogger diff --git a/BaseTools/Source/Python/GenFds/AprioriSection.py b/BaseTools/Source/Python/GenFds/AprioriSection.py index 7196f7f2c7..aaa919d7a8 100644 --- a/BaseTools/Source/Python/GenFds/AprioriSection.py +++ b/BaseTools/Source/Python/GenFds/AprioriSection.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from struct import * import Common.LongFilePathOs as os from io import BytesIO diff --git a/BaseTools/Source/Python/GenFds/Capsule.py b/BaseTools/Source/Python/GenFds/Capsule.py index baa6e1dfa2..238cb4e918 100644 --- a/BaseTools/Source/Python/GenFds/Capsule.py +++ b/BaseTools/Source/Python/GenFds/Capsule.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from .GenFdsGlobalVariable import GenFdsGlobalVariable from .GenFdsGlobalVariable import FindExtendTool from CommonDataClass.FdfClass import CapsuleClassObject diff --git a/BaseTools/Source/Python/GenFds/CapsuleData.py b/BaseTools/Source/Python/GenFds/CapsuleData.py index 0caba8983d..1a592189b3 100644 --- a/BaseTools/Source/Python/GenFds/CapsuleData.py +++ b/BaseTools/Source/Python/GenFds/CapsuleData.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from . import Ffs from .GenFdsGlobalVariable import GenFdsGlobalVariable from io import BytesIO diff --git a/BaseTools/Source/Python/GenFds/CompressSection.py b/BaseTools/Source/Python/GenFds/CompressSection.py index aaaabf84dc..65f6782275 100644 --- a/BaseTools/Source/Python/GenFds/CompressSection.py +++ b/BaseTools/Source/Python/GenFds/CompressSection.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from .Ffs import Ffs from . import Section import subprocess diff --git a/BaseTools/Source/Python/GenFds/DataSection.py b/BaseTools/Source/Python/GenFds/DataSection.py index a6387b07c5..182ea4f3da 100644 --- a/BaseTools/Source/Python/GenFds/DataSection.py +++ b/BaseTools/Source/Python/GenFds/DataSection.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from . import Section from .GenFdsGlobalVariable import GenFdsGlobalVariable import subprocess diff --git a/BaseTools/Source/Python/GenFds/DepexSection.py b/BaseTools/Source/Python/GenFds/DepexSection.py index b2d123bfc0..1868f0aab7 100644 --- a/BaseTools/Source/Python/GenFds/DepexSection.py +++ b/BaseTools/Source/Python/GenFds/DepexSection.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from . import Section from .GenFdsGlobalVariable import GenFdsGlobalVariable import subprocess diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py index 623b77d274..fa2148ec7b 100644 --- a/BaseTools/Source/Python/GenFds/EfiSection.py +++ b/BaseTools/Source/Python/GenFds/EfiSection.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from struct import * from . import Section from .GenFdsGlobalVariable import GenFdsGlobalVariable diff --git a/BaseTools/Source/Python/GenFds/Fd.py b/BaseTools/Source/Python/GenFds/Fd.py index bfae121798..bb58928afa 100644 --- a/BaseTools/Source/Python/GenFds/Fd.py +++ b/BaseTools/Source/Python/GenFds/Fd.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from . import Region from . import Fv import Common.LongFilePathOs as os diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index 63687e98bb..d18b0a3328 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -16,8 +16,6 @@ ## # Import Modules # -from __future__ import print_function -from __future__ import absolute_import import re from . import Fd diff --git a/BaseTools/Source/Python/GenFds/FfsFileStatement.py b/BaseTools/Source/Python/GenFds/FfsFileStatement.py index 4c35aac76a..558a3f75c0 100644 --- a/BaseTools/Source/Python/GenFds/FfsFileStatement.py +++ b/BaseTools/Source/Python/GenFds/FfsFileStatement.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from . import Ffs from . import Rule import Common.LongFilePathOs as os diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py index 6149bc81b4..43b9c90b77 100644 --- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py +++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py @@ -16,7 +16,6 @@ ## # Import Modules # -from __future__ import absolute_import from . import Rule import Common.LongFilePathOs as os from io import BytesIO diff --git a/BaseTools/Source/Python/GenFds/Fv.py b/BaseTools/Source/Python/GenFds/Fv.py index 0d005ebf5b..2bca6d7341 100644 --- a/BaseTools/Source/Python/GenFds/Fv.py +++ b/BaseTools/Source/Python/GenFds/Fv.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import ## @file # process FV generation # diff --git a/BaseTools/Source/Python/GenFds/FvImageSection.py b/BaseTools/Source/Python/GenFds/FvImageSection.py index 04556fc870..3278a8befa 100644 --- a/BaseTools/Source/Python/GenFds/FvImageSection.py +++ b/BaseTools/Source/Python/GenFds/FvImageSection.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from . import Section from io import BytesIO from .Ffs import Ffs diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py index 9dec9c5eb5..5c22755bb7 100644 --- a/BaseTools/Source/Python/GenFds/GenFds.py +++ b/BaseTools/Source/Python/GenFds/GenFds.py @@ -15,8 +15,6 @@ ## # Import Modules # -from __future__ import print_function -from __future__ import absolute_import from optparse import OptionParser import sys import Common.LongFilePathOs as os diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py index 14578a92a9..1f3ca10779 100644 --- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py +++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import print_function import Common.LongFilePathOs as os import sys import subprocess diff --git a/BaseTools/Source/Python/GenFds/GuidSection.py b/BaseTools/Source/Python/GenFds/GuidSection.py index fd660737f4..1f0c87dd7e 100644 --- a/BaseTools/Source/Python/GenFds/GuidSection.py +++ b/BaseTools/Source/Python/GenFds/GuidSection.py @@ -16,7 +16,6 @@ ## # Import Modules # -from __future__ import absolute_import from . import Section import subprocess from .Ffs import Ffs diff --git a/BaseTools/Source/Python/GenFds/OptRomFileStatement.py b/BaseTools/Source/Python/GenFds/OptRomFileStatement.py index e56174ec3c..5d03250158 100644 --- a/BaseTools/Source/Python/GenFds/OptRomFileStatement.py +++ b/BaseTools/Source/Python/GenFds/OptRomFileStatement.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.LongFilePathOs as os from .GenFdsGlobalVariable import GenFdsGlobalVariable diff --git a/BaseTools/Source/Python/GenFds/OptRomInfStatement.py b/BaseTools/Source/Python/GenFds/OptRomInfStatement.py index e416b838d1..c5d106fd85 100644 --- a/BaseTools/Source/Python/GenFds/OptRomInfStatement.py +++ b/BaseTools/Source/Python/GenFds/OptRomInfStatement.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from . import RuleSimpleFile from . import RuleComplexFile from . import Section diff --git a/BaseTools/Source/Python/GenFds/OptionRom.py b/BaseTools/Source/Python/GenFds/OptionRom.py index bb7071fa7f..ebe30fec58 100644 --- a/BaseTools/Source/Python/GenFds/OptionRom.py +++ b/BaseTools/Source/Python/GenFds/OptionRom.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.LongFilePathOs as os import subprocess diff --git a/BaseTools/Source/Python/GenFds/Region.py b/BaseTools/Source/Python/GenFds/Region.py index 5242b74c9e..457861fa57 100644 --- a/BaseTools/Source/Python/GenFds/Region.py +++ b/BaseTools/Source/Python/GenFds/Region.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from struct import * from .GenFdsGlobalVariable import GenFdsGlobalVariable from io import BytesIO diff --git a/BaseTools/Source/Python/GenFds/RuleComplexFile.py b/BaseTools/Source/Python/GenFds/RuleComplexFile.py index c357fedbd3..066156a2f6 100644 --- a/BaseTools/Source/Python/GenFds/RuleComplexFile.py +++ b/BaseTools/Source/Python/GenFds/RuleComplexFile.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from . import Rule from CommonDataClass.FdfClass import RuleComplexFileClassObject diff --git a/BaseTools/Source/Python/GenFds/RuleSimpleFile.py b/BaseTools/Source/Python/GenFds/RuleSimpleFile.py index 7aa184e7d8..4e6b9231a2 100644 --- a/BaseTools/Source/Python/GenFds/RuleSimpleFile.py +++ b/BaseTools/Source/Python/GenFds/RuleSimpleFile.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from . import Rule from CommonDataClass.FdfClass import RuleSimpleFileClassObject diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py index 19a70009dc..61dc32762b 100644 --- a/BaseTools/Source/Python/GenFds/Section.py +++ b/BaseTools/Source/Python/GenFds/Section.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from CommonDataClass.FdfClass import SectionClassObject from .GenFdsGlobalVariable import GenFdsGlobalVariable import Common.LongFilePathOs as os, glob diff --git a/BaseTools/Source/Python/GenFds/UiSection.py b/BaseTools/Source/Python/GenFds/UiSection.py index 24f2f3ca93..ba0534fa49 100644 --- a/BaseTools/Source/Python/GenFds/UiSection.py +++ b/BaseTools/Source/Python/GenFds/UiSection.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from . import Section from .Ffs import Ffs import subprocess diff --git a/BaseTools/Source/Python/GenFds/VerSection.py b/BaseTools/Source/Python/GenFds/VerSection.py index db71fe9653..eb3e930755 100644 --- a/BaseTools/Source/Python/GenFds/VerSection.py +++ b/BaseTools/Source/Python/GenFds/VerSection.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from .Ffs import Ffs from . import Section import Common.LongFilePathOs as os diff --git a/BaseTools/Source/Python/GenFds/Vtf.py b/BaseTools/Source/Python/GenFds/Vtf.py index 5cb2d4acfb..6a8294afb0 100644 --- a/BaseTools/Source/Python/GenFds/Vtf.py +++ b/BaseTools/Source/Python/GenFds/Vtf.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import from .GenFdsGlobalVariable import GenFdsGlobalVariable import Common.LongFilePathOs as os from CommonDataClass.FdfClass import VtfClassObject diff --git a/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py b/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py index 1be0a28177..3b54d19887 100644 --- a/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py +++ b/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py @@ -17,7 +17,6 @@ # #====================================== External Libraries ======================================== -from __future__ import print_function import optparse import Common.LongFilePathOs as os import re diff --git a/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py b/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py index a44781f2e8..47677cc28e 100644 --- a/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py +++ b/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py @@ -19,7 +19,6 @@ ''' Pkcs7Sign ''' -from __future__ import print_function import os import sys diff --git a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKeys.py b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKeys.py index a34dac423b..1be360f743 100644 --- a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKeys.py +++ b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKeys.py @@ -22,7 +22,6 @@ ''' Rsa2048Sha256GenerateKeys ''' -from __future__ import print_function import os import sys diff --git a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py index 3fd7eefd6a..50a442dd4a 100644 --- a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py +++ b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py @@ -17,7 +17,6 @@ ''' Rsa2048Sha256Sign ''' -from __future__ import print_function import os import sys diff --git a/BaseTools/Source/Python/Table/TableDataModel.py b/BaseTools/Source/Python/Table/TableDataModel.py index b01c3ecf6a..9f3e008bc6 100644 --- a/BaseTools/Source/Python/Table/TableDataModel.py +++ b/BaseTools/Source/Python/Table/TableDataModel.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.EdkLogger as EdkLogger import CommonDataClass.DataClass as DataClass from Table.Table import Table diff --git a/BaseTools/Source/Python/Table/TableDec.py b/BaseTools/Source/Python/Table/TableDec.py index 1d887dc1e1..532c15971a 100644 --- a/BaseTools/Source/Python/Table/TableDec.py +++ b/BaseTools/Source/Python/Table/TableDec.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.EdkLogger as EdkLogger import CommonDataClass.DataClass as DataClass from Table.Table import Table diff --git a/BaseTools/Source/Python/Table/TableDsc.py b/BaseTools/Source/Python/Table/TableDsc.py index 0a45f7f5b6..886b752aa8 100644 --- a/BaseTools/Source/Python/Table/TableDsc.py +++ b/BaseTools/Source/Python/Table/TableDsc.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import ## @file # This file is used to create/update/query/erase table for dsc datas # diff --git a/BaseTools/Source/Python/Table/TableEotReport.py b/BaseTools/Source/Python/Table/TableEotReport.py index 6f2fb37189..2567411dd7 100644 --- a/BaseTools/Source/Python/Table/TableEotReport.py +++ b/BaseTools/Source/Python/Table/TableEotReport.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.EdkLogger as EdkLogger import Common.LongFilePathOs as os, time from Table.Table import Table diff --git a/BaseTools/Source/Python/Table/TableFdf.py b/BaseTools/Source/Python/Table/TableFdf.py index 668f56269a..5b5e0d3f57 100644 --- a/BaseTools/Source/Python/Table/TableFdf.py +++ b/BaseTools/Source/Python/Table/TableFdf.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.EdkLogger as EdkLogger import CommonDataClass.DataClass as DataClass from Table.Table import Table diff --git a/BaseTools/Source/Python/Table/TableFile.py b/BaseTools/Source/Python/Table/TableFile.py index 805a528cea..bfcea583a9 100644 --- a/BaseTools/Source/Python/Table/TableFile.py +++ b/BaseTools/Source/Python/Table/TableFile.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.EdkLogger as EdkLogger from Table.Table import Table from Common.StringUtils import ConvertToSqlString diff --git a/BaseTools/Source/Python/Table/TableFunction.py b/BaseTools/Source/Python/Table/TableFunction.py index ee677cf107..ebaddc5fff 100644 --- a/BaseTools/Source/Python/Table/TableFunction.py +++ b/BaseTools/Source/Python/Table/TableFunction.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.EdkLogger as EdkLogger from Table.Table import Table from Common.StringUtils import ConvertToSqlString diff --git a/BaseTools/Source/Python/Table/TableIdentifier.py b/BaseTools/Source/Python/Table/TableIdentifier.py index 6b658cf357..1d00c35f96 100644 --- a/BaseTools/Source/Python/Table/TableIdentifier.py +++ b/BaseTools/Source/Python/Table/TableIdentifier.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.EdkLogger as EdkLogger from Common.StringUtils import ConvertToSqlString from Table.Table import Table diff --git a/BaseTools/Source/Python/Table/TableInf.py b/BaseTools/Source/Python/Table/TableInf.py index e0ffb170f9..0401d46d6b 100644 --- a/BaseTools/Source/Python/Table/TableInf.py +++ b/BaseTools/Source/Python/Table/TableInf.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.EdkLogger as EdkLogger import CommonDataClass.DataClass as DataClass from Table.Table import Table diff --git a/BaseTools/Source/Python/Table/TablePcd.py b/BaseTools/Source/Python/Table/TablePcd.py index 5096862e6e..caa82b7324 100644 --- a/BaseTools/Source/Python/Table/TablePcd.py +++ b/BaseTools/Source/Python/Table/TablePcd.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.EdkLogger as EdkLogger from Table.Table import Table from Common.StringUtils import ConvertToSqlString diff --git a/BaseTools/Source/Python/Table/TableQuery.py b/BaseTools/Source/Python/Table/TableQuery.py index 8e7d313c71..fa807b882b 100644 --- a/BaseTools/Source/Python/Table/TableQuery.py +++ b/BaseTools/Source/Python/Table/TableQuery.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.EdkLogger as EdkLogger from Common.StringUtils import ConvertToSqlString from Table.Table import Table diff --git a/BaseTools/Source/Python/Table/TableReport.py b/BaseTools/Source/Python/Table/TableReport.py index 00022962ff..54977010a2 100644 --- a/BaseTools/Source/Python/Table/TableReport.py +++ b/BaseTools/Source/Python/Table/TableReport.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import Common.EdkLogger as EdkLogger import Common.LongFilePathOs as os, time from Table.Table import Table diff --git a/BaseTools/Source/Python/TargetTool/TargetTool.py b/BaseTools/Source/Python/TargetTool/TargetTool.py index 8d523a6ab8..f9f7d34135 100644 --- a/BaseTools/Source/Python/TargetTool/TargetTool.py +++ b/BaseTools/Source/Python/TargetTool/TargetTool.py @@ -12,7 +12,6 @@ # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # -from __future__ import print_function import Common.LongFilePathOs as os import sys import traceback diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index 39db945fb8..8d1535e6e3 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -17,8 +17,6 @@ # This class is used to retrieve information stored in database and convert them # into PlatformBuildClassObject form for easier use for AutoGen. # -from __future__ import print_function -from __future__ import absolute_import from Common.StringUtils import * from Common.DataType import * from Common.Misc import * diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/Source/Python/Workspace/InfBuildData.py index 44d44d24eb..c606b1a404 100644 --- a/BaseTools/Source/Python/Workspace/InfBuildData.py +++ b/BaseTools/Source/Python/Workspace/InfBuildData.py @@ -12,7 +12,6 @@ # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # -from __future__ import absolute_import from Common.DataType import * from Common.Misc import * from Common.caching import cached_property, cached_class_function diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index f1707c06fe..a3ff733f7e 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -15,8 +15,6 @@ ## # Import Modules # -from __future__ import print_function -from __future__ import absolute_import import Common.LongFilePathOs as os import re import time diff --git a/BaseTools/Source/Python/Workspace/MetaFileTable.py b/BaseTools/Source/Python/Workspace/MetaFileTable.py index e0a0b8d923..89fe97d60a 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileTable.py +++ b/BaseTools/Source/Python/Workspace/MetaFileTable.py @@ -14,7 +14,6 @@ ## # Import Modules # -from __future__ import absolute_import import uuid import Common.EdkLogger as EdkLogger diff --git a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py index 8d8a3e2789..4b9180334f 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py @@ -11,7 +11,6 @@ # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # -from __future__ import absolute_import from collections import OrderedDict, defaultdict from Common.DataType import SUP_MODULE_USER_DEFINED from .BuildClassObject import LibraryClassObject diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py index 3bb287b8b2..50ffe308aa 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py @@ -15,7 +15,6 @@ ## # Import Modules # -from __future__ import absolute_import import sqlite3 from Common.StringUtils import * from Common.DataType import * diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index d74082fc26..314eda7870 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -16,7 +16,6 @@ ## # Import Modules # -from __future__ import print_function import Common.LongFilePathOs as os import re from io import BytesIO