Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions packages/google-apps-script-type/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@
"3.11",
"3.12",
"3.13",
"3.14",
]

DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1]
DEFAULT_PYTHON_VERSION = "3.14"

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450):
# Switch this to Python 3.15 alpha1
# https://peps.python.org/pep-0790/
PREVIEW_PYTHON_VERSION = "3.14"

CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()

Expand All @@ -57,7 +63,7 @@
UNIT_TEST_EXTRAS: List[str] = []
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}

SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON
SYSTEM_TEST_STANDARD_DEPENDENCIES = [
"mock",
"pytest",
Expand Down Expand Up @@ -222,15 +228,22 @@ def install_unittest_dependencies(session, *constraints):
def unit(session, protobuf_implementation):
# Install all test dependencies, then install this package in-place.

if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
# Remove this check once support for Protobuf 3.x is dropped.
if protobuf_implementation == "cpp" and session.python in (
"3.11",
"3.12",
"3.13",
"3.14",
):
session.skip("cpp implementation is not supported in python 3.11+")

constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)
install_unittest_dependencies(session, "-c", constraints_path)

# TODO(https://github.com/googleapis/synthtool/issues/1976):
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
# The 'cpp' implementation requires Protobuf<4.
if protobuf_implementation == "cpp":
Expand Down Expand Up @@ -420,7 +433,7 @@ def docfx(session):
)


@nox.session(python=DEFAULT_PYTHON_VERSION)
@nox.session(python=PREVIEW_PYTHON_VERSION)
@nox.parametrize(
"protobuf_implementation",
["python", "upb", "cpp"],
Expand All @@ -433,7 +446,14 @@ def prerelease_deps(session, protobuf_implementation):
`pip install --pre <package>`.
"""

if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
# Remove this check once support for Protobuf 3.x is dropped.
if protobuf_implementation == "cpp" and session.python in (
"3.11",
"3.12",
"3.13",
"3.14",
):
session.skip("cpp implementation is not supported in python 3.11+")

# Install all dependencies
Expand Down
3 changes: 3 additions & 0 deletions packages/google-apps-script-type/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
# Exclude incompatible versions of `google-auth`
# See https://github.com/googleapis/google-cloud-python/issues/12364
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
"grpcio >= 1.33.2, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"proto-plus >= 1.22.3, <2.0.0",
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
"protobuf>=3.20.2,<7.0.0,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
Expand Down Expand Up @@ -84,6 +86,7 @@
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Topic :: Internet",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
# This constraints file is required for unit tests.
# List all library dependencies and extras in this file.
google-api-core
google-auth
grpcio
proto-plus
protobuf
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
# This constraints file is required for unit tests.
# List all library dependencies and extras in this file.
google-api-core
google-auth
grpcio
proto-plus
protobuf
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
# This constraints file is required for unit tests.
# List all library dependencies and extras in this file.
google-api-core
google-auth
grpcio
proto-plus
protobuf
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
# Then this file should have google-cloud-foo>=1
google-api-core>=2
google-auth>=2
grpcio>=1
proto-plus>=1
protobuf>=6
12 changes: 12 additions & 0 deletions packages/google-apps-script-type/testing/constraints-3.14.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# We use the constraints file for the latest Python version
# (currently this file) to check that the latest
# major versions of dependencies are supported in setup.py.
# List all library dependencies and extras in this file.
# Require the latest major version be installed for each dependency.
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
# Then this file should have google-cloud-foo>=1
google-api-core>=2
google-auth>=2
grpcio>=1
proto-plus>=1
protobuf>=6
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
# Then this file should have google-cloud-foo==1.14.0
google-api-core==1.34.1
google-auth==2.14.1
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453)
# Add the minimum supported version of grpcio to constraints files
proto-plus==1.22.3
protobuf==3.20.2
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
# This constraints file is required for unit tests.
# List all library dependencies and extras in this file.
google-api-core
google-auth
grpcio
proto-plus
protobuf
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
# This constraints file is required for unit tests.
# List all library dependencies and extras in this file.
google-api-core
google-auth
grpcio
proto-plus
protobuf
Loading