Skip to content

feat: add support for CPython 3.15 - #192

Merged
MatthieuDartiailh merged 11 commits into
MatthieuDartiailh:mainfrom
P403n1x87:feat/python-315
Aug 21, 2026
Merged

feat: add support for CPython 3.15#192
MatthieuDartiailh merged 11 commits into
MatthieuDartiailh:mainfrom
P403n1x87:feat/python-315

Conversation

@P403n1x87

Copy link
Copy Markdown
Contributor

No description provided.

@codecov-commenter

codecov-commenter commented May 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.57%. Comparing base (0a6b35a) to head (5b0c4ff).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #192      +/-   ##
==========================================
+ Coverage   95.45%   95.57%   +0.11%     
==========================================
  Files           7        7              
  Lines        2135     2147      +12     
  Branches      459      461       +2     
==========================================
+ Hits         2038     2052      +14     
+ Misses         54       53       -1     
+ Partials       43       42       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MatthieuDartiailh

Copy link
Copy Markdown
Owner

Thanks for starting work on this ! It is nice to see all tests passing with such a small changelog.

@P403n1x87
P403n1x87 marked this pull request as ready for review August 18, 2026 10:16
@P403n1x87

Copy link
Copy Markdown
Contributor Author

@MatthieuDartiailh I think this is ready now that's been tested against the 3.15rc

@MatthieuDartiailh MatthieuDartiailh left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small comments.

I did not realize 3.15 rc was out. I am late in publishing new releases in several project, thanks for the reminder.

Comment thread src/bytecode/instr.py Outdated
Comment on lines +274 to +280
BUILTIN_LIST = 5
BUILTIN_SET = 6
CONSTANT_NONE = 7
CONSTANT_EMPTY_STR = 8
CONSTANT_TRUE = 9
CONSTANT_FALSE = 10
CONSTANT_MINUS_ONE = 11

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thise should be gated by a version check.

Comment thread src/bytecode/instr.py Outdated
Comment on lines +437 to +440
"GET_YIELD_FROM_ITER": (
-1,
1,
), # removed in 3.15, filtered by if k in _opcode.opmap

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"GET_YIELD_FROM_ITER": (
-1,
1,
), # removed in 3.15, filtered by if k in _opcode.opmap
# removed in 3.15, filtered by if k in _opcode.opmap
"GET_YIELD_FROM_ITER": (-1, 1),

Comment thread src/bytecode/instr.py Outdated
# In 3.15, GET_ITER pushes (iter, null_or_index); FOR_ITER always pushes the
# next value (+1). When exhausted it jumps to END_FOR (which pops it) then
# POP_ITER cleans up (iter, null_or_index). Matches dis.stack_effect = 1 always.
"FOR_ITER": (lambda __effect, __arg, __jump: (0, 1))

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should have -2, +3 then to encode the requirement to have the iterator and and index on the stack.

Comment thread tests/test_code.py
function=True,
)

def test_import(self):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment explaining why this is worth testing would be welcome.

@MatthieuDartiailh
MatthieuDartiailh merged commit 4bff24f into MatthieuDartiailh:main Aug 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants