[Utils] Tools for marking things unsafe for general use (#2326)

* Tools for marking things unsafe for general use

* I'm facepalming so much...

Actually, make the two do something different 
instead of getting distracted writing different docs for both based on intended usage.

* local scopes mmkay + tests

* Move file to adress feedback

* typo fix

* Update __init__.py

* Fix issue with exported names in __init__

* changelog
This commit is contained in:
Michael H
2019-05-14 23:56:41 -04:00
committed by Will
parent 165e40c0db
commit 9a243a1454
3 changed files with 56 additions and 0 deletions

View File

@@ -1,8 +1,10 @@
import colorama as _colorama
import discord as _discord
import yaml as _yaml
from .. import __version__, version_info, VersionInfo
from .config import Config
from .utils.safety import warn_unsafe as _warn_unsafe
__all__ = ["Config", "__version__", "version_info", "VersionInfo"]
@@ -10,3 +12,6 @@ _colorama.init()
# Prevent discord PyNaCl missing warning
_discord.voice_client.VoiceClient.warn_nacl = False
# Warn on known unsafe usage of dependencies
_yaml.load = _warn_unsafe(_yaml.load, "Use yaml.safe_load instead. See CVE-2017-18342")