MCPcopy Index your code
hub / github.com/python/cpython / _text_encoding

Function _text_encoding

Lib/subprocess.py:368–384  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

366
367
368def _text_encoding():
369 # Return default text encoding and emit EncodingWarning if
370 # sys.flags.warn_default_encoding is true.
371 if sys.flags.warn_default_encoding:
372 f = sys._getframe()
373 filename = f.f_code.co_filename
374 stacklevel = 2
375 while f := f.f_back:
376 if f.f_code.co_filename != filename:
377 break
378 stacklevel += 1
379 warnings.warn("'encoding' argument not specified.",
380 EncodingWarning, stacklevel)
381
382 if sys.flags.utf8_mode:
383 return "utf-8"
384 return locale.getencoding()
385
386
387def call(*popenargs, timeout=None, **kwargs):

Callers 1

__init__Method · 0.85

Calls 1

warnMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…