Skip to content

Commit

Permalink
fix: require python 3.7+ (#107)
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

* exclude templated readme

* remove python 3.6 from noxfile

* remove require check for python 3.6

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people committed Jul 10, 2022
1 parent 489b832 commit eb41a45
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 82 deletions.
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
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
1 change: 0 additions & 1 deletion .github/sync-repo-settings.yaml
Expand Up @@ -10,7 +10,6 @@ branchProtectionRules:
- 'cla/google'
- 'OwlBot Post Processor'
- 'lint'
- 'unit (3.6)'
- 'unit (3.7)'
- 'unit (3.8)'
- 'unit (3.9)'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unittest.yml
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
7 changes: 7 additions & 0 deletions .kokoro/continuous/prerelease-deps.cfg
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Only run this nox session.
env_vars: {
key: "NOX_SESSION"
value: "prerelease_deps"
}
7 changes: 7 additions & 0 deletions .kokoro/presubmit/prerelease-deps.cfg
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Only run this nox session.
env_vars: {
key: "NOX_SESSION"
value: "prerelease_deps"
}
40 changes: 0 additions & 40 deletions .kokoro/samples/python3.6/common.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions .kokoro/samples/python3.6/continuous.cfg

This file was deleted.

11 changes: 0 additions & 11 deletions .kokoro/samples/python3.6/periodic-head.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.6/periodic.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.6/presubmit.cfg

This file was deleted.

4 changes: 2 additions & 2 deletions .kokoro/test-samples-impl.sh
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
3 changes: 2 additions & 1 deletion README.rst
Expand Up @@ -4,4 +4,5 @@ Python Test Utils

This is a collection of common tools used in system tests of Python client libraries for Google APIs.

We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests. This package is added to each `nox` session as described in each repository's ``noxfile.py``.
We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests. This package is added to each `nox` session as described in each repository's ``noxfile.py``.

2 changes: 1 addition & 1 deletion noxfile.py
Expand Up @@ -90,7 +90,7 @@ def mypy(session):
session.run("mypy", "test_utils/", "tests/")


@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10"])
@nox.session(python=["3.7", "3.8", "3.9", "3.10"])
def unit(session):
constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
Expand Down
3 changes: 2 additions & 1 deletion owlbot.py
Expand Up @@ -31,11 +31,12 @@
"MANIFEST.in", # no 'google' package
"noxfile.py", # noxfile is non-standard
"docs/**/*", # no docs to publish
".kokoro/docs/",
".kokoro/docs/",
".kokoro/publish-docs.sh",
"CONTRIBUTING.rst",
"renovate.json", # no bundle, ignore test resources
".github/workflows/docs.yml", # no docs to publish
"README.rst",
],
)

Expand Down
2 changes: 1 addition & 1 deletion scripts/readme-gen/templates/install_deps.tmpl.rst
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 setup.py
Expand Up @@ -41,13 +41,12 @@
platforms="Posix; MacOS X; Windows",
include_package_data=True,
install_requires=("google-auth >= 0.4.0", "click>=7.0.0", "packaging>=19.0"),
python_requires=">=3.6",
python_requires=">=3.7",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"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 eb41a45

Please sign in to comment.