Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Commit 24f76ba

Browse files
chore: migrate default branch to main (#479)
* chore: migrate default branch from master to main * Rename additional references from master to main * Rename blacklist to denylist * Add owlbot replacement rules to persist changes * Move loose s.move() back under the loop in owlbot.py * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 1164890 commit 24f76ba

File tree

11 files changed

+123
-72
lines changed

11 files changed

+123
-72
lines changed

.github/sync-repo-settings.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# https://github.com/googleapis/repo-automation-bots/tree/master/packages/sync-repo-settings
2-
# Rules for master branch protection
1+
# https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings
2+
# Rules for main branch protection
33
branchProtectionRules:
44
# Identifies the protection rule pattern. Name of the branch to be protected.
5-
# Defaults to `master`
6-
- pattern: master
5+
# Defaults to `main`
6+
- pattern: main
77
requiresCodeOwnerReviews: true
88
requiresStrictStatusChecks: true
99
requiredStatusCheckContexts:

.kokoro/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ python3 -m pip install --upgrade --quiet nox
4141
python3 -m nox --version
4242

4343
# If this is a continuous build, send the test log to the FlakyBot.
44-
# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot.
44+
# See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot.
4545
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then
4646
cleanup() {
4747
chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot

.kokoro/test-samples-impl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ for file in samples/**/requirements.txt; do
8080
EXIT=$?
8181

8282
# If this is a periodic build, send the test log to the FlakyBot.
83-
# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot.
83+
# See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot.
8484
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
8585
chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot
8686
$KOKORO_GFILE_DIR/linux_amd64/flakybot

CONTRIBUTING.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ You'll have to create a development environment using a Git checkout:
5050
# Configure remotes such that you can pull changes from the googleapis/python-pubsub
5151
# repository into your local repository.
5252
$ git remote add upstream git@github.com:googleapis/python-pubsub.git
53-
# fetch and merge changes from upstream into master
53+
# fetch and merge changes from upstream into main
5454
$ git fetch upstream
55-
$ git merge upstream/master
55+
$ git merge upstream/main
5656

5757
Now your local repo is set up such that you will push changes to your GitHub
5858
repo, from which you can submit a pull request.
@@ -110,12 +110,12 @@ Coding Style
110110
variables::
111111

112112
export GOOGLE_CLOUD_TESTING_REMOTE="upstream"
113-
export GOOGLE_CLOUD_TESTING_BRANCH="master"
113+
export GOOGLE_CLOUD_TESTING_BRANCH="main"
114114

115115
By doing this, you are specifying the location of the most up-to-date
116116
version of ``python-pubsub``. The the suggested remote name ``upstream``
117117
should point to the official ``googleapis`` checkout and the
118-
the branch should be the main branch on that remote (``master``).
118+
the branch should be the main branch on that remote (``main``).
119119

120120
- This repository contains configuration for the
121121
`pre-commit <https://pre-commit.com/>`__ tool, which automates checking
@@ -185,7 +185,7 @@ The `description on PyPI`_ for the project comes directly from the
185185
``README``. Due to the reStructuredText (``rst``) parser used by
186186
PyPI, relative links which will work on GitHub (e.g. ``CONTRIBUTING.rst``
187187
instead of
188-
``https://github.com/googleapis/python-pubsub/blob/master/CONTRIBUTING.rst``)
188+
``https://github.com/googleapis/python-pubsub/blob/main/CONTRIBUTING.rst``)
189189
may cause problems creating links or rendering the description.
190190

191191
.. _description on PyPI: https://pypi.org/project/google-cloud-pubsub
@@ -210,7 +210,7 @@ We support:
210210

211211
Supported versions can be found in our ``noxfile.py`` `config`_.
212212

213-
.. _config: https://github.com/googleapis/python-pubsub/blob/master/noxfile.py
213+
.. _config: https://github.com/googleapis/python-pubsub/blob/main/noxfile.py
214214

215215

216216
We also explicitly decided to support Python 3 beginning with version 3.6.

UPGRADING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ required or optional.
8888
> of these methods have in large part been preserved.
8989
9090
Some methods have additional keyword only parameters. The available parameters depend
91-
on the [`google.api.method_signature` annotation](https://github.com/googleapis/python-pubsub/blob/master/google/cloud/pubsub_v1/proto/pubsub.proto#L88)
91+
on the [`google.api.method_signature` annotation](https://github.com/googleapis/python-pubsub/blob/main/google/cloud/pubsub_v1/proto/pubsub.proto#L88)
9292
specified by the API producer.
9393

9494

docs/conf.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
# The encoding of source files.
7777
# source_encoding = 'utf-8-sig'
7878

79-
# The master toctree document.
80-
master_doc = "index"
79+
# The root toctree document.
80+
root_doc = "index"
8181

8282
# General information about the project.
8383
project = "google-cloud-pubsub"
@@ -279,7 +279,7 @@
279279
# author, documentclass [howto, manual, or own class]).
280280
latex_documents = [
281281
(
282-
master_doc,
282+
root_doc,
283283
"google-cloud-pubsub.tex",
284284
"google-cloud-pubsub Documentation",
285285
author,
@@ -313,13 +313,7 @@
313313
# One entry per manual page. List of tuples
314314
# (source start file, name, description, authors, manual section).
315315
man_pages = [
316-
(
317-
master_doc,
318-
"google-cloud-pubsub",
319-
"google-cloud-pubsub Documentation",
320-
[author],
321-
1,
322-
)
316+
(root_doc, "google-cloud-pubsub", "google-cloud-pubsub Documentation", [author], 1,)
323317
]
324318

325319
# If true, show URL addresses after external links.
@@ -333,7 +327,7 @@
333327
# dir menu entry, description, category)
334328
texinfo_documents = [
335329
(
336-
master_doc,
330+
root_doc,
337331
"google-cloud-pubsub",
338332
"google-cloud-pubsub Documentation",
339333
author,

google/cloud/pubsub_v1/_gapic.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
import functools
1818

1919

20-
def add_methods(source_class, blacklist=()):
20+
def add_methods(source_class, denylist=()):
2121
"""Add wrapped versions of the `api` member's methods to the class.
2222
23-
Any methods passed in `blacklist` are not added.
23+
Any methods passed in `denylist` are not added.
2424
Additionally, any methods explicitly defined on the wrapped class are
2525
not added.
2626
"""
@@ -48,8 +48,8 @@ def actual_decorator(cls):
4848
if name.startswith("_"):
4949
continue
5050

51-
# Ignore anything on our blacklist.
52-
if name in blacklist:
51+
# Ignore anything on our denylist.
52+
if name in denylist:
5353
continue
5454

5555
# Retrieve the attribute, and ignore it if it is not callable.

google/cloud/pubsub_v1/publisher/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
_LOGGER = logging.getLogger(__name__)
4747

48-
_BLACKLISTED_METHODS = (
48+
_DENYLISTED_METHODS = (
4949
"publish",
5050
"from_service_account_file",
5151
"from_service_account_json",
@@ -54,7 +54,7 @@
5454
_raw_proto_pubbsub_message = gapic_types.PubsubMessage.pb()
5555

5656

57-
@_gapic.add_methods(publisher_client.PublisherClient, blacklist=_BLACKLISTED_METHODS)
57+
@_gapic.add_methods(publisher_client.PublisherClient, denylist=_DENYLISTED_METHODS)
5858
class Client(object):
5959
"""A publisher client for Google Cloud Pub/Sub.
6060

google/cloud/pubsub_v1/subscriber/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@
3434
# a PIP package.
3535
__version__ = "0.0"
3636

37-
_BLACKLISTED_METHODS = (
37+
_DENYLISTED_METHODS = (
3838
"publish",
3939
"from_service_account_file",
4040
"from_service_account_json",
4141
)
4242

4343

44-
@_gapic.add_methods(subscriber_client.SubscriberClient, blacklist=_BLACKLISTED_METHODS)
44+
@_gapic.add_methods(subscriber_client.SubscriberClient, denylist=_DENYLISTED_METHODS)
4545
class Client(object):
4646
"""A subscriber client for Google Cloud Pub/Sub.
4747

0 commit comments

Comments
 (0)