1111
1212from types import FrameType
1313from typing import (
14- cast , Any , Callable , Dict , List , Mapping , Optional , Set , Tuple , Type , TypeVar ,
14+ cast , Any , Callable , Dict , List , Mapping , Optional , Set , Type , TypeVar ,
1515)
1616
1717from coverage import env
2424from coverage .plugin import CoveragePlugin
2525from coverage .pytracer import PyTracer
2626from coverage .types import (
27- TArc , TFileDisposition , TLineNo , TTraceData , TTraceFn , TTracer , TWarnFn ,
27+ TArc , TFileDisposition , TTraceData , TTraceFn , TTracer , TWarnFn ,
2828)
2929
3030os = isolate_module (os )
@@ -330,18 +330,9 @@ def start(self) -> None:
330330
331331 self .tracers = []
332332
333- # Check to see whether we had a fullcoverage tracer installed. If so,
334- # get the stack frames it stashed away for us.
335- traces0 : List [Tuple [Tuple [FrameType , str , Any ], TLineNo ]] = []
336- fn0 = sys .gettrace ()
337- if fn0 :
338- tracer0 = getattr (fn0 , '__self__' , None )
339- if tracer0 :
340- traces0 = getattr (tracer0 , 'traces' , [])
341-
342333 try :
343334 # Install the tracer on this thread.
344- fn = self ._start_tracer ()
335+ self ._start_tracer ()
345336 except :
346337 if self ._collectors :
347338 self ._collectors [- 1 ].resume ()
@@ -351,13 +342,6 @@ def start(self) -> None:
351342 # stack of collectors.
352343 self ._collectors .append (self )
353344
354- # Replay all the events from fullcoverage into the new trace function.
355- for (frame , event , arg ), lineno in traces0 :
356- try :
357- fn (frame , event , arg , lineno = lineno )
358- except TypeError as ex :
359- raise RuntimeError ("fullcoverage must be run with the C trace function." ) from ex
360-
361345 # Install our installation tracer in threading, to jump-start other
362346 # threads.
363347 if self .threading :
0 commit comments