Bobby R. Bruce has submitted this change. (
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.SafeLoader` when calling
`yaml.load()`.
Change-Id: I3b79115379a45409967a8848175658ab3c13bfc7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38476
Reviewed-by: Jason Lowe-Power <[email protected]>
Reviewed-by: Andreas Sandberg <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M util/maint/lib/maintainers.py
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
Andreas Sandberg: Looks good to me, approved
kokoro: Regressions pass
diff --git a/util/maint/lib/maintainers.py b/util/maint/lib/maintainers.py
index 0b29b67..6dd8d26 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.SafeLoader))
@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.SafeLoader)
else:
- return yaml.load(path_or_file)
+ return yaml.load(path_or_file, Loader=yaml.SafeLoader)
@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: 3
Gerrit-Owner: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Hoa Nguyen <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s