Skip to content

Commit e3fac58

Browse files
authored
chore(revert): revert update grpc extra to require grpcio >= 1.51.3 (#196)
* chore(revert): update grpc extra to require grpcio >= 1.51.3 This reverts commit 593af53221376f609da537e0cb7e146a05ed7bac. * Revert "update testing/constraints-3.9.txt" This reverts commit b5298856bd65f755010878811287640420a77dc4. * cater for python-pubsub grpcio requirement * fix build * fix build * fix build * fix build
1 parent 3e34868 commit e3fac58

File tree

6 files changed

+44
-13
lines changed

6 files changed

+44
-13
lines changed

packages/googleapis-common-protos/noxfile.py

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,25 @@ def lint_setup_py(session):
4747
session.run("python", "setup.py", "check", "--strict")
4848

4949

50-
def default(session):
50+
def default(session, repository=None):
5151
# Install all test dependencies, then install this package in-place.
5252
session.install("asyncmock", "pytest-asyncio")
5353

5454
# Pin mock due to https://github.com/googleapis/python-pubsub/issues/840
5555
session.install("mock==5.0.0", "pytest", "pytest-cov")
5656
session.install("-e", ".")
5757

58+
# Use the repository specific constraints path if it exists
5859
constraints_path = str(
59-
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
60+
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}-{repository}.txt"
6061
)
6162

63+
# If there is no repository specific constraints path, use the default one.
64+
if not Path(constraints_path).exists():
65+
constraints_path = str(
66+
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
67+
)
68+
6269
# Install googleapis-api-common-protos
6370
# This *must* be the last install command to get the package from source.
6471
session.install("-e", ".", "-c", constraints_path)
@@ -78,12 +85,12 @@ def default(session):
7885
)
7986

8087

81-
def unit(session):
88+
def unit(session, repository=None):
8289
"""Run the unit test suite."""
83-
default(session)
90+
default(session, repository)
8491

8592

86-
def system(session):
93+
def system(session, repository=None):
8794
"""Run the system test suite."""
8895
system_test_path = os.path.join("tests", "system.py")
8996
system_test_folder_path = os.path.join("tests", "system")
@@ -107,10 +114,18 @@ def system(session):
107114

108115
session.install("-e", ".")
109116

117+
# Use the repository specific constraints path if it exists
110118
constraints_path = str(
111-
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
119+
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}-{repository}.txt"
112120
)
113121

122+
# If there is no repository specific constraints path, use the default one.
123+
if not Path(constraints_path).exists():
124+
constraints_path = str(
125+
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
126+
)
127+
128+
114129
# Install googleapis-api-common-protos
115130
# This *must* be the last install command to get the package from source.
116131
session.install("-e", ".", "-c", constraints_path)
@@ -160,14 +175,14 @@ def test(session, library):
160175
if package:
161176
session.cd(f'packages/{package}')
162177

163-
unit(session)
178+
unit(session, repository)
164179

165180
# system tests are run on 3.7 only
166181
if session.python == "3.7":
167182
if repository == "python-pubsub":
168183
session.install("psutil")
169184
session.install("flaky")
170-
system(session)
185+
system(session, repository)
171186

172187
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"])
173188
def tests_local(session):

packages/googleapis-common-protos/setup.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
"protobuf>=3.19.5,<5.0.0.dev0,!=3.20.0,!=3.20.1,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
2828
]
2929

30-
# Require grpcio >= 1.51.3 for compatibility with Mac M1
31-
# https://github.com/googleapis/python-pubsub/pull/900
32-
extras_require = {"grpc": ["grpcio >= 1.51.3, <2.0.0.dev0"]}
30+
extras_require = {"grpc": ["grpcio >= 1.44.0, <2.0.0.dev0"]}
3331

3432
package_root = os.path.abspath(os.path.dirname(__file__))
3533

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This constraints file is used to check that lower bounds
2+
# are correct in setup.py
3+
# List *all* library dependencies and extras in this file.
4+
# Pin the version to the lower bound.
5+
#
6+
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
7+
# Then this file should have foo==1.14.0
8+
protobuf==3.19.5
9+
grpcio==1.51.3

packages/googleapis-common-protos/testing/constraints-3.7.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
77
# Then this file should have foo==1.14.0
88
protobuf==3.19.5
9-
grpcio==1.51.3
9+
grpcio==1.44.0
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This constraints file is used to check that lower bounds
2+
# are correct in setup.py
3+
# List *all* library dependencies and extras in this file.
4+
# Pin the version to the lower bound.
5+
#
6+
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
7+
# Then this file should have foo==1.14.0
8+
protobuf==3.20.2
9+
grpcio==1.51.3

packages/googleapis-common-protos/testing/constraints-3.9.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
77
# Then this file should have foo==1.14.0
88
protobuf==3.20.2
9-
grpcio==1.51.3
9+
grpcio==1.44.0

0 commit comments

Comments
 (0)