Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Python 3.12 inspecting a coroutine usinggetcoroutinestate returns the wrong state. #111058

Closed
Labels
3.12only security fixes3.13bugs and security fixestype-bugAn unexpected behavior, bug, or error
@gottadiveintopython

Description

@gottadiveintopython

Bug report

Bug description:

Prior to Python 3.12, we can close a just created coroutine, thus, the following test passes:

frominspectimportgetcoroutinestate,CORO_CLOSEDasyncdefdo_nothing():passdeftest_immediate_close():coro=do_nothing()coro.close()assertgetcoroutinestate(coro)==CORO_CLOSED

But in Python 3.12, the assertion fails andgetcoroutinestate(coro) still isCORO_CREATED after thecoro.close(). You can confirm it fromhttps://github.com/gottadiveintopython/py312/actions/runs/6571303025/job/17850194150.

I don't know if this is an intensional change or not, but I just wanted to tell you.

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13bugs and security fixestype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp