| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,9 +35,15 @@ | |||
| 35 | 35 | "3.11", | |
| 36 | 36 | "3.12", | |
| 37 | 37 | "3.13", | |
| 38 | + "3.14", | ||
| 38 | 39 | ] | |
| 39 | 40 | ||
| 40 | - DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] | ||
| 41 | + DEFAULT_PYTHON_VERSION = "3.14" | ||
| 42 | + | ||
| 43 | + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2450): | ||
| 44 | + # Switch this to Python 3.15 alpha1 | ||
| 45 | + # https://peps.python.org/pep-0790/ | ||
| 46 | + PREVIEW_PYTHON_VERSION = "3.14" | ||
| 41 | 47 | ||
| 42 | 48 | CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() | |
| 43 | 49 | ||
@@ -57,7 +63,7 @@ | |||
| 57 | 63 | UNIT_TEST_EXTRAS: List[str] = [] | |
| 58 | 64 | UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} | |
| 59 | 65 | ||
| 60 | - SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | ||
| 66 | + SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON | ||
| 61 | 67 | SYSTEM_TEST_STANDARD_DEPENDENCIES = [ | |
| 62 | 68 | "mock", | |
| 63 | 69 | "pytest", | |
@@ -222,15 +228,22 @@ def install_unittest_dependencies(session, *constraints): | |||
| 222 | 228 | def unit(session, protobuf_implementation): | |
| 223 | 229 | # Install all test dependencies, then install this package in-place. | |
| 224 | 230 | ||
| 225 | - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): | ||
| 231 | + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): | ||
| 232 | + # Remove this check once support for Protobuf 3.x is dropped. | ||
| 233 | + if protobuf_implementation == "cpp" and session.python in ( | ||
| 234 | + "3.11", | ||
| 235 | + "3.12", | ||
| 236 | + "3.13", | ||
| 237 | + "3.14", | ||
| 238 | + ): | ||
| 226 | 239 | session.skip("cpp implementation is not supported in python 3.11+") | |
| 227 | 240 | ||
| 228 | 241 | constraints_path = str( | |
| 229 | 242 | CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" | |
| 230 | 243 | ) | |
| 231 | 244 | install_unittest_dependencies(session, "-c", constraints_path) | |
| 232 | 245 | ||
| 233 | - # TODO(https://github.com/googleapis/synthtool/issues/1976): | ||
| 246 | + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): | ||
| 234 | 247 | # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. | |
| 235 | 248 | # The 'cpp' implementation requires Protobuf<4. | |
| 236 | 249 | if protobuf_implementation == "cpp": | |
@@ -420,7 +433,7 @@ def docfx(session): | |||
| 420 | 433 | ) | |
| 421 | 434 | ||
| 422 | 435 | ||
| 423 | - @nox.session(python=DEFAULT_PYTHON_VERSION) | ||
| 436 | + @nox.session(python=PREVIEW_PYTHON_VERSION) | ||
| 424 | 437 | @nox.parametrize( | |
| 425 | 438 | "protobuf_implementation", | |
| 426 | 439 | ["python", "upb", "cpp"], | |
@@ -433,7 +446,14 @@ def prerelease_deps(session, protobuf_implementation): | |||
| 433 | 446 | `pip install --pre <package>`. | |
| 434 | 447 | """ | |
| 435 | 448 | ||
| 436 | - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): | ||
| 449 | + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): | ||
| 450 | + # Remove this check once support for Protobuf 3.x is dropped. | ||
| 451 | + if protobuf_implementation == "cpp" and session.python in ( | ||
| 452 | + "3.11", | ||
| 453 | + "3.12", | ||
| 454 | + "3.13", | ||
| 455 | + "3.14", | ||
| 456 | + ): | ||
| 437 | 457 | session.skip("cpp implementation is not supported in python 3.11+") | |
| 438 | 458 | ||
| 439 | 459 | # Install all dependencies | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -43,6 +43,8 @@ | |||
| 43 | 43 | # Exclude incompatible versions of `google-auth` | |
| 44 | 44 | # See https://github.com/googleapis/google-cloud-python/issues/12364 | |
| 45 | 45 | "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", | |
| 46 | + "grpcio >= 1.33.2, < 2.0.0", | ||
| 47 | + "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", | ||
| 46 | 48 | "proto-plus >= 1.22.3, <2.0.0", | |
| 47 | 49 | "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", | |
| 48 | 50 | "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", | |
@@ -84,6 +86,7 @@ | |||
| 84 | 86 | "Programming Language :: Python :: 3.11", | |
| 85 | 87 | "Programming Language :: Python :: 3.12", | |
| 86 | 88 | "Programming Language :: Python :: 3.13", | |
| 89 | + "Programming Language :: Python :: 3.14", | ||
| 87 | 90 | "Operating System :: OS Independent", | |
| 88 | 91 | "Topic :: Internet", | |
| 89 | 92 | ], | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,5 +2,7 @@ | |||
| 2 | 2 | # This constraints file is required for unit tests. | |
| 3 | 3 | # List all library dependencies and extras in this file. | |
| 4 | 4 | google-api-core | |
| 5 | + google-auth | ||
| 6 | + grpcio | ||
| 5 | 7 | proto-plus | |
| 6 | 8 | protobuf | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,5 +2,7 @@ | |||
| 2 | 2 | # This constraints file is required for unit tests. | |
| 3 | 3 | # List all library dependencies and extras in this file. | |
| 4 | 4 | google-api-core | |
| 5 | + google-auth | ||
| 6 | + grpcio | ||
| 5 | 7 | proto-plus | |
| 6 | 8 | protobuf | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,5 +2,7 @@ | |||
| 2 | 2 | # This constraints file is required for unit tests. | |
| 3 | 3 | # List all library dependencies and extras in this file. | |
| 4 | 4 | google-api-core | |
| 5 | + google-auth | ||
| 6 | + grpcio | ||
| 5 | 7 | proto-plus | |
| 6 | 8 | protobuf | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,5 +7,6 @@ | |||
| 7 | 7 | # Then this file should have google-cloud-foo>=1 | |
| 8 | 8 | google-api-core>=2 | |
| 9 | 9 | google-auth>=2 | |
| 10 | + grpcio>=1 | ||
| 10 | 11 | proto-plus>=1 | |
| 11 | 12 | protobuf>=6 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,12 @@ | |||
| 1 | + # We use the constraints file for the latest Python version | ||
| 2 | + # (currently this file) to check that the latest | ||
| 3 | + # major versions of dependencies are supported in setup.py. | ||
| 4 | + # List all library dependencies and extras in this file. | ||
| 5 | + # Require the latest major version be installed for each dependency. | ||
| 6 | + # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", | ||
| 7 | + # Then this file should have google-cloud-foo>=1 | ||
| 8 | + google-api-core>=2 | ||
| 9 | + google-auth>=2 | ||
| 10 | + grpcio>=1 | ||
| 11 | + proto-plus>=1 | ||
| 12 | + protobuf>=6 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,5 +6,7 @@ | |||
| 6 | 6 | # Then this file should have google-cloud-foo==1.14.0 | |
| 7 | 7 | google-api-core==1.34.1 | |
| 8 | 8 | google-auth==2.14.1 | |
| 9 | + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) | ||
| 10 | + # Add the minimum supported version of grpcio to constraints files | ||
| 9 | 11 | proto-plus==1.22.3 | |
| 10 | 12 | protobuf==3.20.2 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,5 +2,7 @@ | |||
| 2 | 2 | # This constraints file is required for unit tests. | |
| 3 | 3 | # List all library dependencies and extras in this file. | |
| 4 | 4 | google-api-core | |
| 5 | + google-auth | ||
| 6 | + grpcio | ||
| 5 | 7 | proto-plus | |
| 6 | 8 | protobuf | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,5 +2,7 @@ | |||
| 2 | 2 | # This constraints file is required for unit tests. | |
| 3 | 3 | # List all library dependencies and extras in this file. | |
| 4 | 4 | google-api-core | |
| 5 | + google-auth | ||
| 6 | + grpcio | ||
| 5 | 7 | proto-plus | |
| 6 | 8 | protobuf | |
| Back | FazBrowse Home | New Git URL |
0 commit comments