Title: `test_contextlib_async` produces several `RuntimeWarning`s · Issue #110378 · python/cpython · GitHub
Open Graph Title: `test_contextlib_async` produces several `RuntimeWarning`s · Issue #110378 · python/cpython
X Title: `test_contextlib_async` produces several `RuntimeWarning`s · Issue #110378 · python/cpython
Description: Bug report » ./python.exe -m test test_contextlib_async Using random seed 908291980 0:00:00 load avg: 4.08 Run 1 test sequentially 0:00:00 load avg: 4.08 [1/1] test_contextlib_async /Users/sobolev/Desktop/cpython/Lib/contextlib.py:701: R...
Open Graph Description: Bug report » ./python.exe -m test test_contextlib_async Using random seed 908291980 0:00:00 load avg: 4.08 Run 1 test sequentially 0:00:00 load avg: 4.08 [1/1] test_contextlib_async /Users/sobolev/...
X Description: Bug report » ./python.exe -m test test_contextlib_async Using random seed 908291980 0:00:00 load avg: 4.08 Run 1 test sequentially 0:00:00 load avg: 4.08 [1/1] test_contextlib_async /Users/sobolev/...
Opengraph URL: https://github.com/python/cpython/issues/110378
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`test_contextlib_async` produces several `RuntimeWarning`s","articleBody":"# Bug report\n\n```\n» ./python.exe -m test test_contextlib_async\nUsing random seed 908291980\n0:00:00 load avg: 4.08 Run 1 test sequentially\n0:00:00 load avg: 4.08 [1/1] test_contextlib_async\n/Users/sobolev/Desktop/cpython/Lib/contextlib.py:701: RuntimeWarning: coroutine method 'aclose' of 'AsyncContextManagerTestCase.test_contextmanager_trap_second_yield.\u003clocals\u003e.whoo' was never awaited\n async def __aenter__(self):\nRuntimeWarning: Enable tracemalloc to get the object allocation traceback\n/Users/sobolev/Desktop/cpython/Lib/contextlib.py:701: RuntimeWarning: coroutine method 'aclose' of 'AsyncContextManagerTestCase.test_contextmanager_trap_yield_after_throw.\u003clocals\u003e.whoo' was never awaited\n async def __aenter__(self):\nRuntimeWarning: Enable tracemalloc to get the object allocation traceback\n/Users/sobolev/Desktop/cpython/Lib/contextlib.py:701: RuntimeWarning: coroutine method 'aclose' of 'TestAbstractAsyncContextManager.test_async_gen_propagates_generator_exit.\u003clocals\u003e.gen' was never awaited\n async def __aenter__(self):\nRuntimeWarning: Enable tracemalloc to get the object allocation traceback\n\n== Tests result: SUCCESS ==\n\n1 test OK.\n\nTotal duration: 121 ms\nTotal tests: run=58\nTotal test files: run=1/1\nResult: SUCCESS\n```\n\nThis can be fixed by moving away from legacy `@_async_test` and by using stabel `IsolatedAsyncioTestCase`.\n\nhttps://github.com/python/cpython/blob/6592976061a6580fee2ade3564f6497eb685ab67/Lib/test/test_contextlib_async.py#L14-L20\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-110379\n* gh-110499\n* gh-110500\n* gh-110588\n* gh-110589\n* gh-110610\n* gh-110611\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/sobolevn","@type":"Person","name":"sobolevn"},"datePublished":"2023-10-05T07:59:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/110378/cpython/issues/110378"}
| 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:901c3940-7b1b-790c-7d3b-8677860b6b57 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EBA2:280F84:E70AC4:1428E69:696A3CB4 |
| html-safe-nonce | 672def65a60d4dce73089f57b92ff3548a2ce1c858c8ab8a05b1e7767889ae31 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkEyOjI4MEY4NDpFNzBBQzQ6MTQyOEU2OTo2OTZBM0NCNCIsInZpc2l0b3JfaWQiOiI3OTg0NTgxNTYyMTA1MjE2MTgwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e9e4f8d5fa0cff0d2a9f0b2d3da5c98ef2e59bd6f17a7ad0a05c7457584aadbe |
| hovercard-subject-tag | issue:1927643103 |
| 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/110378/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a83d3e5e769ca59a7aff1a78b3db5baf7d7796c0e947c71c1881051e95eea87d/python/cpython/issues/110378 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a83d3e5e769ca59a7aff1a78b3db5baf7d7796c0e947c71c1881051e95eea87d/python/cpython/issues/110378 |
| og:image:alt | Bug report » ./python.exe -m test test_contextlib_async Using random seed 908291980 0:00:00 load avg: 4.08 Run 1 test sequentially 0:00:00 load avg: 4.08 [1/1] test_contextlib_async /Users/sobolev/... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sobolevn |
| hostname | github.com |
| expected-hostname | github.com |
| None | 321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538 |
| 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 | 13581a31d51edf4a3aca179e10890a4d4f9b6d76 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width