Skip to content

Commit 52d9f14

Browse files
fix: require python 3.7+ (#1284)
* chore(python): drop python 3.6 Source-Link: googleapis/synthtool@4f89b13 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c * add api_description to .repo-metadata.json * require python 3.7+ in setup.py * remove python 3.6 sample configs * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * exclude templated README.rst * update python_requires * remove python 3.6 from noxfile.py Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 2cc4c0b commit 52d9f14

20 files changed

+32
-89
lines changed

.github/.OwlBot.lock.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:81ed5ecdfc7cac5b699ba4537376f3563f6f04122c4ec9e735d3b3dc1d43dd32
17-
# created: 2022-05-05T22:08:23.383410683Z
16+
digest: sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c
17+
# created: 2022-07-05T18:31:20.838186805Z
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Only run this nox session.
4+
env_vars: {
5+
key: "NOX_SESSION"
6+
value: "prerelease_deps"
7+
}

.kokoro/presubmit/prerelease-deps.cfg

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

.kokoro/samples/python3.6/common.cfg

-40
This file was deleted.

.kokoro/samples/python3.6/continuous.cfg

-7
This file was deleted.

.kokoro/samples/python3.6/periodic-head.cfg

-11
This file was deleted.

.kokoro/samples/python3.6/periodic.cfg

-6
This file was deleted.

.kokoro/samples/python3.6/presubmit.cfg

-6
This file was deleted.

.kokoro/test-samples-impl.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export PYTHONUNBUFFERED=1
3333
env | grep KOKORO
3434

3535
# Install nox
36-
python3.6 -m pip install --upgrade --quiet nox
36+
python3.9 -m pip install --upgrade --quiet nox
3737

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

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

8282
# If this is a periodic build, send the test log to the FlakyBot.

.repo-metadata.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
"requires_billing": false,
1414
"default_version": "v2",
1515
"codeowner_team": "@googleapis/api-bigquery",
16-
"api_shortname": "bigquery"
16+
"api_shortname": "bigquery",
17+
"api_description": "is a fully managed, NoOps, low cost data analytics service.\nData can be streamed into BigQuery at millions of rows per second to enable real-time analysis.\nWith BigQuery you can easily deploy Petabyte-scale Databases."
1718
}

CONTRIBUTING.rst

+2-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ In order to add a feature:
2222
documentation.
2323

2424
- The feature must work fully on the following CPython versions:
25-
3.6, 3.7, 3.8, 3.9 and 3.10 on both UNIX and Windows.
25+
3.7, 3.8, 3.9 and 3.10 on both UNIX and Windows.
2626

2727
- The feature must not add unnecessary dependencies (where
2828
"unnecessary" is of course subjective, but new dependencies should
@@ -221,13 +221,11 @@ Supported Python Versions
221221

222222
We support:
223223

224-
- `Python 3.6`_
225224
- `Python 3.7`_
226225
- `Python 3.8`_
227226
- `Python 3.9`_
228227
- `Python 3.10`_
229228

230-
.. _Python 3.6: https://docs.python.org/3.6/
231229
.. _Python 3.7: https://docs.python.org/3.7/
232230
.. _Python 3.8: https://docs.python.org/3.8/
233231
.. _Python 3.9: https://docs.python.org/3.9/
@@ -239,7 +237,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
239237
.. _config: https://github.com/googleapis/python-bigquery/blob/main/noxfile.py
240238

241239

242-
We also explicitly decided to support Python 3 beginning with version 3.6.
240+
We also explicitly decided to support Python 3 beginning with version 3.7.
243241
Reasons for this include:
244242

245243
- Encouraging use of newest versions of Python 3

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ dependencies.
5252

5353
Supported Python Versions
5454
^^^^^^^^^^^^^^^^^^^^^^^^^
55-
Python >= 3.6, < 3.11
55+
Python >= 3.7, < 3.11
5656

5757
Unsupported Python Versions
5858
^^^^^^^^^^^^^^^^^^^^^^^^^^^
59-
Python == 2.7, Python == 3.5.
59+
Python == 2.7, Python == 3.5, Python == 3.6.
6060

6161
The last version of this library compatible with Python 2.7 and 3.5 is
6262
`google-cloud-bigquery==1.28.0`.

noxfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
DEFAULT_PYTHON_VERSION = "3.8"
3131
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.10"]
32-
UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"]
32+
UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10"]
3333
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
3434

3535
# 'docfx' is excluded since it only needs to run in 'docs-presubmit'

owlbot.py

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
# https://github.com/googleapis/python-bigquery/issues/191
6969
".kokoro/presubmit/presubmit.cfg",
7070
".github/workflows", # exclude gh actions as credentials are needed for tests
71+
"README.rst",
7172
],
7273
)
7374

samples/geography/noxfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def get_pytest_env_vars() -> Dict[str, str]:
8989

9090
# DO NOT EDIT - automatically generated.
9191
# All versions used to test samples.
92-
ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"]
92+
ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10"]
9393

9494
# Any default versions that should be ignored.
9595
IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"]

samples/magics/noxfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def get_pytest_env_vars() -> Dict[str, str]:
8989

9090
# DO NOT EDIT - automatically generated.
9191
# All versions used to test samples.
92-
ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"]
92+
ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10"]
9393

9494
# Any default versions that should be ignored.
9595
IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"]

samples/snippets/README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Install Dependencies
4747
.. _Python Development Environment Setup Guide:
4848
https://cloud.google.com/python/setup
4949

50-
#. Create a virtualenv. Samples are compatible with Python 3.6+.
50+
#. Create a virtualenv. Samples are compatible with Python 3.7+.
5151

5252
.. code-block:: bash
5353

samples/snippets/noxfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def get_pytest_env_vars() -> Dict[str, str]:
8989

9090
# DO NOT EDIT - automatically generated.
9191
# All versions used to test samples.
92-
ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"]
92+
ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10"]
9393

9494
# Any default versions that should be ignored.
9595
IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"]

scripts/readme-gen/templates/install_deps.tmpl.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Install Dependencies
1212
.. _Python Development Environment Setup Guide:
1313
https://cloud.google.com/python/setup
1414

15-
#. Create a virtualenv. Samples are compatible with Python 3.6+.
15+
#. Create a virtualenv. Samples are compatible with Python 3.7+.
1616

1717
.. code-block:: bash
1818

setup.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
"License :: OSI Approved :: Apache Software License",
112112
"Programming Language :: Python",
113113
"Programming Language :: Python :: 3",
114-
"Programming Language :: Python :: 3.6",
115114
"Programming Language :: Python :: 3.7",
116115
"Programming Language :: Python :: 3.8",
117116
"Programming Language :: Python :: 3.9",
@@ -124,7 +123,7 @@
124123
namespace_packages=namespaces,
125124
install_requires=dependencies,
126125
extras_require=extras,
127-
python_requires=">=3.6, <3.11",
126+
python_requires=">=3.7, <3.11",
128127
include_package_data=True,
129128
zip_safe=False,
130129
)

0 commit comments

Comments
 (0)