--- a/eric7/DebugClients/Python/coverage/execfile.py Sun Jan 16 20:28:42 2022 +0100 +++ b/eric7/DebugClients/Python/coverage/execfile.py Sat Jan 22 14:44:56 2022 +0100 @@ -13,7 +13,7 @@ import types from coverage import env -from coverage.exceptions import CoverageException, ExceptionDuringRun, NoCode, NoSource +from coverage.exceptions import CoverageException, _ExceptionDuringRun, NoCode, NoSource from coverage.files import canonical_filename, python_reported_file from coverage.misc import isolate_module from coverage.phystokens import compile_unicode @@ -144,7 +144,7 @@ self.arg0 = try_filename break else: - raise NoSource("Can't find '__main__' module in '%s'" % self.arg0) + raise NoSource(f"Can't find '__main__' module in '{self.arg0}'") # Make a spec. I don't know if this is the right way to do it. try_filename = python_reported_file(try_filename) @@ -233,7 +233,7 @@ err2.__traceback__ = err2.__traceback__.tb_next sys.__excepthook__(typ2, err2, tb2.tb_next) sys.stderr.write("\nOriginal exception was:\n") - raise ExceptionDuringRun(typ, err, tb.tb_next) from exc + raise _ExceptionDuringRun(typ, err, tb.tb_next) from exc else: sys.exit(1) finally: @@ -293,7 +293,7 @@ # match or we won't run the file. magic = fpyc.read(4) if magic != PYC_MAGIC_NUMBER: - raise NoCode(f"Bad magic number in .pyc file: {magic} != {PYC_MAGIC_NUMBER}") + raise NoCode(f"Bad magic number in .pyc file: {magic!r} != {PYC_MAGIC_NUMBER!r}") date_based = True if env.PYBEHAVIOR.hashed_pyc_pep552: