|
28 | 28 | * ``google-genai`` MUST exclude 2.11 and floor at 2.12.1 or later, since that |
29 | 29 | release is the first whose types module defers the optional MCP server stack |
30 | 30 | instead of importing it at Agent startup. |
31 | | -* The ``all`` extra MUST stay the union of every extra that unlocks a runtime |
32 | | - feature, so that ``pip install "google-adk[all]"`` cannot silently stop |
33 | | - installing a feature's dependencies. |
| 31 | +* ``all`` MUST stay the union of every extra that unlocks a runtime feature, so |
| 32 | + that ``pip install "google-adk[all]"`` cannot silently stop installing a |
| 33 | + feature's dependencies. |
| 34 | +* The ``eval`` extra MUST keep ``google-cloud-aiplatform`` below its 2.x major |
| 35 | + line, matching the other runtime extras that depend on it. |
34 | 36 | * Every ``<=`` upper bound MUST name the release the tests run against, so |
35 | 37 | that raising one cannot claim support for a release nothing installed. |
36 | 38 | """ |
@@ -331,6 +333,27 @@ def test_main_deps_require_lazy_mcp_google_genai_release( |
331 | 333 | ) |
332 | 334 |
|
333 | 335 |
|
| 336 | +def test_eval_extra_caps_google_cloud_aiplatform_at_v2( |
| 337 | + pyproject: dict, |
| 338 | +) -> None: |
| 339 | + """The eval extra must not resolve google-cloud-aiplatform 2.x.""" |
| 340 | + specifier = _requirement_specifier( |
| 341 | + pyproject['project']['optional-dependencies']['eval'], |
| 342 | + 'google-cloud-aiplatform', |
| 343 | + ) |
| 344 | + |
| 345 | + assert specifier is not None, ( |
| 346 | + 'The eval extra must declare google-cloud-aiplatform so its evaluation ' |
| 347 | + 'dependency remains explicitly constrained.' |
| 348 | + ) |
| 349 | + assert any( |
| 350 | + clause.operator == '<' and Version(clause.version) == Version('2') |
| 351 | + for clause in specifier |
| 352 | + ), 'The eval extra must keep google-cloud-aiplatform below the 2.x major line.' |
| 353 | + assert Version('1.148') in specifier |
| 354 | + assert Version('2.0.0') not in specifier |
| 355 | + |
| 356 | + |
334 | 357 | def test_inclusive_upper_bounds_ignores_other_operators() -> None: |
335 | 358 | """Only ``<=`` names a release as supported, and the highest one wins.""" |
336 | 359 | bounds = _inclusive_upper_bounds({ |
|
0 commit comments