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 — Implicit set_ methods should return the values set and raise if not successful · Issue #631 · googleapis/google-cloud-python

Implicit set_ methods should return the values set and raise if not successful #631

New issue
Copy link
New issue
Copy link
Closed
Closed
Implicit set_ methods should return the values set and raise if not successful#631
Copy link
Assignees
dhermes
Labels
api: storageIssues related to the Cloud Storage API.
Milestone
Storage Future

Description

@dhermes
dhermes
opened on Feb 13, 2015
Issue body actions

See @tseaver comment about returning (and the current storage regression test hacky behavior).

This will likely require doing something like

class Environment(object):
    ....

DEFAULT_ENVIRON = Environment()

def set_default_foo():
    # Do some stuff to DEFAULT_ENVIRON
    return DEFAULT_ENVIRON

Activity

  1. dhermes
    added
    api: storageIssues related to the Cloud Storage API.
    on Feb 13, 2015
  2. dhermes
    added this to the Storage Future milestone on Feb 13, 2015
  3. dhermes
    changed the title [-]Implict set_ methods should return the values set and raise if not successful[/-] [+]Implicit set_ methods should return the values set and raise if not successful[/+] on Feb 13, 2015
  4. dhermes commented on Mar 9, 2015

    @dhermes
    dhermes
    on Mar 9, 2015
    ContributorAuthor
    More actions

    @tseaver We currently have 7 set_ methods defined:

    $ git grep -n 'def set_'
    gcloud/datastore/__init__.py:65:def set_defaults(dataset_id=None, connection=None):
    gcloud/datastore/_implicit_environ.py:131:def set_default_dataset_id(dataset_id=None):
    gcloud/datastore/_implicit_environ.py:185:def set_default_connection(connection=None):
    gcloud/storage/__init__.py:56:def set_default_bucket(bucket=None):
    gcloud/storage/__init__.py:82:def set_default_project(project=None):
    gcloud/storage/__init__.py:101:def set_default_connection(project=None, connection=None):
    gcloud/storage/__init__.py:117:def set_defaults(bucket=None, project=None, connection=None):
    $ git log -1 --pretty=%H
    3c7316ee312a3255fd78aa93d136ec5b19060417
    

    Among what we do have:

    • datastore._implicit_environ.set_default_dataset_id throws an exception if not set but does not return
    • datastore._implicit_environ.set_default_connection neither throws nor returns
    • datastore.__init__.set_defaults just wraps set_default_dataset_id and set_default_connection, so could get exception throwing for free but returning is not simple. We could just remove this since we have the lazy loading now.
    • storage.__init__.set_default_bucket neither returns nor throws
    • storage.__init__.set_default_project neither returns nor throws
    • storage.__init__.set_default_connection neither returns nor throws
    • storage.__init__.set_default_defaults neither returns nor throws
  5. dhermes commented on Aug 28, 2015

    @dhermes
    dhermes
    on Aug 28, 2015
    ContributorAuthor
    More actions

    Irrelevant in Client world

  6. dhermes
    closed this as completedon Aug 28, 2015
  7. JustinBeckwith
    assigned
    dhermes
    on Feb 1, 2021
  8. vchudnov-g
    added a commit that references this issue on Sep 20, 2023

    chore(deps): Update nox in .kokoro/requirements.in [autoapprove] (#631)

    4fb0668
  9. parthea
    added a commit that references this issue on Aug 21, 2025

    chore(deps): update dependency tqdm to v4.65.1 (#631)

    c6d6a7f
  10. parthea
    added 2 commits that reference this issue on Sep 16, 2025

    chore(deps): update dependency tqdm to v4.65.1 (#631)

    ab0d5c8

    docs: Google Colab auth is used with pydata-google-auth 1.8.0+ (#631)

    4922fde
  11. parthea
    added 3 commits that reference this issue on Nov 22, 2025

    fix(deps): allow protobuf < 5.0.0 (#631)

    4116990

    chore(python): update dependencies in /.kokoro (#631)

    b42a864

    test: Remove tests wrt foreign key (#631)

    66ea0be
  12. parthea
    added a commit that references this issue on Mar 2, 2026

    chore(python): update .pre-commit-config.yaml to use black==22.3.0 (#631

    09de20d
  13. parthea
    added 2 commits that reference this issue on Mar 9, 2026

    chore(deps): update dependency typing-extensions to v4.13.2 (#631)

    8bba697

    chore(python): modify templated noxfile to support non-cloud APIs (#631)

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

Metadata

Metadata

Assignees

  • @dhermes
    dhermes

Labels

api: storageIssues related to the Cloud Storage API.

Type

No type

Projects

No projects

    Milestone

    • Storage Future

    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.