From e96ef93d18831630687b6c026bed89a1f9149c90 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 1 May 2021 13:46:29 -0400 Subject: refactor: remove unneeded backward.py shims Removed were: - StringIO - configparser - string_class - unicode_class - range - zip_longest - get_thread_id - path_types - shlex_quote - reprlib --- coverage/debug.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'coverage/debug.py') diff --git a/coverage/debug.py b/coverage/debug.py index 194f16f5..efcaca2a 100644 --- a/coverage/debug.py +++ b/coverage/debug.py @@ -6,16 +6,17 @@ import contextlib import functools import inspect +import io import itertools import os import pprint +import reprlib import sys try: import _thread except ImportError: import thread as _thread -from coverage.backward import reprlib, StringIO from coverage.misc import isolate_module os = isolate_module(os) @@ -86,7 +87,7 @@ class DebugControl(object): class DebugControlString(DebugControl): """A `DebugControl` that writes to a StringIO, for testing.""" def __init__(self, options): - super(DebugControlString, self).__init__(options, StringIO()) + super(DebugControlString, self).__init__(options, io.StringIO()) def get_output(self): """Get the output text from the `DebugControl`.""" -- cgit v1.2.1