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

Function _reports_object_tracebacks

tasks/capabilities.py:184–196  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

182
183
184def _reports_object_tracebacks() -> bool:
185 # pytest's thread and unraisable exception hooks ask tracemalloc where the offending object was allocated. GraalPy
186 # raises NotImplementedError from that lookup; CPython answers None while not tracing, and PyPy, which ships no
187 # tracemalloc, is never asked.
188 try:
189 get_object_traceback = import_module("tracemalloc").get_object_traceback
190 except ImportError:
191 return True
192 try:
193 get_object_traceback(object())
194 except NotImplementedError:
195 return False
196 return True
197
198
199def _enforces_file_mode() -> bool:

Callers 1

capabilities.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected