Skip to content

Commit 0ebaf4b

Browse files
partheaohmayr
andauthored
build: clean up generated noxfile (#2343)
Co-authored-by: ohmayr <omairn@google.com>
1 parent abfa2ef commit 0ebaf4b

File tree

8 files changed

+32
-40
lines changed

8 files changed

+32
-40
lines changed

gapic/templates/noxfile.py.j2

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ PACKAGE_NAME = '{{ api.naming.warehouse_package_name }}'
2929

3030
BLACK_VERSION = "black==22.3.0"
3131
BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"]
32-
DEFAULT_PYTHON_VERSION = "3.13"
32+
DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1]
3333

3434
nox.sessions = [
3535
"unit",
@@ -51,7 +51,7 @@ nox.sessions = [
5151
def unit(session, protobuf_implementation):
5252
"""Run the unit test suite."""
5353

54-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
54+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
5555
session.skip("cpp implementation is not supported in python 3.11+")
5656

5757
session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"')
@@ -85,7 +85,7 @@ def unit(session, protobuf_implementation):
8585
def prerelease_deps(session, protobuf_implementation):
8686
"""Run the unit test suite against pre-release versions of dependencies."""
8787

88-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
88+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
8989
session.skip("cpp implementation is not supported in python 3.11+")
9090

9191
# Install test environment dependencies
@@ -120,8 +120,7 @@ def prerelease_deps(session, protobuf_implementation):
120120
"googleapis-common-protos",
121121
"google-api-core",
122122
"google-auth",
123-
# Exclude grpcio!=1.67.0rc1 which does not support python 3.13
124-
"grpcio!=1.67.0rc1",
123+
"grpcio",
125124
"grpcio-status",
126125
"protobuf",
127126
"proto-plus",

tests/integration/goldens/asset/noxfile.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
BLACK_VERSION = "black==22.3.0"
4242
BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"]
43-
DEFAULT_PYTHON_VERSION = "3.13"
43+
DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1]
4444

4545
nox.sessions = [
4646
"unit",
@@ -62,7 +62,7 @@
6262
def unit(session, protobuf_implementation):
6363
"""Run the unit test suite."""
6464

65-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
65+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
6666
session.skip("cpp implementation is not supported in python 3.11+")
6767

6868
session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"')
@@ -95,7 +95,7 @@ def unit(session, protobuf_implementation):
9595
def prerelease_deps(session, protobuf_implementation):
9696
"""Run the unit test suite against pre-release versions of dependencies."""
9797

98-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
98+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
9999
session.skip("cpp implementation is not supported in python 3.11+")
100100

101101
# Install test environment dependencies
@@ -130,8 +130,7 @@ def prerelease_deps(session, protobuf_implementation):
130130
"googleapis-common-protos",
131131
"google-api-core",
132132
"google-auth",
133-
# Exclude grpcio!=1.67.0rc1 which does not support python 3.13
134-
"grpcio!=1.67.0rc1",
133+
"grpcio",
135134
"grpcio-status",
136135
"protobuf",
137136
"proto-plus",

tests/integration/goldens/credentials/noxfile.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
BLACK_VERSION = "black==22.3.0"
4242
BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"]
43-
DEFAULT_PYTHON_VERSION = "3.13"
43+
DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1]
4444

4545
nox.sessions = [
4646
"unit",
@@ -62,7 +62,7 @@
6262
def unit(session, protobuf_implementation):
6363
"""Run the unit test suite."""
6464

65-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
65+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
6666
session.skip("cpp implementation is not supported in python 3.11+")
6767

6868
session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"')
@@ -95,7 +95,7 @@ def unit(session, protobuf_implementation):
9595
def prerelease_deps(session, protobuf_implementation):
9696
"""Run the unit test suite against pre-release versions of dependencies."""
9797

98-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
98+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
9999
session.skip("cpp implementation is not supported in python 3.11+")
100100

101101
# Install test environment dependencies
@@ -130,8 +130,7 @@ def prerelease_deps(session, protobuf_implementation):
130130
"googleapis-common-protos",
131131
"google-api-core",
132132
"google-auth",
133-
# Exclude grpcio!=1.67.0rc1 which does not support python 3.13
134-
"grpcio!=1.67.0rc1",
133+
"grpcio",
135134
"grpcio-status",
136135
"protobuf",
137136
"proto-plus",

tests/integration/goldens/eventarc/noxfile.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
BLACK_VERSION = "black==22.3.0"
4242
BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"]
43-
DEFAULT_PYTHON_VERSION = "3.13"
43+
DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1]
4444

4545
nox.sessions = [
4646
"unit",
@@ -62,7 +62,7 @@
6262
def unit(session, protobuf_implementation):
6363
"""Run the unit test suite."""
6464

65-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
65+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
6666
session.skip("cpp implementation is not supported in python 3.11+")
6767

6868
session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"')
@@ -95,7 +95,7 @@ def unit(session, protobuf_implementation):
9595
def prerelease_deps(session, protobuf_implementation):
9696
"""Run the unit test suite against pre-release versions of dependencies."""
9797

98-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
98+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
9999
session.skip("cpp implementation is not supported in python 3.11+")
100100

101101
# Install test environment dependencies
@@ -130,8 +130,7 @@ def prerelease_deps(session, protobuf_implementation):
130130
"googleapis-common-protos",
131131
"google-api-core",
132132
"google-auth",
133-
# Exclude grpcio!=1.67.0rc1 which does not support python 3.13
134-
"grpcio!=1.67.0rc1",
133+
"grpcio",
135134
"grpcio-status",
136135
"protobuf",
137136
"proto-plus",

tests/integration/goldens/logging/noxfile.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
BLACK_VERSION = "black==22.3.0"
4242
BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"]
43-
DEFAULT_PYTHON_VERSION = "3.13"
43+
DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1]
4444

4545
nox.sessions = [
4646
"unit",
@@ -62,7 +62,7 @@
6262
def unit(session, protobuf_implementation):
6363
"""Run the unit test suite."""
6464

65-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
65+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
6666
session.skip("cpp implementation is not supported in python 3.11+")
6767

6868
session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"')
@@ -95,7 +95,7 @@ def unit(session, protobuf_implementation):
9595
def prerelease_deps(session, protobuf_implementation):
9696
"""Run the unit test suite against pre-release versions of dependencies."""
9797

98-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
98+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
9999
session.skip("cpp implementation is not supported in python 3.11+")
100100

101101
# Install test environment dependencies
@@ -130,8 +130,7 @@ def prerelease_deps(session, protobuf_implementation):
130130
"googleapis-common-protos",
131131
"google-api-core",
132132
"google-auth",
133-
# Exclude grpcio!=1.67.0rc1 which does not support python 3.13
134-
"grpcio!=1.67.0rc1",
133+
"grpcio",
135134
"grpcio-status",
136135
"protobuf",
137136
"proto-plus",

tests/integration/goldens/logging_internal/noxfile.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
BLACK_VERSION = "black==22.3.0"
4242
BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"]
43-
DEFAULT_PYTHON_VERSION = "3.13"
43+
DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1]
4444

4545
nox.sessions = [
4646
"unit",
@@ -62,7 +62,7 @@
6262
def unit(session, protobuf_implementation):
6363
"""Run the unit test suite."""
6464

65-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
65+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
6666
session.skip("cpp implementation is not supported in python 3.11+")
6767

6868
session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"')
@@ -95,7 +95,7 @@ def unit(session, protobuf_implementation):
9595
def prerelease_deps(session, protobuf_implementation):
9696
"""Run the unit test suite against pre-release versions of dependencies."""
9797

98-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
98+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
9999
session.skip("cpp implementation is not supported in python 3.11+")
100100

101101
# Install test environment dependencies
@@ -130,8 +130,7 @@ def prerelease_deps(session, protobuf_implementation):
130130
"googleapis-common-protos",
131131
"google-api-core",
132132
"google-auth",
133-
# Exclude grpcio!=1.67.0rc1 which does not support python 3.13
134-
"grpcio!=1.67.0rc1",
133+
"grpcio",
135134
"grpcio-status",
136135
"protobuf",
137136
"proto-plus",

tests/integration/goldens/redis/noxfile.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
BLACK_VERSION = "black==22.3.0"
4242
BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"]
43-
DEFAULT_PYTHON_VERSION = "3.13"
43+
DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1]
4444

4545
nox.sessions = [
4646
"unit",
@@ -62,7 +62,7 @@
6262
def unit(session, protobuf_implementation):
6363
"""Run the unit test suite."""
6464

65-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
65+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
6666
session.skip("cpp implementation is not supported in python 3.11+")
6767

6868
session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"')
@@ -95,7 +95,7 @@ def unit(session, protobuf_implementation):
9595
def prerelease_deps(session, protobuf_implementation):
9696
"""Run the unit test suite against pre-release versions of dependencies."""
9797

98-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
98+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
9999
session.skip("cpp implementation is not supported in python 3.11+")
100100

101101
# Install test environment dependencies
@@ -130,8 +130,7 @@ def prerelease_deps(session, protobuf_implementation):
130130
"googleapis-common-protos",
131131
"google-api-core",
132132
"google-auth",
133-
# Exclude grpcio!=1.67.0rc1 which does not support python 3.13
134-
"grpcio!=1.67.0rc1",
133+
"grpcio",
135134
"grpcio-status",
136135
"protobuf",
137136
"proto-plus",

tests/integration/goldens/redis_selective/noxfile.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
BLACK_VERSION = "black==22.3.0"
4242
BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"]
43-
DEFAULT_PYTHON_VERSION = "3.13"
43+
DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1]
4444

4545
nox.sessions = [
4646
"unit",
@@ -62,7 +62,7 @@
6262
def unit(session, protobuf_implementation):
6363
"""Run the unit test suite."""
6464

65-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
65+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
6666
session.skip("cpp implementation is not supported in python 3.11+")
6767

6868
session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"')
@@ -95,7 +95,7 @@ def unit(session, protobuf_implementation):
9595
def prerelease_deps(session, protobuf_implementation):
9696
"""Run the unit test suite against pre-release versions of dependencies."""
9797

98-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
98+
if protobuf_implementation == "cpp" and float(session.python) > 3.10:
9999
session.skip("cpp implementation is not supported in python 3.11+")
100100

101101
# Install test environment dependencies
@@ -130,8 +130,7 @@ def prerelease_deps(session, protobuf_implementation):
130130
"googleapis-common-protos",
131131
"google-api-core",
132132
"google-auth",
133-
# Exclude grpcio!=1.67.0rc1 which does not support python 3.13
134-
"grpcio!=1.67.0rc1",
133+
"grpcio",
135134
"grpcio-status",
136135
"protobuf",
137136
"proto-plus",

0 commit comments

Comments
 (0)