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:
parent
92c9132180
commit
ddbcedab5a
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user