Skip to content

Async exec in Python 3.8#11713

Merged
Carreau merged 9 commits into
ipython:masterfrom
Carreau:async-exec
Jun 18, 2019
Merged

Async exec in Python 3.8#11713
Carreau merged 9 commits into
ipython:masterfrom
Carreau:async-exec

Conversation

@Carreau

@Carreau Carreau commented May 7, 2019

Copy link
Copy Markdown
Member

Description will come later – this require a custom Python which have extra flags for compile.
See https://bugs.python.org/issue34616

@tacaswell

Copy link
Copy Markdown
Contributor
Python 3.8.0a4+ (heads/master:4c23aff065, May 30 2019, 20:10:13) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.6.0.dev -- An enhanced Interactive Python. Type '?' for help.

In [1]: 1+1                                                                                                                                      
Traceback (most recent call last):
  File "/home/tcaswell/.virtualenvs/bleeding/bin/ipython", line 11, in <module>
    load_entry_point('ipython==7.6.0.dev0', 'console_scripts', 'ipython')()
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/IPython/__init__.py", line 125, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/IPython/terminal/ipapp.py", line 356, in start
    self.shell.mainloop()
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/IPython/terminal/interactiveshell.py", line 498, in mainloop
    self.interact()
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/IPython/terminal/interactiveshell.py", line 489, in interact
    self.run_cell(code, store_history=True)
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 2851, in run_cell
    result = self._run_cell(
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 2872, in _run_cell
    if self.should_run_async(raw_cell):
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 2910, in should_run_async
    return _should_be_async(cell)
NameError: name '_should_be_async' is not defined

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@python.org

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    %config Application.verbose_crash=True

sys:1: RuntimeWarning: coroutine 'InteractiveShell.run_cell_async' was never awaited

@Carreau

Carreau commented May 31, 2019

Copy link
Copy Markdown
Member Author

Can you pull and retry ?

@tacaswell

Copy link
Copy Markdown
Contributor

that seems to work!

@Carreau

Carreau commented May 31, 2019

Copy link
Copy Markdown
Member Author

Just pushed a couple more fixes. At least for CIs.

@stonebig

Copy link
Copy Markdown
Contributor

shall it work on Jupyter Notebook ? How do you handle Tornado issue with proactor loop on Windows ?

@blueyed

blueyed commented Jun 6, 2019

Copy link
Copy Markdown
Contributor

Not sure what this does really, but check out / consider using the new CodeType.replace (https://bugs.python.org/issue37032).

@Carreau

Carreau commented Jun 18, 2019

Copy link
Copy Markdown
Member Author

shall it work on Jupyter Notebook ?

It should; the core logic does not change much and should only be simplified on 3.8

How do you handle Tornado issue with proactor loop on Windows ?

Not sure; this does not involve tornado and that start to reach outside my area of expertise.

Not sure what this does really, but check out / consider using the new CodeType.replace

Yes I've seen that and master already use replace where relevant; with this PR we should not need to mess with CodeObject on 3.8+ so the path with CodeType.replace is not taken.

@Carreau

Carreau commented Jun 18, 2019

Copy link
Copy Markdown
Member Author

Ok, lets get that in master for release at end-of-month.

@Carreau
Carreau merged commit 0e6f90e into ipython:master Jun 18, 2019
@Carreau
Carreau deleted the async-exec branch June 18, 2019 01:21
@Carreau Carreau added this to the 7.6 milestone Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants