Skip to content

Commit 727c073

Browse files
authored
fix(deps): require httplib2>=0.19.0 (googleapis#2371)
* chore: apply constraints for testing dependency versions * update setup.py * fix the version number * nit: remove unnecessary comments * add upper bound to google-auth-httplib2
1 parent 4766fbd commit 727c073

6 files changed

+29
-7
lines changed

noxfile.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,11 @@ def unit(session, oauth2client):
104104
session.install("setuptools", "wheel")
105105
session.run("python3", "setup.py", "bdist_wheel")
106106
session.install(os.path.join("dist", os.listdir("dist").pop()))
107+
root_dir = os.path.dirname(os.path.realpath(__file__))
108+
constraints_path = str(f"{root_dir}/testing/constraints-{session.python}.txt")
109+
session.install("-r", constraints_path)
107110

108111
# Run tests from a different directory to test the package artifacts
109-
root_dir = os.path.dirname(os.path.realpath(__file__))
110112
temp_dir = session.create_tmp()
111113
session.chdir(temp_dir)
112114
shutil.copytree(os.path.join(root_dir, "tests"), "tests")

setup.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333
packages = ["apiclient", "googleapiclient", "googleapiclient/discovery_cache"]
3434

3535
install_requires = [
36-
"httplib2>=0.15.0,<1.dev0",
36+
"httplib2>=0.19.0,<1.dev0",
3737
# NOTE: Maintainers, please do not require google-auth>=2.x.x
3838
# Until this issue is closed
3939
# https://github.com/googleapis/google-cloud-python/issues/10566
40-
"google-auth>=1.19.0,<3.0.0.dev0",
41-
"google-auth-httplib2>=0.1.0",
40+
"google-auth>=1.32.0,<3.0.0.dev0,!=2.24.0,!=2.25.0",
41+
"google-auth-httplib2>=0.2.0, <1.0.0",
4242
# NOTE: Maintainers, please do not require google-api-core>=2.x.x
4343
# Until this issue is closed
4444
# https://github.com/googleapis/google-cloud-python/issues/10566

testing/constraints-3.10.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Test an old version of google-auth against the latest version of api-core.
2+
httplib2==0.19.0
3+
google-auth==1.32.0
4+
google-auth-httplib2==0.2.0
5+
google-api-core
6+
uritemplate==3.0.1

testing/constraints-3.7.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
#
66
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
77
# Then this file should have foo==1.14.0
8-
httplib2==0.15.0
9-
google-auth==1.19.0
10-
google-auth-httplib2==0.0.3
8+
# Test minimum requirements.
9+
httplib2==0.19.0
10+
google-auth==1.32.0
11+
google-auth-httplib2==0.2.0
1112
google-api-core==1.31.5
1213
uritemplate==3.0.1

testing/constraints-3.8.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Test a new version of google-auth against the minimum supported version of api-core.
2+
httplib2==0.19.0
3+
google-auth
4+
google-auth-httplib2==0.2.0
5+
google-api-core==1.31.5
6+
uritemplate==3.0.1

testing/constraints-3.9.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Test the latest version of google-auth against the version of
2+
# api-core with ClientOptions.universe_domain.
3+
httplib2==0.19.0
4+
google-auth
5+
google-auth-httplib2==0.2.0
6+
google-api-core==2.15.0
7+
uritemplate==3.0.1

0 commit comments

Comments
 (0)