40ants / 40ants/therepl

therepl fails with ipython async

Aperta
#1 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
52
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

(test) amadev@flashman:~$ python -V
Python 3.7.7
(test) amadev@flashman:~$ pip freeze
backcall==0.2.0
click==7.1.2
decorator==4.4.2
Flask==1.1.2
ipython==7.17.0
ipython-genutils==0.2.0
itsdangerous==1.1.0
jedi==0.17.2
Jinja2==2.11.2
MarkupSafe==1.1.1
parso==0.7.1
pexpect==4.8.0
pickleshare==0.7.5
prompt-toolkit==3.0.6
ptyprocess==0.6.0
Pygments==2.6.1
six==1.15.0
therepl==0.2.0
traitlets==4.3.3
wcwidth==0.2.5
Werkzeug==1.0.1

(test) amadev@flashman:~$ ipython --simple-prompt -i
Python 3.7.7 (default, Mar 10 2020, 15:16:38)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.17.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: async def test(): return 1

In [2]: async def test(): return 1

In [3]: await test()
Out[3]: 1

In [4]:
%load_ext therepl

In [4]: Setting __module__ to

__main__> In [5]:
__main__> In [5]:
__main__> In [5]: await test()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
~/test/lib/python3.7/site-packages/IPython/core/interactiveshell.py in _async_exec(self, code_obj, user_ns)
3372 """
3373
-> 3374 return eval(code_obj, user_ns)
3375
3376 async def run_code(self, code_obj, result=None, *, async_=False):

TypeError: globals must be a real dict; try eval(expr, {}, mapping)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.