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.
()
| 437 | |
| 438 | |
| 439 | def 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 | |
| 450 | DEFAULT_CONFIG_FILE = "~/.config/ptpython/config.py" |