diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a9fcd07cc43..c07f148f0b0 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:9743664022bd63a8084be67f144898314c7ca12f0a03e422ac17c733c129d803 + digest: sha256:0ffe3bdd6c7159692df5f7744da74e5ef19966288a6bf76023e8e04e0c424d7d diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a158611f3c..9fcb3457cfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.19.1](https://www.github.com/googleapis/google-api-python-client/compare/v2.19.0...v2.19.1) (2021-09-02) + + +### Bug Fixes + +* remove repeated calls to self._get_reason ([#1513](https://www.github.com/googleapis/google-api-python-client/issues/1513)) ([d5cf4e0](https://www.github.com/googleapis/google-api-python-client/commit/d5cf4e0b1537eeafdb96ae831bbdffc5f1c6a94c)) + ## [2.19.0](https://www.github.com/googleapis/google-api-python-client/compare/v2.18.0...v2.19.0) (2021-08-31) diff --git a/googleapiclient/errors.py b/googleapiclient/errors.py index 332327ec04f..385558c4897 100644 --- a/googleapiclient/errors.py +++ b/googleapiclient/errors.py @@ -43,7 +43,7 @@ def __init__(self, resp, content, uri=None): self.content = content self.uri = uri self.error_details = "" - self._get_reason() + self.reason = self._get_reason() @property def status_code(self): @@ -75,25 +75,24 @@ def _get_reason(self): pass if reason is None: reason = "" - return reason + return reason.strip() def __repr__(self): - reason = self._get_reason() if self.error_details: return '' % ( self.resp.status, self.uri, - reason.strip(), + self.reason, self.error_details, ) elif self.uri: return '' % ( self.resp.status, self.uri, - self._get_reason().strip(), + self.reason, ) else: - return '' % (self.resp.status, self._get_reason()) + return '' % (self.resp.status, self.reason) __str__ = __repr__ diff --git a/owlbot.py b/owlbot.py index c13fb3a19df..1df7f43dd4f 100644 --- a/owlbot.py +++ b/owlbot.py @@ -39,8 +39,3 @@ # ---------------------------------------------------------------------------- python.py_samples(skip_readmes=True) - -# Remove the replacements below once https://github.com/googleapis/synthtool/pull/1188 is merged - -# Update googleapis/repo-automation-bots repo to main in .kokoro/*.sh files -s.replace(".kokoro/*.sh", "repo-automation-bots/tree/master", "repo-automation-bots/tree/main") diff --git a/samples/compute/requirements.txt b/samples/compute/requirements.txt index a1c3b1941b0..7473ec53132 100644 --- a/samples/compute/requirements.txt +++ b/samples/compute/requirements.txt @@ -1,3 +1,3 @@ -google-api-python-client==2.18.0 -google-auth==2.0.1 +google-api-python-client==2.19.0 +google-auth==2.0.2 google-auth-httplib2==0.1.0 diff --git a/setup.py b/setup.py index c05fc84c493..688fe4be81f 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ with io.open(readme_filename, encoding="utf-8") as readme_file: readme = readme_file.read() -version = "2.19.0" +version = "2.19.1" setup( name="google-api-python-client",