Skip to content

Commit 523f114

Browse files
authored
chore: use yaml.safe_load (#2398)
1 parent b5098fb commit 523f114

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

gapic/utils/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def tweak_path(p):
147147
if service_yaml_paths:
148148
# Just use the last file specified.
149149
with open(service_yaml_paths[-1]) as f:
150-
service_yaml_config = yaml.load(f, Loader=yaml.Loader)
150+
service_yaml_config = yaml.safe_load(f)
151151
# The yaml service files typically have this field,
152152
# but it is not a field in the gogle.api.Service proto.
153153
service_yaml_config.pop("type", None)

noxfile.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,9 @@ def showcase(
392392
"""Run the Showcase test suite."""
393393

394394
with showcase_library(session, templates=templates, other_opts=other_opts):
395-
session.install("pytest", "pytest-asyncio")
395+
# Exclude pytest-asyncio==1.0.0 while we investigate the recent failure described in
396+
# https://github.com/googleapis/gapic-generator-python/issues/2399
397+
session.install("pytest", "pytest-asyncio!=1.0.0")
396398
test_directory = Path("tests", "system")
397399
ignore_file = env.get("IGNORE_FILE")
398400
pytest_command = [
@@ -422,7 +424,9 @@ def showcase_w_rest_async(
422424
with showcase_library(
423425
session, templates=templates, other_opts=other_opts, rest_async_io_enabled=True
424426
):
425-
session.install("pytest", "pytest-asyncio")
427+
# Exclude pytest-asyncio==1.0.0 while we investigate the recent failure described in
428+
# https://github.com/googleapis/gapic-generator-python/issues/2399
429+
session.install("pytest", "pytest-asyncio!=1.0.0")
426430
test_directory = Path("tests", "system")
427431
ignore_file = env.get("IGNORE_FILE")
428432
pytest_command = [

0 commit comments

Comments
 (0)