FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(deps): Require proto-plus >= 1.22.3 by parthea · Pull Request #626 · googleapis/python-api-core · GitHub

This repository was archived by the owner on Feb 23, 2026. It is now read-only.
/ python-api-core Public archive
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (3) .txt  (1) All 2 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
25 changes: 6 additions & 19 deletions noxfile.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@
]


def _greater_or_equal_than_37(version_string):
tokens = version_string.split(".")
for i, token in enumerate(tokens):
try:
tokens[i] = int(token)
except ValueError:
pass
return tokens >= [3, 7]


@nox.session(python=DEFAULT_PYTHON_VERSION)
def lint(session):
"""Run linters.
Expand Down Expand Up @@ -129,16 +119,13 @@ def default(session, install_grpc=True):
),
]

# Inject AsyncIO content and proto-plus, if version >= 3.7.
# proto-plus is needed for a field mask test in test_protobuf_helpers.py
if _greater_or_equal_than_37(session.python):
session.install("asyncmock", "pytest-asyncio", "proto-plus")
session.install("asyncmock", "pytest-asyncio")

# Having positional arguments means the user wants to run specific tests.
# Best not to add additional tests to that list.
if not session.posargs:
pytest_args.append("--cov=tests.asyncio")
pytest_args.append(os.path.join("tests", "asyncio"))
# Having positional arguments means the user wants to run specific tests.
# Best not to add additional tests to that list.
if not session.posargs:
pytest_args.append("--cov=tests.asyncio")
pytest_args.append(os.path.join("tests", "asyncio"))

session.run(*pytest_args)

Expand Down
1 change: 1 addition & 0 deletions setup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
dependencies = [
"googleapis-common-protos >= 1.56.2, < 2.0.dev0",
"protobuf>=3.19.5,<5.0.0.dev0,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
"proto-plus >= 1.22.3, <2.0.0dev",
"google-auth >= 2.14.1, < 3.0.dev0",
"requests >= 2.18.0, < 3.0.0.dev0",
]
Expand Down
1 change: 1 addition & 0 deletions testing/constraints-3.7.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ packaging==14.3
grpcio==1.33.2
grpcio-status==1.33.2
grpcio-gcp==0.2.2
proto-plus==1.22.3
12 changes: 0 additions & 12 deletions tests/unit/test_protobuf_helpers.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys

import pytest

from google.api import http_pb2
Expand Down Expand Up @@ -476,11 +474,6 @@ def test_field_mask_different_level_diffs():
]


@pytest.mark.skipif(
sys.version_info.major == 2,
reason="Field names with trailing underscores can only be created"
"through proto-plus, which is Python 3 only.",
)
def test_field_mask_ignore_trailing_underscore():
import proto

Expand All @@ -496,11 +489,6 @@ class Foo(proto.Message):
]


@pytest.mark.skipif(
sys.version_info.major == 2,
reason="Field names with trailing underscores can only be created"
"through proto-plus, which is Python 3 only.",
)
def test_field_mask_ignore_trailing_underscore_with_nesting():
import proto

Expand Down

Back | FazBrowse Home | New Git URL