6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-12 06:07:56 +00:00

Fix pyyaml deprecated warning

We were getting the following warning with the latest version of pyyaml:

    YAMLLoadWarning: calling yaml.load() without Loader=... is
    deprecated, as the default Loader is unsafe. Please read
    https://msg.pyyaml.org/load for full details.
This commit is contained in:
Régis Behmo 2019-03-24 14:43:17 -07:00
parent 92c9132180
commit ddbcedab5a
3 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ pyasn1==0.4.5 # via pyasn1-modules, rsa
pycparser==2.19 # via cffi pycparser==2.19 # via cffi
pyjwt==1.7.1 # via adal pyjwt==1.7.1 # via adal
python-dateutil==2.8.0 # via adal, kubernetes python-dateutil==2.8.0 # via adal, kubernetes
pyyaml==4.2b4 pyyaml==5.1
requests-oauthlib==1.2.0 # via kubernetes requests-oauthlib==1.2.0 # via kubernetes
requests==2.21.0 # via adal, kubernetes, requests-oauthlib requests==2.21.0 # via adal, kubernetes, requests-oauthlib
rsa==4.0 # via google-auth rsa==4.0 # via google-auth

View File

@ -33,7 +33,7 @@ pycparser==2.19
pyinstaller==3.4 pyinstaller==3.4
pyjwt==1.7.1 pyjwt==1.7.1
python-dateutil==2.8.0 python-dateutil==2.8.0
pyyaml==4.2b4 pyyaml==5.1
requests-oauthlib==1.2.0 requests-oauthlib==1.2.0
requests==2.21.0 requests==2.21.0
rsa==4.0 rsa==4.0

View File

@ -1,7 +1,7 @@
import yaml import yaml
def load(stream): def load(stream):
return yaml.load(stream) return yaml.load(stream, Loader=yaml.SafeLoader)
def dump(content, fileobj): def dump(content, fileobj):
yaml.dump(content, fileobj, default_flow_style=False) yaml.dump(content, fileobj, default_flow_style=False)