Skip to content

Commit 61198b8

Browse files
authored
Merge branch 'main' into retry_generators
2 parents cbae3d3 + 4d7d2ed commit 61198b8

22 files changed

+202
-86
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:caffe0a9277daeccc4d1de5c9b55ebba0901b57c2f713ec9c876b0d4ec064f61
17-
# created: 2023-11-08T19:46:45.022803742Z
16+
digest: sha256:230f7fe8a0d2ed81a519cfc15c6bb11c5b46b9fb449b8b1219b3771bcb520ad2
17+
# created: 2023-12-09T15:16:25.430769578Z

.github/sync-repo-settings.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@ branchProtectionRules:
1616
- 'unit_grpc_gcp-3.9'
1717
- 'unit_grpc_gcp-3.10'
1818
- 'unit_grpc_gcp-3.11'
19+
- 'unit_grpc_gcp-3.12'
1920
- 'unit-3.7'
2021
- 'unit-3.8'
2122
- 'unit-3.9'
2223
- 'unit-3.10'
2324
- 'unit-3.11'
25+
- 'unit-3.12'
2426
- 'unit_wo_grpc-3.10'
2527
- 'unit_wo_grpc-3.11'
28+
- 'unit_wo_grpc-3.12'
2629
- 'cover'
2730
- 'docs'
2831
- 'docfx'

.github/workflows/docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212
- name: Setup Python
13-
uses: actions/setup-python@v4
13+
uses: actions/setup-python@v5
1414
with:
1515
python-version: "3.9"
1616
- name: Install nox
@@ -24,9 +24,9 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
2828
- name: Setup Python
29-
uses: actions/setup-python@v4
29+
uses: actions/setup-python@v5
3030
with:
3131
python-version: "3.10"
3232
- name: Install nox

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212
- name: Setup Python
13-
uses: actions/setup-python@v4
13+
uses: actions/setup-python@v5
1414
with:
1515
python-version: "3.10"
1616
- name: Install nox

.github/workflows/mypy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212
- name: Setup Python
13-
uses: actions/setup-python@v4
13+
uses: actions/setup-python@v5
1414
with:
1515
python-version: "3.10"
1616
- name: Install nox

.github/workflows/unittest.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
- "3.9"
1919
- "3.10"
2020
- "3.11"
21+
- "3.12"
2122
exclude:
2223
- option: "_wo_grpc"
2324
python: 3.7
@@ -27,9 +28,9 @@ jobs:
2728
python: 3.9
2829
steps:
2930
- name: Checkout
30-
uses: actions/checkout@v3
31+
uses: actions/checkout@v4
3132
- name: Setup Python
32-
uses: actions/setup-python@v4
33+
uses: actions/setup-python@v5
3334
with:
3435
python-version: ${{ matrix.python }}
3536
- name: Install nox
@@ -54,9 +55,9 @@ jobs:
5455
- run-unittests
5556
steps:
5657
- name: Checkout
57-
uses: actions/checkout@v3
58+
uses: actions/checkout@v4
5859
- name: Setup Python
59-
uses: actions/setup-python@v4
60+
uses: actions/setup-python@v5
6061
with:
6162
python-version: "3.10"
6263
- name: Install coverage

.kokoro/requirements.txt

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -93,30 +93,30 @@ colorlog==6.7.0 \
9393
# via
9494
# gcp-docuploader
9595
# nox
96-
cryptography==41.0.5 \
97-
--hash=sha256:0c327cac00f082013c7c9fb6c46b7cc9fa3c288ca702c74773968173bda421bf \
98-
--hash=sha256:0d2a6a598847c46e3e321a7aef8af1436f11c27f1254933746304ff014664d84 \
99-
--hash=sha256:227ec057cd32a41c6651701abc0328135e472ed450f47c2766f23267b792a88e \
100-
--hash=sha256:22892cc830d8b2c89ea60148227631bb96a7da0c1b722f2aac8824b1b7c0b6b8 \
101-
--hash=sha256:392cb88b597247177172e02da6b7a63deeff1937fa6fec3bbf902ebd75d97ec7 \
102-
--hash=sha256:3be3ca726e1572517d2bef99a818378bbcf7d7799d5372a46c79c29eb8d166c1 \
103-
--hash=sha256:573eb7128cbca75f9157dcde974781209463ce56b5804983e11a1c462f0f4e88 \
104-
--hash=sha256:580afc7b7216deeb87a098ef0674d6ee34ab55993140838b14c9b83312b37b86 \
105-
--hash=sha256:5a70187954ba7292c7876734183e810b728b4f3965fbe571421cb2434d279179 \
106-
--hash=sha256:73801ac9736741f220e20435f84ecec75ed70eda90f781a148f1bad546963d81 \
107-
--hash=sha256:7d208c21e47940369accfc9e85f0de7693d9a5d843c2509b3846b2db170dfd20 \
108-
--hash=sha256:8254962e6ba1f4d2090c44daf50a547cd5f0bf446dc658a8e5f8156cae0d8548 \
109-
--hash=sha256:88417bff20162f635f24f849ab182b092697922088b477a7abd6664ddd82291d \
110-
--hash=sha256:a48e74dad1fb349f3dc1d449ed88e0017d792997a7ad2ec9587ed17405667e6d \
111-
--hash=sha256:b948e09fe5fb18517d99994184854ebd50b57248736fd4c720ad540560174ec5 \
112-
--hash=sha256:c707f7afd813478e2019ae32a7c49cd932dd60ab2d2a93e796f68236b7e1fbf1 \
113-
--hash=sha256:d38e6031e113b7421db1de0c1b1f7739564a88f1684c6b89234fbf6c11b75147 \
114-
--hash=sha256:d3977f0e276f6f5bf245c403156673db103283266601405376f075c849a0b936 \
115-
--hash=sha256:da6a0ff8f1016ccc7477e6339e1d50ce5f59b88905585f77193ebd5068f1e797 \
116-
--hash=sha256:e270c04f4d9b5671ebcc792b3ba5d4488bf7c42c3c241a3748e2599776f29696 \
117-
--hash=sha256:e886098619d3815e0ad5790c973afeee2c0e6e04b4da90b88e6bd06e2a0b1b72 \
118-
--hash=sha256:ec3b055ff8f1dce8e6ef28f626e0972981475173d7973d63f271b29c8a2897da \
119-
--hash=sha256:fba1e91467c65fe64a82c689dc6cf58151158993b13eb7a7f3f4b7f395636723
96+
cryptography==41.0.6 \
97+
--hash=sha256:068bc551698c234742c40049e46840843f3d98ad7ce265fd2bd4ec0d11306596 \
98+
--hash=sha256:0f27acb55a4e77b9be8d550d762b0513ef3fc658cd3eb15110ebbcbd626db12c \
99+
--hash=sha256:2132d5865eea673fe6712c2ed5fb4fa49dba10768bb4cc798345748380ee3660 \
100+
--hash=sha256:3288acccef021e3c3c10d58933f44e8602cf04dba96d9796d70d537bb2f4bbc4 \
101+
--hash=sha256:35f3f288e83c3f6f10752467c48919a7a94b7d88cc00b0668372a0d2ad4f8ead \
102+
--hash=sha256:398ae1fc711b5eb78e977daa3cbf47cec20f2c08c5da129b7a296055fbb22aed \
103+
--hash=sha256:422e3e31d63743855e43e5a6fcc8b4acab860f560f9321b0ee6269cc7ed70cc3 \
104+
--hash=sha256:48783b7e2bef51224020efb61b42704207dde583d7e371ef8fc2a5fb6c0aabc7 \
105+
--hash=sha256:4d03186af98b1c01a4eda396b137f29e4e3fb0173e30f885e27acec8823c1b09 \
106+
--hash=sha256:5daeb18e7886a358064a68dbcaf441c036cbdb7da52ae744e7b9207b04d3908c \
107+
--hash=sha256:60e746b11b937911dc70d164060d28d273e31853bb359e2b2033c9e93e6f3c43 \
108+
--hash=sha256:742ae5e9a2310e9dade7932f9576606836ed174da3c7d26bc3d3ab4bd49b9f65 \
109+
--hash=sha256:7e00fb556bda398b99b0da289ce7053639d33b572847181d6483ad89835115f6 \
110+
--hash=sha256:85abd057699b98fce40b41737afb234fef05c67e116f6f3650782c10862c43da \
111+
--hash=sha256:8efb2af8d4ba9dbc9c9dd8f04d19a7abb5b49eab1f3694e7b5a16a5fc2856f5c \
112+
--hash=sha256:ae236bb8760c1e55b7a39b6d4d32d2279bc6c7c8500b7d5a13b6fb9fc97be35b \
113+
--hash=sha256:afda76d84b053923c27ede5edc1ed7d53e3c9f475ebaf63c68e69f1403c405a8 \
114+
--hash=sha256:b27a7fd4229abef715e064269d98a7e2909ebf92eb6912a9603c7e14c181928c \
115+
--hash=sha256:b648fe2a45e426aaee684ddca2632f62ec4613ef362f4d681a9a6283d10e079d \
116+
--hash=sha256:c5a550dc7a3b50b116323e3d376241829fd326ac47bc195e04eb33a8170902a9 \
117+
--hash=sha256:da46e2b5df770070412c46f87bac0849b8d685c5f2679771de277a422c7d0b86 \
118+
--hash=sha256:f39812f70fc5c71a15aa3c97b2bbe213c3f2a460b79bd21c40d033bb34a9bf36 \
119+
--hash=sha256:ff369dd19e8fe0528b02e8df9f2aeb2479f89b1270d90f96a63500afe9af5cae
120120
# via
121121
# gcp-releasetool
122122
# secretstorage

.kokoro/samples/python3.12/common.cfg

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Build logs will be here
4+
action {
5+
define_artifacts {
6+
regex: "**/*sponge_log.xml"
7+
}
8+
}
9+
10+
# Specify which tests to run
11+
env_vars: {
12+
key: "RUN_TESTS_SESSION"
13+
value: "py-3.12"
14+
}
15+
16+
# Declare build specific Cloud project.
17+
env_vars: {
18+
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
19+
value: "python-docs-samples-tests-312"
20+
}
21+
22+
env_vars: {
23+
key: "TRAMPOLINE_BUILD_FILE"
24+
value: "github/python-api-core/.kokoro/test-samples.sh"
25+
}
26+
27+
# Configure the docker image for kokoro-trampoline.
28+
env_vars: {
29+
key: "TRAMPOLINE_IMAGE"
30+
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
31+
}
32+
33+
# Download secrets for samples
34+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
35+
36+
# Download trampoline resources.
37+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
38+
39+
# Use the trampoline script to run in docker.
40+
build_file: "python-api-core/.kokoro/trampoline_v2.sh"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}
7+
8+
env_vars: {
9+
key: "TRAMPOLINE_BUILD_FILE"
10+
value: "github/python-api-core/.kokoro/test-samples-against-head.sh"
11+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "False"
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@
44

55
[1]: https://pypi.org/project/google-api-core/#history
66

7+
## [2.15.0](https://github.com/googleapis/python-api-core/compare/v2.14.0...v2.15.0) (2023-12-07)
8+
9+
10+
### Features
11+
12+
* Add support for Python 3.12 ([#557](https://github.com/googleapis/python-api-core/issues/557)) ([091b4f1](https://github.com/googleapis/python-api-core/commit/091b4f1c7fcc59c3f2a02ee44fd3c30b78423f12))
13+
* Add type annotations to wrapped grpc calls ([#554](https://github.com/googleapis/python-api-core/issues/554)) ([fc12b40](https://github.com/googleapis/python-api-core/commit/fc12b40bfc6e0c4bb313196e2e3a9c9374ce1c45))
14+
* Add universe_domain argument to ClientOptions ([3069ef4](https://github.com/googleapis/python-api-core/commit/3069ef4b9123ddb64841cbb7bbb183b53d502e0a))
15+
* Introduce compatibility with native namespace packages ([#561](https://github.com/googleapis/python-api-core/issues/561)) ([bd82827](https://github.com/googleapis/python-api-core/commit/bd82827108f1eeb6c05cfacf6c044b2afacc18a2))
16+
17+
18+
### Bug Fixes
19+
20+
* Fix regression in `bidi` causing `Thread-ConsumeBidirectionalStream caught unexpected exception and will exit` ([#562](https://github.com/googleapis/python-api-core/issues/562)) ([40c8ae0](https://github.com/googleapis/python-api-core/commit/40c8ae0cf1f797e31e106461164e22db4fb2d3d9))
21+
* Replace deprecated `datetime.datetime.utcnow()` ([#552](https://github.com/googleapis/python-api-core/issues/552)) ([448923a](https://github.com/googleapis/python-api-core/commit/448923acf277a70e8704c949311bf4feaef8cab6)), closes [#540](https://github.com/googleapis/python-api-core/issues/540)
22+
723
## [2.14.0](https://github.com/googleapis/python-api-core/compare/v2.13.1...v2.14.0) (2023-11-09)
824

925

CONTRIBUTING.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In order to add a feature:
2121
documentation.
2222

2323
- The feature must work fully on the following CPython versions:
24-
3.7, 3.8, 3.9, 3.10, and 3.11 on both UNIX and Windows.
24+
3.7, 3.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows.
2525

2626
- The feature must not add unnecessary dependencies (where
2727
"unnecessary" is of course subjective, but new dependencies should
@@ -71,7 +71,7 @@ We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.
7171

7272
- To run a single unit test::
7373

74-
$ nox -s unit-3.11 -- -k <name of test>
74+
$ nox -s unit-3.12 -- -k <name of test>
7575

7676

7777
.. note::
@@ -202,12 +202,14 @@ We support:
202202
- `Python 3.9`_
203203
- `Python 3.10`_
204204
- `Python 3.11`_
205+
- `Python 3.12`_
205206

206207
.. _Python 3.7: https://docs.python.org/3.7/
207208
.. _Python 3.8: https://docs.python.org/3.8/
208209
.. _Python 3.9: https://docs.python.org/3.9/
209210
.. _Python 3.10: https://docs.python.org/3.10/
210211
.. _Python 3.11: https://docs.python.org/3.11/
212+
.. _Python 3.12: https://docs.python.org/3.12/
211213

212214

213215
Supported versions can be found in our ``noxfile.py`` `config`_.

google/__init__.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

google/api_core/bidi.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ def __init__(self, queue, period=1, initial_request=None):
9191
def _is_active(self):
9292
# Note: there is a possibility that this starts *before* the call
9393
# property is set. So we have to check if self.call is set before
94-
# seeing if it's active.
95-
return self.call is not None and self.call.is_active()
94+
# seeing if it's active. We need to return True if self.call is None.
95+
# See https://github.com/googleapis/python-api-core/issues/560.
96+
return self.call is None or self.call.is_active()
9697

9798
def __iter__(self):
9899
if self._initial_request is not None:

google/api_core/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "2.14.0"
15+
__version__ = "2.15.0"

noxfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def unit(session):
149149
default(session)
150150

151151

152-
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
152+
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"])
153153
def unit_grpc_gcp(session):
154154
"""Run the unit test suite with grpcio-gcp installed."""
155155
constraints_path = str(
@@ -163,7 +163,7 @@ def unit_grpc_gcp(session):
163163
default(session)
164164

165165

166-
@nox.session(python=["3.8", "3.10", "3.11"])
166+
@nox.session(python=["3.8", "3.10", "3.11", "3.12"])
167167
def unit_wo_grpc(session):
168168
"""Run the unit test suite w/o grpcio installed"""
169169
default(session, install_grpc=False)

pytest.ini

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[pytest]
2+
filterwarnings =
3+
# treat all warnings as errors
4+
error
5+
# Remove once https://github.com/pytest-dev/pytest-cov/issues/621 is fixed
6+
ignore:.*The --rsyncdir command line argument and rsyncdirs config variable are deprecated:DeprecationWarning
7+
# Remove once https://github.com/protocolbuffers/protobuf/issues/12186 is fixed
8+
ignore:.*custom tp_new.*in Python 3.14:DeprecationWarning
9+
# Remove once support for python 3.7 is dropped
10+
# This warning only appears when using python 3.7
11+
ignore:.*Using or importing the ABCs from.*collections:DeprecationWarning
12+
# Remove once support for grpcio-gcp is deprecated
13+
# See https://github.com/googleapis/python-api-core/blob/42e8b6e6f426cab749b34906529e8aaf3f133d75/google/api_core/grpc_helpers.py#L39-L45
14+
ignore:.*Support for grpcio-gcp is deprecated:DeprecationWarning
15+
# Remove once https://github.com/googleapis/python-api-common-protos/pull/187/files is merged
16+
ignore:.*pkg_resources.declare_namespace:DeprecationWarning
17+
ignore:.*pkg_resources is deprecated as an API:DeprecationWarning
18+
# Remove once release PR https://github.com/googleapis/proto-plus-python/pull/391 is merged
19+
ignore:datetime.datetime.utcfromtimestamp\(\) is deprecated:DeprecationWarning:proto.datetime_helpers
20+
# Remove once https://github.com/grpc/grpc/issues/35086 is fixed
21+
ignore:There is no current event loop:DeprecationWarning

0 commit comments

Comments
 (0)