42
42
""" .strip ()
43
43
DISABLE_DEBUGGER_DETECTION_DESC = """
44
44
When specified, disables debugger detection. breakpoint(), pdb.set_trace(), etc.
45
- will be interrupted.
45
+ will be interrupted by the timeout .
46
46
""" .strip ()
47
47
48
48
# bdb covers pdb, ipdb, and possibly others
@@ -364,16 +364,14 @@ def _parse_marker(marker):
364
364
"""
365
365
if not marker .args and not marker .kwargs :
366
366
raise TypeError ("Timeout marker must have at least one argument" )
367
- timeout = method = func_only = disable_debugger_detection = NOTSET = object ()
367
+ timeout = method = func_only = NOTSET = object ()
368
368
for kw , val in marker .kwargs .items ():
369
369
if kw == "timeout" :
370
370
timeout = val
371
371
elif kw == "method" :
372
372
method = val
373
373
elif kw == "func_only" :
374
374
func_only = val
375
- elif kw == "disable_debugger_detection" :
376
- disable_debugger_detection = val
377
375
else :
378
376
raise TypeError ("Invalid keyword argument for timeout marker: %s" % kw )
379
377
if len (marker .args ) >= 1 and timeout is not NOTSET :
@@ -384,23 +382,15 @@ def _parse_marker(marker):
384
382
raise TypeError ("Multiple values for method argument of timeout marker" )
385
383
elif len (marker .args ) >= 2 :
386
384
method = marker .args [1 ]
387
- if len (marker .args ) >= 3 and disable_debugger_detection is not NOTSET :
388
- raise TypeError (
389
- "Multiple values for disable_debugger_detection argument of timeout marker"
390
- )
391
- elif len (marker .args ) >= 3 :
392
- disable_debugger_detection = marker .args [2 ]
393
- if len (marker .args ) > 3 :
385
+ if len (marker .args ) > 2 :
394
386
raise TypeError ("Too many arguments for timeout marker" )
395
387
if timeout is NOTSET :
396
388
timeout = None
397
389
if method is NOTSET :
398
390
method = None
399
391
if func_only is NOTSET :
400
392
func_only = None
401
- if disable_debugger_detection is NOTSET :
402
- disable_debugger_detection = None
403
- return Settings (timeout , method , func_only , disable_debugger_detection )
393
+ return Settings (timeout , method , func_only , None )
404
394
405
395
406
396
def _validate_timeout (timeout , where ):
0 commit comments