Title: asyncio has underscored names in its `__all__` · Issue #134657 · python/cpython · GitHub
Open Graph Title: asyncio has underscored names in its `__all__` · Issue #134657 · python/cpython
X Title: asyncio has underscored names in its `__all__` · Issue #134657 · python/cpython
Description: 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 darwin Type "help", "copyrigh...
Open Graph Description: 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....
X Description: 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....
Opengraph URL: https://github.com/python/cpython/issues/134657
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"asyncio has underscored names in its `__all__`","articleBody":"# Bug report\n\n### Bug description:\n\nasyncio has several names in its `__all__` that start with an underscore.\n\n```\nPython 3.15.0a0 (heads/assignannos:9081715ff82, May 25 2025, 08:33:06) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e import asyncio\n\u003e\u003e\u003e [x for x in asyncio.__all__ if x.startswith(\"_\")]\n['_AbstractEventLoopPolicy', '_get_event_loop_policy', '_set_event_loop_policy', '_set_running_loop', '_get_running_loop', '_register_task', '_unregister_task', '_enter_task', '_leave_task', '_DefaultEventLoopPolicy']\n```\n\nThat feels wrong: `__all__` indicates the public names in the module, and names that start with an underscore are not meant to be public.\n\nIn Python 3.13 there were fewer:\n```\n['_set_running_loop', '_get_running_loop', '_register_task', '_unregister_task', '_enter_task', '_leave_task']\n```\n\nI 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.\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-134665\n* gh-136455\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/JelleZijlstra","@type":"Person","name":"JelleZijlstra"},"datePublished":"2025-05-25T16:09:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/134657/cpython/issues/134657"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6cae39a1-bf61-5c3f-c00f-378cd5992f97 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B766:B8A9A:16FD45B:2065363:696A4ADC |
| html-safe-nonce | 8fc58c93ae664899a88149f34fbdcc562385942a0f685040d0dde3d4bb14b33a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzY2OkI4QTlBOjE2RkQ0NUI6MjA2NTM2Mzo2OTZBNEFEQyIsInZpc2l0b3JfaWQiOiI2Njc0ODg1MjQ3MTU5MTI2NzQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6f6e9bb9cba5855186ca03c7c7a9cd85d2034c8357bdb019806904ba43018240 |
| hovercard-subject-tag | issue:3089405565 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/134657/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8815b154025a62e39c400d40acb99b4f3fa47ad288be5e9bd63ca9f822a033a0/python/cpython/issues/134657 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8815b154025a62e39c400d40acb99b4f3fa47ad288be5e9bd63ca9f822a033a0/python/cpython/issues/134657 |
| og:image:alt | 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.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JelleZijlstra |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3f871c8e07f0ae1886fa8dac284166d28b09ad5bada6476fc10b674e489788ef |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 63c426b30d262aba269ef14c40e3c817b384cd61 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width