Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion googleapiclient/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,13 @@ def build_http():
# for Resumable Uploads rather than Permanent Redirects.
# This asks httplib2 to exclude 308s from the status codes
# it treats as redirects
http.redirect_codes = http.redirect_codes - {308}
try:
http.redirect_codes = http.redirect_codes - {308}
except AttributeError:
# Apache Beam tests depend on this library and cannot
# currently upgrade their httplib2 version
# http.redirect_codes does not exist in previous versions
# of httplib2, so pass
pass

return http
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
packages = ["apiclient", "googleapiclient", "googleapiclient/discovery_cache"]

install_requires = [
"httplib2>=0.17.0,<1dev",
# NOTE: Apache Beam tests depend on this library and cannot
# currently upgrade their httplib2 version.
# Please see https://github.com/googleapis/google-api-python-client/pull/841
"httplib2>=0.9.2,<1dev",
"google-auth>=1.4.1",
"google-auth-httplib2>=0.0.3",
"google-api-core>=1.13.0,<2dev",
Expand Down