Skip to content

Commit d409975

Browse files
calebhofacebook-github-bot
authored andcommitted
Add "Loader=..." to yaml.load callsites (#588)
Summary: Pull Request resolved: #588 Calling `yaml.load` without `Loader=` is deprecated and will throw in `pyyaml` 6.x. [The behavior in 5.x is to use `Loader=yaml.FullLoader`](https://github.com/yaml/pyyaml/blob/5.4.1.1/lib/yaml/__init__.py#L110), so we retain that semantic. Differential Revision: D49670999 fbshipit-source-id: b22b574a51f84f3bebf88f8d1246de4582101362
1 parent 0692aff commit d409975

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

kernels/test/gen_supported_features_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ def test_gen_header(self):
3030
dtype_double:
3131
type: bool
3232
default: true
33-
"""
33+
""",
34+
Loader=yaml.FullLoader,
3435
)
3536
result = generate_header(y)
3637
self.assertTrue("bool is_aten = false;" in result)
@@ -45,7 +46,8 @@ def test_gen_def(self):
4546
4647
- namespace: op_gelu
4748
dtype_double: true
48-
"""
49+
""",
50+
Loader=yaml.FullLoader,
4951
)
5052
result = generate_definition(y)
5153
self.assertTrue(".output_resize = true," in result)

0 commit comments

Comments
 (0)