Skip to content

Commit

Permalink
Merge branch 'main' into sample-tag
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyunnnn authored Oct 9, 2023
2 parents 555e5e5 + 0925193 commit 19d71c6
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:fac304457974bb530cc5396abd4ab25d26a469cd3bc97cbfb18c8d4324c584eb
# created: 2023-10-02T21:31:03.517640371Z
digest: sha256:08e34975760f002746b1d8c86fdc90660be45945ee6d9db914d1508acdf9a547
# created: 2023-10-09T14:06:13.397766266Z
6 changes: 3 additions & 3 deletions .kokoro/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,9 @@ typing-extensions==4.4.0 \
--hash=sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa \
--hash=sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e
# via -r requirements.in
urllib3==1.26.12 \
--hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \
--hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997
urllib3==1.26.17 \
--hash=sha256:24d6a242c28d29af46c3fae832c36db3bbebcc533dd1bb549172cd739c82df21 \
--hash=sha256:94a757d178c9be92ef5539b8840d48dc9cf1b2709c9d6b588232a055c524458b
# via
# requests
# twine
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
Expand Down
1 change: 0 additions & 1 deletion google/cloud/pubsub_v1/publisher/_batch/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ def publish(
overflow = new_size > size_limit or new_count >= self.settings.max_messages

if not self._messages or not overflow:

# Store the actual message in the batch's message queue.
self._messages.append(message)
self._size = new_size
Expand Down
3 changes: 0 additions & 3 deletions google/pubsub_v1/services/publisher/transports/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,6 @@ def __call__(
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:

r"""Call the get iam policy method over HTTP.
Args:
Expand Down Expand Up @@ -1442,7 +1441,6 @@ def __call__(
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:

r"""Call the set iam policy method over HTTP.
Args:
Expand Down Expand Up @@ -1527,7 +1525,6 @@ def __call__(
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> iam_policy_pb2.TestIamPermissionsResponse:

r"""Call the test iam permissions method over HTTP.
Args:
Expand Down
3 changes: 0 additions & 3 deletions google/pubsub_v1/services/schema_service/transports/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,6 @@ def __call__(
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:

r"""Call the get iam policy method over HTTP.
Args:
Expand Down Expand Up @@ -1593,7 +1592,6 @@ def __call__(
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:

r"""Call the set iam policy method over HTTP.
Args:
Expand Down Expand Up @@ -1678,7 +1676,6 @@ def __call__(
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> iam_policy_pb2.TestIamPermissionsResponse:

r"""Call the test iam permissions method over HTTP.
Args:
Expand Down
3 changes: 0 additions & 3 deletions google/pubsub_v1/services/subscriber/transports/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2119,7 +2119,6 @@ def __call__(
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:

r"""Call the get iam policy method over HTTP.
Args:
Expand Down Expand Up @@ -2198,7 +2197,6 @@ def __call__(
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:

r"""Call the set iam policy method over HTTP.
Args:
Expand Down Expand Up @@ -2283,7 +2281,6 @@ def __call__(
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> iam_policy_pb2.TestIamPermissionsResponse:

r"""Call the test iam permissions method over HTTP.
Args:
Expand Down
36 changes: 19 additions & 17 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,51 +17,53 @@
# Generated by synthtool. DO NOT EDIT!

from __future__ import absolute_import

import os
import pathlib
import re
import shutil
from typing import Dict, List
import warnings

import nox

FLAKE8_VERSION = "flake8==6.1.0"
BLACK_VERSION = "black==22.3.0"
ISORT_VERSION = "isort==5.10.1"
BLACK_VERSION = "black[jupyter]==23.7.0"
ISORT_VERSION = "isort==5.11.0"
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

MYPY_VERSION = "mypy==0.910"

DEFAULT_PYTHON_VERSION = "3.8"

UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11"]
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11"]
UNIT_TEST_STANDARD_DEPENDENCIES = [
"mock==5.0.0",
"asyncmock",
"pytest",
"pytest-cov",
"pytest-asyncio",
]
UNIT_TEST_EXTERNAL_DEPENDENCIES = []
UNIT_TEST_LOCAL_DEPENDENCIES = []
UNIT_TEST_DEPENDENCIES = []
UNIT_TEST_EXTRAS = []
UNIT_TEST_EXTRAS_BY_PYTHON = {}

SYSTEM_TEST_PYTHON_VERSIONS = ["3.10"]
SYSTEM_TEST_STANDARD_DEPENDENCIES = [
UNIT_TEST_EXTERNAL_DEPENDENCIES: List[str] = []
UNIT_TEST_LOCAL_DEPENDENCIES: List[str] = []
UNIT_TEST_DEPENDENCIES: List[str] = []
UNIT_TEST_EXTRAS: List[str] = []
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}

SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.10"]
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
"mock==5.0.0",
"pytest",
"google-cloud-testutils",
]
SYSTEM_TEST_EXTERNAL_DEPENDENCIES = [
SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [
"psutil",
"flaky",
]
SYSTEM_TEST_LOCAL_DEPENDENCIES = []
SYSTEM_TEST_DEPENDENCIES = []
SYSTEM_TEST_EXTRAS = []
SYSTEM_TEST_EXTRAS_BY_PYTHON = {}
SYSTEM_TEST_LOCAL_DEPENDENCIES: List[str] = []
SYSTEM_TEST_DEPENDENCIES: List[str] = []
SYSTEM_TEST_EXTRAS: List[str] = []
SYSTEM_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}

CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()

Expand All @@ -77,6 +79,7 @@
# https://github.com/googleapis/python-pubsub/pull/552#issuecomment-1016256936
# "mypy_samples", # TODO: uncomment when the check passes
"docs",
"format",
]

# Error if a python version is missing
Expand Down Expand Up @@ -240,7 +243,6 @@ def unit(session):


def install_systemtest_dependencies(session, *constraints):

# Use pre-release gRPC for system tests.
# Exclude version 1.52.0rc1 which has a known issue.
# See https://github.com/grpc/grpc/issues/32163
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,6 @@ def test_heartbeat_stream_ack_deadline_seconds(caplog):
"google.cloud.pubsub_v1.subscriber._protocol.heartbeater.Heartbeater", autospec=True
)
def test_open(heartbeater, dispatcher, leaser, background_consumer, resumable_bidi_rpc):

manager = make_manager()

with mock.patch.object(
Expand Down

0 comments on commit 19d71c6

Please sign in to comment.