diff --git a/.flake8 b/.flake8 index ed931638..29227d4c 100644 --- a/.flake8 +++ b/.flake8 @@ -26,6 +26,7 @@ exclude = *_pb2.py # Standard linting exemptions. + **/.nox/** __pycache__, .git, *.pyc, diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml new file mode 100644 index 00000000..af599353 --- /dev/null +++ b/.github/sync-repo-settings.yaml @@ -0,0 +1,13 @@ +# https://github.com/googleapis/repo-automation-bots/tree/master/packages/sync-repo-settings +# Rules for master branch protection +branchProtectionRules: +# Identifies the protection rule pattern. Name of the branch to be protected. +# Defaults to `master` +- pattern: master + requiredStatusCheckContexts: + - 'Kokoro' + - 'cla/google' + - 'Samples - Lint' + - 'Samples - Python 3.6' + - 'Samples - Python 3.7' + - 'Samples - Python 3.8' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..a9024b15 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,17 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.4.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml +- repo: https://github.com/psf/black + rev: 19.10b0 + hooks: + - id: black +- repo: https://gitlab.com/pycqa/flake8 + rev: 3.8.4 + hooks: + - id: flake8 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 98391e75..b14583a8 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -21,8 +21,8 @@ In order to add a feature: - The feature must be documented in both the API and narrative documentation. -- The feature must work fully on the following CPython versions: 2.7, - 3.5, 3.6, 3.7 and 3.8 on both UNIX and Windows. +- The feature must work fully on the following CPython versions: + 3.6, 3.7, 3.8 and 3.9 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -111,6 +111,16 @@ Coding Style should point to the official ``googleapis`` checkout and the the branch should be the main branch on that remote (``master``). +- This repository contains configuration for the + `pre-commit `__ tool, which automates checking + our linters during a commit. If you have it installed on your ``$PATH``, + you can enable enforcing those checks via: + +.. code-block:: bash + + $ pre-commit install + pre-commit installed at .git/hooks/pre-commit + Exceptions to PEP8: - Many unit tests use a helper method, ``_call_fut`` ("FUT" is short for @@ -192,25 +202,24 @@ Supported Python Versions We support: -- `Python 3.5`_ - `Python 3.6`_ - `Python 3.7`_ - `Python 3.8`_ +- `Python 3.9`_ -.. _Python 3.5: https://docs.python.org/3.5/ .. _Python 3.6: https://docs.python.org/3.6/ .. _Python 3.7: https://docs.python.org/3.7/ .. _Python 3.8: https://docs.python.org/3.8/ +.. _Python 3.9: https://docs.python.org/3.9/ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/python-game-servers/blob/master/noxfile.py -Python 2.7 support is deprecated. All code changes should maintain Python 2.7 compatibility until January 1, 2020. We also explicitly decided to support Python 3 beginning with version -3.5. Reasons for this include: +3.6. Reasons for this include: - Encouraging use of newest versions of Python 3 - Taking the lead of `prominent`_ open-source `projects`_ diff --git a/docs/conf.py b/docs/conf.py index 9a955c89..05414166 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -345,10 +345,10 @@ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { - "python": ("http://python.readthedocs.org/en/latest/", None), - "google-auth": ("https://google-auth.readthedocs.io/en/stable", None), + "python": ("https://python.readthedocs.org/en/latest/", None), + "google-auth": ("https://googleapis.dev/python/google-auth/latest/", None), "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,), - "grpc": ("https://grpc.io/grpc/python/", None), + "grpc": ("https://grpc.github.io/grpc/python/", None), "proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None), } diff --git a/google/cloud/gaming_v1/__init__.py b/google/cloud/gaming_v1/__init__.py index 3eb71e9e..cddeaeec 100644 --- a/google/cloud/gaming_v1/__init__.py +++ b/google/cloud/gaming_v1/__init__.py @@ -97,8 +97,8 @@ "GameServerConfigOverride", "GameServerConfigsServiceClient", "GameServerDeployment", - "GameServerDeploymentsServiceClient", "GameServerDeploymentRollout", + "GameServerDeploymentsServiceClient", "GetGameServerClusterRequest", "GetGameServerConfigRequest", "GetGameServerDeploymentRequest", @@ -128,7 +128,6 @@ "PreviewUpdateGameServerClusterResponse", "Realm", "RealmSelector", - "RealmsServiceClient", "ScalingConfig", "Schedule", "SpecSource", @@ -138,4 +137,5 @@ "UpdateGameServerDeploymentRequest", "UpdateGameServerDeploymentRolloutRequest", "UpdateRealmRequest", + "RealmsServiceClient", ) diff --git a/google/cloud/gaming_v1/services/game_server_clusters_service/transports/__init__.py b/google/cloud/gaming_v1/services/game_server_clusters_service/transports/__init__.py index ce769656..24a44510 100644 --- a/google/cloud/gaming_v1/services/game_server_clusters_service/transports/__init__.py +++ b/google/cloud/gaming_v1/services/game_server_clusters_service/transports/__init__.py @@ -30,7 +30,6 @@ _transport_registry["grpc"] = GameServerClustersServiceGrpcTransport _transport_registry["grpc_asyncio"] = GameServerClustersServiceGrpcAsyncIOTransport - __all__ = ( "GameServerClustersServiceTransport", "GameServerClustersServiceGrpcTransport", diff --git a/google/cloud/gaming_v1/services/game_server_clusters_service/transports/grpc.py b/google/cloud/gaming_v1/services/game_server_clusters_service/transports/grpc.py index 39efb978..4d5ed3c9 100644 --- a/google/cloud/gaming_v1/services/game_server_clusters_service/transports/grpc.py +++ b/google/cloud/gaming_v1/services/game_server_clusters_service/transports/grpc.py @@ -149,6 +149,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -167,9 +171,14 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._stubs = {} # type: Dict[str, Callable] + self._operations_client = None # Run the base constructor. super().__init__( @@ -193,7 +202,7 @@ def create_channel( ) -> grpc.Channel: """Create and return a gRPC channel object. Args: - address (Optionsl[str]): The host for the channel to use. + address (Optional[str]): The host for the channel to use. credentials (Optional[~.Credentials]): The authorization credentials to attach to requests. These credentials identify this application to the service. If @@ -240,13 +249,11 @@ def operations_client(self) -> operations_v1.OperationsClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsClient( - self.grpc_channel - ) + if self._operations_client is None: + self._operations_client = operations_v1.OperationsClient(self.grpc_channel) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_game_server_clusters( diff --git a/google/cloud/gaming_v1/services/game_server_clusters_service/transports/grpc_asyncio.py b/google/cloud/gaming_v1/services/game_server_clusters_service/transports/grpc_asyncio.py index 7813f611..31c71904 100644 --- a/google/cloud/gaming_v1/services/game_server_clusters_service/transports/grpc_asyncio.py +++ b/google/cloud/gaming_v1/services/game_server_clusters_service/transports/grpc_asyncio.py @@ -194,6 +194,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -212,6 +216,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) # Run the base constructor. @@ -225,6 +233,7 @@ def __init__( ) self._stubs = {} + self._operations_client = None @property def grpc_channel(self) -> aio.Channel: @@ -244,13 +253,13 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsAsyncClient( + if self._operations_client is None: + self._operations_client = operations_v1.OperationsAsyncClient( self.grpc_channel ) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_game_server_clusters( diff --git a/google/cloud/gaming_v1/services/game_server_configs_service/transports/__init__.py b/google/cloud/gaming_v1/services/game_server_configs_service/transports/__init__.py index 5aa419a6..25d2dd4c 100644 --- a/google/cloud/gaming_v1/services/game_server_configs_service/transports/__init__.py +++ b/google/cloud/gaming_v1/services/game_server_configs_service/transports/__init__.py @@ -30,7 +30,6 @@ _transport_registry["grpc"] = GameServerConfigsServiceGrpcTransport _transport_registry["grpc_asyncio"] = GameServerConfigsServiceGrpcAsyncIOTransport - __all__ = ( "GameServerConfigsServiceTransport", "GameServerConfigsServiceGrpcTransport", diff --git a/google/cloud/gaming_v1/services/game_server_configs_service/transports/grpc.py b/google/cloud/gaming_v1/services/game_server_configs_service/transports/grpc.py index 36b52cc0..3535d0ea 100644 --- a/google/cloud/gaming_v1/services/game_server_configs_service/transports/grpc.py +++ b/google/cloud/gaming_v1/services/game_server_configs_service/transports/grpc.py @@ -149,6 +149,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -167,9 +171,14 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._stubs = {} # type: Dict[str, Callable] + self._operations_client = None # Run the base constructor. super().__init__( @@ -193,7 +202,7 @@ def create_channel( ) -> grpc.Channel: """Create and return a gRPC channel object. Args: - address (Optionsl[str]): The host for the channel to use. + address (Optional[str]): The host for the channel to use. credentials (Optional[~.Credentials]): The authorization credentials to attach to requests. These credentials identify this application to the service. If @@ -240,13 +249,11 @@ def operations_client(self) -> operations_v1.OperationsClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsClient( - self.grpc_channel - ) + if self._operations_client is None: + self._operations_client = operations_v1.OperationsClient(self.grpc_channel) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_game_server_configs( diff --git a/google/cloud/gaming_v1/services/game_server_configs_service/transports/grpc_asyncio.py b/google/cloud/gaming_v1/services/game_server_configs_service/transports/grpc_asyncio.py index aefa96d1..02b033c9 100644 --- a/google/cloud/gaming_v1/services/game_server_configs_service/transports/grpc_asyncio.py +++ b/google/cloud/gaming_v1/services/game_server_configs_service/transports/grpc_asyncio.py @@ -194,6 +194,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -212,6 +216,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) # Run the base constructor. @@ -225,6 +233,7 @@ def __init__( ) self._stubs = {} + self._operations_client = None @property def grpc_channel(self) -> aio.Channel: @@ -244,13 +253,13 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsAsyncClient( + if self._operations_client is None: + self._operations_client = operations_v1.OperationsAsyncClient( self.grpc_channel ) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_game_server_configs( diff --git a/google/cloud/gaming_v1/services/game_server_deployments_service/transports/__init__.py b/google/cloud/gaming_v1/services/game_server_deployments_service/transports/__init__.py index 17e99cc0..3fae0a06 100644 --- a/google/cloud/gaming_v1/services/game_server_deployments_service/transports/__init__.py +++ b/google/cloud/gaming_v1/services/game_server_deployments_service/transports/__init__.py @@ -30,7 +30,6 @@ _transport_registry["grpc"] = GameServerDeploymentsServiceGrpcTransport _transport_registry["grpc_asyncio"] = GameServerDeploymentsServiceGrpcAsyncIOTransport - __all__ = ( "GameServerDeploymentsServiceTransport", "GameServerDeploymentsServiceGrpcTransport", diff --git a/google/cloud/gaming_v1/services/game_server_deployments_service/transports/grpc.py b/google/cloud/gaming_v1/services/game_server_deployments_service/transports/grpc.py index 6be91b48..39d40288 100644 --- a/google/cloud/gaming_v1/services/game_server_deployments_service/transports/grpc.py +++ b/google/cloud/gaming_v1/services/game_server_deployments_service/transports/grpc.py @@ -149,6 +149,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -167,9 +171,14 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._stubs = {} # type: Dict[str, Callable] + self._operations_client = None # Run the base constructor. super().__init__( @@ -193,7 +202,7 @@ def create_channel( ) -> grpc.Channel: """Create and return a gRPC channel object. Args: - address (Optionsl[str]): The host for the channel to use. + address (Optional[str]): The host for the channel to use. credentials (Optional[~.Credentials]): The authorization credentials to attach to requests. These credentials identify this application to the service. If @@ -240,13 +249,11 @@ def operations_client(self) -> operations_v1.OperationsClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsClient( - self.grpc_channel - ) + if self._operations_client is None: + self._operations_client = operations_v1.OperationsClient(self.grpc_channel) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_game_server_deployments( diff --git a/google/cloud/gaming_v1/services/game_server_deployments_service/transports/grpc_asyncio.py b/google/cloud/gaming_v1/services/game_server_deployments_service/transports/grpc_asyncio.py index e8eadd37..67f3eafd 100644 --- a/google/cloud/gaming_v1/services/game_server_deployments_service/transports/grpc_asyncio.py +++ b/google/cloud/gaming_v1/services/game_server_deployments_service/transports/grpc_asyncio.py @@ -196,6 +196,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -214,6 +218,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) # Run the base constructor. @@ -227,6 +235,7 @@ def __init__( ) self._stubs = {} + self._operations_client = None @property def grpc_channel(self) -> aio.Channel: @@ -246,13 +255,13 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsAsyncClient( + if self._operations_client is None: + self._operations_client = operations_v1.OperationsAsyncClient( self.grpc_channel ) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_game_server_deployments( diff --git a/google/cloud/gaming_v1/services/realms_service/transports/__init__.py b/google/cloud/gaming_v1/services/realms_service/transports/__init__.py index 2b139b78..ab9c636f 100644 --- a/google/cloud/gaming_v1/services/realms_service/transports/__init__.py +++ b/google/cloud/gaming_v1/services/realms_service/transports/__init__.py @@ -28,7 +28,6 @@ _transport_registry["grpc"] = RealmsServiceGrpcTransport _transport_registry["grpc_asyncio"] = RealmsServiceGrpcAsyncIOTransport - __all__ = ( "RealmsServiceTransport", "RealmsServiceGrpcTransport", diff --git a/google/cloud/gaming_v1/services/realms_service/transports/grpc.py b/google/cloud/gaming_v1/services/realms_service/transports/grpc.py index 65f00a0c..2a58fadf 100644 --- a/google/cloud/gaming_v1/services/realms_service/transports/grpc.py +++ b/google/cloud/gaming_v1/services/realms_service/transports/grpc.py @@ -149,6 +149,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -167,9 +171,14 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._stubs = {} # type: Dict[str, Callable] + self._operations_client = None # Run the base constructor. super().__init__( @@ -193,7 +202,7 @@ def create_channel( ) -> grpc.Channel: """Create and return a gRPC channel object. Args: - address (Optionsl[str]): The host for the channel to use. + address (Optional[str]): The host for the channel to use. credentials (Optional[~.Credentials]): The authorization credentials to attach to requests. These credentials identify this application to the service. If @@ -240,13 +249,11 @@ def operations_client(self) -> operations_v1.OperationsClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsClient( - self.grpc_channel - ) + if self._operations_client is None: + self._operations_client = operations_v1.OperationsClient(self.grpc_channel) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_realms( diff --git a/google/cloud/gaming_v1/services/realms_service/transports/grpc_asyncio.py b/google/cloud/gaming_v1/services/realms_service/transports/grpc_asyncio.py index ede57a5c..c4960a75 100644 --- a/google/cloud/gaming_v1/services/realms_service/transports/grpc_asyncio.py +++ b/google/cloud/gaming_v1/services/realms_service/transports/grpc_asyncio.py @@ -194,6 +194,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -212,6 +216,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) # Run the base constructor. @@ -225,6 +233,7 @@ def __init__( ) self._stubs = {} + self._operations_client = None @property def grpc_channel(self) -> aio.Channel: @@ -244,13 +253,13 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsAsyncClient( + if self._operations_client is None: + self._operations_client = operations_v1.OperationsAsyncClient( self.grpc_channel ) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_realms( diff --git a/google/cloud/gaming_v1/types/__init__.py b/google/cloud/gaming_v1/types/__init__.py index fea9d663..ebfd8342 100644 --- a/google/cloud/gaming_v1/types/__init__.py +++ b/google/cloud/gaming_v1/types/__init__.py @@ -82,7 +82,6 @@ Realm, ) - __all__ = ( "OperationMetadata", "OperationStatus", diff --git a/google/cloud/gaming_v1beta/__init__.py b/google/cloud/gaming_v1beta/__init__.py index ad0f876b..cddeaeec 100644 --- a/google/cloud/gaming_v1beta/__init__.py +++ b/google/cloud/gaming_v1beta/__init__.py @@ -95,6 +95,7 @@ "GameServerClustersServiceClient", "GameServerConfig", "GameServerConfigOverride", + "GameServerConfigsServiceClient", "GameServerDeployment", "GameServerDeploymentRollout", "GameServerDeploymentsServiceClient", @@ -127,7 +128,6 @@ "PreviewUpdateGameServerClusterResponse", "Realm", "RealmSelector", - "RealmsServiceClient", "ScalingConfig", "Schedule", "SpecSource", @@ -137,5 +137,5 @@ "UpdateGameServerDeploymentRequest", "UpdateGameServerDeploymentRolloutRequest", "UpdateRealmRequest", - "GameServerConfigsServiceClient", + "RealmsServiceClient", ) diff --git a/google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/__init__.py b/google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/__init__.py index ce769656..24a44510 100644 --- a/google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/__init__.py +++ b/google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/__init__.py @@ -30,7 +30,6 @@ _transport_registry["grpc"] = GameServerClustersServiceGrpcTransport _transport_registry["grpc_asyncio"] = GameServerClustersServiceGrpcAsyncIOTransport - __all__ = ( "GameServerClustersServiceTransport", "GameServerClustersServiceGrpcTransport", diff --git a/google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/grpc.py b/google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/grpc.py index c62ac481..e8fe40ee 100644 --- a/google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/grpc.py +++ b/google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/grpc.py @@ -149,6 +149,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -167,9 +171,14 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._stubs = {} # type: Dict[str, Callable] + self._operations_client = None # Run the base constructor. super().__init__( @@ -193,7 +202,7 @@ def create_channel( ) -> grpc.Channel: """Create and return a gRPC channel object. Args: - address (Optionsl[str]): The host for the channel to use. + address (Optional[str]): The host for the channel to use. credentials (Optional[~.Credentials]): The authorization credentials to attach to requests. These credentials identify this application to the service. If @@ -240,13 +249,11 @@ def operations_client(self) -> operations_v1.OperationsClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsClient( - self.grpc_channel - ) + if self._operations_client is None: + self._operations_client = operations_v1.OperationsClient(self.grpc_channel) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_game_server_clusters( diff --git a/google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/grpc_asyncio.py b/google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/grpc_asyncio.py index e1567647..336396b3 100644 --- a/google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/grpc_asyncio.py +++ b/google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/grpc_asyncio.py @@ -194,6 +194,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -212,6 +216,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) # Run the base constructor. @@ -225,6 +233,7 @@ def __init__( ) self._stubs = {} + self._operations_client = None @property def grpc_channel(self) -> aio.Channel: @@ -244,13 +253,13 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsAsyncClient( + if self._operations_client is None: + self._operations_client = operations_v1.OperationsAsyncClient( self.grpc_channel ) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_game_server_clusters( diff --git a/google/cloud/gaming_v1beta/services/game_server_configs_service/transports/__init__.py b/google/cloud/gaming_v1beta/services/game_server_configs_service/transports/__init__.py index 5aa419a6..25d2dd4c 100644 --- a/google/cloud/gaming_v1beta/services/game_server_configs_service/transports/__init__.py +++ b/google/cloud/gaming_v1beta/services/game_server_configs_service/transports/__init__.py @@ -30,7 +30,6 @@ _transport_registry["grpc"] = GameServerConfigsServiceGrpcTransport _transport_registry["grpc_asyncio"] = GameServerConfigsServiceGrpcAsyncIOTransport - __all__ = ( "GameServerConfigsServiceTransport", "GameServerConfigsServiceGrpcTransport", diff --git a/google/cloud/gaming_v1beta/services/game_server_configs_service/transports/grpc.py b/google/cloud/gaming_v1beta/services/game_server_configs_service/transports/grpc.py index 2d25773f..e0284bbd 100644 --- a/google/cloud/gaming_v1beta/services/game_server_configs_service/transports/grpc.py +++ b/google/cloud/gaming_v1beta/services/game_server_configs_service/transports/grpc.py @@ -149,6 +149,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -167,9 +171,14 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._stubs = {} # type: Dict[str, Callable] + self._operations_client = None # Run the base constructor. super().__init__( @@ -193,7 +202,7 @@ def create_channel( ) -> grpc.Channel: """Create and return a gRPC channel object. Args: - address (Optionsl[str]): The host for the channel to use. + address (Optional[str]): The host for the channel to use. credentials (Optional[~.Credentials]): The authorization credentials to attach to requests. These credentials identify this application to the service. If @@ -240,13 +249,11 @@ def operations_client(self) -> operations_v1.OperationsClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsClient( - self.grpc_channel - ) + if self._operations_client is None: + self._operations_client = operations_v1.OperationsClient(self.grpc_channel) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_game_server_configs( diff --git a/google/cloud/gaming_v1beta/services/game_server_configs_service/transports/grpc_asyncio.py b/google/cloud/gaming_v1beta/services/game_server_configs_service/transports/grpc_asyncio.py index caf61da8..7975e17d 100644 --- a/google/cloud/gaming_v1beta/services/game_server_configs_service/transports/grpc_asyncio.py +++ b/google/cloud/gaming_v1beta/services/game_server_configs_service/transports/grpc_asyncio.py @@ -194,6 +194,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -212,6 +216,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) # Run the base constructor. @@ -225,6 +233,7 @@ def __init__( ) self._stubs = {} + self._operations_client = None @property def grpc_channel(self) -> aio.Channel: @@ -244,13 +253,13 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsAsyncClient( + if self._operations_client is None: + self._operations_client = operations_v1.OperationsAsyncClient( self.grpc_channel ) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_game_server_configs( diff --git a/google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/__init__.py b/google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/__init__.py index 17e99cc0..3fae0a06 100644 --- a/google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/__init__.py +++ b/google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/__init__.py @@ -30,7 +30,6 @@ _transport_registry["grpc"] = GameServerDeploymentsServiceGrpcTransport _transport_registry["grpc_asyncio"] = GameServerDeploymentsServiceGrpcAsyncIOTransport - __all__ = ( "GameServerDeploymentsServiceTransport", "GameServerDeploymentsServiceGrpcTransport", diff --git a/google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/grpc.py b/google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/grpc.py index 415d00f6..749f3132 100644 --- a/google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/grpc.py +++ b/google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/grpc.py @@ -149,6 +149,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -167,9 +171,14 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._stubs = {} # type: Dict[str, Callable] + self._operations_client = None # Run the base constructor. super().__init__( @@ -193,7 +202,7 @@ def create_channel( ) -> grpc.Channel: """Create and return a gRPC channel object. Args: - address (Optionsl[str]): The host for the channel to use. + address (Optional[str]): The host for the channel to use. credentials (Optional[~.Credentials]): The authorization credentials to attach to requests. These credentials identify this application to the service. If @@ -240,13 +249,11 @@ def operations_client(self) -> operations_v1.OperationsClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsClient( - self.grpc_channel - ) + if self._operations_client is None: + self._operations_client = operations_v1.OperationsClient(self.grpc_channel) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_game_server_deployments( diff --git a/google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/grpc_asyncio.py b/google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/grpc_asyncio.py index 4c14f322..e27273e4 100644 --- a/google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/grpc_asyncio.py +++ b/google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/grpc_asyncio.py @@ -196,6 +196,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -214,6 +218,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) # Run the base constructor. @@ -227,6 +235,7 @@ def __init__( ) self._stubs = {} + self._operations_client = None @property def grpc_channel(self) -> aio.Channel: @@ -246,13 +255,13 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsAsyncClient( + if self._operations_client is None: + self._operations_client = operations_v1.OperationsAsyncClient( self.grpc_channel ) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_game_server_deployments( diff --git a/google/cloud/gaming_v1beta/services/realms_service/transports/__init__.py b/google/cloud/gaming_v1beta/services/realms_service/transports/__init__.py index 2b139b78..ab9c636f 100644 --- a/google/cloud/gaming_v1beta/services/realms_service/transports/__init__.py +++ b/google/cloud/gaming_v1beta/services/realms_service/transports/__init__.py @@ -28,7 +28,6 @@ _transport_registry["grpc"] = RealmsServiceGrpcTransport _transport_registry["grpc_asyncio"] = RealmsServiceGrpcAsyncIOTransport - __all__ = ( "RealmsServiceTransport", "RealmsServiceGrpcTransport", diff --git a/google/cloud/gaming_v1beta/services/realms_service/transports/grpc.py b/google/cloud/gaming_v1beta/services/realms_service/transports/grpc.py index c592d900..9df29246 100644 --- a/google/cloud/gaming_v1beta/services/realms_service/transports/grpc.py +++ b/google/cloud/gaming_v1beta/services/realms_service/transports/grpc.py @@ -149,6 +149,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -167,9 +171,14 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._stubs = {} # type: Dict[str, Callable] + self._operations_client = None # Run the base constructor. super().__init__( @@ -193,7 +202,7 @@ def create_channel( ) -> grpc.Channel: """Create and return a gRPC channel object. Args: - address (Optionsl[str]): The host for the channel to use. + address (Optional[str]): The host for the channel to use. credentials (Optional[~.Credentials]): The authorization credentials to attach to requests. These credentials identify this application to the service. If @@ -240,13 +249,11 @@ def operations_client(self) -> operations_v1.OperationsClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsClient( - self.grpc_channel - ) + if self._operations_client is None: + self._operations_client = operations_v1.OperationsClient(self.grpc_channel) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_realms( diff --git a/google/cloud/gaming_v1beta/services/realms_service/transports/grpc_asyncio.py b/google/cloud/gaming_v1beta/services/realms_service/transports/grpc_asyncio.py index 0313db01..9a4c381d 100644 --- a/google/cloud/gaming_v1beta/services/realms_service/transports/grpc_asyncio.py +++ b/google/cloud/gaming_v1beta/services/realms_service/transports/grpc_asyncio.py @@ -194,6 +194,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -212,6 +216,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) # Run the base constructor. @@ -225,6 +233,7 @@ def __init__( ) self._stubs = {} + self._operations_client = None @property def grpc_channel(self) -> aio.Channel: @@ -244,13 +253,13 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient: client. """ # Sanity check: Only create a new client if we do not already have one. - if "operations_client" not in self.__dict__: - self.__dict__["operations_client"] = operations_v1.OperationsAsyncClient( + if self._operations_client is None: + self._operations_client = operations_v1.OperationsAsyncClient( self.grpc_channel ) # Return the client from cache. - return self.__dict__["operations_client"] + return self._operations_client @property def list_realms( diff --git a/google/cloud/gaming_v1beta/types/__init__.py b/google/cloud/gaming_v1beta/types/__init__.py index fea9d663..ebfd8342 100644 --- a/google/cloud/gaming_v1beta/types/__init__.py +++ b/google/cloud/gaming_v1beta/types/__init__.py @@ -82,7 +82,6 @@ Realm, ) - __all__ = ( "OperationMetadata", "OperationStatus", diff --git a/noxfile.py b/noxfile.py index 3d05d6c1..a57e24be 100644 --- a/noxfile.py +++ b/noxfile.py @@ -81,9 +81,8 @@ def default(session): session.run( "py.test", "--quiet", - "--cov=google.cloud.gameservices", - "--cov=google.cloud", - "--cov=tests.unit", + "--cov=google/cloud", + "--cov=tests/unit", "--cov-append", "--cov-config=.coveragerc", "--cov-report=", diff --git a/samples/snippets/noxfile.py b/samples/snippets/noxfile.py index b90eef00..bca0522e 100644 --- a/samples/snippets/noxfile.py +++ b/samples/snippets/noxfile.py @@ -17,6 +17,7 @@ import os from pathlib import Path import sys +from typing import Callable, Dict, List, Optional import nox @@ -68,7 +69,7 @@ TEST_CONFIG.update(TEST_CONFIG_OVERRIDE) -def get_pytest_env_vars(): +def get_pytest_env_vars() -> Dict[str, str]: """Returns a dict for pytest invocation.""" ret = {} @@ -97,7 +98,7 @@ def get_pytest_env_vars(): # -def _determine_local_import_names(start_dir): +def _determine_local_import_names(start_dir: str) -> List[str]: """Determines all import names that should be considered "local". This is used when running the linter to insure that import order is @@ -135,7 +136,7 @@ def _determine_local_import_names(start_dir): @nox.session -def lint(session): +def lint(session: nox.sessions.Session) -> None: if not TEST_CONFIG['enforce_type_hints']: session.install("flake8", "flake8-import-order") else: @@ -154,7 +155,7 @@ def lint(session): @nox.session -def blacken(session): +def blacken(session: nox.sessions.Session) -> None: session.install("black") python_files = [path for path in os.listdir(".") if path.endswith(".py")] @@ -168,7 +169,7 @@ def blacken(session): PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] -def _session_tests(session, post_install=None): +def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: """Runs py.test for a particular project.""" if os.path.exists("requirements.txt"): session.install("-r", "requirements.txt") @@ -194,7 +195,7 @@ def _session_tests(session, post_install=None): @nox.session(python=ALL_VERSIONS) -def py(session): +def py(session: nox.sessions.Session) -> None: """Runs py.test for a sample using the specified version of Python.""" if session.python in TESTED_VERSIONS: _session_tests(session) @@ -209,7 +210,7 @@ def py(session): # -def _get_repo_root(): +def _get_repo_root() -> Optional[str]: """ Returns the root folder of the project. """ # Get root of this repository. Assume we don't have directories nested deeper than 10 items. p = Path(os.getcwd()) @@ -232,7 +233,7 @@ def _get_repo_root(): @nox.session @nox.parametrize("path", GENERATED_READMES) -def readmegen(session, path): +def readmegen(session: nox.sessions.Session, path: str) -> None: """(Re-)generates the readme for a sample.""" session.install("jinja2", "pyyaml") dir_ = os.path.dirname(path) diff --git a/setup.py b/setup.py index 1c9b2722..7a6f0f1b 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ platforms="Posix; MacOS X; Windows", include_package_data=True, install_requires=( - "google-api-core[grpc] >= 1.22.0, < 2.0.0dev", + "google-api-core[grpc] >= 1.22.2, < 2.0.0dev", "googleapis-common-protos >= 1.5.8", "proto-plus >= 1.4.0", ), diff --git a/synth.metadata b/synth.metadata index 3a9598f1..4c0d165b 100644 --- a/synth.metadata +++ b/synth.metadata @@ -3,30 +3,30 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/python-game-servers.git", - "sha": "be02190d049986c6040e4f607f2868c88a431b6f" + "remote": "git@github.com:googleapis/python-game-servers", + "sha": "91f31197a437691aba6f6cdc52d8a1fb9555efc6" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "468a94a87b9f80d22d1f5e3076d5bab73a5c996f", - "internalRef": "346664095" + "sha": "69697504d9eba1d064820c3085b4750767be6d08", + "internalRef": "348952930" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58" + "sha": "6b026e1443948dcfc0b9e3289c85e940eb70f694" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58" + "sha": "6b026e1443948dcfc0b9e3289c85e940eb70f694" } } ], @@ -49,180 +49,5 @@ "generator": "bazel" } } - ], - "generatedFiles": [ - ".flake8", - ".github/CONTRIBUTING.md", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/release-please.yml", - ".github/snippet-bot.yml", - ".gitignore", - ".kokoro/build.sh", - ".kokoro/continuous/common.cfg", - ".kokoro/continuous/continuous.cfg", - ".kokoro/docker/docs/Dockerfile", - ".kokoro/docker/docs/fetch_gpg_keys.sh", - ".kokoro/docs/common.cfg", - ".kokoro/docs/docs-presubmit.cfg", - ".kokoro/docs/docs.cfg", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/common.cfg", - ".kokoro/presubmit/presubmit.cfg", - ".kokoro/publish-docs.sh", - ".kokoro/release.sh", - ".kokoro/release/common.cfg", - ".kokoro/release/release.cfg", - ".kokoro/samples/lint/common.cfg", - ".kokoro/samples/lint/continuous.cfg", - ".kokoro/samples/lint/periodic.cfg", - ".kokoro/samples/lint/presubmit.cfg", - ".kokoro/samples/python3.6/common.cfg", - ".kokoro/samples/python3.6/continuous.cfg", - ".kokoro/samples/python3.6/periodic.cfg", - ".kokoro/samples/python3.6/presubmit.cfg", - ".kokoro/samples/python3.7/common.cfg", - ".kokoro/samples/python3.7/continuous.cfg", - ".kokoro/samples/python3.7/periodic.cfg", - ".kokoro/samples/python3.7/presubmit.cfg", - ".kokoro/samples/python3.8/common.cfg", - ".kokoro/samples/python3.8/continuous.cfg", - ".kokoro/samples/python3.8/periodic.cfg", - ".kokoro/samples/python3.8/presubmit.cfg", - ".kokoro/test-samples.sh", - ".kokoro/trampoline.sh", - ".kokoro/trampoline_v2.sh", - ".trampolinerc", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.rst", - "LICENSE", - "MANIFEST.in", - "docs/_static/custom.css", - "docs/_templates/layout.html", - "docs/conf.py", - "docs/gaming_v1/services.rst", - "docs/gaming_v1/types.rst", - "docs/gaming_v1beta/services.rst", - "docs/gaming_v1beta/types.rst", - "docs/multiprocessing.rst", - "google/cloud/gaming/__init__.py", - "google/cloud/gaming/py.typed", - "google/cloud/gaming_v1/__init__.py", - "google/cloud/gaming_v1/py.typed", - "google/cloud/gaming_v1/services/__init__.py", - "google/cloud/gaming_v1/services/game_server_clusters_service/__init__.py", - "google/cloud/gaming_v1/services/game_server_clusters_service/async_client.py", - "google/cloud/gaming_v1/services/game_server_clusters_service/client.py", - "google/cloud/gaming_v1/services/game_server_clusters_service/pagers.py", - "google/cloud/gaming_v1/services/game_server_clusters_service/transports/__init__.py", - "google/cloud/gaming_v1/services/game_server_clusters_service/transports/base.py", - "google/cloud/gaming_v1/services/game_server_clusters_service/transports/grpc.py", - "google/cloud/gaming_v1/services/game_server_clusters_service/transports/grpc_asyncio.py", - "google/cloud/gaming_v1/services/game_server_configs_service/__init__.py", - "google/cloud/gaming_v1/services/game_server_configs_service/async_client.py", - "google/cloud/gaming_v1/services/game_server_configs_service/client.py", - "google/cloud/gaming_v1/services/game_server_configs_service/pagers.py", - "google/cloud/gaming_v1/services/game_server_configs_service/transports/__init__.py", - "google/cloud/gaming_v1/services/game_server_configs_service/transports/base.py", - "google/cloud/gaming_v1/services/game_server_configs_service/transports/grpc.py", - "google/cloud/gaming_v1/services/game_server_configs_service/transports/grpc_asyncio.py", - "google/cloud/gaming_v1/services/game_server_deployments_service/__init__.py", - "google/cloud/gaming_v1/services/game_server_deployments_service/async_client.py", - "google/cloud/gaming_v1/services/game_server_deployments_service/client.py", - "google/cloud/gaming_v1/services/game_server_deployments_service/pagers.py", - "google/cloud/gaming_v1/services/game_server_deployments_service/transports/__init__.py", - "google/cloud/gaming_v1/services/game_server_deployments_service/transports/base.py", - "google/cloud/gaming_v1/services/game_server_deployments_service/transports/grpc.py", - "google/cloud/gaming_v1/services/game_server_deployments_service/transports/grpc_asyncio.py", - "google/cloud/gaming_v1/services/realms_service/__init__.py", - "google/cloud/gaming_v1/services/realms_service/async_client.py", - "google/cloud/gaming_v1/services/realms_service/client.py", - "google/cloud/gaming_v1/services/realms_service/pagers.py", - "google/cloud/gaming_v1/services/realms_service/transports/__init__.py", - "google/cloud/gaming_v1/services/realms_service/transports/base.py", - "google/cloud/gaming_v1/services/realms_service/transports/grpc.py", - "google/cloud/gaming_v1/services/realms_service/transports/grpc_asyncio.py", - "google/cloud/gaming_v1/types/__init__.py", - "google/cloud/gaming_v1/types/common.py", - "google/cloud/gaming_v1/types/game_server_clusters.py", - "google/cloud/gaming_v1/types/game_server_clusters_service.py", - "google/cloud/gaming_v1/types/game_server_configs.py", - "google/cloud/gaming_v1/types/game_server_configs_service.py", - "google/cloud/gaming_v1/types/game_server_deployments.py", - "google/cloud/gaming_v1/types/game_server_deployments_service.py", - "google/cloud/gaming_v1/types/realms.py", - "google/cloud/gaming_v1/types/realms_service.py", - "google/cloud/gaming_v1beta/__init__.py", - "google/cloud/gaming_v1beta/py.typed", - "google/cloud/gaming_v1beta/services/__init__.py", - "google/cloud/gaming_v1beta/services/game_server_clusters_service/__init__.py", - "google/cloud/gaming_v1beta/services/game_server_clusters_service/async_client.py", - "google/cloud/gaming_v1beta/services/game_server_clusters_service/client.py", - "google/cloud/gaming_v1beta/services/game_server_clusters_service/pagers.py", - "google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/__init__.py", - "google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/base.py", - "google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/grpc.py", - "google/cloud/gaming_v1beta/services/game_server_clusters_service/transports/grpc_asyncio.py", - "google/cloud/gaming_v1beta/services/game_server_configs_service/__init__.py", - "google/cloud/gaming_v1beta/services/game_server_configs_service/async_client.py", - "google/cloud/gaming_v1beta/services/game_server_configs_service/client.py", - "google/cloud/gaming_v1beta/services/game_server_configs_service/pagers.py", - "google/cloud/gaming_v1beta/services/game_server_configs_service/transports/__init__.py", - "google/cloud/gaming_v1beta/services/game_server_configs_service/transports/base.py", - "google/cloud/gaming_v1beta/services/game_server_configs_service/transports/grpc.py", - "google/cloud/gaming_v1beta/services/game_server_configs_service/transports/grpc_asyncio.py", - "google/cloud/gaming_v1beta/services/game_server_deployments_service/__init__.py", - "google/cloud/gaming_v1beta/services/game_server_deployments_service/async_client.py", - "google/cloud/gaming_v1beta/services/game_server_deployments_service/client.py", - "google/cloud/gaming_v1beta/services/game_server_deployments_service/pagers.py", - "google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/__init__.py", - "google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/base.py", - "google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/grpc.py", - "google/cloud/gaming_v1beta/services/game_server_deployments_service/transports/grpc_asyncio.py", - "google/cloud/gaming_v1beta/services/realms_service/__init__.py", - "google/cloud/gaming_v1beta/services/realms_service/async_client.py", - "google/cloud/gaming_v1beta/services/realms_service/client.py", - "google/cloud/gaming_v1beta/services/realms_service/pagers.py", - "google/cloud/gaming_v1beta/services/realms_service/transports/__init__.py", - "google/cloud/gaming_v1beta/services/realms_service/transports/base.py", - "google/cloud/gaming_v1beta/services/realms_service/transports/grpc.py", - "google/cloud/gaming_v1beta/services/realms_service/transports/grpc_asyncio.py", - "google/cloud/gaming_v1beta/types/__init__.py", - "google/cloud/gaming_v1beta/types/common.py", - "google/cloud/gaming_v1beta/types/game_server_clusters.py", - "google/cloud/gaming_v1beta/types/game_server_clusters_service.py", - "google/cloud/gaming_v1beta/types/game_server_configs.py", - "google/cloud/gaming_v1beta/types/game_server_configs_service.py", - "google/cloud/gaming_v1beta/types/game_server_deployments.py", - "google/cloud/gaming_v1beta/types/game_server_deployments_service.py", - "google/cloud/gaming_v1beta/types/realms.py", - "google/cloud/gaming_v1beta/types/realms_service.py", - "mypy.ini", - "noxfile.py", - "renovate.json", - "samples/snippets/noxfile.py", - "scripts/decrypt-secrets.sh", - "scripts/fixup_gaming_v1_keywords.py", - "scripts/fixup_gaming_v1beta_keywords.py", - "scripts/readme-gen/readme_gen.py", - "scripts/readme-gen/templates/README.tmpl.rst", - "scripts/readme-gen/templates/auth.tmpl.rst", - "scripts/readme-gen/templates/auth_api_key.tmpl.rst", - "scripts/readme-gen/templates/install_deps.tmpl.rst", - "scripts/readme-gen/templates/install_portaudio.tmpl.rst", - "setup.cfg", - "testing/.gitignore", - "tests/unit/gapic/gaming_v1/__init__.py", - "tests/unit/gapic/gaming_v1/test_game_server_clusters_service.py", - "tests/unit/gapic/gaming_v1/test_game_server_configs_service.py", - "tests/unit/gapic/gaming_v1/test_game_server_deployments_service.py", - "tests/unit/gapic/gaming_v1/test_realms_service.py", - "tests/unit/gapic/gaming_v1beta/__init__.py", - "tests/unit/gapic/gaming_v1beta/test_game_server_clusters_service.py", - "tests/unit/gapic/gaming_v1beta/test_game_server_configs_service.py", - "tests/unit/gapic/gaming_v1beta/test_game_server_deployments_service.py", - "tests/unit/gapic/gaming_v1beta/test_realms_service.py" ] } \ No newline at end of file diff --git a/tests/unit/gapic/gaming_v1/test_game_server_clusters_service.py b/tests/unit/gapic/gaming_v1/test_game_server_clusters_service.py index 7f9e1eec..7f0d325e 100644 --- a/tests/unit/gapic/gaming_v1/test_game_server_clusters_service.py +++ b/tests/unit/gapic/gaming_v1/test_game_server_clusters_service.py @@ -2529,6 +2529,10 @@ def test_game_server_clusters_service_transport_channel_mtls_with_client_cert_so scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel assert transport._ssl_channel_credentials == mock_ssl_cred @@ -2570,6 +2574,10 @@ def test_game_server_clusters_service_transport_channel_mtls_with_adc(transport_ scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel diff --git a/tests/unit/gapic/gaming_v1/test_game_server_configs_service.py b/tests/unit/gapic/gaming_v1/test_game_server_configs_service.py index 6aa4c939..440eb4da 100644 --- a/tests/unit/gapic/gaming_v1/test_game_server_configs_service.py +++ b/tests/unit/gapic/gaming_v1/test_game_server_configs_service.py @@ -1806,6 +1806,10 @@ def test_game_server_configs_service_transport_channel_mtls_with_client_cert_sou scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel assert transport._ssl_channel_credentials == mock_ssl_cred @@ -1847,6 +1851,10 @@ def test_game_server_configs_service_transport_channel_mtls_with_adc(transport_c scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel diff --git a/tests/unit/gapic/gaming_v1/test_game_server_deployments_service.py b/tests/unit/gapic/gaming_v1/test_game_server_deployments_service.py index a1a37442..fc46942a 100644 --- a/tests/unit/gapic/gaming_v1/test_game_server_deployments_service.py +++ b/tests/unit/gapic/gaming_v1/test_game_server_deployments_service.py @@ -2886,6 +2886,10 @@ def test_game_server_deployments_service_transport_channel_mtls_with_client_cert scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel assert transport._ssl_channel_credentials == mock_ssl_cred @@ -2929,6 +2933,10 @@ def test_game_server_deployments_service_transport_channel_mtls_with_adc( scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel diff --git a/tests/unit/gapic/gaming_v1/test_realms_service.py b/tests/unit/gapic/gaming_v1/test_realms_service.py index ca3d9632..08a180f5 100644 --- a/tests/unit/gapic/gaming_v1/test_realms_service.py +++ b/tests/unit/gapic/gaming_v1/test_realms_service.py @@ -1929,6 +1929,10 @@ def test_realms_service_transport_channel_mtls_with_client_cert_source(transport scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel assert transport._ssl_channel_credentials == mock_ssl_cred @@ -1970,6 +1974,10 @@ def test_realms_service_transport_channel_mtls_with_adc(transport_class): scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel diff --git a/tests/unit/gapic/gaming_v1beta/test_game_server_clusters_service.py b/tests/unit/gapic/gaming_v1beta/test_game_server_clusters_service.py index 16e1fa31..fc9dab62 100644 --- a/tests/unit/gapic/gaming_v1beta/test_game_server_clusters_service.py +++ b/tests/unit/gapic/gaming_v1beta/test_game_server_clusters_service.py @@ -2529,6 +2529,10 @@ def test_game_server_clusters_service_transport_channel_mtls_with_client_cert_so scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel assert transport._ssl_channel_credentials == mock_ssl_cred @@ -2570,6 +2574,10 @@ def test_game_server_clusters_service_transport_channel_mtls_with_adc(transport_ scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel diff --git a/tests/unit/gapic/gaming_v1beta/test_game_server_configs_service.py b/tests/unit/gapic/gaming_v1beta/test_game_server_configs_service.py index 3dfc58bd..fcb89945 100644 --- a/tests/unit/gapic/gaming_v1beta/test_game_server_configs_service.py +++ b/tests/unit/gapic/gaming_v1beta/test_game_server_configs_service.py @@ -1806,6 +1806,10 @@ def test_game_server_configs_service_transport_channel_mtls_with_client_cert_sou scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel assert transport._ssl_channel_credentials == mock_ssl_cred @@ -1847,6 +1851,10 @@ def test_game_server_configs_service_transport_channel_mtls_with_adc(transport_c scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel diff --git a/tests/unit/gapic/gaming_v1beta/test_game_server_deployments_service.py b/tests/unit/gapic/gaming_v1beta/test_game_server_deployments_service.py index e56c8556..0fe7376f 100644 --- a/tests/unit/gapic/gaming_v1beta/test_game_server_deployments_service.py +++ b/tests/unit/gapic/gaming_v1beta/test_game_server_deployments_service.py @@ -2888,6 +2888,10 @@ def test_game_server_deployments_service_transport_channel_mtls_with_client_cert scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel assert transport._ssl_channel_credentials == mock_ssl_cred @@ -2931,6 +2935,10 @@ def test_game_server_deployments_service_transport_channel_mtls_with_adc( scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel diff --git a/tests/unit/gapic/gaming_v1beta/test_realms_service.py b/tests/unit/gapic/gaming_v1beta/test_realms_service.py index c018403e..c4277570 100644 --- a/tests/unit/gapic/gaming_v1beta/test_realms_service.py +++ b/tests/unit/gapic/gaming_v1beta/test_realms_service.py @@ -1929,6 +1929,10 @@ def test_realms_service_transport_channel_mtls_with_client_cert_source(transport scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel assert transport._ssl_channel_credentials == mock_ssl_cred @@ -1970,6 +1974,10 @@ def test_realms_service_transport_channel_mtls_with_adc(transport_class): scopes=("https://www.googleapis.com/auth/cloud-platform",), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel