Repository navigation
fix(python): Support Python 3.15 expression dispatch - #28750
LarryHu0217 wants to merge 5 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #28750 +/- ##
==========================================
+ Coverage 81.67% 81.69% +0.01%
==========================================
Files 1905 1905
Lines 271217 271216 -1
Branches 3105 3105
==========================================
+ Hits 221527 221580 +53
+ Misses 48907 48853 -54
Partials 783 783 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Hi, this is ready for review. The full local test suite passed, and the required screenshot is attached. Please let me know if any changes or additional validation would be helpful. |
8ad3c52 to
e3e7cad
Compare
|
CPython 3.15 has been ABI stable since rc1 on August 4th and the final release is due on October 1st. It would be good to get this merged before the final release of 3.15 |
| return (fc.co_code in _EMPTY_BYTECODE) and ( | ||
| (len(fc.co_consts) == 2 and fc.co_consts[1] is None) | ||
| # account for optimized-out docstrings (eg: running 'python -OO') | ||
| or (sys.flags.optimize == 2 and fc.co_consts == (None,)) |
There was a problem hiding this comment.
why was (sys.flags.optimize == 2 and fc.co_consts == (None,)) condition removed? could we restore this if it was accidental?
|
superceded by #29489 |

Summary
Fix Python 3.15 expression dispatch behavior and add regression coverage for the affected code path.
Changes
Testing
I ran the full test suite locally with:
make testResult:
The screenshot is already attached

AI use
Closes #28347