-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare for py3k #374
Prepare for py3k #374
Conversation
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
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.
@@ -16,47 +16,47 @@ | |||
toy.save() | |||
|
|||
# If we look it up by its key, we should find it... | |||
print dataset.get_entities([toy.key()]) | |||
print(dataset.get_entities([toy.key()])) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
We were getting it transitively, but better to say we need it.
They were wrongly introduced by .
All seems well except possible resolving the use of Are we ready to add a |
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 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 |
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 |
|
Since we have decided not to support Python 3.2.x, we can avoid the wart.
@@ -1,9 +1,11 @@ | |||
"""Script to populate datastore with regression test data.""" | |||
from __future__ import print_function |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
LGTM pending your decision on the two imports of Can we update #91 with what remains? |
Incorporates feedback from @dhermes: #374 (comment) #374 (comment)
Re: updating #91: #91 (comment) |
* 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 <partheniou@google.com>
Source-Link: https://togithub.com/googleapis/synthtool/commit/d0f51a0c2a9a6bcca86911eabea9e484baadf64b Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:240b5bcc2bafd450912d2da2be15e62bc6de2cf839823ae4bf94d4f392b451dc
* 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 <partheniou@google.com>
Source-Link: https://togithub.com/googleapis/synthtool/commit/cb960373d12d20f8dc38beee2bf884d49627165e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2d816f26f728ac8b24248741e7d4c461c09764ef9f7be3684d557c9632e46dbd
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* 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>
Source-Link: https://togithub.com/googleapis/synthtool/commit/352b9d4c068ce7c05908172af128b294073bf53c Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:3e3800bb100af5d7f9e810d48212b37812c1856d20ffeafb99ebe66461b61fc7
* 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>
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:
six
module does some import hackery which confuses pylint when used in a virtualenv: suppressimport-error
check (only in test/demo code). Note that the check is redundant (we have 100% coverage) as well as failing bogusly.from __future__ import print_statement
in demos, just useprint()
, 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).