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

asyncio has underscored names in its__all__ #134657

Closed
Labels
3.14bugs and security fixes3.15new features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytopic-asynciotype-bugAn unexpected behavior, bug, or error
@JelleZijlstra

Description

@JelleZijlstra

Bug report

Bug description:

asyncio has several names in its__all__ that start with an underscore.

Python 3.15.0a0 (heads/assignannos:9081715ff82, May 25 2025, 08:33:06) [Clang 15.0.0 (clang-1500.3.9.4)] on darwinType "help", "copyright", "credits" or "license" for more information.>>> import asyncio>>> [x for x in asyncio.__all__ if x.startswith("_")]['_AbstractEventLoopPolicy', '_get_event_loop_policy', '_set_event_loop_policy', '_set_running_loop', '_get_running_loop', '_register_task', '_unregister_task', '_enter_task', '_leave_task', '_DefaultEventLoopPolicy']

That feels wrong:__all__ indicates the public names in the module, and names that start with an underscore are not meant to be public.

In Python 3.13 there were fewer:

['_set_running_loop', '_get_running_loop', '_register_task', '_unregister_task', '_enter_task', '_leave_task']

I propose we remove the new additions in 3.14 in both the 3.14 and main branches, and remove the remaining underscored names in 3.15.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixes3.15new features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytopic-asynciotype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp