summaryrefslogtreecommitdiff
path: root/coverage/execfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/execfile.py')
-rw-r--r--coverage/execfile.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/coverage/execfile.py b/coverage/execfile.py
index b5d3a65f..93dffcd1 100644
--- a/coverage/execfile.py
+++ b/coverage/execfile.py
@@ -16,7 +16,6 @@ from coverage import env
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
from coverage.python import get_python_source
os = isolate_module(os)
@@ -274,8 +273,7 @@ def make_code_from_py(filename):
except (OSError, NoSource) as exc:
raise NoSource(f"No file to run: '{filename}'") from exc
- code = compile_unicode(source, filename, "exec")
- return code
+ return compile(source, filename, "exec")
def make_code_from_pyc(filename):