Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit46b3d3a

Browse files
partheagcf-owl-bot[bot]ohmayr
authored
feat: add support for python 3.13 (#696)
* feat: add support for python 3.13* Add constraints file* Avoid Python3.13 warning coroutine method 'aclose' was never awaited* remove allow-prereleases: true* exclude grpcio 1.67.0rc1* add comment* remove empty line* 🦉 Updates from OwlBot post-processorSeehttps://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md* Update commentCo-authored-by: ohmayr <omairnaveed@ymail.com>---------Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>Co-authored-by: ohmayr <omairnaveed@ymail.com>
1 parent8c53381 commit46b3d3a

File tree

7 files changed

+17
-4
lines changed

7 files changed

+17
-4
lines changed

‎.github/workflows/unittest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
-"3.10"
2020
-"3.11"
2121
-"3.12"
22+
-"3.13"
2223
exclude:
2324
-option:"_wo_grpc"
2425
python:3.7

‎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, 3.11and 3.12 on both UNIX and Windows.
24+
3.7, 3.8, 3.9, 3.10, 3.11, 3.12and 3.13 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.12 -- -k <name of test>
74+
$ nox -s unit-3.13 -- -k <name of test>
7575

7676

7777
.. note::
@@ -203,13 +203,15 @@ We support:
203203
- `Python 3.10`_
204204
- `Python 3.11`_
205205
- `Python 3.12`_
206+
- `Python 3.13`_
206207

207208
.. _Python 3.7:https://docs.python.org/3.7/
208209
.. _Python 3.8:https://docs.python.org/3.8/
209210
.. _Python 3.9:https://docs.python.org/3.9/
210211
.. _Python 3.10:https://docs.python.org/3.10/
211212
.. _Python 3.11:https://docs.python.org/3.11/
212213
.. _Python 3.12:https://docs.python.org/3.12/
214+
.. _Python 3.13:https://docs.python.org/3.13/
213215

214216

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

‎noxfile.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# Black and flake8 clash on the syntax for ignoring flake8's F401 in this file.
2929
BLACK_EXCLUDES= ["--exclude","^/google/api_core/operations_v1/__init__.py"]
3030

31-
PYTHON_VERSIONS= ["3.7","3.8","3.9","3.10","3.11","3.12"]
31+
PYTHON_VERSIONS= ["3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
3232

3333
DEFAULT_PYTHON_VERSION="3.10"
3434
CURRENT_DIRECTORY=pathlib.Path(__file__).parent.absolute()
@@ -95,7 +95,8 @@ def install_prerelease_dependencies(session, constraints_path):
9595
prerel_deps= [
9696
"google-auth",
9797
"googleapis-common-protos",
98-
"grpcio",
98+
# Exclude grpcio!=1.67.0rc1 which does not support python 3.13
99+
"grpcio!=1.67.0rc1",
99100
"grpcio-status",
100101
"proto-plus",
101102
"protobuf",
@@ -132,6 +133,7 @@ def default(session, install_grpc=True, prerelease=False, install_async_rest=Fal
132133

133134
install_extras= []
134135
ifinstall_grpc:
136+
# Note: The extra is called `grpc` and not `grpcio`.
135137
install_extras.append("grpc")
136138

137139
constraints_dir=str(CURRENT_DIRECTORY/"testing")

‎setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"Programming Language :: Python :: 3.10",
9494
"Programming Language :: Python :: 3.11",
9595
"Programming Language :: Python :: 3.12",
96+
"Programming Language :: Python :: 3.13",
9697
"Operating System :: OS Independent",
9798
"Topic :: Internet",
9899
],

‎testing/constraints-3.13.txt

Whitespace-only changes.

‎tests/asyncio/retry/test_retry_streaming_async.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ async def test___call___generator_retry(self, sleep):
139139
unpacked= [awaitgenerator.__anext__()foriinrange(10)]
140140
assertunpacked== [0,1,2,0,1,2,0,1,2,0]
141141
asserton_error.call_count==3
142+
awaitgenerator.aclose()
142143

143144
@mock.patch("random.uniform",autospec=True,side_effect=lambdam,n:n)
144145
@mock.patch("asyncio.sleep",autospec=True)
@@ -246,6 +247,7 @@ async def _mock_send_gen():
246247
recv=awaitgenerator.asend(msg)
247248
out_messages.append(recv)
248249
assertin_messages==out_messages
250+
awaitgenerator.aclose()
249251

250252
@mock.patch("asyncio.sleep",autospec=True)
251253
@pytest.mark.asyncio
@@ -263,6 +265,7 @@ async def test___call___generator_send_retry(self, sleep):
263265
withpytest.raises(TypeError)asexc_info:
264266
awaitgenerator.asend("cannot send to fresh generator")
265267
assertexc_info.match("can't send non-None value")
268+
awaitgenerator.aclose()
266269

267270
# error thrown on 3
268271
# generator should contain 0, 1, 2 looping
@@ -271,6 +274,7 @@ async def test___call___generator_send_retry(self, sleep):
271274
unpacked= [awaitgenerator.asend(i)foriinrange(10)]
272275
assertunpacked== [1,2,0,1,2,0,1,2,0,1]
273276
asserton_error.call_count==3
277+
awaitgenerator.aclose()
274278

275279
@mock.patch("asyncio.sleep",autospec=True)
276280
@pytest.mark.asyncio
@@ -382,6 +386,7 @@ async def wrapper():
382386
assertawaitretryable.asend("test")==1
383387
assertawaitretryable.asend("test2")==2
384388
assertawaitretryable.asend("test3")==3
389+
awaitretryable.aclose()
385390

386391
@pytest.mark.parametrize("awaitable_wrapped", [True,False])
387392
@mock.patch("asyncio.sleep",autospec=True)

‎tests/asyncio/test_page_iterator_async.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ async def test__page_aiter_increment(self):
110110
awaitpage_aiter.__anext__()
111111

112112
assertiterator.num_results==1
113+
awaitpage_aiter.aclose()
113114

114115
@pytest.mark.asyncio
115116
asyncdeftest__page_aiter_no_increment(self):
@@ -122,6 +123,7 @@ async def test__page_aiter_no_increment(self):
122123

123124
# results should still be 0 after fetching a page.
124125
assertiterator.num_results==0
126+
awaitpage_aiter.aclose()
125127

126128
@pytest.mark.asyncio
127129
asyncdeftest__items_aiter(self):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp