Skip to content

Commit 1c2e24f

Browse files
authored
chore: generate google-cloud-monitoring-dashboards (#17309)
Fixes #17305 See follow up issue #17311
1 parent 06965d8 commit 1c2e24f

5 files changed

Lines changed: 110 additions & 103 deletions

File tree

packages/google-cloud-monitoring-dashboards/noxfile.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@
4747

4848
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
4949

50-
LOWER_BOUND_CONSTRAINTS_FILE = CURRENT_DIRECTORY / "constraints.txt"
50+
if (CURRENT_DIRECTORY / "testing").exists():
51+
LOWER_BOUND_CONSTRAINTS_FILE = (
52+
CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt"
53+
)
54+
else:
55+
LOWER_BOUND_CONSTRAINTS_FILE = CURRENT_DIRECTORY / "constraints.txt"
5156
PACKAGE_NAME = "google-cloud-monitoring-dashboards"
5257

5358
UNIT_TEST_STANDARD_DEPENDENCIES = [
@@ -468,14 +473,6 @@ def prerelease_deps(session, protobuf_implementation):
468473
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
469474
session.install(*unit_deps_all)
470475

471-
# Install dependencies for the system test environment
472-
system_deps_all = (
473-
SYSTEM_TEST_STANDARD_DEPENDENCIES
474-
+ SYSTEM_TEST_EXTERNAL_DEPENDENCIES
475-
+ SYSTEM_TEST_EXTRAS
476-
)
477-
session.install(*system_deps_all)
478-
479476
# Because we test minimum dependency versions on the minimum Python
480477
# version, the first version we test with in the unit tests sessions has a
481478
# constraints file containing all dependencies and extras.
@@ -587,14 +584,6 @@ def core_deps_from_source(session, protobuf_implementation):
587584
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
588585
session.install(*unit_deps_all)
589586

590-
# Install dependencies for the system test environment
591-
system_deps_all = (
592-
SYSTEM_TEST_STANDARD_DEPENDENCIES
593-
+ SYSTEM_TEST_EXTERNAL_DEPENDENCIES
594-
+ SYSTEM_TEST_EXTRAS
595-
)
596-
session.install(*system_deps_all)
597-
598587
# Because we test minimum dependency versions on the minimum Python
599588
# version, the first version we test with in the unit tests sessions has a
600589
# constraints file containing all dependencies and extras.

packages/google-cloud-monitoring-dashboards/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
# Exclude incompatible versions of `google-auth`
4646
# See https://github.com/googleapis/google-cloud-python/issues/12364
4747
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
48-
"grpcio >= 1.44.0, < 2.0.0",
48+
"grpcio >= 1.59.0, < 2.0.0",
4949
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
5050
"proto-plus >= 1.22.3, <2.0.0",
5151
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",

packages/google-cloud-monitoring-dashboards/testing/constraints-3.10.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
# then this file should have google-cloud-foo==1.14.0
77
google-api-core==2.17.1
88
google-auth==2.14.1
9-
grpcio==1.44.0
9+
grpcio==1.59.0
1010
proto-plus==1.22.3
1111
protobuf==4.25.8

packages/google-cloud-monitoring-dashboards/tests/unit/gapic/dashboard_v1/test_dashboards_service.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
import asyncio
1617
import os
1718

1819
# try/except added for compatibility with python < 3.8
@@ -71,6 +72,21 @@
7172
)
7273

7374

75+
@pytest.fixture(autouse=True)
76+
def set_event_loop():
77+
try:
78+
asyncio.get_running_loop()
79+
yield
80+
except RuntimeError:
81+
loop = asyncio.new_event_loop()
82+
asyncio.set_event_loop(loop)
83+
try:
84+
yield
85+
finally:
86+
loop.close()
87+
asyncio.set_event_loop(None)
88+
89+
7490
# Anonymous Credentials with universe domain property. If no universe domain is provided, then
7591
# the default universe domain is "googleapis.com".
7692
class _AnonymousCredentialsWithUniverseDomain(ga_credentials.AnonymousCredentials):

0 commit comments

Comments
 (0)