Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit e62b2ef

Browse files
committed
Require Python 3.0+ in the templates
1 parent 5687c89 commit e62b2ef

File tree

7 files changed

+23
-38
lines changed

7 files changed

+23
-38
lines changed

gapic/ads-templates/noxfile.py.j2

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import nox # type: ignore
1111
# Add tests for Python 3.15 alpha1
1212
# https://peps.python.org/pep-0790/
1313
ALL_PYTHON = [
14-
"3.7",
15-
"3.8",
1614
"3.9",
1715
"3.10",
1816
"3.11",

gapic/ads-templates/setup.py.j2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ setuptools.setup(
6363
"License :: OSI Approved :: Apache Software License",
6464
"Programming Language :: Python",
6565
"Programming Language :: Python :: 3",
66-
"Programming Language :: Python :: 3.7",
67-
"Programming Language :: Python :: 3.8",
6866
"Programming Language :: Python :: 3.9",
6967
"Programming Language :: Python :: 3.10",
7068
"Programming Language :: Python :: 3.11",
@@ -76,7 +74,7 @@ setuptools.setup(
7674
],
7775
platforms="Posix; MacOS X; Windows",
7876
packages=packages,
79-
python_requires=">=3.7",
77+
python_requires=">=3.9",
8078
install_requires=dependencies,
8179
include_package_data=True,
8280
zip_safe=False,

gapic/templates/noxfile.py.j2

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ if os.path.isdir("samples"):
3333
FORMAT_PATHS.append("samples")
3434

3535
ALL_PYTHON = [
36-
"3.7",
37-
"3.8",
3836
"3.9",
3937
"3.10",
4038
"3.11",

gapic/templates/setup.py.j2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ setuptools.setup(
8989
"License :: OSI Approved :: Apache Software License",
9090
"Programming Language :: Python",
9191
"Programming Language :: Python :: 3",
92-
"Programming Language :: Python :: 3.7",
93-
"Programming Language :: Python :: 3.8",
9492
"Programming Language :: Python :: 3.9",
9593
"Programming Language :: Python :: 3.10",
9694
"Programming Language :: Python :: 3.11",
@@ -102,7 +100,7 @@ setuptools.setup(
102100
],
103101
platforms="Posix; MacOS X; Windows",
104102
packages=packages,
105-
python_requires=">=3.7",
103+
python_requires=">=3.9",
106104
install_requires=dependencies,
107105
extras_require=extras,
108106
include_package_data=True,

gapic/templates/testing/constraints-3.7.txt.j2

Lines changed: 0 additions & 21 deletions
This file was deleted.

gapic/templates/testing/constraints-3.8.txt.j2

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
# -*- coding: utf-8 -*-
2-
{% block constraints %}
3-
{% include "testing/_default_constraints.j2" %}
4-
{% endblock %}
2+
{% from '_pypi_packages.j2' import pypi_packages %}
3+
# This constraints file is used to check that lower bounds
4+
# are correct in setup.py
5+
# List all library dependencies and extras in this file.
6+
# Pin the version to the lower bound.
7+
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
8+
# Then this file should have google-cloud-foo==1.14.0
9+
google-api-core==1.34.1
10+
google-auth==2.35.0
11+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453)
12+
# Add the minimum supported version of grpcio to constraints files
13+
proto-plus==1.22.3
14+
protobuf==4.25.8
15+
{% for package_tuple, package_info in pypi_packages.items() %}
16+
{# Quick check to make sure `package_info.package_name` is not the package being generated so we don't circularly include this package in its own constraints file. #}
17+
{% if api.naming.warehouse_package_name != package_info.package_name %}
18+
{% if api.requires_package(package_tuple) %}
19+
{{ package_info.package_name }}=={{ package_info.lower_bound }}
20+
{% endif %}
21+
{% endif %}
22+
{% endfor %}

0 commit comments

Comments
 (0)