Skip to content

Commit

Permalink
fix(deps): require httplib2>=0.19.0 (#2371)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ohmayr committed Mar 27, 2024
1 parent 4766fbd commit 727c073
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 7 deletions.
4 changes: 3 additions & 1 deletion noxfile.py
Expand Up @@ -104,9 +104,11 @@ def unit(session, oauth2client):
session.install("setuptools", "wheel")
session.run("python3", "setup.py", "bdist_wheel")
session.install(os.path.join("dist", os.listdir("dist").pop()))
root_dir = os.path.dirname(os.path.realpath(__file__))
constraints_path = str(f"{root_dir}/testing/constraints-{session.python}.txt")
session.install("-r", constraints_path)

# Run tests from a different directory to test the package artifacts
root_dir = os.path.dirname(os.path.realpath(__file__))
temp_dir = session.create_tmp()
session.chdir(temp_dir)
shutil.copytree(os.path.join(root_dir, "tests"), "tests")
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Expand Up @@ -33,12 +33,12 @@
packages = ["apiclient", "googleapiclient", "googleapiclient/discovery_cache"]

install_requires = [
"httplib2>=0.15.0,<1.dev0",
"httplib2>=0.19.0,<1.dev0",
# NOTE: Maintainers, please do not require google-auth>=2.x.x
# Until this issue is closed
# https://github.com/googleapis/google-cloud-python/issues/10566
"google-auth>=1.19.0,<3.0.0.dev0",
"google-auth-httplib2>=0.1.0",
"google-auth>=1.32.0,<3.0.0.dev0,!=2.24.0,!=2.25.0",
"google-auth-httplib2>=0.2.0, <1.0.0",
# NOTE: Maintainers, please do not require google-api-core>=2.x.x
# Until this issue is closed
# https://github.com/googleapis/google-cloud-python/issues/10566
Expand Down
6 changes: 6 additions & 0 deletions testing/constraints-3.10.txt
@@ -0,0 +1,6 @@
# Test an old version of google-auth against the latest version of api-core.
httplib2==0.19.0
google-auth==1.32.0
google-auth-httplib2==0.2.0
google-api-core
uritemplate==3.0.1
7 changes: 4 additions & 3 deletions testing/constraints-3.7.txt
Expand Up @@ -5,8 +5,9 @@
#
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
# Then this file should have foo==1.14.0
httplib2==0.15.0
google-auth==1.19.0
google-auth-httplib2==0.0.3
# Test minimum requirements.
httplib2==0.19.0
google-auth==1.32.0
google-auth-httplib2==0.2.0
google-api-core==1.31.5
uritemplate==3.0.1
6 changes: 6 additions & 0 deletions testing/constraints-3.8.txt
@@ -0,0 +1,6 @@
# Test a new version of google-auth against the minimum supported version of api-core.
httplib2==0.19.0
google-auth
google-auth-httplib2==0.2.0
google-api-core==1.31.5
uritemplate==3.0.1
7 changes: 7 additions & 0 deletions testing/constraints-3.9.txt
@@ -0,0 +1,7 @@
# Test the latest version of google-auth against the version of
# api-core with ClientOptions.universe_domain.
httplib2==0.19.0
google-auth
google-auth-httplib2==0.2.0
google-api-core==2.15.0
uritemplate==3.0.1

0 comments on commit 727c073

Please sign in to comment.