Skip to content

Conversation

@benzea
Copy link

@benzea benzea commented Jan 23, 2026

The test checks that coro1 emits a runtime warning when it is garbage collected. cpython will do this collection immediately, but other implementations such as PyPy might not. Add the appropriate call to support.gc_collect() to ensure the warning is emitted while still in the with statement.

The test checks that coro1 emits a runtime warning when it is garbage
collected. cpython will do this collection immediately, but other
implementations such as PyPy might not. Add the appropriate call to
support.gc_collect() to ensure the warning is emitted while still in the
with statement.
@python-cla-bot
Copy link

python-cla-bot bot commented Jan 23, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Jan 23, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app bedevere-app bot added tests Tests in the Lib/test dir awaiting review labels Jan 23, 2026
@picnixz
Copy link
Member

picnixz commented Jan 24, 2026

Is the only place? I would appreciate an issue for this as well.

@benzea
Copy link
Author

benzea commented Jan 24, 2026

Is the only place? I would appreciate an issue for this as well.

It is the only place I noticed. But we only ran test_events.py against it for the pygobject GLibEventLoop integration tests. And even there we now switch to simply use the pypy sources instead, we pulled in the cpython version more by accident.

That said, I do think it is technically a bug, and there might be more … maybe it would actually be effective to diff the pypy version and see what they changed.

I suppose I can open a ticket and update the patch. I guess I'll wait a bit in case I find the motivation to check if more things need to be changed.

@picnixz
Copy link
Member

picnixz commented Jan 24, 2026

Still, please open a ticket with the specific bug. If there is more to do we will update the ticket. But this is something that needs to be tracked, at least for posterity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants