summaryrefslogtreecommitdiff
path: root/coverage/inorout.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-05-01 14:15:50 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-05-01 16:24:37 -0400
commit7db98362f368ac569edf66228d52cbc64a6d69aa (patch)
tree491c7c3736ca60ceeda3d29e3f4186954e3e572a /coverage/inorout.py
parent775c14a764ff3fd32bcd25d91f4c0f635722ed50 (diff)
downloadpython-coveragepy-git-7db98362f368ac569edf66228d52cbc64a6d69aa.tar.gz
refactor: remove yet more unneeded backward.py shims
Gone are: - PYC_MAGIC_NUMBER - code_object - SimpleNamespace
Diffstat (limited to 'coverage/inorout.py')
-rw-r--r--coverage/inorout.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/coverage/inorout.py b/coverage/inorout.py
index 532634eb..554d34c4 100644
--- a/coverage/inorout.py
+++ b/coverage/inorout.py
@@ -13,7 +13,7 @@ import sysconfig
import traceback
from coverage import env
-from coverage.backward import code_object, importlib_util_find_spec
+from coverage.backward import importlib_util_find_spec
from coverage.disposition import FileDisposition, disposition_init
from coverage.files import TreeMatcher, FnmatchMatcher, ModuleMatcher
from coverage.files import prep_patterns, find_python_files, canonical_filename
@@ -162,7 +162,7 @@ def add_stdlib_paths(paths):
# objects still have the file names. So dig into one to find
# the path to exclude. The "filename" might be synthetic,
# don't be fooled by those.
- structseq_file = code_object(_structseq.structseq_new).co_filename
+ structseq_file = _structseq.structseq_new.__code__.co_filename
if not structseq_file.startswith("<"):
paths.add(canonical_path(structseq_file))