GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Prepare for py3k by tseaver · Pull Request #374 · googleapis/google-cloud-python

Conversation

@tseaver

@tseaver tseaver commented Nov 13, 2014

Copy link
Copy Markdown
Contributor

Make a start toward #91 (we are still blocked on the protobuf dependency).

Selectively apply patches suggested by 'python-modernize --six-unicode'.

Tweak the pylint messages suppressed in test/demo code to work around issues involved in "straddling" Python2/Python3:

  • The six module does some import hackery which confuses pylint when used in a virtualenv: suppress import-error check (only in test/demo code). Note that the check is redundant (we have 100% coverage) as well as failing bogusly.
  • Rather than introduce from __future__ import print_statement in demos, just use print(), which is legal in Python2, and forward-compatible to Python3, but causes a `superfluous-parens' warning under pylint: suppress that warning (only test/demo code).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
tseaver added 4 commits November 13, 2014 14:33
@tseaver
Sort disabled messages for test/demo code.
d3388c8
@tseaver
Disable 'import-error' for test/demo code.
f4e4a0d
The 'six.moves' module (used in demo code) is known to confuse pylint
when used in conjunction with virtualenv.  See:

https://bitbucket.org/logilab/pylint/issue/73/pylint-is-unable-to-import
@tseaver
Disable 'superfluous-parens' for demo code.
7f2d6e1
The error trips over using 'print(thing)' in Python2, which is legal,
and forward-compatible to Py3k for simple cases.  Rather than introduce
the 'from __future__ import print_function' into the demo, just suppress
the warning.
@tseaver
Selectively apply patches suggested by 'python-modernize --six-unicode'.
e544d27
@tseaver tseaver added the milestone-feature label Nov 13, 2014
@coveralls

coveralls commented Nov 13, 2014

Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling e544d27 on tseaver:modernize-prep_for_py3k into 9d6efcf on GoogleCloudPlatform:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dhermes
dhermes reviewed Nov 15, 2014
View reviewed changes
Comment thread gcloud/datastore/demo/demo.py

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tseaver added 5 commits November 15, 2014 14:09
@tseaver
PEP8.
b79e1bc
@tseaver
Explicitly declare dep. on 'six'.
0f44997
We were getting it transitively, but better to say we need it.
@tseaver
PEP8.
98a9960
@tseaver
Remove spurious 'list(foo.items())' wrappers.
790f649
They were wrongly introduced by .
@tseaver
No need for 'try: ... except:' when we have 'six'.
92beb55
@coveralls

coveralls commented Nov 15, 2014

Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling 92beb55 on tseaver:modernize-prep_for_py3k into 9d6efcf on GoogleCloudPlatform:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver
Moar no need for 'try: ... except:' when we have 'six'.
7706cd9
@coveralls

coveralls commented Nov 15, 2014

Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling 7706cd9 on tseaver:modernize-prep_for_py3k into 9d6efcf on GoogleCloudPlatform:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Nov 16, 2014

Copy link
Copy Markdown
Contributor

All seems well except possible resolving the use of six.u, which can be done outside of this PR. Let's resolve (the decision) before I LGTM. We should run by @silvolu about explicitly not supporting 2.5 and / or 3.2.

Are we ready to add a py34 environ to tox? Do you want to do it in this PR or catch it in another cycle?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Nov 16, 2014

Copy link
Copy Markdown
Contributor Author

WRT 3.2: FWIW, 3.2 is the "system python3" version for Ubuntu 12.04 ("precise") and Debian stable ("wheezy"). Dropping support for 3.2 would make the six.u() ugliness go away.

WRT 2.5: Given that current travis / tox / virtualenv / pip / setuptools don't support Python 2.5, and that we therefore cannot automate testing for it, I recommend that we drop support, as recommended in Lennart Regebro's excellent book on porting to Python3.

WRT tox -e py34: We can't add 'py3x' until we get the transitive closure of our dependencies cleanly installable in Python 3 (google-apputils is the current crtiical path blocker).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Nov 17, 2014

Copy link
Copy Markdown
Contributor

RE: 3.2 on an LTS release, eek! This makes me sad, the EOL is still May 2017 so I'm not as confident as I previously was. If we use the from __future__ import unicode_literals import this will not be an issue, thought that import does not exist in 2.5.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Nov 24, 2014

Copy link
Copy Markdown
Contributor Author

from future __import_literals__ is problematic if we care at all about being able to test with "native" strings on Python2. I'd rather drop 3.2 support than use it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver
Restore unicode literals.
38f7425
Since we have decided not to support Python 3.2.x, we can avoid the wart.
@coveralls

coveralls commented Nov 24, 2014

Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling 38f7425 on tseaver:modernize-prep_for_py3k into 9d6efcf on GoogleCloudPlatform:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes dhermes added the hygiene label Dec 31, 2015
atulep pushed a commit that referenced this pull request Apr 6, 2023
@renovate-bot
chore(deps): update dependency google-cloud-speech to v2.14.0 (#374)
3bac8e8
atulep pushed a commit that referenced this pull request Apr 6, 2023
@renovate-bot
chore(deps): update dependency google-cloud-speech to v2.14.0 (#374)
d673a5f
atulep pushed a commit that referenced this pull request Apr 18, 2023
@renovate-bot
chore(deps): update dependency google-cloud-speech to v2.14.0 (#374)
fa2979e
parthea pushed a commit that referenced this pull request Jun 4, 2023
@renovate-bot
chore(deps): update dependency pytest to v7.1.3 (#374)
36e51c9
parthea pushed a commit that referenced this pull request Jul 6, 2023
@renovate-bot
chore(deps): update dependency google-auth to v2.11.1 (#374)
3f21f8b
parthea added a commit that referenced this pull request Sep 20, 2023
@gcf-owl-bot @parthea
feat: support async write mode for WriteUserEvent API (#374)
eb70cea
* feat: support async write mode for WriteUserEvent API
feat: support collect and import GA4 event format with prebuilt whistle rule
feat: support exact searchable and retrievable in catalog attribute config
feat: deprecate retrievable_fields in product attribute
feat: support diversity type in serving config
feat: allow set feed id in merchant center link
feat: support data output to GCS
docs: keep the API doc up-to-date with recent changes

PiperOrigin-RevId: 495893148

Source-Link: googleapis/googleapis@02dcec3

Source-Link: googleapis/googleapis-gen@996aa46
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTk2YWE0NmZlNDgyZWY4MDdhMzNiNTZkMTViMjhhZDU1ZmJhYzdiOSJ9

* 🦉 Updates from OwlBot post-processor

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

* fix flaky test

* revert

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
parthea pushed a commit that referenced this pull request Sep 22, 2023
@renovate-bot
chore(deps): update dependency google-cloud-pubsub to v2.13.5 (#374)
fe303fa
parthea pushed a commit that referenced this pull request Sep 22, 2023
@gcf-owl-bot
build(deps): bump cryptography to 41.0.0 [autoapprove] (#374)
07ac6ee
Source-Link: https://togithub.com/googleapis/synthtool/commit/d0f51a0c2a9a6bcca86911eabea9e484baadf64b
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:240b5bcc2bafd450912d2da2be15e62bc6de2cf839823ae4bf94d4f392b451dc
parthea added a commit that referenced this pull request Sep 22, 2023
@gcf-owl-bot @parthea
chore: use gapic-generator-python 0.65.1 (#374)
82eea67
* chore: use gapic-generator-python 0.65.1

PiperOrigin-RevId: 441524537

Source-Link: googleapis/googleapis@2a27391

Source-Link: googleapis/googleapis-gen@ab6756a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWI2NzU2YTQ4Yzg5YjViY2I5ZmI3MzQ0M2NiOGU1NWQ1NzRmNDY0MyJ9

* 🦉 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>
Co-authored-by: Anthonios Partheniou <[email protected]>
parthea pushed a commit that referenced this pull request Sep 22, 2023
@gcf-owl-bot
chore: store artifacts in placer [autoapprove] (#374)
c94d891
Source-Link: https://togithub.com/googleapis/synthtool/commit/cb960373d12d20f8dc38beee2bf884d49627165e
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2d816f26f728ac8b24248741e7d4c461c09764ef9f7be3684d557c9632e46dbd
parthea pushed a commit that referenced this pull request Sep 22, 2023
@renovate-bot
chore(deps): update dependency backoff to v2.2.1 (#374)
e75a30a
parthea pushed a commit that referenced this pull request Oct 21, 2023
@release-please
chore(main): release 1.8.0 (#374)
5db9198
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Oct 21, 2023
@gcf-owl-bot
chore: Update gapic-generator-python to v1.8.4 (#374)
27a8fe8
* chore: Update gapic-generator-python to v1.8.4

PiperOrigin-RevId: 507808936

Source-Link: googleapis/googleapis@64cf849

Source-Link: googleapis/googleapis-gen@53c48ca
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTNjNDhjYWMxNTNkM2IzN2YzZDJjMmRlYzQ4MzBjZmQ5MWVjNDE1MyJ9

* 🦉 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 Oct 21, 2023
@renovate-bot
chore(deps): update dependency google-analytics-admin to v0.20.0 (#374)
2256ec7
parthea pushed a commit that referenced this pull request Oct 21, 2023
@gcf-owl-bot
build: [autoapprove] bump cryptography from 41.0.2 to 41.0.3 (#374)
041382e
Source-Link: https://togithub.com/googleapis/synthtool/commit/352b9d4c068ce7c05908172af128b294073bf53c
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:3e3800bb100af5d7f9e810d48212b37812c1856d20ffeafb99ebe66461b61fc7
parthea pushed a commit that referenced this pull request Oct 21, 2023
@gcf-owl-bot
chore: Update gapic-generator-python to v1.8.2 (#374)
afa53e0
* chore: Update gapic-generator-python to v1.8.2

PiperOrigin-RevId: 504289125

Source-Link: googleapis/googleapis@38a48a4

Source-Link: googleapis/googleapis-gen@b2dc226
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjJkYzIyNjYzZGJlNDdhOTcyYzhkOGMyZjhhNGRmMDEzZGFmZGNiYyJ9

* 🦉 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 Oct 22, 2023
@renovate-bot
chore(deps): update dependency google-cloud-speech to v2.14.0 (#374)
b640ebc
parthea pushed a commit that referenced this pull request Sep 18, 2025
@busunkim96
chore: add CODEOWNERS (#374)
8d65a55
OSPO's security recommendations include requiring CODEOWNERS review.
parthea pushed a commit that referenced this pull request Nov 22, 2025
@tseaver
chore: 'requirements.txt' is not a script (#374)
c4b71ce
parthea pushed a commit that referenced this pull request Nov 24, 2025
@arithmetic1728
fix: fix mTLS logic (#374)
6240d44
Previous PR triggers mTLS if client_options.api_endpoint is different 
from the default one, in this PR, we change the logic, mTLS is triggered 
if client_options.api_endpoint is provided
parthea pushed a commit that referenced this pull request Nov 24, 2025
@gcf-owl-bot
chore: store artifacts in placer (#374)
8dd0e5b
Source-Link: googleapis/synthtool@cb96037
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2d816f26f728ac8b24248741e7d4c461c09764ef9f7be3684d557c9632e46dbd

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
@gcf-owl-bot
chore: [autoapprove] update readme_gen.py to include autoescape True (#…
b23d0b7
…374)

Source-Link: googleapis/synthtool@6b4d5a6
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f792ee1320e03eda2d13a5281a2989f7ed8a9e50b73ef6da97fac7e1e850b149

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea added a commit that referenced this pull request Nov 24, 2025
@parthea
chore(librarian): onboard to librarian (#374)
a261e83
Towards googleapis/librarian#2456
parthea pushed a commit that referenced this pull request Nov 24, 2025
@gcf-owl-bot
chore(python): exclude grpcio==1.49.0rc1 in tests (#374)
0064548
Source-Link: googleapis/synthtool@c4dd595
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:ce3c1686bc81145c81dd269bd12c4025c6b275b22d14641358827334fddb1d72

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
@renovate-bot @leahecole
chore(deps): update dependency google-cloud-bigquery to v2.24.0 (#374)
85b4316
Co-authored-by: Leah E. Cole <[email protected]>
parthea pushed a commit that referenced this pull request Nov 25, 2025
@renovate-bot @leahecole
chore(deps): update dependency google-cloud-bigquery to v2.24.0 (#374)
2f57cf5
Co-authored-by: Leah E. Cole <[email protected]>
parthea pushed a commit that referenced this pull request Mar 9, 2026
@tritone
fix: set custom_time on uploads (#374)
ca8370d
The custom_time property was incorrectly not included as a field
that could be set on object upload.

Fixes #372
parthea pushed a commit that referenced this pull request Mar 9, 2026
@gcf-owl-bot
docs: omit mention of Python 2.7 in 'CONTRIBUTING.rst' (#1127) (#374)
9c556ed
Closes #1126
Source-Link: googleapis/synthtool@b91f129
Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:b6169fc6a5207b11800a7c002d0c5c2bc6d82697185ca12e666f44031468cfcd
parthea pushed a commit that referenced this pull request Mar 9, 2026
@dandhlee
feat: add support for enums (#374)
639eb89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@tseaver @coveralls @dhermes
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.