##// END OF EJS Templates
Merge pull request #10457 from Carreau/undefined-variable...
Merge pull request #10457 from Carreau/undefined-variable typo: undefinied variable completion

File last commit:

r23554:cbdf6689
r23557:e6e8653f merge
Show More
version6.rst
188 lines | 7.8 KiB | text/x-rst | RstLexer
Matthias Bussonnier
Uniform titles across versions
r23554 ============
6.x Series
============
Matthias Bussonnier
update what's new
r23447 IPython 6.0
===========
Released .... ...., 2017
IPython 6 feature a major improvement in the completion machinery which is now
capable of completing non-executed code. It is also the first version of IPython
to stop compatibility with Python 2, which is still supported on the bugfix only
5.x branch. Read below to have a non-exhaustive list of new features.
Matthias Bussonnier
Polish release docs.
r23526 Make sure you have pip > 9.0 before upgrading.
Matthias Bussonnier
update what's new
r23447 You should be able to update by using:
.. code::
pip install ipython --upgrade
Matthias Bussonnier
Polish release docs.
r23526
.. note::
If your pip version is greater of equal to pip 9.0.1 you will automatically get
Antonino Ingargiola
Spell checks
r23537 the most recent version of IPython compatible with your system: on Python 2 you
will get the latest IPython 5.x bugfix, while in Python 3
Matthias Bussonnier
Polish release docs.
r23526 you will get the latest 6.x stable version.
Matthias Bussonnier
update what's new
r23447 New completion API and Interface
--------------------------------
The completer Completion API has seen an overhaul, and the new completer have
plenty of improvement both from the end users of terminal IPython or for
consumers of the API.
This new API is capable of pulling completions from :any:`jedi`, thus allowing
type inference on non-executed code. If :any:`jedi` is installed completion like
the following are now becoming possible without code evaluation:
>>> data = ['Number of users', 123_456]
... data[0].<tab>
That is to say, IPython is now capable of inferring that `data[0]` is a string,
and will suggest completions like `.capitalize`. The completion power of IPython
will increase with new Jedi releases, and a number of bugs and more completions
Antonino Ingargiola
Spell checks
r23537 are already available on the development version of :any:`jedi` if you are curious.
Matthias Bussonnier
update what's new
r23447
With the help of prompt toolkit, types of completions can be shown in the
completer interface:
.. image:: ../_images/jedi_type_inference_60.png
:alt: Jedi showing ability to do type inference
:align: center
Matthias Bussonnier
Fix a couple of warnings/errors in doc builds.
r23477 :width: 400px
Matthias Bussonnier
update what's new
r23447 :target: ../_images/jedi_type_inference_60.png
The appearance of the completer is controlled by the
``c.TerminalInteractiveShell.display_completions`` option that will show the
Matthias Bussonnier
'fix some links in whatsnew'
r23464 type differently depending on the value among ``'column'``, ``'multicolumn'``
Matthias Bussonnier
update what's new
r23447 and ``'readlinelike'``
Antonino Ingargiola
Spell checks
r23537 The use of Jedi also fulfills a number of requests and fix a number of bugs
like case-insensitive completion, completion after division operator: See
Matthias Bussonnier
'fix some links in whatsnew'
r23464 :ghpull:`10182`.
Matthias Bussonnier
update what's new
r23447
Matthias Bussonnier
Fix a couple of warnings/errors in doc builds.
r23477 Extra patches and updates will be needed to the :mod:`ipykernel` package for
Antonino Ingargiola
Spell checks
r23537 this feature to be available to other clients like Jupyter Notebook, Lab,
Matthias Bussonnier
update what's new
r23447 Nteract, Hydrogen...
Antonino Ingargiola
Spell checks
r23537 The use of Jedi is should be barely noticeable on recent enough machines, but
can be slower on older ones. To tweak the performances, the amount
Matthias Bussonnier
update what's new
r23447 of time given to Jedi to compute type inference can be adjusted with
Antonino Ingargiola
Spell checks
r23537 ``c.IPCompleter.jedi_compute_type_timeout``. The objects whose type were not
Matthias Bussonnier
update what's new
r23447 inferred will be shown as ``<unknown>``. Jedi can also be completely deactivated
by using the ``c.Completer.use_jedi=False`` option.
The old ``Completer.complete()`` API is waiting deprecation and should be
replaced replaced by ``Completer.completions()`` in a near future. Feedback on
the current state of the API and suggestions welcome.
Python 3 only codebase
----------------------
One of the large challenges in IPython 6.0 has been the adoption of a pure
Antonino Ingargiola
Spell checks
r23537 Python 3 codebase, which leads us to great length to upstream patches in pip,
Matthias Bussonnier
update what's new
r23447 pypi and warehouse to make sure Python 2 system still upgrade to the latest
compatible Python version compatible.
We remind our Python 2 users that IPython 5 is still compatible with Python 2.7,
still maintained and get regular releases. Using pip 9+, upgrading IPython will
automatically upgrade to the latest version compatible with your system.
.. warning::
Antonino Ingargiola
Spell checks
r23537 If you are on a system using an older version of pip on Python 2, pip may
Matthias Bussonnier
Polish release docs.
r23526 still install IPython 6.0 on your system, and IPython will refuse to start.
Antonino Ingargiola
Spell checks
r23537 You can fix this by upgrading pip, and reinstalling ipython, or forcing pip to
Matthias Bussonnier
update what's new
r23447 install an earlier version: ``pip install 'ipython<6'``
Antonino Ingargiola
Spell checks
r23537 The ability to use only Python 3 on the code base of IPython brings a number
Matthias Bussonnier
update what's new
r23447 of advantage. Most of the newly written code make use of `optional function type
Antonino Ingargiola
Spell checks
r23537 annotation <https://www.python.org/dev/peps/pep-0484/>`_ leading to clearer code
Matthias Bussonnier
update what's new
r23447 and better documentation.
Antonino Ingargiola
Spell checks
r23537 The total size of the repository has also decreased by about 1500 lines (for the
first time excluding the big split for 4.0). The decrease is potentially
a bit more for the sour as some documents like this one are append only and
Matthias Bussonnier
update what's new
r23447 are about 300 lines long.
The removal as of Python2/Python3 shim layer has made the code quite clearer and
more idiomatic in a number of location, and much friendlier to work with and
understand. We hope to further embrace Python 3 capability in the next release
cycle and introduce more of the Python 3 only idioms (yield from, kwarg only,
general unpacking) in the code base of IPython, and see if we can take advantage
of these as well to improve user experience with better error messages and
hints.
Matthias Bussonnier
Polish release docs.
r23526 Configurable TerminalInteractiveShell, readline interface
---------------------------------------------------------
Matthias Bussonnier
Make the TerminalInteractiveShell class configurable....
r23505
IPython gained a new ``c.TerminalIPythonApp.interactive_shell_class`` option
Antonino Ingargiola
Spell checks
r23537 that allows customizing the class used to start the terminal frontend. This
should allow a user to use custom interfaces, like reviving the former readline
Matthias Bussonnier
Polish release docs.
r23526 interface which is now a separate package not actively maintained by the core
team. See the project to bring back the readline interface: `rlipython
<https://github.com/ipython/rlipython>`_.
This change will be backported to the IPython 5.x series.
Matthias Bussonnier
Make the TerminalInteractiveShell class configurable....
r23505
Matthias Bussonnier
update what's new
r23447 Miscs improvements
------------------
Antonino Ingargiola
Spell checks
r23537 - The :cellmagic:`capture` magic can now capture the result of a cell (from
an expression on the last line), as well as printed and displayed output.
Matthias Bussonnier
update what's new
r23447 :ghpull:`9851`.
- Pressing Ctrl-Z in the terminal debugger now suspends IPython, as it already
does in the main terminal prompt.
Michael Käufl
[docs] Fixed typos in whatsnew v6
r23552 - Autoreload can now reload ``Enum``. See :ghissue:`10232` and :ghpull:`10316`
Matthias Bussonnier
update what's new
r23447
- IPython.display has gained a :any:`GeoJSON <IPython.display.GeoJSON>` object.
:ghpull:`10288` and :ghpull:`10253`
Matthias Bussonnier
add do_where
r21970
Matthias Bussonnier
update what's new
r23447 Functions Deprecated in 6.x Development cycle
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Michael Käufl
[docs] Fixed typos in whatsnew v6
r23552 - Loading extensions from ``ipython_extension_dir`` prints a warning that this
Matthias Bussonnier
update what's new
r23447 location is pending deprecation. This should only affect users still having
extensions installed with ``%install_ext`` which has been deprecated since
IPython 4.0, and removed in 5.0. Extensions still present in
``ipython_extension_dir`` may shadow more recently installed versions using
pip. It is thus recommended to clean ``ipython_extension_dir`` of any
extension now available as a package.
- ``IPython.utils.warn`` was deprecated in IPython 4.0, and has now been removed.
Matthias Bussonnier
'fix some links in whatsnew'
r23464 instead of ``IPython.utils.warn`` inbuilt :any:`warnings` module is used.
Matthias Bussonnier
update what's new
r23447
- The function `IPython.core.oinspect.py:call_tip` is unused, was marked as
Michael Käufl
[docs] Fixed typos in whatsnew v6
r23552 deprecated (raising a `DeprecationWarning`) and marked for later removal.
Matthias Bussonnier
update what's new
r23447 :ghpull:`10104`
Antonino Ingargiola
Spell checks
r23537 Backward incompatible changes
Thomas Kluyver
Add note on gutting of prefilter to whatsnew docs.
r8218 ------------------------------
Matthias Bussonnier
update what's new
r23447 Functions Removed in 6.x Development cycle
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following functions have been removed in the
development cycle marked for Milestone 6.0.
- ``IPython/utils/process.py`` - ``is_cmd_found``
- ``IPython/utils/process.py`` - ``pycmd2argv``
- The `--deep-reload` flag and the corresponding options to inject `dreload` or
Matthias Bussonnier
'fix some links in whatsnew'
r23464 `reload` into the interactive namespace have been removed. You have to
explicitly import `reload` from `IPython.lib.deepreload` to use it.
Matthias Bussonnier
update what's new
r23447
Michael Käufl
[docs] Fixed typos in whatsnew v6
r23552 - The :magic:`profile` used to print current IPython profile in use, and which
Matthias Bussonnier
Remove %profile in perspective of using it in later IPython versions....
r23510 was deprecated in IPython 2.0 does now raise a `DeprecationWarning` error when
used. It is often confused with the :magic:`prun` and the deprecation remove
should free up the ``profile`` name in future versions.