Skip to content

Conversation

@dhermes
Copy link
Contributor

@dhermes dhermes commented Jun 25, 2015

Fixes #905.


This is labelled don't merge because it doesn't adhere to the truly optimal case described in #905 by @jonparrott. I sent the PR just to have more discussion here (now that @tseaver is back in the US).

I'm worried that implementing the method used by node will be painful. I suppose we could do it with something like a custom class that is just bound to the topic and calls made for it

class CustomHttp(object):

    def __init__(self, http, object_to_create):
        self._http = http
        self._object_to_create = object_to_create
        self._creation_checked = False

    def request(self, method, uri=None, headers=None, body=None):
        # Just do the request
        try:
            self._http(method, uri=uri, headers=headers, body=body)
        except:
            # Do some other stuff

BUT, no matter how I slice it, the added complexity doesn't seem to be worth it for a measly feature like auto_create. But maybe I am undervaluing it?

@dhermes dhermes added do not merge Indicates a pull request not ready for merge, due to either quality or timing. api: pubsub Issues related to the Pub/Sub API. labels Jun 25, 2015
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 25, 2015
@dhermes dhermes added do not merge Indicates a pull request not ready for merge, due to either quality or timing. and removed do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Jun 25, 2015
@dhermes
Copy link
Contributor Author

dhermes commented Jun 25, 2015

It looks like I also needed to delete the reviewninja webhook (see #948 for original reviewninja post) from the GitHub settings. Lets hope it stops bothering us 😄

@theacodes
Copy link
Contributor

To be honest, in python looking before you leap isn't as overly onerous as it is in node:

if not topic.exists():
    topic.create()

So I'm okay with nixing this if the cost/benefit isn't good. My only issue now is that the check for exists is slow, but that's not this library's fault.

@dhermes
Copy link
Contributor Author

dhermes commented Jun 30, 2015

@jonparrott Sorry for the huge delay in reply.

Since it was @waprin who filed, I want to feel out for how he feels about closing #905.

Also I noticed on googleapis/google-cloud-node#696 that you and @tmatsuo are having some reservations of autoCreate and/or think that exists() is a fine substitute for autoCreate.

@waprin
Copy link
Contributor

waprin commented Jun 30, 2015

Yeah in retrospect auto_create creates more confusion than convenience, I'm fine with just closing them all down.

@dhermes dhermes closed this Jun 30, 2015
@dhermes
Copy link
Contributor Author

dhermes commented Jun 30, 2015

Thanks guys! Let me know if there is anything we can do to make the sample writing process easier.

@dhermes dhermes deleted the fix-905 branch June 30, 2015 19:11
parthea pushed a commit that referenced this pull request Nov 24, 2025
…tion (#949)

* add partitioning and clustering to the to_gbq function

* feat: add partitioning and clustering to the to_gbq function

* added tests

* fixed documentation error

* run nox -r -s format lint

---------

Co-authored-by: Tim Sweña (Swast) <swast@google.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
* chore(python): Add Python 3.12

* feat: Add Python 3.12

* Allow extra log message in cache tests.
parthea pushed a commit that referenced this pull request Nov 26, 2025
🤖 I have created a release *beep* *boop*
---


## [2.4.0](googleapis/google-auth-library-python@v2.3.3...v2.4.0) (2022-01-20)


### Features

* add 'py.typed' declaration ([#919](googleapis/google-auth-library-python#919)) ([c993504](googleapis/google-auth-library-python@c993504))
* add api key support ([#826](googleapis/google-auth-library-python#826)) ([3b15092](googleapis/google-auth-library-python@3b15092))


### Bug Fixes

* **deps:** allow cachetools 5.0 for python 3.7+ ([#937](googleapis/google-auth-library-python#937)) ([1eae37d](googleapis/google-auth-library-python@1eae37d))
* fix the message format for metadata server exception ([#916](googleapis/google-auth-library-python#916)) ([e756f08](googleapis/google-auth-library-python@e756f08))


### Documentation

* fix intersphinx link for 'requests-oauthlib' ([#921](googleapis/google-auth-library-python#921)) ([967be4f](googleapis/google-auth-library-python@967be4f))
* note ValueError in `verify_oauth2_token` ([#928](googleapis/google-auth-library-python#928)) ([82bc5f0](googleapis/google-auth-library-python@82bc5f0))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the Pub/Sub API. cla: yes This human has signed the Contributor License Agreement. do not merge Indicates a pull request not ready for merge, due to either quality or timing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants