Skip to content

Commit 0308700

Browse files
committed
WIP: changes to try to isolate test failures
1 parent 95b1e7a commit 0308700

File tree

9 files changed

+114
-105
lines changed

9 files changed

+114
-105
lines changed

gapic/templates/%namespace/%name_%version/%sub/__init__.py.j2

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,21 @@ try:
7272
_next_supported_version_tuple = (4, 25, 8)
7373
(_version_used, _version_used_string) = _get_version(_dependency_package)
7474
if _version_used and _version_used < _next_supported_version_tuple:
75-
warnings.warn(f"Package {_package_label} depends on " +
76-
f"{_dependency_package}, currently installed at version " +
77-
f"{_version_used_string}. Future updates to " +
78-
f"{_package_label} will require {_dependency_package} at " +
79-
f"version {_next_supported_version} or higher. Please ensure " +
80-
"that either (a) your Python environment doesn't pin the " +
81-
f"version of {_dependency_package}, so that updates to " +
82-
f"{_package_label} can require the higher version, or " +
83-
"(b) you manually update your Python environment to use at " +
84-
f"least version {_next_supported_version} of " +
85-
f"{_dependency_package}.",
86-
FutureWarning)
75+
pass
76+
# warnings.warn(f"Package {_package_label} depends on " +
77+
# f"{_dependency_package}, currently installed at version " +
78+
# f"{_version_used_string}. Future updates to " +
79+
# f"{_package_label} will require {_dependency_package} at " +
80+
# f"version {_next_supported_version} or higher. Please ensure " +
81+
# "that either (a) your Python environment doesn't pin the " +
82+
# f"version of {_dependency_package}, so that updates to " +
83+
# f"{_package_label} can require the higher version, or " +
84+
# "(b) you manually update your Python environment to use at " +
85+
# f"least version {_next_supported_version} of " +
86+
# f"{_dependency_package}.",
87+
# FutureWarning)
8788
except Exception as exception: # pragma: NO COVER
88-
warnings.warn(f"Unexpected exception: {exception}")
89+
warnings.warn(f"Unexpected exception BEGIN vvvvvvvvvvvvvvvvvvvv:\n{exception}\nUnexpected exception END ^^^^^^^^^^^^^^^^^^^^")
8990

9091
{# Import subpackages. -#}
9192
{% for subpackage, _ in api.subpackages|dictsort %}

tests/integration/goldens/asset/google/cloud/asset_v1/__init__.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,21 @@ def _get_version(dependency_name):
7575
_next_supported_version_tuple = (4, 25, 8)
7676
(_version_used, _version_used_string) = _get_version(_dependency_package)
7777
if _version_used and _version_used < _next_supported_version_tuple:
78-
warnings.warn(f"Package {_package_label} depends on " +
79-
f"{_dependency_package}, currently installed at version " +
80-
f"{_version_used_string}. Future updates to " +
81-
f"{_package_label} will require {_dependency_package} at " +
82-
f"version {_next_supported_version} or higher. Please ensure " +
83-
"that either (a) your Python environment doesn't pin the " +
84-
f"version of {_dependency_package}, so that updates to " +
85-
f"{_package_label} can require the higher version, or " +
86-
"(b) you manually update your Python environment to use at " +
87-
f"least version {_next_supported_version} of " +
88-
f"{_dependency_package}.",
89-
FutureWarning)
78+
pass
79+
# warnings.warn(f"Package {_package_label} depends on " +
80+
# f"{_dependency_package}, currently installed at version " +
81+
# f"{_version_used_string}. Future updates to " +
82+
# f"{_package_label} will require {_dependency_package} at " +
83+
# f"version {_next_supported_version} or higher. Please ensure " +
84+
# "that either (a) your Python environment doesn't pin the " +
85+
# f"version of {_dependency_package}, so that updates to " +
86+
# f"{_package_label} can require the higher version, or " +
87+
# "(b) you manually update your Python environment to use at " +
88+
# f"least version {_next_supported_version} of " +
89+
# f"{_dependency_package}.",
90+
# FutureWarning)
9091
except Exception as exception: # pragma: NO COVER
91-
warnings.warn(f"Unexpected exception: {exception}")
92+
warnings.warn(f"Unexpected exception BEGIN vvvvvvvvvvvvvvvvvvvv:\n{exception}\nUnexpected exception END ^^^^^^^^^^^^^^^^^^^^")
9293

9394

9495
from .services.asset_service import AssetServiceClient

tests/integration/goldens/credentials/google/iam/credentials_v1/__init__.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,21 @@ def _get_version(dependency_name):
7575
_next_supported_version_tuple = (4, 25, 8)
7676
(_version_used, _version_used_string) = _get_version(_dependency_package)
7777
if _version_used and _version_used < _next_supported_version_tuple:
78-
warnings.warn(f"Package {_package_label} depends on " +
79-
f"{_dependency_package}, currently installed at version " +
80-
f"{_version_used_string}. Future updates to " +
81-
f"{_package_label} will require {_dependency_package} at " +
82-
f"version {_next_supported_version} or higher. Please ensure " +
83-
"that either (a) your Python environment doesn't pin the " +
84-
f"version of {_dependency_package}, so that updates to " +
85-
f"{_package_label} can require the higher version, or " +
86-
"(b) you manually update your Python environment to use at " +
87-
f"least version {_next_supported_version} of " +
88-
f"{_dependency_package}.",
89-
FutureWarning)
78+
pass
79+
# warnings.warn(f"Package {_package_label} depends on " +
80+
# f"{_dependency_package}, currently installed at version " +
81+
# f"{_version_used_string}. Future updates to " +
82+
# f"{_package_label} will require {_dependency_package} at " +
83+
# f"version {_next_supported_version} or higher. Please ensure " +
84+
# "that either (a) your Python environment doesn't pin the " +
85+
# f"version of {_dependency_package}, so that updates to " +
86+
# f"{_package_label} can require the higher version, or " +
87+
# "(b) you manually update your Python environment to use at " +
88+
# f"least version {_next_supported_version} of " +
89+
# f"{_dependency_package}.",
90+
# FutureWarning)
9091
except Exception as exception: # pragma: NO COVER
91-
warnings.warn(f"Unexpected exception: {exception}")
92+
warnings.warn(f"Unexpected exception BEGIN vvvvvvvvvvvvvvvvvvvv:\n{exception}\nUnexpected exception END ^^^^^^^^^^^^^^^^^^^^")
9293

9394

9495
from .services.iam_credentials import IAMCredentialsClient

tests/integration/goldens/eventarc/google/cloud/eventarc_v1/__init__.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,21 @@ def _get_version(dependency_name):
7575
_next_supported_version_tuple = (4, 25, 8)
7676
(_version_used, _version_used_string) = _get_version(_dependency_package)
7777
if _version_used and _version_used < _next_supported_version_tuple:
78-
warnings.warn(f"Package {_package_label} depends on " +
79-
f"{_dependency_package}, currently installed at version " +
80-
f"{_version_used_string}. Future updates to " +
81-
f"{_package_label} will require {_dependency_package} at " +
82-
f"version {_next_supported_version} or higher. Please ensure " +
83-
"that either (a) your Python environment doesn't pin the " +
84-
f"version of {_dependency_package}, so that updates to " +
85-
f"{_package_label} can require the higher version, or " +
86-
"(b) you manually update your Python environment to use at " +
87-
f"least version {_next_supported_version} of " +
88-
f"{_dependency_package}.",
89-
FutureWarning)
78+
pass
79+
# warnings.warn(f"Package {_package_label} depends on " +
80+
# f"{_dependency_package}, currently installed at version " +
81+
# f"{_version_used_string}. Future updates to " +
82+
# f"{_package_label} will require {_dependency_package} at " +
83+
# f"version {_next_supported_version} or higher. Please ensure " +
84+
# "that either (a) your Python environment doesn't pin the " +
85+
# f"version of {_dependency_package}, so that updates to " +
86+
# f"{_package_label} can require the higher version, or " +
87+
# "(b) you manually update your Python environment to use at " +
88+
# f"least version {_next_supported_version} of " +
89+
# f"{_dependency_package}.",
90+
# FutureWarning)
9091
except Exception as exception: # pragma: NO COVER
91-
warnings.warn(f"Unexpected exception: {exception}")
92+
warnings.warn(f"Unexpected exception BEGIN vvvvvvvvvvvvvvvvvvvv:\n{exception}\nUnexpected exception END ^^^^^^^^^^^^^^^^^^^^")
9293

9394

9495
from .services.eventarc import EventarcClient

tests/integration/goldens/logging/google/cloud/logging_v2/__init__.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,21 @@ def _get_version(dependency_name):
7575
_next_supported_version_tuple = (4, 25, 8)
7676
(_version_used, _version_used_string) = _get_version(_dependency_package)
7777
if _version_used and _version_used < _next_supported_version_tuple:
78-
warnings.warn(f"Package {_package_label} depends on " +
79-
f"{_dependency_package}, currently installed at version " +
80-
f"{_version_used_string}. Future updates to " +
81-
f"{_package_label} will require {_dependency_package} at " +
82-
f"version {_next_supported_version} or higher. Please ensure " +
83-
"that either (a) your Python environment doesn't pin the " +
84-
f"version of {_dependency_package}, so that updates to " +
85-
f"{_package_label} can require the higher version, or " +
86-
"(b) you manually update your Python environment to use at " +
87-
f"least version {_next_supported_version} of " +
88-
f"{_dependency_package}.",
89-
FutureWarning)
78+
pass
79+
# warnings.warn(f"Package {_package_label} depends on " +
80+
# f"{_dependency_package}, currently installed at version " +
81+
# f"{_version_used_string}. Future updates to " +
82+
# f"{_package_label} will require {_dependency_package} at " +
83+
# f"version {_next_supported_version} or higher. Please ensure " +
84+
# "that either (a) your Python environment doesn't pin the " +
85+
# f"version of {_dependency_package}, so that updates to " +
86+
# f"{_package_label} can require the higher version, or " +
87+
# "(b) you manually update your Python environment to use at " +
88+
# f"least version {_next_supported_version} of " +
89+
# f"{_dependency_package}.",
90+
# FutureWarning)
9091
except Exception as exception: # pragma: NO COVER
91-
warnings.warn(f"Unexpected exception: {exception}")
92+
warnings.warn(f"Unexpected exception BEGIN vvvvvvvvvvvvvvvvvvvv:\n{exception}\nUnexpected exception END ^^^^^^^^^^^^^^^^^^^^")
9293

9394

9495
from .services.config_service_v2 import ConfigServiceV2Client

tests/integration/goldens/logging_internal/google/cloud/logging_v2/__init__.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,21 @@ def _get_version(dependency_name):
7575
_next_supported_version_tuple = (4, 25, 8)
7676
(_version_used, _version_used_string) = _get_version(_dependency_package)
7777
if _version_used and _version_used < _next_supported_version_tuple:
78-
warnings.warn(f"Package {_package_label} depends on " +
79-
f"{_dependency_package}, currently installed at version " +
80-
f"{_version_used_string}. Future updates to " +
81-
f"{_package_label} will require {_dependency_package} at " +
82-
f"version {_next_supported_version} or higher. Please ensure " +
83-
"that either (a) your Python environment doesn't pin the " +
84-
f"version of {_dependency_package}, so that updates to " +
85-
f"{_package_label} can require the higher version, or " +
86-
"(b) you manually update your Python environment to use at " +
87-
f"least version {_next_supported_version} of " +
88-
f"{_dependency_package}.",
89-
FutureWarning)
78+
pass
79+
# warnings.warn(f"Package {_package_label} depends on " +
80+
# f"{_dependency_package}, currently installed at version " +
81+
# f"{_version_used_string}. Future updates to " +
82+
# f"{_package_label} will require {_dependency_package} at " +
83+
# f"version {_next_supported_version} or higher. Please ensure " +
84+
# "that either (a) your Python environment doesn't pin the " +
85+
# f"version of {_dependency_package}, so that updates to " +
86+
# f"{_package_label} can require the higher version, or " +
87+
# "(b) you manually update your Python environment to use at " +
88+
# f"least version {_next_supported_version} of " +
89+
# f"{_dependency_package}.",
90+
# FutureWarning)
9091
except Exception as exception: # pragma: NO COVER
91-
warnings.warn(f"Unexpected exception: {exception}")
92+
warnings.warn(f"Unexpected exception BEGIN vvvvvvvvvvvvvvvvvvvv:\n{exception}\nUnexpected exception END ^^^^^^^^^^^^^^^^^^^^")
9293

9394

9495
from .services.config_service_v2 import BaseConfigServiceV2Client

tests/integration/goldens/redis/google/cloud/redis_v1/__init__.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,21 @@ def _get_version(dependency_name):
7575
_next_supported_version_tuple = (4, 25, 8)
7676
(_version_used, _version_used_string) = _get_version(_dependency_package)
7777
if _version_used and _version_used < _next_supported_version_tuple:
78-
warnings.warn(f"Package {_package_label} depends on " +
79-
f"{_dependency_package}, currently installed at version " +
80-
f"{_version_used_string}. Future updates to " +
81-
f"{_package_label} will require {_dependency_package} at " +
82-
f"version {_next_supported_version} or higher. Please ensure " +
83-
"that either (a) your Python environment doesn't pin the " +
84-
f"version of {_dependency_package}, so that updates to " +
85-
f"{_package_label} can require the higher version, or " +
86-
"(b) you manually update your Python environment to use at " +
87-
f"least version {_next_supported_version} of " +
88-
f"{_dependency_package}.",
89-
FutureWarning)
78+
pass
79+
# warnings.warn(f"Package {_package_label} depends on " +
80+
# f"{_dependency_package}, currently installed at version " +
81+
# f"{_version_used_string}. Future updates to " +
82+
# f"{_package_label} will require {_dependency_package} at " +
83+
# f"version {_next_supported_version} or higher. Please ensure " +
84+
# "that either (a) your Python environment doesn't pin the " +
85+
# f"version of {_dependency_package}, so that updates to " +
86+
# f"{_package_label} can require the higher version, or " +
87+
# "(b) you manually update your Python environment to use at " +
88+
# f"least version {_next_supported_version} of " +
89+
# f"{_dependency_package}.",
90+
# FutureWarning)
9091
except Exception as exception: # pragma: NO COVER
91-
warnings.warn(f"Unexpected exception: {exception}")
92+
warnings.warn(f"Unexpected exception BEGIN vvvvvvvvvvvvvvvvvvvv:\n{exception}\nUnexpected exception END ^^^^^^^^^^^^^^^^^^^^")
9293

9394

9495
from .services.cloud_redis import CloudRedisClient

tests/integration/goldens/redis_selective/google/cloud/redis_v1/__init__.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,21 @@ def _get_version(dependency_name):
7575
_next_supported_version_tuple = (4, 25, 8)
7676
(_version_used, _version_used_string) = _get_version(_dependency_package)
7777
if _version_used and _version_used < _next_supported_version_tuple:
78-
warnings.warn(f"Package {_package_label} depends on " +
79-
f"{_dependency_package}, currently installed at version " +
80-
f"{_version_used_string}. Future updates to " +
81-
f"{_package_label} will require {_dependency_package} at " +
82-
f"version {_next_supported_version} or higher. Please ensure " +
83-
"that either (a) your Python environment doesn't pin the " +
84-
f"version of {_dependency_package}, so that updates to " +
85-
f"{_package_label} can require the higher version, or " +
86-
"(b) you manually update your Python environment to use at " +
87-
f"least version {_next_supported_version} of " +
88-
f"{_dependency_package}.",
89-
FutureWarning)
78+
pass
79+
# warnings.warn(f"Package {_package_label} depends on " +
80+
# f"{_dependency_package}, currently installed at version " +
81+
# f"{_version_used_string}. Future updates to " +
82+
# f"{_package_label} will require {_dependency_package} at " +
83+
# f"version {_next_supported_version} or higher. Please ensure " +
84+
# "that either (a) your Python environment doesn't pin the " +
85+
# f"version of {_dependency_package}, so that updates to " +
86+
# f"{_package_label} can require the higher version, or " +
87+
# "(b) you manually update your Python environment to use at " +
88+
# f"least version {_next_supported_version} of " +
89+
# f"{_dependency_package}.",
90+
# FutureWarning)
9091
except Exception as exception: # pragma: NO COVER
91-
warnings.warn(f"Unexpected exception: {exception}")
92+
warnings.warn(f"Unexpected exception BEGIN vvvvvvvvvvvvvvvvvvvv:\n{exception}\nUnexpected exception END ^^^^^^^^^^^^^^^^^^^^")
9293

9394

9495
from .services.cloud_redis import CloudRedisClient

tests/system/test_response_metadata.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import os
1616
import pytest
17+
import traceback
1718

1819
from google import showcase
1920

@@ -105,7 +106,7 @@ async def test_metadata_response_unary_async(
105106
metadata=(request_metadata,),
106107
)
107108
except Exception as exception:
108-
print(f"Encountered exception: {exception}")
109+
print(f"Encountered exception (test) START: vvvvvvvvvvvvvvvvvvvv\n{exception}\n==================== Traceback:\n{traceback.format_exc()}\nEncountered exception (test) END ^^^^^^^^^^^^^^^^^^^^")
109110

110111
assert response.content == request_content
111112
assert request_metadata in interceptor.request_metadata

0 commit comments

Comments
 (0)