diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index b771c37..c07f148 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:a1a891041baa4ffbe1a809ac1b8b9b4a71887293c9101c88e8e255943c5aec2d + digest: sha256:0ffe3bdd6c7159692df5f7744da74e5ef19966288a6bf76023e8e04e0c424d7d diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 9690de5..95ab71d 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -41,7 +41,7 @@ python3 -m pip install --upgrade --quiet nox python3 -m nox --version # If this is a continuous build, send the test log to the FlakyBot. -# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot. +# See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot. if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then cleanup() { chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot diff --git a/.kokoro/test-samples-impl.sh b/.kokoro/test-samples-impl.sh index 311a8d5..8a324c9 100755 --- a/.kokoro/test-samples-impl.sh +++ b/.kokoro/test-samples-impl.sh @@ -80,7 +80,7 @@ for file in samples/**/requirements.txt; do EXIT=$? # If this is a periodic build, send the test log to the FlakyBot. - # See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot. + # See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot. if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot $KOKORO_GFILE_DIR/linux_amd64/flakybot diff --git a/CHANGELOG.md b/CHANGELOG.md index 018a60c..90a4442 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-runtimeconfig/#history +### [0.32.5](https://www.github.com/googleapis/python-runtimeconfig/compare/v0.32.4...v0.32.5) (2021-09-20) + + +### Bug Fixes + +* remove six ([#105](https://www.github.com/googleapis/python-runtimeconfig/issues/105)) ([152b9c6](https://www.github.com/googleapis/python-runtimeconfig/commit/152b9c6316c2dcc482106997b6ee6944ee6d0245)) + ### [0.32.4](https://www.github.com/googleapis/python-runtimeconfig/compare/v0.32.3...v0.32.4) (2021-08-13) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 9b2b20e..04e70b8 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -50,9 +50,9 @@ You'll have to create a development environment using a Git checkout: # Configure remotes such that you can pull changes from the googleapis/python-runtimeconfig # repository into your local repository. $ git remote add upstream git@github.com:googleapis/python-runtimeconfig.git - # fetch and merge changes from upstream into master + # fetch and merge changes from upstream into main $ git fetch upstream - $ git merge upstream/master + $ git merge upstream/main Now your local repo is set up such that you will push changes to your GitHub repo, from which you can submit a pull request. @@ -110,12 +110,12 @@ Coding Style variables:: export GOOGLE_CLOUD_TESTING_REMOTE="upstream" - export GOOGLE_CLOUD_TESTING_BRANCH="master" + export GOOGLE_CLOUD_TESTING_BRANCH="main" By doing this, you are specifying the location of the most up-to-date - version of ``python-runtimeconfig``. The the suggested remote name ``upstream`` - should point to the official ``googleapis`` checkout and the - the branch should be the main branch on that remote (``master``). + version of ``python-runtimeconfig``. The + remote name ``upstream`` should point to the official ``googleapis`` + checkout and the branch should be the default branch on that remote (``main``). - This repository contains configuration for the `pre-commit `__ tool, which automates checking @@ -209,7 +209,7 @@ The `description on PyPI`_ for the project comes directly from the ``README``. Due to the reStructuredText (``rst``) parser used by PyPI, relative links which will work on GitHub (e.g. ``CONTRIBUTING.rst`` instead of -``https://github.com/googleapis/python-runtimeconfig/blob/master/CONTRIBUTING.rst``) +``https://github.com/googleapis/python-runtimeconfig/blob/main/CONTRIBUTING.rst``) may cause problems creating links or rendering the description. .. _description on PyPI: https://pypi.org/project/google-cloud-runtimeconfig @@ -234,7 +234,7 @@ We support: Supported versions can be found in our ``noxfile.py`` `config`_. -.. _config: https://github.com/googleapis/python-runtimeconfig/blob/master/noxfile.py +.. _config: https://github.com/googleapis/python-runtimeconfig/blob/main/noxfile.py We also explicitly decided to support Python 3 beginning with version 3.6. diff --git a/README.rst b/README.rst index 5632026..b6c4fee 100644 --- a/README.rst +++ b/README.rst @@ -12,7 +12,7 @@ return based on certain conditions. - `Product Documentation`_ .. |beta| image:: https://img.shields.io/badge/support-beta-orange.svg - :target: https://github.com/googleapis/google-cloud-python/blob/master/README.rst#beta-support + :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#beta-support .. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-runtimeconfig.svg :target: https://pypi.org/project/google-cloud-runtimeconfig/ .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-runtimeconfig.svg diff --git a/docs/conf.py b/docs/conf.py index bb9194c..d7bc93d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -76,8 +76,8 @@ # The encoding of source files. # source_encoding = 'utf-8-sig' -# The master toctree document. -master_doc = "index" +# The root toctree document. +root_doc = "index" # General information about the project. project = "google-cloud-runtimeconfig" @@ -280,7 +280,7 @@ # author, documentclass [howto, manual, or own class]). latex_documents = [ ( - master_doc, + root_doc, "google-cloud-runtimeconfig.tex", "google-cloud-runtimeconfig Documentation", author, @@ -315,7 +315,7 @@ # (source start file, name, description, authors, manual section). man_pages = [ ( - master_doc, + root_doc, "google-cloud-runtimeconfig", "google-cloud-runtimeconfig Documentation", [author], @@ -334,7 +334,7 @@ # dir menu entry, description, category) texinfo_documents = [ ( - master_doc, + root_doc, "google-cloud-runtimeconfig", "google-cloud-runtimeconfig Documentation", author, diff --git a/noxfile.py b/noxfile.py index d896e7f..935a924 100644 --- a/noxfile.py +++ b/noxfile.py @@ -84,9 +84,15 @@ def default(session): constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) - session.install("asyncmock", "pytest-asyncio", "-c", constraints_path) - - session.install("mock", "pytest", "pytest-cov", "-c", constraints_path) + session.install( + "mock", + "asyncmock", + "pytest", + "pytest-cov", + "pytest-asyncio", + "-c", + constraints_path, + ) session.install("-e", ".", "-c", constraints_path) diff --git a/owlbot.py b/owlbot.py index 8983c1c..23e4852 100644 --- a/owlbot.py +++ b/owlbot.py @@ -18,6 +18,7 @@ import synthtool as s from synthtool import gcp +from synthtool.languages import python common = gcp.CommonTemplates() @@ -25,7 +26,10 @@ # Add templated files # ---------------------------------------------------------------------------- templated_files = common.py_library(microgenerator=True) + # this is an http library, not grpc s.move(templated_files, excludes=["docs/multiprocessing.rst"]) +python.py_samples(skip_readmes=True) + s.shell.run(["nox", "-s", "blacken"], hide_output=False) diff --git a/renovate.json b/renovate.json index c048955..c21036d 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,9 @@ { "extends": [ - "config:base", ":preserveSemverRanges" + "config:base", + "group:all", + ":preserveSemverRanges", + ":disableDependencyDashboard" ], "ignorePaths": [".pre-commit-config.yaml"], "pip_requirements": { diff --git a/scripts/readme-gen/templates/install_deps.tmpl.rst b/scripts/readme-gen/templates/install_deps.tmpl.rst index a0406db..275d649 100644 --- a/scripts/readme-gen/templates/install_deps.tmpl.rst +++ b/scripts/readme-gen/templates/install_deps.tmpl.rst @@ -12,7 +12,7 @@ Install Dependencies .. _Python Development Environment Setup Guide: https://cloud.google.com/python/setup -#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. +#. Create a virtualenv. Samples are compatible with Python 3.6+. .. code-block:: bash diff --git a/setup.py b/setup.py index 5dfe2e5..47afc7c 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ name = "google-cloud-runtimeconfig" description = "Google Cloud RuntimeConfig API client library" -version = "0.32.4" +version = "0.32.5" # Should be one of: # 'Development Status :: 3 - Alpha' # 'Development Status :: 4 - Beta' diff --git a/tests/unit/test__http.py b/tests/unit/test__http.py index 5672119..39d3483 100644 --- a/tests/unit/test__http.py +++ b/tests/unit/test__http.py @@ -33,8 +33,8 @@ def test_default_url(self): self.assertIs(conn._client, client) def test_build_api_url_no_extra_query_params(self): - from six.moves.urllib.parse import parse_qsl - from six.moves.urllib.parse import urlsplit + from urllib.parse import parse_qsl + from urllib.parse import urlsplit conn = self._make_one(object()) uri = conn.build_api_url("/foo") @@ -47,8 +47,8 @@ def test_build_api_url_no_extra_query_params(self): self.assertEqual(parms, {}) def test_build_api_url_w_custom_endpoint(self): - from six.moves.urllib.parse import parse_qsl - from six.moves.urllib.parse import urlsplit + from urllib.parse import parse_qsl + from urllib.parse import urlsplit custom_endpoint = "https://foo-runtimeconfig.googleapis.com" conn = self._make_one(object(), api_endpoint=custom_endpoint) @@ -62,8 +62,8 @@ def test_build_api_url_w_custom_endpoint(self): self.assertEqual(parms, {}) def test_build_api_url_w_extra_query_params(self): - from six.moves.urllib.parse import parse_qsl - from six.moves.urllib.parse import urlsplit + from urllib.parse import parse_qsl + from urllib.parse import urlsplit conn = self._make_one(object()) uri = conn.build_api_url("/foo", {"bar": "baz"}) diff --git a/tests/unit/test_config.py b/tests/unit/test_config.py index 104ee04..ddff89c 100644 --- a/tests/unit/test_config.py +++ b/tests/unit/test_config.py @@ -212,14 +212,12 @@ def test_get_variable_w_alternate_client(self): self.assertEqual(req["path"], "/%s" % (VARIABLE_PATH,)) def test_list_variables_empty(self): - import six - conn = _Connection({}) client = _Client(project=self.PROJECT, connection=conn) config = self._make_one(name=self.CONFIG_NAME, client=client) iterator = config.list_variables() - page = six.next(iterator.pages) + page = next(iterator.pages) variables = list(page) token = iterator.next_page_token @@ -232,7 +230,6 @@ def test_list_variables_empty(self): self.assertEqual(req["path"], "/%s" % (PATH,)) def test_list_variables_defaults(self): - import six from google.cloud._helpers import _rfc3339_to_datetime from google.cloud.runtimeconfig.variable import Variable @@ -259,7 +256,7 @@ def test_list_variables_defaults(self): config = self._make_one(name=self.CONFIG_NAME, client=client) iterator = config.list_variables() - page = six.next(iterator.pages) + page = next(iterator.pages) variables = list(page) token = iterator.next_page_token @@ -279,7 +276,6 @@ def test_list_variables_defaults(self): self.assertNotIn("filter", req["query_params"]) def test_list_variables_explicit(self): - import six from google.cloud._helpers import _rfc3339_to_datetime from google.cloud.runtimeconfig.variable import Variable @@ -305,7 +301,7 @@ def test_list_variables_explicit(self): config = self._make_one(name=self.CONFIG_NAME, client=client) iterator = config.list_variables(page_size=3, page_token=TOKEN, client=client) - page = six.next(iterator.pages) + page = next(iterator.pages) variables = list(page) token = iterator.next_page_token