Skip to content

Fix async generator issue and prefer opcode comparison to name comparison everywhere#179

Merged
MatthieuDartiailh merged 4 commits into
mainfrom
fix-end-async-for
Dec 21, 2025
Merged

Fix async generator issue and prefer opcode comparison to name comparison everywhere#179
MatthieuDartiailh merged 4 commits into
mainfrom
fix-end-async-for

Conversation

@MatthieuDartiailh

@MatthieuDartiailh MatthieuDartiailh commented Dec 4, 2025

Copy link
Copy Markdown
Owner

Closes #178

@codecov-commenter

codecov-commenter commented Dec 4, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.96970% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.16%. Comparing base (5229b3e) to head (2d9a0fd).

Files with missing lines Patch % Lines
src/bytecode/concrete.py 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #179   +/-   ##
=======================================
  Coverage   95.16%   95.16%           
=======================================
  Files           7        7           
  Lines        2025     2028    +3     
  Branches      452      449    -3     
=======================================
+ Hits         1927     1930    +3     
  Misses         54       54           
  Partials       44       44           

☔ View full report in Codecov by Sentry.
📢 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 Author

Running the benchmark found in #172 does not show a significant improvement (on one run it looks faster on average but the variance is large).

@P403n1x87

Copy link
Copy Markdown
Contributor

@MatthieuDartiailh thanks for putting this together and apologies for the late reply but I've not had much time to look into this. It sounds like there are no measurable performance improvements from this, but I think there still is the advantage of cleaner coding anyway. May I suggest splitting this PR into 3 separate ones to address the 3 individual goals and keep the git history cleaner?

@MatthieuDartiailh

Copy link
Copy Markdown
Owner Author

Sure I can split the work between dropping 3.9 and 3.10 (and subsequent simplifications) and the rest. But what is the third part you would have seen ? @P403n1x87

@P403n1x87

Copy link
Copy Markdown
Contributor

what is the third part you would have seen ?

Based on the PR title I thought this PR had 3 parts:

  • Drop 3.9 and 3.10
  • simplify code base
  • fix async gen issue

@MatthieuDartiailh

Copy link
Copy Markdown
Owner Author

Yes but dumping 3.9 and 3.10 without taking advantage of that to remove the related version checks feels like unfinished work to me. I will split in 2.

@MatthieuDartiailh MatthieuDartiailh changed the title Drop support for Python 3.9 and 3.10, simplify code base and fix async generator issue Fix async generator issue and prefer opcode comparison to name comparison everywhere Dec 18, 2025
@MatthieuDartiailh MatthieuDartiailh merged commit d98ee89 into main Dec 21, 2025
10 checks passed
@MatthieuDartiailh MatthieuDartiailh deleted the fix-end-async-for branch December 21, 2025 14:31
@amazingandyyy

Copy link
Copy Markdown

when will this be in the next release?

@amazingandyyy

Copy link
Copy Markdown

we are upgrading ddtrace, and it depends on this fix to support python 3.14

@MatthieuDartiailh

MatthieuDartiailh commented Jun 2, 2026

Copy link
Copy Markdown
Owner Author

Thanks for the ping. I do not have a date yet but I will try to come back to you ASAP

@P403n1x87

Copy link
Copy Markdown
Contributor

we are upgrading ddtrace, and it depends on this fix to support python 3.14

@amazingandyyy have you opened an issue on dd-trace-py too by any chance? If not, I'd be curious to see what problem this is causing and if we can work around it there in the meantime 🙏

@MatthieuDartiailh

Copy link
Copy Markdown
Owner Author

0.18.0 is released

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.

Exception for async function in Python 3.14

4 participants