pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/py-ipython py-ipython: updated to 7.10.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/97323b18c156
branches:  trunk
changeset: 418565:97323b18c156
user:      adam <adam%pkgsrc.org@localhost>
date:      Thu Nov 28 06:26:33 2019 +0000

description:
py-ipython: updated to 7.10.0

IPython 7.10.0
==============

IPython 7.10 is the first double digit minor release in the  last decade, and
first since the release of IPython 1.0, previous double digit minor release was
in August 2009.

We've been trying to give you regular release on the last Friday of every month
for a guaranty of rapid access to bug fixes and new features.

Unlike the previous first few releases that have seen only a couple of code
changes, 7.10 bring a number of changes, new features and bugfixes.

Stop Support for Python 3.5 ? Adopt NEP 29
------------------------------------------

IPython has decided to follow the informational `NEP 29
<https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear
policy as to which version of (C)Python and NumPy are supported.

We thus dropped support for Python 3.5, and cleaned up a number of code path
that were Python-version dependant. If you are on 3.5 or earlier pip should
automatically give you the latest compatible version of IPython so you do not
need to pin to a given version.

Support for Prompt Toolkit 3.0
------------------------------

Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few
breaking changes. We believe IPython 7.10 should be compatible with both Prompt
Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so
please report any issues.


Prompt Rendering Performance improvements
-----------------------------------------

Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering
logic that should decrease the resource usage of IPython when using the
_default_ configuration but could potentially introduce a regression of
functionalities if you are using a custom prompt.

We know assume if you haven't changed the default keybindings that the prompt
**will not change** during the duration of your input ? which is for example
not true when using vi insert mode that switches between `[ins]` and `[nor]`
for the current mode.

If you are experiencing any issue let us know.

Code autoformatting
-------------------

The IPython terminal can now auto format your code just before entering a new
line or executing a command. To do so use the
``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``;
if black is installed IPython will use black to format your code when possible.

IPython cannot always properly format your code; in particular it will
auto formatting with *black* will only work if:

   - Your code does not contains magics or special python syntax.

   - There is no code after your cursor.

The Black API is also still in motion; so this may not work with all versions of
black.

It should be possible to register custom formatter, though the API is till in
flux.

Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal)
-----------------------------------------------------------------------

When using IPython terminal it is now possible to register function to handle
arbitrary mimetypes. While rendering non-text based representation was possible in
many jupyter frontend; it was not possible in terminal IPython, as usually
terminal are limited to displaying text. As many terminal these days provide
escape sequences to display non-text; bringing this loved feature to IPython CLI
made a lot of sens. This functionality will not only allow inline images; but
allow opening of external program; for example ``mplayer`` to "display" sound
files.

So far only the hooks necessary for this are in place, but no default mime
renderers added; so inline images will only be available via extensions. We will
progressively enable these features by default in the next few releases, and
contribution is welcomed.

We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more
informations.

This is originally based on work form in :ghpull:`10610` from @stephanh42
started over two years ago, and still a lot need to be done.

MISC
----

 - Completions can define their own ordering :ghpull:`11855`
 - Enable Plotting in the same cell than the one that import matplotlib
   :ghpull:`11916`
 - Allow to store and restore multiple variables at once :ghpull:`11930`

You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release.

API Changes
-----------

Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta):

The following items are new in IPython 7.10::

    + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell)
    + IPython.terminal.interactiveshell.PTK3
    + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor)
    + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None')

The following items have been removed in 7.10::

    - IPython.lib.pretty.DICT_IS_ORDERED

The following signatures differ between versions::

    - IPython.extensions.storemagic.restore_aliases(ip)
    + IPython.extensions.storemagic.restore_aliases(ip, alias='None')

Special Thanks
--------------

 - @stephanh42 who started the work on inline images in terminal 2 years ago
 - @augustogoulart who spent a lot of time triaging issues and responding to
   users.
 - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you
   like IPython, Jupyter and many other library of the SciPy stack you can
   donate to numfocus.org non profit

diffstat:

 devel/py-ipython/Makefile |   4 ++--
 devel/py-ipython/distinfo |  10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (28 lines):

diff -r 472d17f2253b -r 97323b18c156 devel/py-ipython/Makefile
--- a/devel/py-ipython/Makefile Thu Nov 28 06:25:06 2019 +0000
+++ b/devel/py-ipython/Makefile Thu Nov 28 06:26:33 2019 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.41 2019/10/26 22:51:30 adam Exp $
+# $NetBSD: Makefile,v 1.42 2019/11/28 06:26:33 adam Exp $
 
-DISTNAME=      ipython-7.9.0
+DISTNAME=      ipython-7.10.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=i/ipython/}
diff -r 472d17f2253b -r 97323b18c156 devel/py-ipython/distinfo
--- a/devel/py-ipython/distinfo Thu Nov 28 06:25:06 2019 +0000
+++ b/devel/py-ipython/distinfo Thu Nov 28 06:26:33 2019 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.21 2019/10/26 22:51:30 adam Exp $
+$NetBSD: distinfo,v 1.22 2019/11/28 06:26:33 adam Exp $
 
-SHA1 (ipython-7.9.0.tar.gz) = d71d6b6215c5cbbab7087df9d61b858fe25d6e62
-RMD160 (ipython-7.9.0.tar.gz) = f7814918d76d323a725f8dc522a2a64830421f5e
-SHA512 (ipython-7.9.0.tar.gz) = cc4bb9365598e8e73afce961bfa58782d6b3e61e238f7697c52a374c4d5885acab356c2433ae6f0410ad3978260b1d99ef6233c5b46a537950429a75ad1f7c38
-Size (ipython-7.9.0.tar.gz) = 5124623 bytes
+SHA1 (ipython-7.10.0.tar.gz) = fc476d8e4c4689c87a66d433929140485d300751
+RMD160 (ipython-7.10.0.tar.gz) = f97104e222b5989aa5b28de7a8cbe29d090fb261
+SHA512 (ipython-7.10.0.tar.gz) = 246f4d7061f45be1683c221bf296c6af007d96405c7b7d517c8ddd6465647b7c8b837d15ba622a71dd1049cb1ea59d3c7dea72a12605426e6bebcd20355b36f4
+Size (ipython-7.10.0.tar.gz) = 5201864 bytes
 SHA1 (patch-setupbase.py) = 241463d5368a4c80c8194244f5c3895196b44da5



Home | Main Index | Thread Index | Old Index