MCPcopy Create free account
hub / github.com/tox-dev/filelock / _reports_object_tracebacks

Function _reports_object_tracebacks

tasks/capabilities.py:276–288  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

274
275
276def _reports_object_tracebacks() -> bool:
277 # pytest's thread and unraisable exception hooks ask tracemalloc where the offending object was allocated. GraalPy
278 # raises NotImplementedError from that lookup; CPython answers None while not tracing, and PyPy, which ships no
279 # tracemalloc, is never asked.
280 try:
281 get_object_traceback = import_module("tracemalloc").get_object_traceback
282 except ImportError:
283 return True
284 try:
285 get_object_traceback(object())
286 except NotImplementedError:
287 return False
288 return True
289
290
291def _supports_file_mode() -> bool:

Callers 1

capabilities.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected