Skip to content

Commit

Permalink
chore: Remove Python 3.6 support (#1430)
Browse files Browse the repository at this point in the history
* chore: Remove Python 3.6 support

* fix 3.7 test fragment_alternative_templates test
  • Loading branch information
vam-google authored Sep 6, 2022
1 parent 6f56f21 commit da2d9d3
Show file tree
Hide file tree
Showing 28 changed files with 26 additions and 60 deletions.
4 changes: 0 additions & 4 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ branchProtectionRules:
# - 'showcase-mtls (showcase_mtls_alternative_templates)'
- 'showcase-mypy'
- 'showcase-mypy (_alternative_templates)'
- 'showcase-unit (3.6)'
- 'showcase-unit (3.7)'
- 'showcase-unit (3.8)'
- 'showcase-unit (3.9)'
Expand All @@ -29,7 +28,6 @@ branchProtectionRules:
- 'showcase-unit (3.8, _alternative_templates_mixins)'
- 'showcase-unit (3.9, _alternative_templates_mixins)'
- 'showcase-unit (3.10, _alternative_templates_mixins)'
- 'showcase-unit (3.6, _mixins)'
- 'showcase-unit (3.7, _mixins)'
- 'showcase-unit (3.8, _mixins)'
- 'showcase-unit (3.9, _mixins)'
Expand All @@ -39,12 +37,10 @@ branchProtectionRules:
- 'goldens-lint'
- 'style-check'
- 'snippetgen'
- 'unit (3.6)'
- 'unit (3.7)'
- 'unit (3.8)'
- 'unit (3.9)'
- 'unit (3.10)'
- 'fragment (3.6)'
- 'fragment (3.7)'
- 'fragment (3.8)'
- 'fragment (3.9)'
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,8 @@ jobs:
showcase-unit:
strategy:
matrix:
python: ["3.6", "3.7", "3.8", "3.9", "3.10"]
python: ["3.7", "3.8", "3.9", "3.10"]
variant: ['', _alternative_templates, _mixins, _alternative_templates_mixins]
exclude:
- python: "3.6"
variant: _alternative_templates
- python: "3.6"
variant: _alternative_templates_mixins
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -241,7 +236,7 @@ jobs:
unit:
strategy:
matrix:
python: ["3.6", "3.7", "3.8", "3.9", "3.10"]
python: ["3.7", "3.8", "3.9", "3.10"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -262,11 +257,8 @@ jobs:
fragment:
strategy:
matrix:
python: ["3.6", "3.7", "3.8", "3.9", "3.10"]
python: ["3.7", "3.8", "3.9", "3.10"]
variant: ['', _alternative_templates]
exclude:
- python: "3.6"
variant: _alternative_templates
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ build:
image: latest
python:
pip_install: true
version: 3.6
version: 3.7
13 changes: 3 additions & 10 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ pandoc_binary(
name = "pandoc_binary",
)

config_setting(
name = "gapic_gen_python_3_6",
values = {"define": "gapic_gen_python=3.6"},
)

py_runtime(
name = "pyenv3_runtime",
interpreter = ":pyenv3wrapper.sh",
Expand Down Expand Up @@ -69,9 +64,7 @@ py_binary(
requirement("MarkupSafe"),
requirement("pypandoc"),
requirement("PyYAML"),
requirement("grpc-google-iam-v1"),
] + select({
":gapic_gen_python_3_6": [requirement("dataclasses")],
"//conditions:default": [],
}),
requirement("grpc-google-iam-v1"),
]
)

2 changes: 1 addition & 1 deletion docs/getting-started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Getting Started
---------------

This code generator is implemented as a plugin to ``protoc``, the compiler
for `protocol buffers`_, and will run in any environment that Python 3.6+ and
for `protocol buffers`_, and will run in any environment that Python 3.7+ and
protocol buffers do.

Because dependency management and such can be a significant undertaking, we
Expand Down
2 changes: 1 addition & 1 deletion gapic/ads-templates/mypy.ini.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[mypy]
python_version = 3.6
python_version = 3.7
namespace_packages = True
2 changes: 1 addition & 1 deletion gapic/templates/mypy.ini.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[mypy]
python_version = 3.6
python_version = 3.7
namespace_packages = True
1 change: 0 additions & 1 deletion gapic/templates/noxfile.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import sys
import nox # type: ignore

ALL_PYTHON = [
"3.6",
"3.7",
"3.8",
"3.9",
Expand Down
3 changes: 1 addition & 2 deletions gapic/templates/setup.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ setuptools.setup(
'google-cloud-documentai >= 1.2.1, < 2.0.0dev',
{% endif %}
),
python_requires='>=3.6',
python_requires='>=3.7',
classifiers=[
'Development Status :: 3 - Alpha',
'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
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[mypy]
python_version = 3.6
python_version = 3.7
7 changes: 3 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@


ALL_PYTHON = (
"3.6",
"3.7",
"3.8",
"3.9",
Expand Down Expand Up @@ -158,7 +157,7 @@ def fragment(session, use_ads_templates=False):
session.log(tester(frag))


@nox.session(python=ALL_PYTHON[1:])
@nox.session(python=ALL_PYTHON)
def fragment_alternative_templates(session):
fragment(session, use_ads_templates=True)

Expand Down Expand Up @@ -334,7 +333,7 @@ def showcase_unit(
run_showcase_unit_tests(session)


@nox.session(python=ALL_PYTHON[1:]) # Do not test 3.6
@nox.session(python=ALL_PYTHON)
def showcase_unit_alternative_templates(session):
with showcase_library(
session, templates=ADS_TEMPLATES, other_opts=("old-naming",)
Expand All @@ -357,7 +356,7 @@ def showcase_unit_mixins(session):
run_showcase_unit_tests(session)


@nox.session(python=ALL_PYTHON[1:]) # Do not test 3.6
@nox.session(python=ALL_PYTHON)
def showcase_unit_alternative_templates_mixins(session):
with showcase_library(
session, templates=ADS_TEMPLATES, other_opts=("old-naming",),
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ MarkupSafe==2.1.1
protobuf==3.20.1
pypandoc==1.8.1
PyYAML==6.0
dataclasses==0.6 # TODO(busunkim) remove when 3.6 support is dropped
setuptools==65.3.0
grpc-google-iam-v1==0.12.4
proto-plus==1.22.1
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"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 All @@ -74,7 +73,7 @@
"Topic :: Software Development :: Libraries :: Python Modules",
],
platforms="Posix; MacOS X",
python_requires=">=3.6",
python_requires=">=3.7",
install_requires=dependencies,
include_package_data=True,
zip_safe=False,
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/goldens/asset/mypy.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[mypy]
python_version = 3.6
python_version = 3.7
namespace_packages = True
1 change: 0 additions & 1 deletion tests/integration/goldens/asset/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import nox # type: ignore

ALL_PYTHON = [
"3.6",
"3.7",
"3.8",
"3.9",
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/goldens/asset/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@
'proto-plus >= 1.19.7',
'grpc-google-iam-v1 >= 0.12.4, < 0.13dev',
),
python_requires='>=3.6',
python_requires='>=3.7',
classifiers=[
'Development Status :: 3 - Alpha',
'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
2 changes: 1 addition & 1 deletion tests/integration/goldens/credentials/mypy.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[mypy]
python_version = 3.6
python_version = 3.7
namespace_packages = True
1 change: 0 additions & 1 deletion tests/integration/goldens/credentials/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import nox # type: ignore

ALL_PYTHON = [
"3.6",
"3.7",
"3.8",
"3.9",
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/goldens/credentials/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@
'googleapis-common-protos >= 1.55.0, <2.0.0dev',
'proto-plus >= 1.19.7',
),
python_requires='>=3.6',
python_requires='>=3.7',
classifiers=[
'Development Status :: 3 - Alpha',
'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
2 changes: 1 addition & 1 deletion tests/integration/goldens/eventarc/mypy.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[mypy]
python_version = 3.6
python_version = 3.7
namespace_packages = True
1 change: 0 additions & 1 deletion tests/integration/goldens/eventarc/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import nox # type: ignore

ALL_PYTHON = [
"3.6",
"3.7",
"3.8",
"3.9",
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/goldens/eventarc/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@
'googleapis-common-protos >= 1.55.0, <2.0.0dev',
'proto-plus >= 1.19.7',
),
python_requires='>=3.6',
python_requires='>=3.7',
classifiers=[
'Development Status :: 3 - Alpha',
'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
2 changes: 1 addition & 1 deletion tests/integration/goldens/logging/mypy.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[mypy]
python_version = 3.6
python_version = 3.7
namespace_packages = True
1 change: 0 additions & 1 deletion tests/integration/goldens/logging/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import nox # type: ignore

ALL_PYTHON = [
"3.6",
"3.7",
"3.8",
"3.9",
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/goldens/logging/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@
'googleapis-common-protos >= 1.55.0, <2.0.0dev',
'proto-plus >= 1.19.7',
),
python_requires='>=3.6',
python_requires='>=3.7',
classifiers=[
'Development Status :: 3 - Alpha',
'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
2 changes: 1 addition & 1 deletion tests/integration/goldens/redis/mypy.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[mypy]
python_version = 3.6
python_version = 3.7
namespace_packages = True
1 change: 0 additions & 1 deletion tests/integration/goldens/redis/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import nox # type: ignore

ALL_PYTHON = [
"3.6",
"3.7",
"3.8",
"3.9",
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/goldens/redis/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@
'googleapis-common-protos >= 1.55.0, <2.0.0dev',
'proto-plus >= 1.19.7',
),
python_requires='>=3.6',
python_requires='>=3.7',
classifiers=[
'Development Status :: 3 - Alpha',
'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 da2d9d3

Please sign in to comment.