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 — Unify '_implicit_environ' handling · Issue #741 · googleapis/google-cloud-python

Unify '_implicit_environ' handling #741

New issue
Copy link
New issue
Copy link
Closed
Closed
Unify '_implicit_environ' handling#741
Copy link
Assignees
tseaver
Labels
api: datastoreIssues related to the Datastore API.api: pubsubIssues related to the Pub/Sub API.api: storageIssues related to the Cloud Storage API.

Description

@tseaver
tseaver
opened on Mar 17, 2015
Issue body actions

There is a lot of overlap between datastore._implicit_environ and storage._implicit_environ. We should factor that out, especially before implementing yet another version in pubsub.

Activity

  1. tseaver
    added
    api: datastoreIssues related to the Datastore API.
    api: storageIssues related to the Cloud Storage API.
    hygiene
    api: pubsubIssues related to the Pub/Sub API.
    on Mar 17, 2015
  2. dhermes commented on Mar 18, 2015

    @dhermes
    dhermes
    on Mar 18, 2015
    Contributor
    More actions

    I like it. Was trying to move gradually towards this while building out the implicit functionality into storage.

    The hardest thing to factor out is the dependence on the local concepts of Connection and _DefaultsContainer.

  3. tseaver commented on Mar 20, 2015

    @tseaver
    tseaver
    on Mar 20, 2015
    ContributorAuthor
    More actions

    Here's my notional take on a unification plan;

    • Move the GAE/GCD detection logic from gcloud.datastore._implicit_environ into gcloud._helpers (#741: hoist GAE/GCD detection into gcloud._helpers #747).
    • Move the "project detection" logic from gcloud.storage._implicit_environ into gcloud._helpers (#741: hoist project detection/setup into 'gcloud._helpers'. #748).
    • Consider how 'project' and 'dataset_id' should be related (e.g., does an app running on AppEngine / GCE use the same logic to determine its project ID for storage / pubsub purposes?).
    • Add gcloud._helpers.get_scoped_connection(), which takes the connection class and a scopes list as arguments; make each gcloud.*._implicit_environ.get_connection delegate to that helper (e.g., via functools.partial) (#741: hoist get_scoped_connection into connection #749 leaves to original get_connection() functions in place, but has them delegate to get_scoped_connection()).
    • Move the _DefaultsContainer up into gcloud._helpers, and make it generic; instantiate it (subclassing only if really necessary) in each gcloud.*._implicit_environ.

    @dhermes WDYT?

  4. dhermes commented on Mar 20, 2015

    @dhermes
    dhermes
    on Mar 20, 2015
    Contributor
    More actions

    I don't see _DefaultsContainer able to be generalized due to the dependence on package specific functions for lazy-loading.

    The rest seems great.

    RE: Project ID vs. App Engine App ID. We should ask someone with more knowledge of the current state of things. I think they are the same, but could be wrong.

    App Engine apps also have a default bucket created for them: <app-id>.appspot.com (bucket names with periods can't usually be created)

  5. tseaver
    added a commit that references this issue on Mar 20, 2015

    Merge pull request #747 from tseaver/741-hoist_gae_gcd_detection

    9c09ced
  6. tseaver commented on Mar 20, 2015

    @tseaver
    tseaver
    on Mar 20, 2015
    ContributorAuthor
    More actions

    Re: _DefaultsContainer: I (now) agree. When I moved the project stuff up into gcloud._helpers, I split apart the _DefaultsContainer class in gcloud.storage._implicit_environ: each modules version knows only about the attributes relevant to its own functions.

  7. tseaver
    added 2 commits that reference this issue on Mar 23, 2015

    Merge pull request #748 from tseaver/741-hoist_default_project

    4512eff

    Merge pull request #749 from tseaver/741-get_scoped_connection

    3b04fdb
  8. dhermes commented on Mar 31, 2015

    @dhermes
    dhermes
    on Mar 31, 2015
    Contributor
    More actions

    @tseaver What's the status on this?

  9. tseaver commented on Mar 31, 2015

    @tseaver
    tseaver
    on Mar 31, 2015
    ContributorAuthor
    More actions

    I think that we are good, here: the default project stuff is shared, as is the repeated connection stuff (via get_scoped_connection).

  10. tseaver
    closed this as completedon Mar 31, 2015
  11. JustinBeckwith
    assigned
    tseaver
    on Feb 1, 2021
  12. parthea
    added a commit that references this issue on Sep 18, 2025

    chore(deps): update all dependencies (#741)

    ac4be2c
  13. parthea
    added 7 commits that reference this issue on Nov 22, 2025

    chore(main): release 2.17.0 (#741)

    fc42418

    fix: fix rest transport unit test template (#741)

    d353d67

    chore: release 0.40.2 (#745)

    f43d49c

    fix: Ensure repo install (#741)

    6c314c0

    build(deps): [autoapprove] bump pygments from 2.13.0 to 2.15.0 (#741)

    c21847d

    chore: release 1.11.1 (#741)

    d1d153b

    chore: release 1.30.0 (#741)

    4669dd7
  14. parthea
    added 3 commits that reference this issue on Mar 9, 2026

    chore(deps): update actions/checkout action to v5 (#741)

    4cdc01b

    feat: track invocation id for retry metrics (#741)

    8c6bcca

    feat: Add support for Postgresql dialect (#741)

    b3906f8
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: datastoreIssues related to the Datastore API.api: pubsubIssues related to the Pub/Sub API.api: storageIssues related to the Cloud Storage API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    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.