Message311053
> Yury's theory: maybe BEFORE_ASYNC_WITH's error-handling path is forgetting to DECREF the object.
Nope, that doesn't seem to be it. This version prints "refcount: 2" twice, *and* prints a proper "was never awaited" warning:
-----
import sys
async def open_file():
pass
async def main():
open_file_coro = open_file()
print("refcount:", sys.getrefcount(open_file_coro))
try:
async with open_file_coro:
pass
except:
pass
print("refcount:", sys.getrefcount(open_file_coro))
coro = main()
try:
coro.send(None)
except:
pass |
|
Date |
User |
Action |
Args |
2018-01-29 04:10:22 | njs | set | recipients:
+ njs, giampaolo.rodola, asvetlov, yselivanov |
2018-01-29 04:10:22 | njs | set | messageid: <1517199022.43.0.467229070634.issue32703@psf.upfronthosting.co.za> |
2018-01-29 04:10:22 | njs | link | issue32703 messages |
2018-01-29 04:10:22 | njs | create | |
|