Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: Modify synth.py to update grpc transport options (#266)
* fix: Modify synth.py to update grpc transport options.

* fix: tweak regex replace

* chore: regen other docs

* chore: make replace required

* chore: remove unused import

Co-authored-by: Bu Sun Kim <busunkim@google.com>
  • Loading branch information
dpcollins-google and busunkim96 committed Dec 28, 2020
1 parent fd2840c commit 41dcd30
Show file tree
Hide file tree
Showing 36 changed files with 6,763 additions and 264 deletions.
1 change: 1 addition & 0 deletions .flake8
Expand Up @@ -26,6 +26,7 @@ exclude =
*_pb2.py

# Standard linting exemptions.
**/.nox/**
__pycache__,
.git,
*.pyc,
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
rev: v3.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand Down
11 changes: 5 additions & 6 deletions CONTRIBUTING.rst
Expand Up @@ -21,8 +21,8 @@ In order to add a feature:
- The feature must be documented in both the API and narrative
documentation.
- The feature must work fully on the following CPython versions: 2.7,
3.5, 3.6, 3.7 and 3.8 on both UNIX and Windows.
- The feature must work fully on the following CPython versions:
3.6, 3.7, 3.8 and 3.9 on both UNIX and Windows.
- The feature must not add unnecessary dependencies (where
"unnecessary" is of course subjective, but new dependencies should
Expand Down Expand Up @@ -202,25 +202,24 @@ Supported Python Versions
We support:
- `Python 3.5`_
- `Python 3.6`_
- `Python 3.7`_
- `Python 3.8`_
- `Python 3.9`_
.. _Python 3.5: https://docs.python.org/3.5/
.. _Python 3.6: https://docs.python.org/3.6/
.. _Python 3.7: https://docs.python.org/3.7/
.. _Python 3.8: https://docs.python.org/3.8/
.. _Python 3.9: https://docs.python.org/3.9/
Supported versions can be found in our ``noxfile.py`` `config`_.
.. _config: https://github.com/googleapis/python-pubsub/blob/master/noxfile.py
Python 2.7 support is deprecated. All code changes should maintain Python 2.7 compatibility until January 1, 2020.
We also explicitly decided to support Python 3 beginning with version
3.5. Reasons for this include:
3.6. Reasons for this include:
- Encouraging use of newest versions of Python 3
- Taking the lead of `prominent`_ open-source `projects`_
Expand Down
33 changes: 29 additions & 4 deletions google/cloud/pubsub_v1/proto/pubsub.proto
Expand Up @@ -24,6 +24,7 @@ import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "google/pubsub/v1/schema.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.PubSub.V1";
Expand All @@ -42,8 +43,8 @@ service Publisher {
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/pubsub";

// Creates the given topic with the given name. See the [resource name rules](
// https://cloud.google.com/pubsub/docs/admin#resource_names).
// Creates the given topic with the given name. See the [resource name rules]
// (https://cloud.google.com/pubsub/docs/admin#resource_names).
rpc CreateTopic(Topic) returns (Topic) {
option (google.api.http) = {
put: "/v1/{name=projects/*/topics/*}"
Expand Down Expand Up @@ -143,6 +144,21 @@ message MessageStoragePolicy {
repeated string allowed_persistence_regions = 1;
}

// Settings for validating messages published against a schema.
message SchemaSettings {
// Required. The name of the schema that messages published should be
// validated against. Format is `projects/{project}/schemas/{schema}`. The
// value of this field will be `_deleted-schema_` if the schema has been
// deleted.
string schema = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Schema" }
];

// The encoding of messages validated against `schema`.
Encoding encoding = 2;
}

// A topic resource.
message Topic {
option (google.api.resource) = {
Expand Down Expand Up @@ -173,6 +189,15 @@ message Topic {
//
// The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
string kms_key_name = 5;

// Settings for validating messages published against a schema.
//
// EXPERIMENTAL: Schema support is in development and may not work yet.
SchemaSettings schema_settings = 6;

// Reserved for future use. This field is set only in responses from the
// server; it is ignored if it is set in any requests.
bool satisfies_pzs = 7;
}

// A message that is published by publishers and consumed by subscribers. The
Expand Down Expand Up @@ -587,8 +612,8 @@ service Subscriber {
}

// Seeks an existing subscription to a point in time or to a given snapshot,
// whichever is provided in the request. Snapshots are used in [Seek](
// https://cloud.google.com/pubsub/docs/replay-overview) operations, which
// whichever is provided in the request. Snapshots are used in [Seek]
// (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
// allow you to manage message acknowledgments in bulk. That is, you can set
// the acknowledgment state of messages in an existing subscription to the
// state captured by a snapshot. Note that both the subscription and the
Expand Down

0 comments on commit 41dcd30

Please sign in to comment.