|
34 | 34 | from google.api_core.client_options import ClientOptions |
35 | 35 | from google.auth import credentials as ga_credentials # type: ignore |
36 | 36 | from google.oauth2 import service_account # type: ignore |
37 | | -import pkg_resources |
| 37 | + |
| 38 | +from google.cloud.debugger_v2 import gapic_version as package_version |
38 | 39 |
|
39 | 40 | try: |
40 | 41 | OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] |
@@ -225,7 +226,7 @@ async def set_breakpoint( |
225 | 226 | breakpoint_: Optional[data.Breakpoint] = None, |
226 | 227 | client_version: Optional[str] = None, |
227 | 228 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
228 | | - timeout: Optional[float] = None, |
| 229 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
229 | 230 | metadata: Sequence[Tuple[str, str]] = (), |
230 | 231 | ) -> debugger.SetBreakpointResponse: |
231 | 232 | r"""Sets the breakpoint to the debuggee. |
@@ -348,7 +349,7 @@ async def get_breakpoint( |
348 | 349 | breakpoint_id: Optional[str] = None, |
349 | 350 | client_version: Optional[str] = None, |
350 | 351 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
351 | | - timeout: Optional[float] = None, |
| 352 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
352 | 353 | metadata: Sequence[Tuple[str, str]] = (), |
353 | 354 | ) -> debugger.GetBreakpointResponse: |
354 | 355 | r"""Gets breakpoint information. |
@@ -488,7 +489,7 @@ async def delete_breakpoint( |
488 | 489 | breakpoint_id: Optional[str] = None, |
489 | 490 | client_version: Optional[str] = None, |
490 | 491 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
491 | | - timeout: Optional[float] = None, |
| 492 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
492 | 493 | metadata: Sequence[Tuple[str, str]] = (), |
493 | 494 | ) -> None: |
494 | 495 | r"""Deletes the breakpoint from the debuggee. |
@@ -614,7 +615,7 @@ async def list_breakpoints( |
614 | 615 | debuggee_id: Optional[str] = None, |
615 | 616 | client_version: Optional[str] = None, |
616 | 617 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
617 | | - timeout: Optional[float] = None, |
| 618 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
618 | 619 | metadata: Sequence[Tuple[str, str]] = (), |
619 | 620 | ) -> debugger.ListBreakpointsResponse: |
620 | 621 | r"""Lists all breakpoints for the debuggee. |
@@ -737,7 +738,7 @@ async def list_debuggees( |
737 | 738 | project: Optional[str] = None, |
738 | 739 | client_version: Optional[str] = None, |
739 | 740 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
740 | | - timeout: Optional[float] = None, |
| 741 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
741 | 742 | metadata: Sequence[Tuple[str, str]] = (), |
742 | 743 | ) -> debugger.ListDebuggeesResponse: |
743 | 744 | r"""Lists all the debuggees that the user has access to. |
@@ -852,14 +853,9 @@ async def __aexit__(self, exc_type, exc, tb): |
852 | 853 | await self.transport.close() |
853 | 854 |
|
854 | 855 |
|
855 | | -try: |
856 | | - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( |
857 | | - gapic_version=pkg_resources.get_distribution( |
858 | | - "google-cloud-debugger-client", |
859 | | - ).version, |
860 | | - ) |
861 | | -except pkg_resources.DistributionNotFound: |
862 | | - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() |
| 856 | +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( |
| 857 | + gapic_version=package_version.__version__ |
| 858 | +) |
863 | 859 |
|
864 | 860 |
|
865 | 861 | __all__ = ("Debugger2AsyncClient",) |
0 commit comments