MCPcopy
hub / github.com/prompt-toolkit/ptpython / enable_deprecation_warnings

Function enable_deprecation_warnings

src/ptpython/repl.py:439–447  ·  view source on GitHub ↗

Show deprecation warnings, when they are triggered directly by actions in the REPL. This is recommended to call, before calling `embed`. e.g. This will show an error message when the user imports the 'sha' library on Python 2.7.

()

Source from the content-addressed store, hash-verified

437
438
439def enable_deprecation_warnings() -> None:
440 """
441 Show deprecation warnings, when they are triggered directly by actions in
442 the REPL. This is recommended to call, before calling `embed`.
443
444 e.g. This will show an error message when the user imports the 'sha'
445 library on Python 2.7.
446 """
447 warnings.filterwarnings("default", category=DeprecationWarning, module="__main__")
448
449
450DEFAULT_CONFIG_FILE = "~/.config/ptpython/config.py"

Callers 2

runFunction · 0.90
runFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected