Bobby R. Bruce has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/38476 )
Change subject: util,python: Updated maintainers.py to fix deprecation
warning
......................................................................
util,python: Updated maintainers.py to fix deprecation warning
The following warning was being thrown:
```
util/maint/lib/maintainers.py:120: 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 is fixed by adding `Loader=yaml.FullLoader` when calling
`yaml.load()`.
Change-Id: I3b79115379a45409967a8848175658ab3c13bfc7
---
M util/maint/lib/maintainers.py
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/util/maint/lib/maintainers.py b/util/maint/lib/maintainers.py
index 0b29b67..5d993f8 100644
--- a/util/maint/lib/maintainers.py
+++ b/util/maint/lib/maintainers.py
@@ -106,7 +106,7 @@
@classmethod
def from_yaml(cls, yaml_str: str) -> "Maintainers":
- return cls(yaml.load(yaml_str))
+ return cls(yaml.load(yaml_str, Loader=yaml.FullLoader))
@classmethod
def _load_maintainers_file(cls,
@@ -117,9 +117,9 @@
if isinstance(path_or_file, str):
with open(path_or_file, 'r') as fin:
- return yaml.load(fin)
+ return yaml.load(fin, Loader=yaml.FullLoader)
else:
- return yaml.load(path_or_file)
+ return yaml.load(path_or_file, Loader=yaml.FullLoader)
@classmethod
def _parse_subsystem(cls, tag: str, ydict: Mapping[str, Any]) ->
Subsystem:
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/38476
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I3b79115379a45409967a8848175658ab3c13bfc7
Gerrit-Change-Number: 38476
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s