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 — Adding auto create to pub/sub topic. by dhermes · Pull Request #949 · googleapis/google-cloud-python

Conversation

@dhermes

@dhermes dhermes commented Jun 25, 2015

Copy link
Copy Markdown
Contributor

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dhermes
Adding auto create to pub/sub topic.
3d6a8ec
Fixes googleapis#905.
@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

dhermes commented Jun 25, 2015

Copy link
Copy Markdown
Contributor Author

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 😄

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@theacodes

theacodes commented Jun 29, 2015

Copy link
Copy Markdown
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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Jun 30, 2015

Copy link
Copy Markdown
Contributor Author

@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waprin

waprin commented Jun 30, 2015

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes dhermes closed this Jun 30, 2015
@dhermes

dhermes commented Jun 30, 2015

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes
dhermes deleted the fix-905 branch June 30, 2015 19:11
@dhermes dhermes mentioned this pull request Jun 30, 2015
Pubsub Could Use Autocreate on Topics and Subscriptions #905
Closed
@stephenplusplus stephenplusplus mentioned this pull request Jul 25, 2015
remove topic.options.autoCreate, add topic.getMetadata googleapis/google-cloud-node#742
Merged
parthea pushed a commit that referenced this pull request Nov 24, 2025
@renovate-bot
chore(deps): update dependency google-api-core to v1.31.0 (#949)
5a1b403
parthea pushed a commit that referenced this pull request Nov 24, 2025
@antoineeripret @tswast
feat: add partitioning and clustering parameters to the to_gbq func…
b8e59a7
…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) <[email protected]>
parthea pushed a commit that referenced this pull request Nov 24, 2025
@NickChittle
fix: support async vector search from a collection (#949)
28fa96c
parthea pushed a commit that referenced this pull request Nov 24, 2025
@sorced-jim
feat: Add Python 3.12 (#949)
011e58a
* 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
@release-please
chore(main): release 2.4.0 (#949)
3209283
🤖 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).
parthea pushed a commit that referenced this pull request Mar 2, 2026
@chak-radhar007
samples: Update schema.py print (#949)
a4a2914
Format string issue

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/python-pubsub/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕
parthea pushed a commit that referenced this pull request Mar 9, 2026
@cojenco
samples: add generation-match preconditions to selected samples (#949)
6279b2a
* samples: add preconditions to objects.delete

* add preconditons to rewrite category samples

* add compose and update previous changes

* preconditions to rewrites and encrypted uploads

* add preconditions to objects insert

* refine optional block wording and flow

* update test
parthea pushed a commit that referenced this pull request Mar 9, 2026
@dandhlee @asthamohta
docs: fix documentation structure (#949)
a0fb614
Co-authored-by: Astha Mohta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

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

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@dhermes @theacodes @waprin @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.