From aaaecc47a8bbe21bc047e589e34bec6e18f928f6 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 3 Jun 2023 12:47:30 +0100 Subject: [PATCH] using names of modules that are identical to commonly-used python modules (even at the leaf-node) is causing import problems --- src/openpower/decoder/isa/caller.py | 2 +- src/openpower/decoder/power_table.py | 2 +- src/openpower/insndb/asm.py | 8 ++++---- src/openpower/insndb/db.py | 2 +- src/openpower/insndb/{types.py => dbtypes.py} | 0 src/openpower/insndb/disasm.py | 2 +- src/openpower/sv/sv_binutils.py | 4 ++-- src/openpower/sv/sv_binutils_fptrans.py | 2 +- src/openpower/sv/trans/test_pysvp64dis.py | 2 +- src/openpower/sv/trans/test_pysvp64dis_branch.py | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) rename src/openpower/insndb/{types.py => dbtypes.py} (100%) diff --git a/src/openpower/decoder/isa/caller.py b/src/openpower/decoder/isa/caller.py index 29691b92..3934d2cd 100644 --- a/src/openpower/decoder/isa/caller.py +++ b/src/openpower/decoder/isa/caller.py @@ -35,7 +35,7 @@ from openpower.decoder.power_enums import (FPTRANS_INSNS, CRInSel, CROutSel, SVP64RMMode, SVPType, XER_bits, insns, spr_byname, spr_dict, BFP_FLAG_NAMES) -from openpower.insndb.types import SVP64Instruction +from openpower.insndb.dbtypes import SVP64Instruction from openpower.decoder.power_svp64 import SVP64RM, decode_extra from openpower.decoder.selectable_int import (FieldSelectableInt, SelectableInt, selectconcat, diff --git a/src/openpower/decoder/power_table.py b/src/openpower/decoder/power_table.py index 7b83ba50..2af39c8d 100644 --- a/src/openpower/decoder/power_table.py +++ b/src/openpower/decoder/power_table.py @@ -1,6 +1,6 @@ import collections from openpower.decoder.power_enums import find_wiki_dir -from openpower.insndb.types import Database +from openpower.insndb.dbtypes import Database from openpower.util import log sections = {} diff --git a/src/openpower/insndb/asm.py b/src/openpower/insndb/asm.py index 8ed34b8d..534d9a0c 100644 --- a/src/openpower/insndb/asm.py +++ b/src/openpower/insndb/asm.py @@ -28,10 +28,10 @@ from openpower.decoder.pseudo.pagereader import ISA from openpower.decoder.power_svp64 import SVP64RM, get_regtype, decode_extra from openpower.decoder.selectable_int import SelectableInt from openpower.consts import SVP64MODE -from openpower.insndb.types import SVP64Instruction -from openpower.insndb.types import Database -from openpower.insndb.types import Style -from openpower.insndb.types import WordInstruction +from openpower.insndb.dbtypes import SVP64Instruction +from openpower.insndb.dbtypes import Database +from openpower.insndb.dbtypes import Style +from openpower.insndb.dbtypes import WordInstruction from openpower.decoder.power_enums import find_wiki_dir # for debug logging diff --git a/src/openpower/insndb/db.py b/src/openpower/insndb/db.py index 753ab626..b16e6cae 100644 --- a/src/openpower/insndb/db.py +++ b/src/openpower/insndb/db.py @@ -5,7 +5,7 @@ import sys from openpower.decoder.power_enums import ( find_wiki_dir, ) -from openpower.insndb.types import ( +from openpower.insndb.dbtypes import ( Database, Visitor, ) diff --git a/src/openpower/insndb/types.py b/src/openpower/insndb/dbtypes.py similarity index 100% rename from src/openpower/insndb/types.py rename to src/openpower/insndb/dbtypes.py diff --git a/src/openpower/insndb/disasm.py b/src/openpower/insndb/disasm.py index 720963ba..adaa5a63 100644 --- a/src/openpower/insndb/disasm.py +++ b/src/openpower/insndb/disasm.py @@ -6,7 +6,7 @@ import os from openpower.decoder.power_enums import ( find_wiki_dir, ) -from openpower.insndb.types import ( +from openpower.insndb.dbtypes import ( Style, Database, WordInstruction, diff --git a/src/openpower/sv/sv_binutils.py b/src/openpower/sv/sv_binutils.py index f08f70c6..85f94e80 100644 --- a/src/openpower/sv/sv_binutils.py +++ b/src/openpower/sv/sv_binutils.py @@ -22,8 +22,8 @@ from openpower.decoder.power_enums import ( find_wiki_dir as _find_wiki_dir, ) from openpower.consts import SVP64MODE as _SVP64MODE -from openpower.insndb.types import Database as _Database -from openpower.insndb.types import SVP64Instruction as _SVP64Instruction +from openpower.insndb.dbtypes import Database as _Database +from openpower.insndb.dbtypes import SVP64Instruction as _SVP64Instruction DISCLAIMER = """\ diff --git a/src/openpower/sv/sv_binutils_fptrans.py b/src/openpower/sv/sv_binutils_fptrans.py index ac26657b..34cba32e 100644 --- a/src/openpower/sv/sv_binutils_fptrans.py +++ b/src/openpower/sv/sv_binutils_fptrans.py @@ -8,7 +8,7 @@ from openpower.decoder.power_enums import ( FPTRANS_INSNS as _FPTRANS_INSNS, find_wiki_dir as _find_wiki_dir, ) -from openpower.insndb.types import ( +from openpower.insndb.dbtypes import ( Database as _Database, StaticOperand as _StaticOperand, WordInstruction as _WordInstruction, diff --git a/src/openpower/sv/trans/test_pysvp64dis.py b/src/openpower/sv/trans/test_pysvp64dis.py index 96667dba..e3ddfddd 100644 --- a/src/openpower/sv/trans/test_pysvp64dis.py +++ b/src/openpower/sv/trans/test_pysvp64dis.py @@ -1,7 +1,7 @@ from openpower.simulator.program import Program from openpower.insndb.disasm import load, dump from openpower.insndb.asm import SVP64Asm -from openpower.insndb.types import Database, Style +from openpower.insndb.dbtypes import Database, Style from openpower.decoder.power_enums import find_wiki_dir from openpower.sv import sv_binutils_fptrans import unittest diff --git a/src/openpower/sv/trans/test_pysvp64dis_branch.py b/src/openpower/sv/trans/test_pysvp64dis_branch.py index 5132c24d..63572847 100644 --- a/src/openpower/sv/trans/test_pysvp64dis_branch.py +++ b/src/openpower/sv/trans/test_pysvp64dis_branch.py @@ -1,7 +1,7 @@ from openpower.simulator.program import Program from openpower.insndb.disasm import load, dump from openpower.insndb.asm import SVP64Asm -from openpower.insndb.types import Database, Style +from openpower.insndb.dbtypes import Database, Style from openpower.decoder.power_enums import find_wiki_dir from openpower.sv import sv_binutils_fptrans import unittest -- 2.30.2