Skip to content

Conversation

@craigloftus
Copy link

When using Python 3 httplib2 returns response content as bytes, but the content is str in Python 2. This causes problems when passing the content to json.loads, which requires str always.

Tests were passing previously because they were mocking the response by httplib2 as a str. These tests have been changed to use the b notation, which resolves to str in Python 2 and bytes in Python 3.

This is the follow-up from PR #697.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 13, 2015
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling a66cb5c on craigloftus:python3_support_improvements into d9e2156 on GoogleCloudPlatform:master.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@craigloftus craigloftus force-pushed the python3_support_improvements branch from a66cb5c to 62e13d7 Compare March 16, 2015 09:55
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 68fa37f on craigloftus:python3_support_improvements into d668044 on GoogleCloudPlatform:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 4785d98 on craigloftus:python3_support_improvements into d668044 on GoogleCloudPlatform:master.

@dhermes
Copy link
Contributor

dhermes commented Mar 24, 2015

@tseaver I am working on integrating this (and getting regression3 to pass)

Spurred on by #755 and #754

dhermes added a commit to dhermes/google-cloud-python that referenced this pull request Mar 24, 2015
- Incorporates changes from googleapis#724.
- Also requires httplib2 from HEAD since the bytes/unicode
  header issues have not been released on PyPI yet.
dhermes added a commit to dhermes/google-cloud-python that referenced this pull request Mar 24, 2015
- Incorporates changes from googleapis#724.
- Also requires httplib2 from HEAD since the bytes/unicode
  header issues have not been released on PyPI yet.
@dhermes dhermes mentioned this pull request Mar 24, 2015
@dhermes
Copy link
Contributor

dhermes commented Mar 24, 2015

@craigloftus Thanks for doing this work. I have incorporated it into #756 to keep this from bit-rotting too much as we make more updates to master.

Please re-open or comment if you have any issues with this.

@dhermes dhermes closed this Mar 24, 2015
@craigloftus
Copy link
Author

@dhermes No worries. I learnt a lot and look forward to no longer depending on my fork.

parthea pushed a commit that referenced this pull request Aug 21, 2025
…724)

Source-Link: googleapis/synthtool@280ddae
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:346ab2efb51649c5dde7756cbbdc60dd394852ba83b9bbffc292a63549f33c17

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Sep 16, 2025
…724)

Source-Link: googleapis/synthtool@280ddae
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:346ab2efb51649c5dde7756cbbdc60dd394852ba83b9bbffc292a63549f33c17

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea added a commit that referenced this pull request Nov 24, 2025
* feat: implement `OperationsRestAsyncTransport` to support long running operations (#700)

* feat: Add OperationsRestAsyncTransport to support long running operations

* update TODO comment

* update TODO comment

* address feedback

* address feedback

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix mypy and lint issues

* minor fix

* add no cover

* fix no cover tag

* link coverage issue

* silence coverage issue

* fix statement name error

* address PR feedback

* address PR feedback

* address PR comments

---------

Co-authored-by: ohmayr <[email protected]>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

* feat: implement async client for LROs (#707)

* feat: implement `AbstractOperationsAsyncClient` to support long running operations

* remove coverage guards

* address presubmit failures

* fix coverage for cancel operation

* tests cleanup

* fix incorrect tests

* file bugs

* add auth import

* address PR comments

* address PR comments

* fix unit tests and address more comments

* disable retry parameter

* add retry parameter

* address PR comments

---------

Co-authored-by: ohmayr <[email protected]>
Co-authored-by: ohmayr <[email protected]>

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Anthonios Partheniou <[email protected]>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
* feat: add CreateDatabase API

PiperOrigin-RevId: 537397252

Source-Link: googleapis/googleapis@b4481e1

Source-Link: googleapis/googleapis-gen@6b4b12a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmI0YjEyYWJlOWVjZTYzODJlYThkNmZmZDVjNTBlMzZiMzI5MDVmOCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants