Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.14"
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.14"
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.14"
- name: Install coverage
run: |
python -m pip install --upgrade setuptools pip wheel
Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In order to add a feature:
documentation.

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

- The feature must not add unnecessary dependencies (where
"unnecessary" is of course subjective, but new dependencies should
Expand Down Expand Up @@ -204,6 +204,7 @@ We support:
- `Python 3.11`_
- `Python 3.12`_
- `Python 3.13`_
- `Python 3.14`_

.. _Python 3.7: https://docs.python.org/3.7/
.. _Python 3.8: https://docs.python.org/3.8/
Expand All @@ -212,6 +213,7 @@ We support:
.. _Python 3.11: https://docs.python.org/3.11/
.. _Python 3.12: https://docs.python.org/3.12/
.. _Python 3.13: https://docs.python.org/3.13/
.. _Python 3.14: https://docs.python.org/3.14/


Supported versions can be found in our ``noxfile.py`` `config`_.
Expand Down
2 changes: 1 addition & 1 deletion google/api_core/grpc_helpers_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def create_channel(
default_host=None,
compression=None,
attempt_direct_path: Optional[bool] = False,
**kwargs
**kwargs,
):
"""Create an AsyncIO secure channel with credentials.

Expand Down
2 changes: 1 addition & 1 deletion google/api_core/operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(
result_type,
metadata_type=None,
polling=polling.DEFAULT_POLLING,
**kwargs
**kwargs,
):
super(Operation, self).__init__(polling=polling, **kwargs)
self._operation = operation
Expand Down
2 changes: 1 addition & 1 deletion google/api_core/operations_v1/pagers.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(
request: operations_pb2.ListOperationsRequest,
response: operations_pb2.ListOperationsResponse,
*,
metadata: Sequence[Tuple[str, str]] = ()
metadata: Sequence[Tuple[str, str]] = (),
):
super().__init__(
method=method, request=request, response=response, metadata=metadata
Expand Down
2 changes: 1 addition & 1 deletion google/api_core/operations_v1/pagers_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(
request: operations_pb2.ListOperationsRequest,
response: operations_pb2.ListOperationsResponse,
*,
metadata: Sequence[Tuple[str, str]] = ()
metadata: Sequence[Tuple[str, str]] = (),
):
super().__init__(
method=method, request=request, response=response, metadata=metadata
Expand Down
2 changes: 1 addition & 1 deletion google/api_core/operations_v1/pagers_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(
request: operations_pb2.ListOperationsRequest,
response: operations_pb2.ListOperationsResponse,
*,
metadata: Sequence[Tuple[str, str]] = ()
metadata: Sequence[Tuple[str, str]] = (),
):
"""Instantiate the pager.

Expand Down
6 changes: 3 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
import nox # pytype: disable=import-error


BLACK_VERSION = "black==22.3.0"
BLACK_VERSION = "black==23.7.0"
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
# Black and flake8 clash on the syntax for ignoring flake8's F401 in this file.
BLACK_EXCLUDES = ["--exclude", "^/google/api_core/operations_v1/__init__.py"]

PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]

DEFAULT_PYTHON_VERSION = "3.10"
DEFAULT_PYTHON_VERSION = "3.14"
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()

# 'docfx' is excluded since it only needs to run in 'docs-presubmit'
Expand Down Expand Up @@ -261,7 +261,7 @@ def unit_w_async_rest_extra(session):
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""

session.install("docutils", "Pygments")
session.install("docutils", "Pygments", "setuptools")
session.run("python", "setup.py", "check", "--restructuredtext", "--strict")


Expand Down
2 changes: 0 additions & 2 deletions tests/asyncio/test_rest_streaming_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ async def test_next_escaped_characters_in_string(
@pytest.mark.asyncio
@pytest.mark.parametrize("response_type", [EchoResponse, httpbody_pb2.HttpBody])
async def test_next_not_array(response_type):

data = '{"hello": 0}'
with mock.patch.object(
ResponseMock, "content", return_value=mock_async_gen(data)
Expand Down Expand Up @@ -352,7 +351,6 @@ async def test_check_buffer(response_type, return_value):
@pytest.mark.asyncio
@pytest.mark.parametrize("response_type", [EchoResponse, httpbody_pb2.HttpBody])
async def test_next_html(response_type):

data = "<!DOCTYPE html><html></html>"
with mock.patch.object(
ResponseMock, "content", return_value=mock_async_gen(data)
Expand Down
3 changes: 0 additions & 3 deletions tests/unit/operations_v1/test_operations_rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ def test_operations_client_service_account_always_use_jwt(transport_class):
PYPARAM_CLIENT,
)
def test_operations_client_from_service_account_file(client_class):

if "async" in str(client_class):
# TODO(): Add support for service account creds to async REST transport.
with pytest.raises(NotImplementedError):
Expand Down Expand Up @@ -547,7 +546,6 @@ def test_operations_client_client_options_credentials_file(
# TODO(): Add support for credentials file to async REST transport.
with pytest.raises(core_exceptions.AsyncRestUnsupportedParameterError):
with warn_deprecated_credentials_file():

client_class(client_options=options, transport=transport_name)
else:
with mock.patch.object(transport_class, "__init__") as patched:
Expand Down Expand Up @@ -1089,7 +1087,6 @@ async def test_cancel_operation_rest_failure_async():
PYPARAM_CLIENT_TRANSPORT_CREDENTIALS,
)
def test_credentials_transport_error(client_class, transport_class, credentials):

# It is an error to provide credentials and a transport instance.
transport = transport_class(credentials=credentials)
with pytest.raises(ValueError):
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_client_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ def test_setup_logging_w_incorrect_scope():


def test_initialize_logging():

with mock.patch("os.getenv", return_value="foogle.bar"):
with mock.patch("google.api_core.client_logging._BASE_LOGGER_NAME", "foogle"):
initialize_logging()
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/test_client_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def test_constructor():


def test_constructor_with_encrypted_cert_source():

options = client_options.ClientOptions(
api_endpoint="foo.googleapis.com",
client_encrypted_cert_source=get_client_encrypted_cert,
Expand All @@ -79,7 +78,6 @@ def test_constructor_with_both_cert_sources():


def test_constructor_with_api_key():

options = client_options.ClientOptions(
api_endpoint="foo.googleapis.com",
client_cert_source=get_client_cert,
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_page_iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ def test__has_next_page_w_max_results_not_done(self):
assert iterator._has_next_page()

def test__has_next_page_w_max_results_done(self):

iterator = page_iterator.HTTPIterator(
mock.sentinel.client,
mock.sentinel.api_request,
Expand Down
Loading