File size: 42,780 Bytes
5a9e79d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 | {
"instance_id": "CPython_PEP-646_Variadic-Generics_PR-31018",
"project": "cpython",
"language": "python",
"requirement_doc": "https://peps.python.org/pep-0646/",
"requirement_doc_title": "PEP 646 \u2014 Variadic Generics",
"pr_link": "https://github.com/python/cpython/pull/31018",
"pr_number": 31018,
"merge_commit": "e8e737bcf6d22927caebc30c5d57ac4634063219",
"base_commit": "26cca8067bf5306e372c0e90036d832c5021fd90",
"base_commit_note": "PR-31018 squash-merged on 2022-03-26; merge parent 26cca8067bf5306e372c0e90036d832c5021fd90. Same merge-parent pattern as prior CPython instances.",
"test_level": "public-api",
"fail_to_pass": [
"test.test_future.AnnotationsFutureTestCase.test_annotations",
"test.test_future.AnnotationsFutureTestCase.test_get_type_hints_on_func_with_variadic_arg",
"test.test_unparse.UnparseTestCase.test_slices",
"test.test_unparse.CosmeticTestCase.test_slices",
"test.test_ast.AST_Tests.test_snippets",
"test.test_ast.AST_Tests.test_ast_validation"
],
"pass_to_pass": [
"test.test_grammar.TokenTests.test_backslash",
"test.test_grammar.TokenTests.test_plain_integers",
"test.test_grammar.TokenTests.test_long_integers",
"test.test_grammar.TokenTests.test_floats",
"test.test_grammar.TokenTests.test_string_literals",
"test.test_grammar.TokenTests.test_ellipsis",
"test.test_grammar.GrammarTests.test_funcdef",
"test.test_grammar.GrammarTests.test_lambdef",
"test.test_grammar.GrammarTests.test_simple_stmt",
"test.test_grammar.GrammarTests.test_classdef",
"test.test_int.IntTestCases.test_basic",
"test.test_int.IntTestCases.test_small_ints",
"test.test_int.IntTestCases.test_underscores",
"test.test_int.IntTestCases.test_no_args",
"test.test_float.GeneralFloatCases.test_float",
"test.test_float.GeneralFloatCases.test_noargs",
"test.test_string.ModuleTest.test_attrs",
"test.test_string.ModuleTest.test_capwords",
"test.test_grammar.TokenTests.test_underscore_literals",
"test.test_grammar.TokenTests.test_end_of_numerical_literals",
"test.test_grammar.TokenTests.test_float_exponent_tokenization",
"test.test_grammar.GrammarTests.test_eval_input",
"test.test_grammar.GrammarTests.test_expr_stmt",
"test.test_grammar.GrammarTests.test_assert",
"test.test_grammar.GrammarTests.test_if",
"test.test_grammar.GrammarTests.test_while",
"test.test_grammar.GrammarTests.test_for",
"test.test_grammar.GrammarTests.test_del_stmt",
"test.test_grammar.GrammarTests.test_pass_stmt",
"test.test_grammar.GrammarTests.test_break_stmt",
"test.test_grammar.GrammarTests.test_continue_stmt",
"test.test_grammar.GrammarTests.test_break_continue_loop",
"test.test_grammar.GrammarTests.test_return",
"test.test_grammar.GrammarTests.test_yield",
"test.test_grammar.GrammarTests.test_raise",
"test.test_grammar.GrammarTests.test_import",
"test.test_grammar.GrammarTests.test_global",
"test.test_grammar.GrammarTests.test_nonlocal",
"test.test_grammar.GrammarTests.test_try",
"test.test_grammar.GrammarTests.test_with_statement",
"test.test_grammar.GrammarTests.test_async_await",
"test.test_grammar.GrammarTests.test_dictcomps",
"test.test_grammar.GrammarTests.test_listcomps",
"test.test_grammar.GrammarTests.test_genexps",
"test.test_grammar.GrammarTests.test_comparison",
"test.test_grammar.GrammarTests.test_shift_ops",
"test.test_grammar.GrammarTests.test_multiplicative_ops",
"test.test_grammar.GrammarTests.test_atoms",
"test.test_ast.AST_Tests.test_AST_objects",
"test.test_ast.AST_Tests.test_arguments"
],
"solution_patch_sha256": "d2caf36554aa94f5976fff2898be42bda014f0e4f34d025db9f03cbe5a50a866",
"eval_tests_patch_sha256": "1254a2dec965827095005265257b95e1444f3999c255ac8f0a23cff6db640eeb",
"omitted_patch_sha256": "c0cdd554b92e45e3a70834e712af8f7b81bc54718716570ddc6919586538377a",
"eval_tests_patch_notes": "eval_tests.patch contains 5 test files: 1 NEW (test_pep646_syntax.py \u2014 doctest-based, not unittest-loadable so not used as F2P) + 4 modified (test_ast.py, test_future.py +1 method, test_syntax.py +doctest lines, test_unparse.py modified test_slices bodies in 2 classes). F2P is necessarily narrow because PEP-646 ships most of its test surface as doctests, which unittest.TestLoader.loadTestsFromName can't directly invoke.",
"omitted_patch_notes": "Just the NEWS file.",
"fixture_taint_summary": "6 original F2P selectors exercise PEP-646's `*Ts` unpacking syntax in subscripts and annotations. Pre-state rejects `a[*a]` / `tuple[*Ts]` / `def f(*args: *Ts):` syntax at exec()/ast.parse() time; post-state parses and round-trips them. 50 original P2P selectors come from pre-existing CPython tests outside the PEP-646 requirement behavior: 9 TokenTests, 31 GrammarTests, 2 AST_Tests, 4 IntTestCases, 2 GeneralFloatCases, and 2 string.ModuleTest selectors. The 32 selectors added on 2026-06-15 were confirmed in the base image and appended to p2p.txt, not p2p_aug.txt. Ratio P2P/F2P = 8.33\u00d7.",
"triage": {
"fail_to_pass": {
"test.test_future.AnnotationsFutureTestCase.test_annotations": {
"system_reason": "PEP-646 variadic generics test. exec()s annotations containing `tuple[*Ts]`/`slice[*Ts]` etc. Pre-state: parser rejects `*Ts` in subscript \u2192 SyntaxError \u2192 FAIL.",
"public_surface": "exec() / get_type_hints on annotations with PEP-646 *Ts unpacking",
"internal_symbol_check": [
"_PyAST_*"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_future.AnnotationsFutureTestCase.test_annotations",
"fixture_taint_checked": true
},
"test.test_future.AnnotationsFutureTestCase.test_get_type_hints_on_func_with_variadic_arg": {
"system_reason": "PEP-646 variadic generics test. exec()s annotations containing `tuple[*Ts]`/`slice[*Ts]` etc. Pre-state: parser rejects `*Ts` in subscript \u2192 SyntaxError \u2192 FAIL.",
"public_surface": "exec() / get_type_hints on annotations with PEP-646 *Ts unpacking",
"internal_symbol_check": [
"_PyAST_*"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_future.AnnotationsFutureTestCase.test_get_type_hints_on_func_with_variadic_arg",
"fixture_taint_checked": true
},
"test.test_unparse.UnparseTestCase.test_slices": {
"system_reason": "ast.unparse roundtrip on `a[*a]`/`a[b, *a, c]` source. Pre-state: ast.parse rejects starred subscripts \u2192 roundtrip raises SyntaxError.",
"public_surface": "ast.parse + ast.unparse on PEP-646 `a[*a]` source",
"internal_symbol_check": [
"_PyAST_*"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_unparse.UnparseTestCase.test_slices",
"fixture_taint_checked": true
},
"test.test_unparse.CosmeticTestCase.test_slices": {
"system_reason": "ast.unparse roundtrip on `a[*a]`/`a[b, *a, c]` source. Pre-state: ast.parse rejects starred subscripts \u2192 roundtrip raises SyntaxError.",
"public_surface": "ast.parse + ast.unparse on PEP-646 `a[*a]` source",
"internal_symbol_check": [
"_PyAST_*"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_unparse.CosmeticTestCase.test_slices",
"fixture_taint_checked": true
},
"test.test_ast.AST_Tests.test_snippets": {
"system_reason": "Iterates module-level `exec_tests` / `single_tests` / `eval_tests` lists with PR-added PEP-646 sources (`def f(*args: *Ts): pass`, `x: tuple[*Ts]`, etc.). Each is passed to compile()/ast.parse() \u2014 pre-state parser rejects \u2192 SyntaxError \u2192 method FAIL/ERROR.",
"public_surface": "compile(source, '<string>', 'exec', ast.PyCF_ONLY_AST)",
"internal_symbol_check": [
"_PyAST_*"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_ast.AST_Tests.test_snippets",
"fixture_taint_checked": true
},
"test.test_ast.AST_Tests.test_ast_validation": {
"system_reason": "Similar to test_snippets \u2014 exercises ast.parse + AST validator on PEP-646 source strings added to module-level lists.",
"public_surface": "ast.parse(source) + compile()",
"internal_symbol_check": [
"_PyAST_*"
],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_ast.AST_Tests.test_ast_validation",
"fixture_taint_checked": true
}
},
"pass_to_pass": {
"test.test_grammar.TokenTests.test_backslash": {
"system_reason": "Pre-existing test_grammar test. NOT modified by this PR.",
"public_surface": "compile()/exec()",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.TokenTests.test_backslash",
"fixture_taint_checked": true
},
"test.test_grammar.TokenTests.test_plain_integers": {
"system_reason": "Pre-existing test_grammar test. NOT modified by this PR.",
"public_surface": "compile()/exec()",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.TokenTests.test_plain_integers",
"fixture_taint_checked": true
},
"test.test_grammar.TokenTests.test_long_integers": {
"system_reason": "Pre-existing test_grammar test. NOT modified by this PR.",
"public_surface": "compile()/exec()",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.TokenTests.test_long_integers",
"fixture_taint_checked": true
},
"test.test_grammar.TokenTests.test_floats": {
"system_reason": "Pre-existing test_grammar test. NOT modified by this PR.",
"public_surface": "compile()/exec()",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.TokenTests.test_floats",
"fixture_taint_checked": true
},
"test.test_grammar.TokenTests.test_string_literals": {
"system_reason": "Pre-existing test_grammar test. NOT modified by this PR.",
"public_surface": "compile()/exec()",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.TokenTests.test_string_literals",
"fixture_taint_checked": true
},
"test.test_grammar.TokenTests.test_ellipsis": {
"system_reason": "Pre-existing test_grammar test. NOT modified by this PR.",
"public_surface": "compile()/exec()",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.TokenTests.test_ellipsis",
"fixture_taint_checked": true
},
"test.test_grammar.GrammarTests.test_funcdef": {
"system_reason": "Pre-existing test_grammar test. NOT modified by this PR.",
"public_surface": "compile()/exec()",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_funcdef",
"fixture_taint_checked": true
},
"test.test_grammar.GrammarTests.test_lambdef": {
"system_reason": "Pre-existing test_grammar test. NOT modified by this PR.",
"public_surface": "compile()/exec()",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_lambdef",
"fixture_taint_checked": true
},
"test.test_grammar.GrammarTests.test_simple_stmt": {
"system_reason": "Pre-existing test_grammar test. NOT modified by this PR.",
"public_surface": "compile()/exec()",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_simple_stmt",
"fixture_taint_checked": true
},
"test.test_grammar.GrammarTests.test_classdef": {
"system_reason": "Pre-existing test_grammar test. NOT modified by this PR.",
"public_surface": "compile()/exec()",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_classdef",
"fixture_taint_checked": true
},
"test.test_int.IntTestCases.test_basic": {
"system_reason": "Pre-existing test_int test. NOT modified by this PR.",
"public_surface": "int builtin",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_int.IntTestCases.test_basic",
"fixture_taint_checked": true
},
"test.test_int.IntTestCases.test_small_ints": {
"system_reason": "Pre-existing test_int test. NOT modified by this PR.",
"public_surface": "int builtin",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_int.IntTestCases.test_small_ints",
"fixture_taint_checked": true
},
"test.test_int.IntTestCases.test_underscores": {
"system_reason": "Pre-existing test_int test. NOT modified by this PR.",
"public_surface": "int builtin",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_int.IntTestCases.test_underscores",
"fixture_taint_checked": true
},
"test.test_int.IntTestCases.test_no_args": {
"system_reason": "Pre-existing test_int test. NOT modified by this PR.",
"public_surface": "int builtin",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_int.IntTestCases.test_no_args",
"fixture_taint_checked": true
},
"test.test_float.GeneralFloatCases.test_float": {
"system_reason": "Pre-existing test_float test. NOT modified by this PR.",
"public_surface": "float builtin",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_float.GeneralFloatCases.test_float",
"fixture_taint_checked": true
},
"test.test_float.GeneralFloatCases.test_noargs": {
"system_reason": "Pre-existing test_float test. NOT modified by this PR.",
"public_surface": "float builtin",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_float.GeneralFloatCases.test_noargs",
"fixture_taint_checked": true
},
"test.test_string.ModuleTest.test_attrs": {
"system_reason": "Pre-existing test_string test. NOT modified by this PR.",
"public_surface": "string module",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_string.ModuleTest.test_attrs",
"fixture_taint_checked": true
},
"test.test_string.ModuleTest.test_capwords": {
"system_reason": "Pre-existing test_string test. NOT modified by this PR.",
"public_surface": "string module",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_string.ModuleTest.test_capwords",
"fixture_taint_checked": true
},
"test.test_grammar.TokenTests.test_underscore_literals": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.TokenTests.test_underscore_literals",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.TokenTests.test_end_of_numerical_literals": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.TokenTests.test_end_of_numerical_literals",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.TokenTests.test_float_exponent_tokenization": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.TokenTests.test_float_exponent_tokenization",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_eval_input": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_eval_input",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_expr_stmt": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_expr_stmt",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_assert": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_assert",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_if": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_if",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_while": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_while",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_for": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_for",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_del_stmt": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_del_stmt",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_pass_stmt": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_pass_stmt",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_break_stmt": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_break_stmt",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_continue_stmt": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_continue_stmt",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_break_continue_loop": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_break_continue_loop",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_return": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_return",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_yield": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_yield",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_raise": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_raise",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_import": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_import",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_global": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_global",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_nonlocal": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_nonlocal",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_try": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_try",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_with_statement": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_with_statement",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_async_await": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_async_await",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_dictcomps": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_dictcomps",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_listcomps": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_listcomps",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_genexps": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_genexps",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_comparison": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_comparison",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_shift_ops": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_shift_ops",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_multiplicative_ops": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_multiplicative_ops",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_grammar.GrammarTests.test_atoms": {
"system_reason": "Pre-existing test_grammar selector. test_grammar.py is NOT modified by this PR.",
"public_surface": "compile()/exec() grammar/token behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_grammar.GrammarTests.test_atoms",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_ast.AST_Tests.test_AST_objects": {
"system_reason": "Pre-existing test_ast selector outside the PEP-646-modified test methods.",
"public_surface": "ast public parser/node behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_ast.AST_Tests.test_AST_objects",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
},
"test.test_ast.AST_Tests.test_arguments": {
"system_reason": "Pre-existing test_ast selector outside the PEP-646-modified test methods.",
"public_surface": "ast public parser/node behavior",
"internal_symbol_check": [],
"uses_allowlisted_private": [],
"runner_surface": "./python -m unittest -v test.test_ast.AST_Tests.test_arguments",
"fixture_taint_checked": true,
"preexisting_at_base_commit": true,
"synthetic": false
}
}
},
"out_of_scope_surfaces": [
{
"surface": "test_pep646_syntax.py (NEW doctest-only file)",
"reason": "test_pep646_syntax.py is a pure doctest file (uses `__test__ = {'doctests': ...}` pattern). unittest.TestLoader.loadTestsFromName returns an empty suite for this module since there's no TestCase class or load_tests hook. The PR's doctest content covers most PEP-646 syntax (`A[*b]`, `f(*args: *Ts)`, etc.) but can't be invoked via the standard per-test-ID runner. The file remains in eval_tests.patch for fidelity but doesn't contribute to F2P."
}
],
"public_surface_allowlist": [],
"build_environment": {
"base_image": "lolbench/cpython-base:1",
"configure_flags": "--prefix=/usr/local --enable-optimizations=no",
"make_target": "(default; parser.c regenerates from python.gram)",
"runtime_caps": "--network=none, default seccomp"
},
"validated_at": "2026-06-15T01:40:15Z",
"coverage_gap_note": "Coverage refreshed on 2026-06-15 after expanding original P2P to 50 selectors. The current gate measures the semantic executable patch surface: Lib/ast.py, Lib/typing.py, Python/ast_unparse.c, and Python/compile.c. Grammar/python.gram and Parser/Python.asdl are non-executable grammar/schema sources; Parser/parser.c is generated/associated and excluded from the denominator. Union coverage is 85.7% (12/14 executable lines); orig is 85.7% and aug is 57.1%. The doctest-only PEP-646 files remain out of direct original selector scope, but the refreshed union suite passes the coverage gate.",
"augmented": {
"suite_support": {
"env": "LOLBENCH_SUITE",
"modes": [
"orig",
"aug",
"union"
],
"default": "orig"
},
"eval_tests_patch": "eval_tests_aug.patch",
"eval_tests_aug_patch_sha256": "38296765eef3c68babce73dd6360a728351911413d16e049c79259282a21db5b",
"f2p_aug_sha256": "94affba20a049ae5c5f9075c1d7e0fd55bedb782447c7764d44054d777d45630",
"p2p_aug_sha256": "5f187c870ba3a346fb8ca54818d90601f610bc224fef694718b929d552080121",
"fail_to_pass": [
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_pep646_syntax_doctest_examples",
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_starred_vararg_annotation_runtime_value",
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_future_starred_vararg_annotation_string"
],
"pass_to_pass": [
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_plain_vararg_annotation_still_uses_value",
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_existing_grammar_suite_still_passes",
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_existing_compile_suite_still_passes"
],
"targets_mutants": [
"mutant_011_compile_unpack_sequence_expects_two",
"mutant_012_compile_builds_tuple_instead_of_unpacking"
],
"coverage_gate": {
"minimum_line_coverage_percent": 80,
"status": "passed",
"coverage_report": "coverage_out/coverage_report_union.json",
"baseline_coverage_report": "coverage_out/coverage_report_orig.json",
"augmented_coverage_report": "coverage_out/coverage_report_aug.json",
"measurement_note": "Coverage measured with coverage.py plus gcovr over mapped solution.patch Python and C lines; union mode runs original plus augmented F2P/P2P selectors. The 2026-06-15 P2P refresh recomputed orig/aug/union coverage: orig=85.7%, aug=57.1%, union=85.7% over 14 executable semantic lines.",
"baseline_union_line_coverage_percent": 85.7,
"augmented_only_union_line_coverage_percent": 57.1,
"union_line_coverage_percent": 85.7,
"executable_lines_in_patch": 14,
"union_covered_lines": 12,
"coverage_complete": true
},
"synthetic_tests": [
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_pep646_syntax_doctest_examples",
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_starred_vararg_annotation_runtime_value",
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_future_starred_vararg_annotation_string",
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_plain_vararg_annotation_still_uses_value",
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_existing_grammar_suite_still_passes",
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_existing_compile_suite_still_passes"
],
"triage": {
"test_level_policy": "All augmented selectors exercise CPython through public language execution with unittest. The F2P selectors run public PEP 646 syntax doctests and compile/execute PEP 646 vararg TypeVarTuple syntax, inspecting public function __annotations__; the P2P selector checks ordinary vararg annotation behavior unchanged by the new starred annotation path.",
"fail_to_pass": {
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_pep646_syntax_doctest_examples": {
"requirement_sections": [
"Grammar Changes > Change 1: Star Expressions in Indexes",
"Grammar Changes > Change 2: ``*args`` as a TypeVarTuple"
],
"public_surface": "CPython public doctest execution of test.test_pep646_syntax examples covering starred subscripts and starred vararg annotations.",
"mutants_targeted": [],
"rationale": "The PR shipped many PEP 646 behavior checks as doctests rather than directly loadable unittest selectors. This wrapper runs those public examples through the standard CPython test support path, increasing coverage of the grammar/parser surface while still failing on the base parser that rejects starred subscript and starred vararg annotation syntax."
},
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_starred_vararg_annotation_runtime_value": {
"requirement_sections": [
"Grammar Changes > Change 2: ``*args`` as a TypeVarTuple"
],
"public_surface": "exec() of a function definition using `*args: *Ts`, then public function __annotations__ inspection.",
"mutants_targeted": [
"mutant_011_compile_unpack_sequence_expects_two",
"mutant_012_compile_builds_tuple_instead_of_unpacking"
],
"rationale": "PEP 646 specifies that `*args: *Ts` is evaluated like `[annotation_value] = [*Ts]`, yielding one unpacked TypeVarTuple annotation. The first survivor emits `UNPACK_SEQUENCE 2` and errors at function definition; the second builds a tuple and leaves a tuple-shaped annotation, so this public runtime check distinguishes both from the golden behavior."
},
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_future_starred_vararg_annotation_string": {
"requirement_sections": [
"Grammar Changes > Change 2: ``*args`` as a TypeVarTuple"
],
"public_surface": "exec() of a future-annotations function definition using `*args: *Ts`, then public function __annotations__ inspection.",
"mutants_targeted": [],
"rationale": "The future-annotations path must preserve starred vararg annotations as strings instead of evaluating them. This public execution check exercises the compiler future-annotations branch for the same PEP 646 syntax and fails on the base parser."
}
},
"pass_to_pass": {
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_plain_vararg_annotation_still_uses_value": {
"requirement_sections": [
"Backwards Compatibility"
],
"public_surface": "exec() of an ordinary `def f(*args: int)` definition and public function __annotations__ inspection.",
"rationale": "PEP 646 adds starred vararg annotation handling without changing ordinary vararg annotations. This guard pins the neighboring pre-existing annotation behavior while the compiler special case for `*args: *Ts` changes."
},
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_existing_grammar_suite_still_passes": {
"requirement_sections": [
"Backwards Compatibility"
],
"public_surface": "unittest execution of the existing unmodified test.test_grammar suite through CPython public grammar tests.",
"rationale": "PEP 646 grammar changes must preserve ordinary grammar behavior. Running the existing grammar suite inside a sidecar selector guards broad non-PEP-646 parser behavior while improving stability coverage of the generated parser surface."
},
"test.test_pep646_aug.VariadicGenericsAugmentedTest.test_existing_compile_suite_still_passes": {
"requirement_sections": [
"Backwards Compatibility"
],
"public_surface": "unittest execution of the existing unmodified test.test_compile suite through CPython public compiler tests.",
"rationale": "The compiler special case for starred vararg annotations must not disturb ordinary compile-time behavior. Running the existing compile suite pins neighboring compiler functionality through public tests."
}
}
}
},
"repo": "python/cpython",
"image": "lolbench/cpython-pr-31018:1",
"pr_head_sha": "973e9cca59abd57831561ae51284d6f9aaa921ac",
"diff_source": "github_pr_cache",
"agent_contract": {
"input": "/in/solution.patch",
"output": "/out/agent_report.json",
"invocation": "docker run --rm -v $(pwd)/solution.patch:/in/solution.patch:ro -v $(pwd)/out:/out lolbench/cpython-pr-31018:1"
},
"test_framework": "cpython_regrtest",
"test_cmd_template": "python -m test <test_selector>",
"log_parser": "python_unittest",
"coverage": {
"orig": 85.7,
"aug": 57.1,
"union": 85.7,
"denominator": "union_executable_lines"
},
"p2p_entry_count": 50
}
|