Commit ad2ed0a
Yury Selivanov
WIP async repl implementation
This now works:
import asyncio
import types
print('here')
L = {
'asyncio': asyncio,
'a': 'something'
}
code = compile('''
async with asyncio.Lock():
a = await asyncio.sleep(1, result=42)
''', '', 'single', 0x2000)
f = types.FunctionType(code, L)
print('before', L)
asyncio.run(f())
print('after', L)1 parent 3d37ea2 commit ad2ed0a
2 files changed
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4551 | 4551 | | |
4552 | 4552 | | |
4553 | 4553 | | |
4554 | | - | |
| 4554 | + | |
| 4555 | + | |
| 4556 | + | |
4555 | 4557 | | |
4556 | 4558 | | |
4557 | 4559 | | |
| |||
4759 | 4761 | | |
4760 | 4762 | | |
4761 | 4763 | | |
4762 | | - | |
4763 | | - | |
| 4764 | + | |
| 4765 | + | |
| 4766 | + | |
| 4767 | + | |
| 4768 | + | |
| 4769 | + | |
| 4770 | + | |
4764 | 4771 | | |
4765 | | - | |
4766 | | - | |
4767 | | - | |
| 4772 | + | |
| 4773 | + | |
| 4774 | + | |
| 4775 | + | |
| 4776 | + | |
4768 | 4777 | | |
4769 | 4778 | | |
4770 | 4779 | | |
| |||
5699 | 5708 | | |
5700 | 5709 | | |
5701 | 5710 | | |
| 5711 | + | |
| 5712 | + | |
| 5713 | + | |
| 5714 | + | |
5702 | 5715 | | |
5703 | 5716 | | |
5704 | 5717 | | |
| |||
0 commit comments