Skip to content

Commit

Permalink
fix: require python 3.7+ (#165)
Browse files Browse the repository at this point in the history
* chore(python): drop python 3.6

Source-Link: googleapis/synthtool@4f89b13
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c

* require python 3.7+ in setup.py

* remove python 3.6 sample configs

* remove python 3.6 from noxfile

* add api_description to .repo-metadata.json

* 🦉 Updates from OwlBot post-processor

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>
Co-authored-by: Anthonios Partheniou <[email protected]>
  • Loading branch information
3 people authored Jul 10, 2022
1 parent 63d3ad9 commit 6925ee2
Show file tree
Hide file tree
Showing 16 changed files with 57 additions and 95 deletions.
4 changes: 2 additions & 2 deletions packages/google-cloud-org-policy/.github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:81ed5ecdfc7cac5b699ba4537376f3563f6f04122c4ec9e735d3b3dc1d43dd32
# created: 2022-05-05T22:08:23.383410683Z
digest: sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c
# created: 2022-07-05T18:31:20.838186805Z
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.6', '3.7', '3.8', '3.9', '3.10']
python: ['3.7', '3.8', '3.9', '3.10']
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Only run this nox session.
env_vars: {
key: "NOX_SESSION"
value: "prerelease_deps"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Only run this nox session.
env_vars: {
key: "NOX_SESSION"
value: "prerelease_deps"
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions packages/google-cloud-org-policy/.kokoro/test-samples-impl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export PYTHONUNBUFFERED=1
env | grep KOKORO

# Install nox
python3.6 -m pip install --upgrade --quiet nox
python3.9 -m pip install --upgrade --quiet nox

# Use secrets acessor service account to get secrets
if [[ -f "${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" ]]; then
Expand Down Expand Up @@ -76,7 +76,7 @@ for file in samples/**/requirements.txt; do
echo "------------------------------------------------------------"

# Use nox to execute the tests for the project.
python3.6 -m nox -s "$RUN_TESTS_SESSION"
python3.9 -m nox -s "$RUN_TESTS_SESSION"
EXIT=$?

# If this is a periodic build, send the test log to the FlakyBot.
Expand Down
1 change: 1 addition & 0 deletions packages/google-cloud-org-policy/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "orgpolicy",
"name_pretty": "Organization Policy",
"api_description": "The Organization Policy API allows users to configure governance rules on their GCP resources across the Cloud Resource Hierarchy.",
"product_documentation": "https://cloud.google.com/resource-manager/docs/organization-policy/overview",
"client_documentation": "https://cloud.google.com/python/docs/reference/orgpolicy/latest",
"issue_tracker": "",
Expand Down
6 changes: 2 additions & 4 deletions packages/google-cloud-org-policy/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In order to add a feature:
documentation.

- The feature must work fully on the following CPython versions:
3.6, 3.7, 3.8, 3.9 and 3.10 on both UNIX and Windows.
3.7, 3.8, 3.9 and 3.10 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 @@ -221,13 +221,11 @@ Supported Python Versions

We support:

- `Python 3.6`_
- `Python 3.7`_
- `Python 3.8`_
- `Python 3.9`_
- `Python 3.10`_

.. _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/
Expand All @@ -239,7 +237,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
.. _config: https://github.com/googleapis/python-org-policy/blob/main/noxfile.py


We also explicitly decided to support Python 3 beginning with version 3.6.
We also explicitly decided to support Python 3 beginning with version 3.7.
Reasons for this include:

- Encouraging use of newest versions of Python 3
Expand Down
44 changes: 32 additions & 12 deletions packages/google-cloud-org-policy/README.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
Python Client for Organization Policy
=================================================
Python Client for Organization Policy API
=========================================

|GA| |pypi| |versions|
|stable| |pypi| |versions|

`Organization Policy`_: The Organization Policy API allows users to configure governance rules on their GCP
resources across the Cloud Resource Hierarchy.
`Organization Policy API`_: The Organization Policy API allows users to configure governance rules on their GCP resources across the Cloud Resource Hierarchy.

- `Client Library Documentation`_
- `Product Documentation`_

.. |GA| image:: https://img.shields.io/badge/support-ga-gold.svg
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#general-availability
.. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-org-policy.svg
:target: https://pypi.org/project/google-cloud-org-policy/
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-org-policy.svg
:target: https://pypi.org/project/google-cloud-org-policy/
.. _Organization Policy: https://cloud.google.com/resource-manager/docs/organization-policy/overview
.. _Organization Policy API: https://cloud.google.com/resource-manager/docs/organization-policy/overview
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/orgpolicy/latest
.. _Product Documentation: https://cloud.google.com/resource-manager/docs/organization-policy/overview

Expand Down Expand Up @@ -48,6 +47,27 @@ dependencies.
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/


Code samples and snippets
~~~~~~~~~~~~~~~~~~~~~~~~~

Code samples and snippets live in the `samples/` folder.


Supported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^
Our client libraries are compatible with all current [active](https://devguide.python.org/devcycle/#in-development-main-branch) and [maintenance](https://devguide.python.org/devcycle/#maintenance-branches) versions of
Python.

Python >= 3.7

Unsupported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Python <= 3.6

If you are using an [end-of-life](https://devguide.python.org/devcycle/#end-of-life-branches)
version of Python, we recommend that you update as soon as possible to an actively supported version.


Mac/Linux
^^^^^^^^^

Expand All @@ -72,12 +92,12 @@ Windows
Next Steps
~~~~~~~~~~

- Read the `Client Library Documentation`_ for Organization Policy
- Read the `Client Library Documentation`_ for Organization Policy API
to see other available methods on the client.
- Read the `Organization Policy Product documentation`_ to learn
- Read the `Organization Policy API Product documentation`_ to learn
more about the product and see How-to Guides.
- View this `README`_ to see the full list of Cloud
APIs that we cover.

.. _Organization Policy Product documentation: https://cloud.google.com/resource-manager/docs/organization-policy/overview
.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
.. _Organization Policy API Product documentation: https://cloud.google.com/resource-manager/docs/organization-policy/overview
.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
2 changes: 1 addition & 1 deletion packages/google-cloud-org-policy/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

DEFAULT_PYTHON_VERSION = "3.8"

UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"]
UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10"]
UNIT_TEST_STANDARD_DEPENDENCIES = [
"mock",
"asyncmock",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 3.6+.
#. Create a virtualenv. Samples are compatible with Python 3.7+.

.. code-block:: bash
Expand Down
3 changes: 1 addition & 2 deletions packages/google-cloud-org-policy/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@
"proto-plus >= 1.15.0, <2.0.0dev",
"protobuf >= 3.19.0, <4.0.0dev",
),
python_requires=">=3.6",
python_requires=">=3.7",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
Expand Down

0 comments on commit 6925ee2

Please sign in to comment.