Title: deprecate the asyncio child watchers system · Issue #94597 · python/cpython · GitHub
Open Graph Title: deprecate the asyncio child watchers system · Issue #94597 · python/cpython
X Title: deprecate the asyncio child watchers system · Issue #94597 · python/cpython
Description: Deprecate the child watchers system and the policy system in favour of asyncio.Runner(loop_factory=asyncio.ProactorEventLoop/asyncio.SelectorEventLoop/uvloop.new_event_loop) that would be deprecating: asyncio.get_event_loop() # already d...
Open Graph Description: Deprecate the child watchers system and the policy system in favour of asyncio.Runner(loop_factory=asyncio.ProactorEventLoop/asyncio.SelectorEventLoop/uvloop.new_event_loop) that would be deprecati...
X Description: Deprecate the child watchers system and the policy system in favour of asyncio.Runner(loop_factory=asyncio.ProactorEventLoop/asyncio.SelectorEventLoop/uvloop.new_event_loop) that would be deprecati...
Opengraph URL: https://github.com/python/cpython/issues/94597
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"deprecate the asyncio child watchers system","articleBody":"Deprecate the child watchers system and the policy system in favour of \r\n`asyncio.Runner(loop_factory=asyncio.ProactorEventLoop/asyncio.SelectorEventLoop/uvloop.new_event_loop)` \r\nthat would be deprecating:\r\n\r\n```\r\nasyncio.get_event_loop() # already deprecated unless the loop is running \r\nasyncio.set_event_loop() # asyncio.set_event_loop(None) should probably be exempt\r\nasyncio.get_event_loop_policy()\r\nasyncio.set_event_loop_policy() # asyncio.set_event_loop_policy(None) should probably be exempt\r\nasyncio.set_child_watcher()\r\nasyncio.get_child_watcher() # `_make_subprocess_transport` will instead attempt to use os.open_pidfd and fallback to starting a thread\r\n```\r\n\r\nI'd also like to introduce a new API: `asyncio.EventLoop` implemented as:\r\n\r\n```\r\nif sys.platform == \"win32\":\r\n EventLoop = ProactorEventLoop\r\nelse:\r\n EventLoop = SelectorEventLoop\r\n```\r\n\r\n`asyncio.new_event_loop()` will issue a DeprecationWarning if the current policy is not the default policy, and then in 3 releases become an alias of `asyncio.EventLoop`\r\n\r\n_Originally posted by @graingert in https://github.com/python/cpython/issues/93896#issuecomment-1159182995_\r\n\n\n\u003c!-- gh-pr-number: gh-99386 --\u003e\n* PR: gh-99386\n\u003c!-- /gh-pr-number --\u003e\n\n\n\u003c!-- gh-pr-number: gh-110723 --\u003e\n* PR: gh-110723\n\u003c!-- /gh-pr-number --\u003e\n\n\n\u003c!-- gh-pr-number: gh-110728 --\u003e\n* PR: gh-110728\n\u003c!-- /gh-pr-number --\u003e\n","author":{"url":"https://github.com/graingert","@type":"Person","name":"graingert"},"datePublished":"2022-07-06T08:26:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":33},"url":"https://github.com/94597/cpython/issues/94597"}
| 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:e63365d5-bedf-d948-5c77-47727d44f43c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DAB8:31C581:1445596:1BCA8F9:69694D1B |
| html-safe-nonce | 4fd0784c95ddc0e82110fe222af3adc43fea04328510c709ee22dc4d647cc8cd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUI4OjMxQzU4MToxNDQ1NTk2OjFCQ0E4Rjk6Njk2OTREMUIiLCJ2aXNpdG9yX2lkIjoiMjE1MTE2Mzc4ODIwMTExOTAwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3a1ade45a5d88e3952f0cb79451db03904b9f93b0f2d1f63a4f8bfdd326dc729 |
| hovercard-subject-tag | issue:1295443139 |
| 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/94597/issue_layout |
| twitter:image | https://opengraph.githubassets.com/18d9ff566f5e11e195bf7890ddc2f2edec1ed7b6026f154fe0950b16981a4fb1/python/cpython/issues/94597 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/18d9ff566f5e11e195bf7890ddc2f2edec1ed7b6026f154fe0950b16981a4fb1/python/cpython/issues/94597 |
| og:image:alt | Deprecate the child watchers system and the policy system in favour of asyncio.Runner(loop_factory=asyncio.ProactorEventLoop/asyncio.SelectorEventLoop/uvloop.new_event_loop) that would be deprecati... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | graingert |
| hostname | github.com |
| expected-hostname | github.com |
| None | 54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d |
| 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 | d69ac0477df0f87da03b8b06cebd187012d7a930 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width