google-cloud-devicestreaming 0.4.0__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/MANIFEST.in +1 -1
  2. {google_cloud_devicestreaming-0.4.0/google_cloud_devicestreaming.egg-info → google_cloud_devicestreaming-0.5.0}/PKG-INFO +17 -17
  3. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/README.rst +12 -11
  4. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming/__init__.py +1 -1
  5. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming/gapic_version.py +2 -2
  6. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/__init__.py +4 -21
  7. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/gapic_version.py +2 -2
  8. {google_cloud_devicestreaming-0.4.0/tests/unit → google_cloud_devicestreaming-0.5.0/google/cloud/devicestreaming_v1/services}/__init__.py +1 -1
  9. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/__init__.py +1 -1
  10. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/async_client.py +1 -1
  11. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/client.py +1 -1
  12. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/pagers.py +1 -1
  13. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/transports/__init__.py +1 -1
  14. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/transports/base.py +1 -1
  15. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/transports/grpc.py +1 -1
  16. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/transports/grpc_asyncio.py +1 -1
  17. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/transports/rest.py +1 -1
  18. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/transports/rest_base.py +1 -1
  19. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/types/__init__.py +1 -1
  20. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/types/adb_service.py +1 -1
  21. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/types/service.py +1 -1
  22. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0/google_cloud_devicestreaming.egg-info}/PKG-INFO +17 -17
  23. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google_cloud_devicestreaming.egg-info/requires.txt +2 -2
  24. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/setup.py +5 -6
  25. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/tests/__init__.py +1 -1
  26. {google_cloud_devicestreaming-0.4.0/tests/unit/gapic → google_cloud_devicestreaming-0.5.0/tests/unit}/__init__.py +1 -1
  27. {google_cloud_devicestreaming-0.4.0/google/cloud/devicestreaming_v1/services → google_cloud_devicestreaming-0.5.0/tests/unit/gapic}/__init__.py +1 -1
  28. google_cloud_devicestreaming-0.5.0/tests/unit/gapic/devicestreaming_v1/__init__.py +15 -0
  29. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/tests/unit/gapic/devicestreaming_v1/test_direct_access_service.py +108 -104
  30. google_cloud_devicestreaming-0.4.0/tests/unit/gapic/devicestreaming_v1/__init__.py +0 -15
  31. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/LICENSE +0 -0
  32. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming/py.typed +0 -0
  33. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/gapic_metadata.json +0 -0
  34. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/py.typed +0 -0
  35. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google_cloud_devicestreaming.egg-info/SOURCES.txt +0 -0
  36. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google_cloud_devicestreaming.egg-info/dependency_links.txt +0 -0
  37. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google_cloud_devicestreaming.egg-info/not-zip-safe +0 -0
  38. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/google_cloud_devicestreaming.egg-info/top_level.txt +0 -0
  39. {google_cloud_devicestreaming-0.4.0 → google_cloud_devicestreaming-0.5.0}/setup.cfg +0 -0
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,18 +1,17 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-cloud-devicestreaming
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Google Cloud Devicestreaming API client library
5
5
  Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-devicestreaming
6
6
  Author: Google LLC
7
7
  Author-email: googleapis-packages@google.com
8
- License: Apache 2.0
8
+ License: Apache-2.0
9
9
  Platform: Posix; MacOS X; Windows
10
10
  Classifier: Development Status :: 4 - Beta
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.9
16
15
  Classifier: Programming Language :: Python :: 3.10
17
16
  Classifier: Programming Language :: Python :: 3.11
18
17
  Classifier: Programming Language :: Python :: 3.12
@@ -20,11 +19,11 @@ Classifier: Programming Language :: Python :: 3.13
20
19
  Classifier: Programming Language :: Python :: 3.14
21
20
  Classifier: Operating System :: OS Independent
22
21
  Classifier: Topic :: Internet
23
- Requires-Python: >=3.9
22
+ Requires-Python: >=3.10
24
23
  License-File: LICENSE
25
- Requires-Dist: google-api-core[grpc]<3.0.0,>=2.11.0
24
+ Requires-Dist: google-api-core[grpc]<3.0.0,>=2.17.1
26
25
  Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
27
- Requires-Dist: grpcio<2.0.0,>=1.33.2
26
+ Requires-Dist: grpcio<2.0.0,>=1.59.0
28
27
  Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14"
29
28
  Requires-Dist: proto-plus<2.0.0,>=1.22.3
30
29
  Requires-Dist: proto-plus<2.0.0,>=1.25.0; python_version >= "3.13"
@@ -41,12 +40,12 @@ Dynamic: requires-dist
41
40
  Dynamic: requires-python
42
41
  Dynamic: summary
43
42
 
44
- Python Client for Device Streaming API
45
- ======================================
43
+ Python Client for Device Streaming
44
+ ==================================
46
45
 
47
46
  |preview| |pypi| |versions|
48
47
 
49
- `Device Streaming API`_: The Cloud API for device streaming usage.
48
+ `Device Streaming`_: The Cloud API for device streaming usage.
50
49
 
51
50
  - `Client Library Documentation`_
52
51
  - `Product Documentation`_
@@ -57,7 +56,7 @@ Python Client for Device Streaming API
57
56
  :target: https://pypi.org/project/google-cloud-devicestreaming/
58
57
  .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-devicestreaming.svg
59
58
  :target: https://pypi.org/project/google-cloud-devicestreaming/
60
- .. _Device Streaming API: https://cloud.google.com/device-streaming/docs
59
+ .. _Device Streaming: https://cloud.google.com/device-streaming/docs
61
60
  .. _Client Library Documentation: https://cloud.google.com/python/docs/reference/google-cloud-devicestreaming/latest/summary_overview
62
61
  .. _Product Documentation: https://cloud.google.com/device-streaming/docs
63
62
 
@@ -68,12 +67,12 @@ In order to use this library, you first need to go through the following steps:
68
67
 
69
68
  1. `Select or create a Cloud Platform project.`_
70
69
  2. `Enable billing for your project.`_
71
- 3. `Enable the Device Streaming API.`_
70
+ 3. `Enable the Device Streaming.`_
72
71
  4. `Set up Authentication.`_
73
72
 
74
73
  .. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
75
74
  .. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
76
- .. _Enable the Device Streaming API.: https://cloud.google.com/device-streaming/docs
75
+ .. _Enable the Device Streaming.: https://cloud.google.com/device-streaming/docs
77
76
  .. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
78
77
 
79
78
  Installation
@@ -104,14 +103,15 @@ Supported Python Versions
104
103
  Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
105
104
  Python.
106
105
 
107
- Python >= 3.9, including 3.14
106
+ Python >= 3.10, including 3.14
108
107
 
109
108
  .. _active: https://devguide.python.org/devcycle/#in-development-main-branch
110
109
  .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
111
110
 
112
111
  Unsupported Python Versions
113
112
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
114
- Python <= 3.8
113
+ Python <= 3.9
114
+
115
115
 
116
116
  If you are using an `end-of-life`_
117
117
  version of Python, we recommend that you update as soon as possible to an actively supported version.
@@ -140,14 +140,14 @@ Windows
140
140
  Next Steps
141
141
  ~~~~~~~~~~
142
142
 
143
- - Read the `Client Library Documentation`_ for Device Streaming API
143
+ - Read the `Client Library Documentation`_ for Device Streaming
144
144
  to see other available methods on the client.
145
- - Read the `Device Streaming API Product documentation`_ to learn
145
+ - Read the `Device Streaming Product documentation`_ to learn
146
146
  more about the product and see How-to Guides.
147
147
  - View this `README`_ to see the full list of Cloud
148
148
  APIs that we cover.
149
149
 
150
- .. _Device Streaming API Product documentation: https://cloud.google.com/device-streaming/docs
150
+ .. _Device Streaming Product documentation: https://cloud.google.com/device-streaming/docs
151
151
  .. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
152
152
 
153
153
  Logging
@@ -1,9 +1,9 @@
1
- Python Client for Device Streaming API
2
- ======================================
1
+ Python Client for Device Streaming
2
+ ==================================
3
3
 
4
4
  |preview| |pypi| |versions|
5
5
 
6
- `Device Streaming API`_: The Cloud API for device streaming usage.
6
+ `Device Streaming`_: The Cloud API for device streaming usage.
7
7
 
8
8
  - `Client Library Documentation`_
9
9
  - `Product Documentation`_
@@ -14,7 +14,7 @@ Python Client for Device Streaming API
14
14
  :target: https://pypi.org/project/google-cloud-devicestreaming/
15
15
  .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-devicestreaming.svg
16
16
  :target: https://pypi.org/project/google-cloud-devicestreaming/
17
- .. _Device Streaming API: https://cloud.google.com/device-streaming/docs
17
+ .. _Device Streaming: https://cloud.google.com/device-streaming/docs
18
18
  .. _Client Library Documentation: https://cloud.google.com/python/docs/reference/google-cloud-devicestreaming/latest/summary_overview
19
19
  .. _Product Documentation: https://cloud.google.com/device-streaming/docs
20
20
 
@@ -25,12 +25,12 @@ In order to use this library, you first need to go through the following steps:
25
25
 
26
26
  1. `Select or create a Cloud Platform project.`_
27
27
  2. `Enable billing for your project.`_
28
- 3. `Enable the Device Streaming API.`_
28
+ 3. `Enable the Device Streaming.`_
29
29
  4. `Set up Authentication.`_
30
30
 
31
31
  .. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
32
32
  .. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
33
- .. _Enable the Device Streaming API.: https://cloud.google.com/device-streaming/docs
33
+ .. _Enable the Device Streaming.: https://cloud.google.com/device-streaming/docs
34
34
  .. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
35
35
 
36
36
  Installation
@@ -61,14 +61,15 @@ Supported Python Versions
61
61
  Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
62
62
  Python.
63
63
 
64
- Python >= 3.9, including 3.14
64
+ Python >= 3.10, including 3.14
65
65
 
66
66
  .. _active: https://devguide.python.org/devcycle/#in-development-main-branch
67
67
  .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
68
68
 
69
69
  Unsupported Python Versions
70
70
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
71
- Python <= 3.8
71
+ Python <= 3.9
72
+
72
73
 
73
74
  If you are using an `end-of-life`_
74
75
  version of Python, we recommend that you update as soon as possible to an actively supported version.
@@ -97,14 +98,14 @@ Windows
97
98
  Next Steps
98
99
  ~~~~~~~~~~
99
100
 
100
- - Read the `Client Library Documentation`_ for Device Streaming API
101
+ - Read the `Client Library Documentation`_ for Device Streaming
101
102
  to see other available methods on the client.
102
- - Read the `Device Streaming API Product documentation`_ to learn
103
+ - Read the `Device Streaming Product documentation`_ to learn
103
104
  more about the product and see How-to Guides.
104
105
  - View this `README`_ to see the full list of Cloud
105
106
  APIs that we cover.
106
107
 
107
- .. _Device Streaming API Product documentation: https://cloud.google.com/device-streaming/docs
108
+ .. _Device Streaming Product documentation: https://cloud.google.com/device-streaming/docs
108
109
  .. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
109
110
 
110
111
  Logging
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.4.0" # {x-release-please-version}
16
+ __version__ = "0.5.0" # {x-release-please-version}
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -21,13 +21,7 @@ from google.cloud.devicestreaming_v1 import gapic_version as package_version
21
21
 
22
22
  __version__ = package_version.__version__
23
23
 
24
- if sys.version_info >= (3, 8): # pragma: NO COVER
25
- from importlib import metadata
26
- else: # pragma: NO COVER
27
- # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove
28
- # this code path once we drop support for Python 3.7
29
- import importlib_metadata as metadata
30
-
24
+ from importlib import metadata
31
25
 
32
26
  from .services.direct_access_service import (
33
27
  DirectAccessServiceAsyncClient,
@@ -64,28 +58,17 @@ else: # pragma: NO COVER
64
58
  # An older version of api_core is installed which does not define the
65
59
  # functions above. We do equivalent checks manually.
66
60
  try:
67
- import sys
68
61
  import warnings
69
62
 
70
63
  _py_version_str = sys.version.split()[0]
71
64
  _package_label = "google.cloud.devicestreaming_v1"
72
- if sys.version_info < (3, 9):
65
+ if sys.version_info < (3, 10):
73
66
  warnings.warn(
74
67
  "You are using a non-supported Python version "
75
68
  + f"({_py_version_str}). Google will not post any further "
76
69
  + f"updates to {_package_label} supporting this Python version. "
77
70
  + "Please upgrade to the latest Python version, or at "
78
- + f"least to Python 3.9, and then update {_package_label}.",
79
- FutureWarning,
80
- )
81
- if sys.version_info[:2] == (3, 9):
82
- warnings.warn(
83
- f"You are using a Python version ({_py_version_str}) "
84
- + f"which Google will stop supporting in {_package_label} in "
85
- + "January 2026. Please "
86
- + "upgrade to the latest Python version, or at "
87
- + "least to Python 3.10, before then, and "
88
- + f"then update {_package_label}.",
71
+ + f"least to Python 3.10, and then update {_package_label}.",
89
72
  FutureWarning,
90
73
  )
91
74
 
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.4.0" # {x-release-please-version}
16
+ __version__ = "0.5.0" # {x-release-please-version}
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,18 +1,17 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-cloud-devicestreaming
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Google Cloud Devicestreaming API client library
5
5
  Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-devicestreaming
6
6
  Author: Google LLC
7
7
  Author-email: googleapis-packages@google.com
8
- License: Apache 2.0
8
+ License: Apache-2.0
9
9
  Platform: Posix; MacOS X; Windows
10
10
  Classifier: Development Status :: 4 - Beta
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.9
16
15
  Classifier: Programming Language :: Python :: 3.10
17
16
  Classifier: Programming Language :: Python :: 3.11
18
17
  Classifier: Programming Language :: Python :: 3.12
@@ -20,11 +19,11 @@ Classifier: Programming Language :: Python :: 3.13
20
19
  Classifier: Programming Language :: Python :: 3.14
21
20
  Classifier: Operating System :: OS Independent
22
21
  Classifier: Topic :: Internet
23
- Requires-Python: >=3.9
22
+ Requires-Python: >=3.10
24
23
  License-File: LICENSE
25
- Requires-Dist: google-api-core[grpc]<3.0.0,>=2.11.0
24
+ Requires-Dist: google-api-core[grpc]<3.0.0,>=2.17.1
26
25
  Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
27
- Requires-Dist: grpcio<2.0.0,>=1.33.2
26
+ Requires-Dist: grpcio<2.0.0,>=1.59.0
28
27
  Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14"
29
28
  Requires-Dist: proto-plus<2.0.0,>=1.22.3
30
29
  Requires-Dist: proto-plus<2.0.0,>=1.25.0; python_version >= "3.13"
@@ -41,12 +40,12 @@ Dynamic: requires-dist
41
40
  Dynamic: requires-python
42
41
  Dynamic: summary
43
42
 
44
- Python Client for Device Streaming API
45
- ======================================
43
+ Python Client for Device Streaming
44
+ ==================================
46
45
 
47
46
  |preview| |pypi| |versions|
48
47
 
49
- `Device Streaming API`_: The Cloud API for device streaming usage.
48
+ `Device Streaming`_: The Cloud API for device streaming usage.
50
49
 
51
50
  - `Client Library Documentation`_
52
51
  - `Product Documentation`_
@@ -57,7 +56,7 @@ Python Client for Device Streaming API
57
56
  :target: https://pypi.org/project/google-cloud-devicestreaming/
58
57
  .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-devicestreaming.svg
59
58
  :target: https://pypi.org/project/google-cloud-devicestreaming/
60
- .. _Device Streaming API: https://cloud.google.com/device-streaming/docs
59
+ .. _Device Streaming: https://cloud.google.com/device-streaming/docs
61
60
  .. _Client Library Documentation: https://cloud.google.com/python/docs/reference/google-cloud-devicestreaming/latest/summary_overview
62
61
  .. _Product Documentation: https://cloud.google.com/device-streaming/docs
63
62
 
@@ -68,12 +67,12 @@ In order to use this library, you first need to go through the following steps:
68
67
 
69
68
  1. `Select or create a Cloud Platform project.`_
70
69
  2. `Enable billing for your project.`_
71
- 3. `Enable the Device Streaming API.`_
70
+ 3. `Enable the Device Streaming.`_
72
71
  4. `Set up Authentication.`_
73
72
 
74
73
  .. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
75
74
  .. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
76
- .. _Enable the Device Streaming API.: https://cloud.google.com/device-streaming/docs
75
+ .. _Enable the Device Streaming.: https://cloud.google.com/device-streaming/docs
77
76
  .. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
78
77
 
79
78
  Installation
@@ -104,14 +103,15 @@ Supported Python Versions
104
103
  Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
105
104
  Python.
106
105
 
107
- Python >= 3.9, including 3.14
106
+ Python >= 3.10, including 3.14
108
107
 
109
108
  .. _active: https://devguide.python.org/devcycle/#in-development-main-branch
110
109
  .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
111
110
 
112
111
  Unsupported Python Versions
113
112
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
114
- Python <= 3.8
113
+ Python <= 3.9
114
+
115
115
 
116
116
  If you are using an `end-of-life`_
117
117
  version of Python, we recommend that you update as soon as possible to an actively supported version.
@@ -140,14 +140,14 @@ Windows
140
140
  Next Steps
141
141
  ~~~~~~~~~~
142
142
 
143
- - Read the `Client Library Documentation`_ for Device Streaming API
143
+ - Read the `Client Library Documentation`_ for Device Streaming
144
144
  to see other available methods on the client.
145
- - Read the `Device Streaming API Product documentation`_ to learn
145
+ - Read the `Device Streaming Product documentation`_ to learn
146
146
  more about the product and see How-to Guides.
147
147
  - View this `README`_ to see the full list of Cloud
148
148
  APIs that we cover.
149
149
 
150
- .. _Device Streaming API Product documentation: https://cloud.google.com/device-streaming/docs
150
+ .. _Device Streaming Product documentation: https://cloud.google.com/device-streaming/docs
151
151
  .. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
152
152
 
153
153
  Logging
@@ -1,6 +1,6 @@
1
- google-api-core[grpc]<3.0.0,>=2.11.0
1
+ google-api-core[grpc]<3.0.0,>=2.17.1
2
2
  google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
3
- grpcio<2.0.0,>=1.33.2
3
+ grpcio<2.0.0,>=1.59.0
4
4
  proto-plus<2.0.0,>=1.22.3
5
5
  protobuf<8.0.0,>=4.25.8
6
6
 
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -41,11 +41,11 @@ else:
41
41
  release_status = "Development Status :: 5 - Production/Stable"
42
42
 
43
43
  dependencies = [
44
- "google-api-core[grpc] >= 2.11.0, <3.0.0",
44
+ "google-api-core[grpc] >= 2.17.1, <3.0.0",
45
45
  # Exclude incompatible versions of `google-auth`
46
46
  # See https://github.com/googleapis/google-cloud-python/issues/12364
47
47
  "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
48
- "grpcio >= 1.33.2, < 2.0.0",
48
+ "grpcio >= 1.59.0, < 2.0.0",
49
49
  "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
50
50
  "proto-plus >= 1.22.3, <2.0.0",
51
51
  "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
@@ -73,7 +73,7 @@ setuptools.setup(
73
73
  long_description=readme,
74
74
  author="Google LLC",
75
75
  author_email="googleapis-packages@google.com",
76
- license="Apache 2.0",
76
+ license="Apache-2.0",
77
77
  url=url,
78
78
  classifiers=[
79
79
  release_status,
@@ -81,7 +81,6 @@ setuptools.setup(
81
81
  "License :: OSI Approved :: Apache Software License",
82
82
  "Programming Language :: Python",
83
83
  "Programming Language :: Python :: 3",
84
- "Programming Language :: Python :: 3.9",
85
84
  "Programming Language :: Python :: 3.10",
86
85
  "Programming Language :: Python :: 3.11",
87
86
  "Programming Language :: Python :: 3.12",
@@ -92,7 +91,7 @@ setuptools.setup(
92
91
  ],
93
92
  platforms="Posix; MacOS X; Windows",
94
93
  packages=packages,
95
- python_requires=">=3.9",
94
+ python_requires=">=3.10",
96
95
  install_requires=dependencies,
97
96
  extras_require=extras,
98
97
  include_package_data=True,
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -0,0 +1,15 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2026 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -13,18 +13,13 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- import os
17
-
18
- # try/except added for compatibility with python < 3.8
19
- try:
20
- from unittest import mock
21
- from unittest.mock import AsyncMock # pragma: NO COVER
22
- except ImportError: # pragma: NO COVER
23
- import mock
24
-
16
+ import asyncio
25
17
  import json
26
18
  import math
19
+ import os
27
20
  from collections.abc import AsyncIterable, Iterable, Mapping, Sequence
21
+ from unittest import mock
22
+ from unittest.mock import AsyncMock
28
23
 
29
24
  import grpc
30
25
  import pytest
@@ -116,6 +111,21 @@ def modify_default_endpoint_template(client):
116
111
  )
117
112
 
118
113
 
114
+ @pytest.fixture(autouse=True)
115
+ def set_event_loop():
116
+ try:
117
+ asyncio.get_running_loop()
118
+ yield
119
+ except RuntimeError:
120
+ loop = asyncio.new_event_loop()
121
+ asyncio.set_event_loop(loop)
122
+ try:
123
+ yield
124
+ finally:
125
+ loop.close()
126
+ asyncio.set_event_loop(None)
127
+
128
+
119
129
  def test__get_default_mtls_endpoint():
120
130
  api_endpoint = "example.googleapis.com"
121
131
  api_mtls_endpoint = "example.mtls.googleapis.com"
@@ -1379,8 +1389,8 @@ def test_direct_access_service_client_create_channel_credentials_file(
1379
1389
  @pytest.mark.parametrize(
1380
1390
  "request_type",
1381
1391
  [
1382
- service.CreateDeviceSessionRequest,
1383
- dict,
1392
+ service.CreateDeviceSessionRequest(),
1393
+ {},
1384
1394
  ],
1385
1395
  )
1386
1396
  def test_create_device_session(request_type, transport: str = "grpc"):
@@ -1391,7 +1401,7 @@ def test_create_device_session(request_type, transport: str = "grpc"):
1391
1401
 
1392
1402
  # Everything is optional in proto3 as far as the runtime is concerned,
1393
1403
  # and we are mocking out the actual API, so just send an empty request.
1394
- request = request_type()
1404
+ request = request_type
1395
1405
 
1396
1406
  # Mock the actual call within the gRPC stub, and fake the request.
1397
1407
  with mock.patch.object(
@@ -1444,10 +1454,11 @@ def test_create_device_session_non_empty_request_with_auto_populated_field():
1444
1454
  client.create_device_session(request=request)
1445
1455
  call.assert_called()
1446
1456
  _, args, _ = call.mock_calls[0]
1447
- assert args[0] == service.CreateDeviceSessionRequest(
1457
+ request_msg = service.CreateDeviceSessionRequest(
1448
1458
  parent="parent_value",
1449
1459
  device_session_id="device_session_id_value",
1450
1460
  )
1461
+ assert args[0] == request_msg
1451
1462
 
1452
1463
 
1453
1464
  def test_create_device_session_use_cached_wrapped_rpc():
@@ -1533,8 +1544,15 @@ async def test_create_device_session_async_use_cached_wrapped_rpc(
1533
1544
 
1534
1545
 
1535
1546
  @pytest.mark.asyncio
1547
+ @pytest.mark.parametrize(
1548
+ "request_type",
1549
+ [
1550
+ service.CreateDeviceSessionRequest(),
1551
+ {},
1552
+ ],
1553
+ )
1536
1554
  async def test_create_device_session_async(
1537
- transport: str = "grpc_asyncio", request_type=service.CreateDeviceSessionRequest
1555
+ request_type, transport: str = "grpc_asyncio"
1538
1556
  ):
1539
1557
  client = DirectAccessServiceAsyncClient(
1540
1558
  credentials=async_anonymous_credentials(),
@@ -1543,7 +1561,7 @@ async def test_create_device_session_async(
1543
1561
 
1544
1562
  # Everything is optional in proto3 as far as the runtime is concerned,
1545
1563
  # and we are mocking out the actual API, so just send an empty request.
1546
- request = request_type()
1564
+ request = request_type
1547
1565
 
1548
1566
  # Mock the actual call within the gRPC stub, and fake the request.
1549
1567
  with mock.patch.object(
@@ -1572,11 +1590,6 @@ async def test_create_device_session_async(
1572
1590
  assert response.state == service.DeviceSession.SessionState.REQUESTED
1573
1591
 
1574
1592
 
1575
- @pytest.mark.asyncio
1576
- async def test_create_device_session_async_from_dict():
1577
- await test_create_device_session_async(request_type=dict)
1578
-
1579
-
1580
1593
  def test_create_device_session_field_headers():
1581
1594
  client = DirectAccessServiceClient(
1582
1595
  credentials=ga_credentials.AnonymousCredentials(),
@@ -1751,8 +1764,8 @@ async def test_create_device_session_flattened_error_async():
1751
1764
  @pytest.mark.parametrize(
1752
1765
  "request_type",
1753
1766
  [
1754
- service.ListDeviceSessionsRequest,
1755
- dict,
1767
+ service.ListDeviceSessionsRequest(),
1768
+ {},
1756
1769
  ],
1757
1770
  )
1758
1771
  def test_list_device_sessions(request_type, transport: str = "grpc"):
@@ -1763,7 +1776,7 @@ def test_list_device_sessions(request_type, transport: str = "grpc"):
1763
1776
 
1764
1777
  # Everything is optional in proto3 as far as the runtime is concerned,
1765
1778
  # and we are mocking out the actual API, so just send an empty request.
1766
- request = request_type()
1779
+ request = request_type
1767
1780
 
1768
1781
  # Mock the actual call within the gRPC stub, and fake the request.
1769
1782
  with mock.patch.object(
@@ -1813,11 +1826,12 @@ def test_list_device_sessions_non_empty_request_with_auto_populated_field():
1813
1826
  client.list_device_sessions(request=request)
1814
1827
  call.assert_called()
1815
1828
  _, args, _ = call.mock_calls[0]
1816
- assert args[0] == service.ListDeviceSessionsRequest(
1829
+ request_msg = service.ListDeviceSessionsRequest(
1817
1830
  parent="parent_value",
1818
1831
  page_token="page_token_value",
1819
1832
  filter="filter_value",
1820
1833
  )
1834
+ assert args[0] == request_msg
1821
1835
 
1822
1836
 
1823
1837
  def test_list_device_sessions_use_cached_wrapped_rpc():
@@ -1902,8 +1916,15 @@ async def test_list_device_sessions_async_use_cached_wrapped_rpc(
1902
1916
 
1903
1917
 
1904
1918
  @pytest.mark.asyncio
1919
+ @pytest.mark.parametrize(
1920
+ "request_type",
1921
+ [
1922
+ service.ListDeviceSessionsRequest(),
1923
+ {},
1924
+ ],
1925
+ )
1905
1926
  async def test_list_device_sessions_async(
1906
- transport: str = "grpc_asyncio", request_type=service.ListDeviceSessionsRequest
1927
+ request_type, transport: str = "grpc_asyncio"
1907
1928
  ):
1908
1929
  client = DirectAccessServiceAsyncClient(
1909
1930
  credentials=async_anonymous_credentials(),
@@ -1912,7 +1933,7 @@ async def test_list_device_sessions_async(
1912
1933
 
1913
1934
  # Everything is optional in proto3 as far as the runtime is concerned,
1914
1935
  # and we are mocking out the actual API, so just send an empty request.
1915
- request = request_type()
1936
+ request = request_type
1916
1937
 
1917
1938
  # Mock the actual call within the gRPC stub, and fake the request.
1918
1939
  with mock.patch.object(
@@ -1937,11 +1958,6 @@ async def test_list_device_sessions_async(
1937
1958
  assert response.next_page_token == "next_page_token_value"
1938
1959
 
1939
1960
 
1940
- @pytest.mark.asyncio
1941
- async def test_list_device_sessions_async_from_dict():
1942
- await test_list_device_sessions_async(request_type=dict)
1943
-
1944
-
1945
1961
  def test_list_device_sessions_field_headers():
1946
1962
  client = DirectAccessServiceClient(
1947
1963
  credentials=ga_credentials.AnonymousCredentials(),
@@ -2285,11 +2301,7 @@ async def test_list_device_sessions_async_pages():
2285
2301
  RuntimeError,
2286
2302
  )
2287
2303
  pages = []
2288
- # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch`
2289
- # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372
2290
- async for page_ in ( # pragma: no branch
2291
- await client.list_device_sessions(request={})
2292
- ).pages:
2304
+ async for page_ in (await client.list_device_sessions(request={})).pages:
2293
2305
  pages.append(page_)
2294
2306
  for page_, token in zip(pages, ["abc", "def", "ghi", ""]):
2295
2307
  assert page_.raw_page.next_page_token == token
@@ -2298,8 +2310,8 @@ async def test_list_device_sessions_async_pages():
2298
2310
  @pytest.mark.parametrize(
2299
2311
  "request_type",
2300
2312
  [
2301
- service.GetDeviceSessionRequest,
2302
- dict,
2313
+ service.GetDeviceSessionRequest(),
2314
+ {},
2303
2315
  ],
2304
2316
  )
2305
2317
  def test_get_device_session(request_type, transport: str = "grpc"):
@@ -2310,7 +2322,7 @@ def test_get_device_session(request_type, transport: str = "grpc"):
2310
2322
 
2311
2323
  # Everything is optional in proto3 as far as the runtime is concerned,
2312
2324
  # and we are mocking out the actual API, so just send an empty request.
2313
- request = request_type()
2325
+ request = request_type
2314
2326
 
2315
2327
  # Mock the actual call within the gRPC stub, and fake the request.
2316
2328
  with mock.patch.object(
@@ -2362,9 +2374,10 @@ def test_get_device_session_non_empty_request_with_auto_populated_field():
2362
2374
  client.get_device_session(request=request)
2363
2375
  call.assert_called()
2364
2376
  _, args, _ = call.mock_calls[0]
2365
- assert args[0] == service.GetDeviceSessionRequest(
2377
+ request_msg = service.GetDeviceSessionRequest(
2366
2378
  name="name_value",
2367
2379
  )
2380
+ assert args[0] == request_msg
2368
2381
 
2369
2382
 
2370
2383
  def test_get_device_session_use_cached_wrapped_rpc():
@@ -2449,9 +2462,14 @@ async def test_get_device_session_async_use_cached_wrapped_rpc(
2449
2462
 
2450
2463
 
2451
2464
  @pytest.mark.asyncio
2452
- async def test_get_device_session_async(
2453
- transport: str = "grpc_asyncio", request_type=service.GetDeviceSessionRequest
2454
- ):
2465
+ @pytest.mark.parametrize(
2466
+ "request_type",
2467
+ [
2468
+ service.GetDeviceSessionRequest(),
2469
+ {},
2470
+ ],
2471
+ )
2472
+ async def test_get_device_session_async(request_type, transport: str = "grpc_asyncio"):
2455
2473
  client = DirectAccessServiceAsyncClient(
2456
2474
  credentials=async_anonymous_credentials(),
2457
2475
  transport=transport,
@@ -2459,7 +2477,7 @@ async def test_get_device_session_async(
2459
2477
 
2460
2478
  # Everything is optional in proto3 as far as the runtime is concerned,
2461
2479
  # and we are mocking out the actual API, so just send an empty request.
2462
- request = request_type()
2480
+ request = request_type
2463
2481
 
2464
2482
  # Mock the actual call within the gRPC stub, and fake the request.
2465
2483
  with mock.patch.object(
@@ -2488,11 +2506,6 @@ async def test_get_device_session_async(
2488
2506
  assert response.state == service.DeviceSession.SessionState.REQUESTED
2489
2507
 
2490
2508
 
2491
- @pytest.mark.asyncio
2492
- async def test_get_device_session_async_from_dict():
2493
- await test_get_device_session_async(request_type=dict)
2494
-
2495
-
2496
2509
  def test_get_device_session_field_headers():
2497
2510
  client = DirectAccessServiceClient(
2498
2511
  credentials=ga_credentials.AnonymousCredentials(),
@@ -2647,8 +2660,8 @@ async def test_get_device_session_flattened_error_async():
2647
2660
  @pytest.mark.parametrize(
2648
2661
  "request_type",
2649
2662
  [
2650
- service.CancelDeviceSessionRequest,
2651
- dict,
2663
+ service.CancelDeviceSessionRequest(),
2664
+ {},
2652
2665
  ],
2653
2666
  )
2654
2667
  def test_cancel_device_session(request_type, transport: str = "grpc"):
@@ -2659,7 +2672,7 @@ def test_cancel_device_session(request_type, transport: str = "grpc"):
2659
2672
 
2660
2673
  # Everything is optional in proto3 as far as the runtime is concerned,
2661
2674
  # and we are mocking out the actual API, so just send an empty request.
2662
- request = request_type()
2675
+ request = request_type
2663
2676
 
2664
2677
  # Mock the actual call within the gRPC stub, and fake the request.
2665
2678
  with mock.patch.object(
@@ -2704,9 +2717,10 @@ def test_cancel_device_session_non_empty_request_with_auto_populated_field():
2704
2717
  client.cancel_device_session(request=request)
2705
2718
  call.assert_called()
2706
2719
  _, args, _ = call.mock_calls[0]
2707
- assert args[0] == service.CancelDeviceSessionRequest(
2720
+ request_msg = service.CancelDeviceSessionRequest(
2708
2721
  name="name_value",
2709
2722
  )
2723
+ assert args[0] == request_msg
2710
2724
 
2711
2725
 
2712
2726
  def test_cancel_device_session_use_cached_wrapped_rpc():
@@ -2792,8 +2806,15 @@ async def test_cancel_device_session_async_use_cached_wrapped_rpc(
2792
2806
 
2793
2807
 
2794
2808
  @pytest.mark.asyncio
2809
+ @pytest.mark.parametrize(
2810
+ "request_type",
2811
+ [
2812
+ service.CancelDeviceSessionRequest(),
2813
+ {},
2814
+ ],
2815
+ )
2795
2816
  async def test_cancel_device_session_async(
2796
- transport: str = "grpc_asyncio", request_type=service.CancelDeviceSessionRequest
2817
+ request_type, transport: str = "grpc_asyncio"
2797
2818
  ):
2798
2819
  client = DirectAccessServiceAsyncClient(
2799
2820
  credentials=async_anonymous_credentials(),
@@ -2802,7 +2823,7 @@ async def test_cancel_device_session_async(
2802
2823
 
2803
2824
  # Everything is optional in proto3 as far as the runtime is concerned,
2804
2825
  # and we are mocking out the actual API, so just send an empty request.
2805
- request = request_type()
2826
+ request = request_type
2806
2827
 
2807
2828
  # Mock the actual call within the gRPC stub, and fake the request.
2808
2829
  with mock.patch.object(
@@ -2822,11 +2843,6 @@ async def test_cancel_device_session_async(
2822
2843
  assert response is None
2823
2844
 
2824
2845
 
2825
- @pytest.mark.asyncio
2826
- async def test_cancel_device_session_async_from_dict():
2827
- await test_cancel_device_session_async(request_type=dict)
2828
-
2829
-
2830
2846
  def test_cancel_device_session_field_headers():
2831
2847
  client = DirectAccessServiceClient(
2832
2848
  credentials=ga_credentials.AnonymousCredentials(),
@@ -2893,8 +2909,8 @@ async def test_cancel_device_session_field_headers_async():
2893
2909
  @pytest.mark.parametrize(
2894
2910
  "request_type",
2895
2911
  [
2896
- service.UpdateDeviceSessionRequest,
2897
- dict,
2912
+ service.UpdateDeviceSessionRequest(),
2913
+ {},
2898
2914
  ],
2899
2915
  )
2900
2916
  def test_update_device_session(request_type, transport: str = "grpc"):
@@ -2905,7 +2921,7 @@ def test_update_device_session(request_type, transport: str = "grpc"):
2905
2921
 
2906
2922
  # Everything is optional in proto3 as far as the runtime is concerned,
2907
2923
  # and we are mocking out the actual API, so just send an empty request.
2908
- request = request_type()
2924
+ request = request_type
2909
2925
 
2910
2926
  # Mock the actual call within the gRPC stub, and fake the request.
2911
2927
  with mock.patch.object(
@@ -2955,7 +2971,8 @@ def test_update_device_session_non_empty_request_with_auto_populated_field():
2955
2971
  client.update_device_session(request=request)
2956
2972
  call.assert_called()
2957
2973
  _, args, _ = call.mock_calls[0]
2958
- assert args[0] == service.UpdateDeviceSessionRequest()
2974
+ request_msg = service.UpdateDeviceSessionRequest()
2975
+ assert args[0] == request_msg
2959
2976
 
2960
2977
 
2961
2978
  def test_update_device_session_use_cached_wrapped_rpc():
@@ -3041,8 +3058,15 @@ async def test_update_device_session_async_use_cached_wrapped_rpc(
3041
3058
 
3042
3059
 
3043
3060
  @pytest.mark.asyncio
3061
+ @pytest.mark.parametrize(
3062
+ "request_type",
3063
+ [
3064
+ service.UpdateDeviceSessionRequest(),
3065
+ {},
3066
+ ],
3067
+ )
3044
3068
  async def test_update_device_session_async(
3045
- transport: str = "grpc_asyncio", request_type=service.UpdateDeviceSessionRequest
3069
+ request_type, transport: str = "grpc_asyncio"
3046
3070
  ):
3047
3071
  client = DirectAccessServiceAsyncClient(
3048
3072
  credentials=async_anonymous_credentials(),
@@ -3051,7 +3075,7 @@ async def test_update_device_session_async(
3051
3075
 
3052
3076
  # Everything is optional in proto3 as far as the runtime is concerned,
3053
3077
  # and we are mocking out the actual API, so just send an empty request.
3054
- request = request_type()
3078
+ request = request_type
3055
3079
 
3056
3080
  # Mock the actual call within the gRPC stub, and fake the request.
3057
3081
  with mock.patch.object(
@@ -3080,11 +3104,6 @@ async def test_update_device_session_async(
3080
3104
  assert response.state == service.DeviceSession.SessionState.REQUESTED
3081
3105
 
3082
3106
 
3083
- @pytest.mark.asyncio
3084
- async def test_update_device_session_async_from_dict():
3085
- await test_update_device_session_async(request_type=dict)
3086
-
3087
-
3088
3107
  def test_update_device_session_field_headers():
3089
3108
  client = DirectAccessServiceClient(
3090
3109
  credentials=ga_credentials.AnonymousCredentials(),
@@ -3249,8 +3268,8 @@ async def test_update_device_session_flattened_error_async():
3249
3268
  @pytest.mark.parametrize(
3250
3269
  "request_type",
3251
3270
  [
3252
- adb_service.AdbMessage,
3253
- dict,
3271
+ adb_service.AdbMessage(),
3272
+ {},
3254
3273
  ],
3255
3274
  )
3256
3275
  def test_adb_connect(request_type, transport: str = "grpc"):
@@ -3261,7 +3280,7 @@ def test_adb_connect(request_type, transport: str = "grpc"):
3261
3280
 
3262
3281
  # Everything is optional in proto3 as far as the runtime is concerned,
3263
3282
  # and we are mocking out the actual API, so just send an empty request.
3264
- request = request_type()
3283
+ request = request_type
3265
3284
  requests = [request]
3266
3285
 
3267
3286
  # Mock the actual call within the gRPC stub, and fake the request.
@@ -3358,9 +3377,14 @@ async def test_adb_connect_async_use_cached_wrapped_rpc(
3358
3377
 
3359
3378
 
3360
3379
  @pytest.mark.asyncio
3361
- async def test_adb_connect_async(
3362
- transport: str = "grpc_asyncio", request_type=adb_service.AdbMessage
3363
- ):
3380
+ @pytest.mark.parametrize(
3381
+ "request_type",
3382
+ [
3383
+ adb_service.AdbMessage(),
3384
+ {},
3385
+ ],
3386
+ )
3387
+ async def test_adb_connect_async(request_type, transport: str = "grpc_asyncio"):
3364
3388
  client = DirectAccessServiceAsyncClient(
3365
3389
  credentials=async_anonymous_credentials(),
3366
3390
  transport=transport,
@@ -3368,7 +3392,7 @@ async def test_adb_connect_async(
3368
3392
 
3369
3393
  # Everything is optional in proto3 as far as the runtime is concerned,
3370
3394
  # and we are mocking out the actual API, so just send an empty request.
3371
- request = request_type()
3395
+ request = request_type
3372
3396
  requests = [request]
3373
3397
 
3374
3398
  # Mock the actual call within the gRPC stub, and fake the request.
@@ -3390,11 +3414,6 @@ async def test_adb_connect_async(
3390
3414
  assert isinstance(message, adb_service.DeviceMessage)
3391
3415
 
3392
3416
 
3393
- @pytest.mark.asyncio
3394
- async def test_adb_connect_async_from_dict():
3395
- await test_adb_connect_async(request_type=dict)
3396
-
3397
-
3398
3417
  def test_create_device_session_rest_use_cached_wrapped_rpc():
3399
3418
  # Clients should use _prep_wrapped_messages to create cached wrapped rpcs,
3400
3419
  # instead of constructing them on each call
@@ -3511,7 +3530,7 @@ def test_create_device_session_rest_required_fields(
3511
3530
 
3512
3531
  expected_params = [("$alt", "json;enum-encoding=int")]
3513
3532
  actual_params = req.call_args.kwargs["params"]
3514
- assert expected_params == actual_params
3533
+ assert sorted(expected_params) == sorted(actual_params)
3515
3534
 
3516
3535
 
3517
3536
  def test_create_device_session_rest_unset_required_fields():
@@ -3711,7 +3730,7 @@ def test_list_device_sessions_rest_required_fields(
3711
3730
 
3712
3731
  expected_params = [("$alt", "json;enum-encoding=int")]
3713
3732
  actual_params = req.call_args.kwargs["params"]
3714
- assert expected_params == actual_params
3733
+ assert sorted(expected_params) == sorted(actual_params)
3715
3734
 
3716
3735
 
3717
3736
  def test_list_device_sessions_rest_unset_required_fields():
@@ -3963,7 +3982,7 @@ def test_get_device_session_rest_required_fields(
3963
3982
 
3964
3983
  expected_params = [("$alt", "json;enum-encoding=int")]
3965
3984
  actual_params = req.call_args.kwargs["params"]
3966
- assert expected_params == actual_params
3985
+ assert sorted(expected_params) == sorted(actual_params)
3967
3986
 
3968
3987
 
3969
3988
  def test_get_device_session_rest_unset_required_fields():
@@ -4142,7 +4161,7 @@ def test_cancel_device_session_rest_required_fields(
4142
4161
 
4143
4162
  expected_params = [("$alt", "json;enum-encoding=int")]
4144
4163
  actual_params = req.call_args.kwargs["params"]
4145
- assert expected_params == actual_params
4164
+ assert sorted(expected_params) == sorted(actual_params)
4146
4165
 
4147
4166
 
4148
4167
  def test_cancel_device_session_rest_unset_required_fields():
@@ -4265,7 +4284,7 @@ def test_update_device_session_rest_required_fields(
4265
4284
 
4266
4285
  expected_params = [("$alt", "json;enum-encoding=int")]
4267
4286
  actual_params = req.call_args.kwargs["params"]
4268
- assert expected_params == actual_params
4287
+ assert sorted(expected_params) == sorted(actual_params)
4269
4288
 
4270
4289
 
4271
4290
  def test_update_device_session_rest_unset_required_fields():
@@ -4488,7 +4507,6 @@ def test_create_device_session_empty_call_grpc():
4488
4507
  call.assert_called()
4489
4508
  _, args, _ = call.mock_calls[0]
4490
4509
  request_msg = service.CreateDeviceSessionRequest()
4491
-
4492
4510
  assert args[0] == request_msg
4493
4511
 
4494
4512
 
@@ -4511,7 +4529,6 @@ def test_list_device_sessions_empty_call_grpc():
4511
4529
  call.assert_called()
4512
4530
  _, args, _ = call.mock_calls[0]
4513
4531
  request_msg = service.ListDeviceSessionsRequest()
4514
-
4515
4532
  assert args[0] == request_msg
4516
4533
 
4517
4534
 
@@ -4534,7 +4551,6 @@ def test_get_device_session_empty_call_grpc():
4534
4551
  call.assert_called()
4535
4552
  _, args, _ = call.mock_calls[0]
4536
4553
  request_msg = service.GetDeviceSessionRequest()
4537
-
4538
4554
  assert args[0] == request_msg
4539
4555
 
4540
4556
 
@@ -4557,7 +4573,6 @@ def test_cancel_device_session_empty_call_grpc():
4557
4573
  call.assert_called()
4558
4574
  _, args, _ = call.mock_calls[0]
4559
4575
  request_msg = service.CancelDeviceSessionRequest()
4560
-
4561
4576
  assert args[0] == request_msg
4562
4577
 
4563
4578
 
@@ -4580,7 +4595,6 @@ def test_update_device_session_empty_call_grpc():
4580
4595
  call.assert_called()
4581
4596
  _, args, _ = call.mock_calls[0]
4582
4597
  request_msg = service.UpdateDeviceSessionRequest()
4583
-
4584
4598
  assert args[0] == request_msg
4585
4599
 
4586
4600
 
@@ -4625,7 +4639,6 @@ async def test_create_device_session_empty_call_grpc_asyncio():
4625
4639
  call.assert_called()
4626
4640
  _, args, _ = call.mock_calls[0]
4627
4641
  request_msg = service.CreateDeviceSessionRequest()
4628
-
4629
4642
  assert args[0] == request_msg
4630
4643
 
4631
4644
 
@@ -4654,7 +4667,6 @@ async def test_list_device_sessions_empty_call_grpc_asyncio():
4654
4667
  call.assert_called()
4655
4668
  _, args, _ = call.mock_calls[0]
4656
4669
  request_msg = service.ListDeviceSessionsRequest()
4657
-
4658
4670
  assert args[0] == request_msg
4659
4671
 
4660
4672
 
@@ -4685,7 +4697,6 @@ async def test_get_device_session_empty_call_grpc_asyncio():
4685
4697
  call.assert_called()
4686
4698
  _, args, _ = call.mock_calls[0]
4687
4699
  request_msg = service.GetDeviceSessionRequest()
4688
-
4689
4700
  assert args[0] == request_msg
4690
4701
 
4691
4702
 
@@ -4710,7 +4721,6 @@ async def test_cancel_device_session_empty_call_grpc_asyncio():
4710
4721
  call.assert_called()
4711
4722
  _, args, _ = call.mock_calls[0]
4712
4723
  request_msg = service.CancelDeviceSessionRequest()
4713
-
4714
4724
  assert args[0] == request_msg
4715
4725
 
4716
4726
 
@@ -4741,7 +4751,6 @@ async def test_update_device_session_empty_call_grpc_asyncio():
4741
4751
  call.assert_called()
4742
4752
  _, args, _ = call.mock_calls[0]
4743
4753
  request_msg = service.UpdateDeviceSessionRequest()
4744
-
4745
4754
  assert args[0] == request_msg
4746
4755
 
4747
4756
 
@@ -5621,7 +5630,6 @@ def test_create_device_session_empty_call_rest():
5621
5630
  call.assert_called()
5622
5631
  _, args, _ = call.mock_calls[0]
5623
5632
  request_msg = service.CreateDeviceSessionRequest()
5624
-
5625
5633
  assert args[0] == request_msg
5626
5634
 
5627
5635
 
@@ -5643,7 +5651,6 @@ def test_list_device_sessions_empty_call_rest():
5643
5651
  call.assert_called()
5644
5652
  _, args, _ = call.mock_calls[0]
5645
5653
  request_msg = service.ListDeviceSessionsRequest()
5646
-
5647
5654
  assert args[0] == request_msg
5648
5655
 
5649
5656
 
@@ -5665,7 +5672,6 @@ def test_get_device_session_empty_call_rest():
5665
5672
  call.assert_called()
5666
5673
  _, args, _ = call.mock_calls[0]
5667
5674
  request_msg = service.GetDeviceSessionRequest()
5668
-
5669
5675
  assert args[0] == request_msg
5670
5676
 
5671
5677
 
@@ -5687,7 +5693,6 @@ def test_cancel_device_session_empty_call_rest():
5687
5693
  call.assert_called()
5688
5694
  _, args, _ = call.mock_calls[0]
5689
5695
  request_msg = service.CancelDeviceSessionRequest()
5690
-
5691
5696
  assert args[0] == request_msg
5692
5697
 
5693
5698
 
@@ -5709,7 +5714,6 @@ def test_update_device_session_empty_call_rest():
5709
5714
  call.assert_called()
5710
5715
  _, args, _ = call.mock_calls[0]
5711
5716
  request_msg = service.UpdateDeviceSessionRequest()
5712
-
5713
5717
  assert args[0] == request_msg
5714
5718
 
5715
5719
 
@@ -1,15 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #