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 — Use apitools for uploads/downloads · Issue #334 · googleapis/google-cloud-python

Use apitools for uploads/downloads #334

New issue
Copy link
New issue
Copy link
Closed
#407
Closed
Use apitools for uploads/downloads#334
#407
Copy link
Assignees
tseaver
Labels
api: storageIssues related to the Cloud Storage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
Milestone
Storage Stable

Description

@silvolu
silvolu
opened on Nov 4, 2014
Issue body actions

uploads_test.py and downloads_test.py should provide good examples for it.

Activity

Next
  1. silvolu
    added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    api: storageIssues related to the Cloud Storage API.
    on Nov 4, 2014
  2. silvolu
    added this to the This milestone has been deleted milestone on Nov 4, 2014
  3. tseaver
    self-assigned this
    on Nov 20, 2014
  4. tseaver commented on Nov 20, 2014

    @tseaver
    tseaver
    on Nov 20, 2014
    Contributor
    More actions

    I'm working on this, but maybe need some help from @craigcitro . The bits of apitools we need to do the upload / download still have dependencies on protorpc, even outside code generation / generated code:

    apitools.base.py.base_api

    • defines two classes derived from protorpc.messages.Message
    • uses protorpc.messages.ValidationError and protorpc.messages.MessageFields classes for error handling / validation.
    • Its _LoadClass uses the protorpc.message_types module for "simple" / scalar types.

    apitools.base.py.encoding

    • depends heavily on protorpc.messages.Message (its whole raison-d'etre is marshalling JSON using messages as schema).
    • uses the protorpc.message_types module, but in only one place (and the usage is somewhat odd, excluding "normal" marshalling of protorpc.message_types.DateTimeField)
    • uses the protorpc.protorpc.ProtoJson class to do a "deep copy", and has a helper class derived from it (used from MessageToJson() and JsonToMessage().

    apitools.base.py.extra_types

    • depends heavily on protorpc.messages.Message.
    • re-exports protorpc.message_types.DateTimeMessage
    • adds custom marshalling for protorpc.message_types.DateTimeField.
    • uses the protorpc.protorpc.ProtoJson class in its cusoom marshlling of protorpc.message_types.DateTimeField.

    For us to use apitools, we really need either a version of google-protorpc that supports our desired Python versions, or else we need to fork the needed bits of both into our codebase. Note that the protorpc modules we use (unlike most of the rest) don't pull in a dependency on GAE, so maybe we should be pulling them out somehow.

  5. tseaver commented on Nov 20, 2014

    @tseaver
    tseaver
    on Nov 20, 2014
    Contributor
    More actions

    @dhermes you've got some residual memories of protorpc -- maybe you can suggest something?

  6. craigcitro commented on Nov 20, 2014

    @craigcitro
    craigcitro
    on Nov 20, 2014
    Contributor
    More actions

    I'm actively working on getting the protorpc fixes pushed through -- it's going well, i've just got a few too many balls in the air right now.

    how far away is protorpc for python3 support? (you'd think i would know, but haven't looked yet.)

  7. tseaver commented on Nov 20, 2014

    @tseaver
    tseaver
    on Nov 20, 2014
    Contributor
    More actions

    It is hard to estimate, given that running the tests is an unknown quantity. I've done some work today on adding tox support, but the tests don't all pass in the absence of the not-explicitly-depended-on GAE / protobuf code. I will post a gist showing the modernize results (after cleaning it up a bit).

  8. dhermes commented on Nov 20, 2014

    @dhermes
    dhermes
    on Nov 20, 2014
    Contributor
    More actions

    RE: "residual memories" I never got tests running outside of Google's BUILD environment, so I am in the same boat as @tseaver.

    As for the usefulness of protorpc, I am not sold on it if we are only using it in generated code.

    The value in user-land was that people could create protorpc.Message objects which behaved "exactly" like a typed object (something obviously not supported in Python).

    We could write something much simpler given a JSON schema:
    https://gist.github.com/dhermes/2cbf4352146239e1aca1

    I don't know if @craigcitro has feelings on this, but I'd guess he's thought about it more than I have.

  9. tseaver commented on Nov 20, 2014

    @tseaver
    tseaver
    on Nov 20, 2014
    Contributor
    More actions

    As for the usefulness of protorpc, I am not sold on it if we are only using it in generated code.

    We use a fairly narrow slice of it in non-generated code (see above).

  10. tseaver commented on Nov 20, 2014

    @tseaver
    tseaver
    on Nov 20, 2014
    Contributor
    More actions

    @craigcitro here is the gist I promised (I'd be glad to kick this in as another Hg branch):

    https://gist.github.com/tseaver/6d28ef139b2a0dcb2eea

  11. silvolu commented on Nov 20, 2014

    @silvolu
    silvolu
    on Nov 20, 2014
    ContributorAuthor
    More actions

    Couldn't we just use transfer.py for uploads and downloads?
    There shouldn't be no need for protorpc in that case.

  12. tseaver commented on Nov 20, 2014

    @tseaver
    tseaver
    on Nov 20, 2014
    Contributor
    More actions

    @silvolu looks like we could: that would use http_wrapper, exceptions, and util as well, and none of those import anything from protorpc. We still can't ship with a dependency on protorpc if it doesn't support the versions we want: I guess we could just fork those four modules (they don't have tests) into a "vendored" sub-package for now.

  13. silvolu commented on Nov 20, 2014

    @silvolu
    silvolu
    on Nov 20, 2014
    ContributorAuthor
    More actions

    Yeah, that's the plan B mentioned in the doc I sent along.

  14. tseaver commented on Nov 25, 2014

    @tseaver
    tseaver
    on Nov 25, 2014
    Contributor
    More actions

    @silvolu @craigcitro I'm not sure we can make use of apitools.base.py.transfer directly without the support of the stuff in apitools.base.py.base_api. In particular, transfer.Upload.InitializeUpload() and transfer.Download.InitializeDownload() APIs expect to be handed http_request and client arguments which are set up inside base_api.BaseApiService._RunMethod(), which has lots more hair than we should be replicating.

  15. 40 remaining items

  16. parthea
    added 10 commits that reference this issue on Nov 24, 2025

    chore: move docs check from kokoro to GH actions (#334)

    5572bc2

    chore: reference main branch of google-cloud-python (#334)

    ace2d3e

    feat: Add read_time support for get and query (#334)

    ec6e08e

    feat: Add Support for Layout Parser Documents (#334)

    e91fdb0

    fix: bump minimum versions for google-api-core and proto-plus (#334)

    9df6544

    chore: release 2.1.1 (#341)

    f7e4194

    feat: add always_use_jwt_access (#334)

    8c32327

    chore: release 2.6.0 (#337)

    a662cfc

    feat: add always_use_jwt_access (#334)

    9e4eda5

    chore: release 2.6.0 (#337)

    3a21ae1
  17. parthea
    added 5 commits that reference this issue on Mar 2, 2026

    chore(deps): update dependency avro to v1.10.2 (#334)

    1476622

    django: fix crash when using F expression on TimeField

    b24d462

    chore: change owner to harshachinta (#334)

    69be80a

    tests: pre-scrub old HMAC keys before testing creation (#467)

    3cc1ffe

    feat!: Bump minimum version to 3.10 (#334)

    78bd044
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @tseaver
    tseaver

Labels

api: storageIssues related to the Cloud Storage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    • Storage Stable

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.