Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Should we URL quote subscription names #1507

Copy link
Copy link

Description

@dhermes
Issue body actions

@tseaver I tried to use

t = client.topic('foo')
s = t.subscription('bar with space')

and got a strange error. Should we forbid subscription names that don't adhere or manually escape them for users? I wrote a docstring edit but wanted to discuss before sending a PR

diff --git a/gcloud/pubsub/subscription.py b/gcloud/pubsub/subscription.py
index e3da8a0..8c54d39 100644
--- a/gcloud/pubsub/subscription.py
+++ b/gcloud/pubsub/subscription.py
@@ -26,7 +26,10 @@ class Subscription(object):
     https://cloud.google.com/pubsub/reference/rest/v1/projects.subscriptions

     :type name: string
-    :param name: the name of the subscription
+    :param name: the name of the subscription. Must start with a letter, and
+                 contain only letters, numbers, dashes, underscores, periods,
+                 tildes, plus or percent signs. It must be between 3 and 255
+                 characters in length, and it must not start with ``goog``.

     :type topic: :class:`gcloud.pubsub.topic.Topic`
     :param topic: the topic to which the subscription belongs..
Reactions are currently unavailable

Metadata

Metadata

Labels

api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.