IPython Changelog

What's new in IPython 8.24.0

Apr 26, 2024
  • The biggest change is the move of the matplotlib backend handling from IPython to matplotlib. PR #14371PR #14403.
  • We will note:
  • pytest 8 compatibility PR #14413
  • typing-extension now needs 4.6 or newer. It was already the case, but not explicated. PR #14380
  • Attempt to speed running code under debugger in some cases. PR #14386 PR #14418.
  • Multiple fixes to documentation for ipyparallel, simple_prompt and emacs PR #14384 PR #14404 PR #14407
  • Maintenance and cleanup of debugger PR #14387 PR #14393

New in IPython 8.23.0 (Mar 31, 2024)

  • The main change improves inference from return type annotations in completer and the introduction of the optional target ipython[matplotlib] to explicitly request the matplotlib optional dependencies.

New in IPython 8.22.2 (Mar 4, 2024)

  • I am not going to details all the changes, but among other we have:
  • More compatibility with emscripten PR #14316, PR #14318,
  • Test more downstream project to avoid breakage PR #14317
  • Fix recently introduced bug with the store magic.
  • Fix issues with multiple call to matplotlib.pyplot.switch_backend
  • Fix crashing IPython when some tracebacks encounter dynamically evaluated code.

New in IPython 8.22.0 (Feb 22, 2024)

  • More compatibility with emscripten PR #14316, PR #14318,
  • Test more downstream project to avoid breakage PR #14317
  • Fix recently introduced bug with the store magic.
  • Fix issues with multiple call to matplotlib.pyplot.switch_backend
  • Fix crashing IPython when some tracebacks encounter dynamically evaluated code.

New in IPython 8.21.0 (Jan 31, 2024)

  • Deprecations:
  • PR #14307 Pending Deprecation of ColorSchemeTable.set_active_scheme(...)’s case_sensitive Parameter.
  • PR #14305 Pending Deprecation of constructing ColorScheme via kwargs, in favor passing a single dict.
  • Fixes:
  • PR #14284 TerminalIPythonApp’s would warn that auto_create option is not recognized.
  • PR #14286 Fix a crash with NotOneValueFound when rendering complex tracebacks.
  • PR #14287 Partial Python 3.13 compatibility
  • PR #14290 Docs/Typos.
  • Changes:
  • PR #14289 ipdb.set_trace() now accepts header= for better compatibility with pdb.set_trace()
  • PR #14300 and PR #14301 Add hooking ability to produce mimebundle.
  • We’ll outline PR #14300, it is now possible to extend the ?/?? operator to return more mimetypes to render richer help in frontends that support it. In particular you could send a json representation of the help that could be displayed in a customizable way.
  • Miscellaneous:
  • PR #14291 Misc Refactor of Color handling
  • PR #14295 Misc test skip on problematic Pypy versions.

New in IPython 8.20.0 (Jan 9, 2024)

  • Quick IPython release in this beginning of 2024, barely 2 weeks after the previous release.
  • This is mostly to fix a backward compatibility issue, I would have done a patch release earlier if I could. As a few other cleanup are also part of this release, this will get a minor version bump.
  • The crux of this release is PR #14274 (Inspect continuation prompt signature and pass only viable arguments), the rest of the changes are mostly type annotation, and a few compatibility issues with Python 3.13 that are getting addressed.
  • Python 3.13 compatibility is still not complete (help welcomed).

New in IPython 8.18.1 (Nov 27, 2023)

  • 8.18.1 is identical to 8.18 but pin prompt_toolkit to greater than 3.0.41

New in IPython 8.18.0 (Nov 24, 2023)

  • Small release of IPython that fixes a small number of inconveniences:
  • Fix a memory leak in qt event loop integration by setting the Loop parent to None.
  • Pickleshare was made an optional dependency in 8.17, this leads to warnings in some installations when using modules completions. The warning has been silenced.
  • Update event loop code for compatibility with more recent prompt_toolkit due to deprecations in Python 3.12.
  • Fix doc example on Pygments styles
  • Remove dependency on app_nope, this is actually only a dependency of IPykernel.

New in IPython 8.17.1 (Oct 31, 2023)

  • Remove backcall dependency
  • Make pickleshare dependency optional
  • Support completion based on type annotations of calls

New in IPython 8.16.0 (Sep 29, 2023)

  • Fix a bug of the new iPdb chained traceback where some Exception would not have any traceback. (see upstream fix in CPython for more details).
  • Fix an error where semicolon would not suppress output.
  • Fix case with spurious message about event loops when using matplotlib.

New in IPython 8.15.0 (Sep 1, 2023)

  • IPython provides a rich toolkit to help you make the most out of using Python interactively. Its main components are:
  • A powerful interactive Python shell
  • A Jupyter kernel to work with Python code in Jupyter notebooks and other interactive frontends.
  • The enhanced interactive Python shells have the following main features:
  • Comprehensive object introspection.
  • Input history, persistent across sessions.
  • Caching of output results during a session with automatically generated references.
  • Extensible tab completion, with support by default for completion of python variables and keywords, filenames and function keywords.
  • Extensible system of ‘magic’ commands for controlling the environment and performing many tasks related either to IPython or the operating system.
  • A rich configuration system with easy switching between different setups (simpler than changing $PYTHONSTARTUP environment variables every time).
  • Session logging and reloading.
  • Extensible syntax processing for special purpose situations.
  • Access to the system shell with user-extensible alias system.
  • Easily embeddable in other Python programs and GUIs.
  • Integrated access to the pdb debugger and the Python profiler.

New in IPython 8.13.0 (Apr 28, 2023)

  • As usual for the end of the month, minor release of IPython. This release is significant in that it not only has a number of bugfixes, but also drop support for Python 3.8 as per NEP 29 (PR #14023).
  • All the critical bugfixes have been backported onto the 8.12.1 release (see below). In addition to that went into 8.12.1 you’ll find:
  • Pretty reprensentation for Counter has been fixed to match the Python one and be in decreasing order. PR #14032
  • Module completion is better when jedi is disabled PR #14029.
  • Improvment of %%bash magic that would get stuck PR #14019

New in IPython 8.12.0 (Mar 30, 2023)

  • Project description:
  • IPython provides a rich toolkit to help you make the most out of using Python interactively. Its main components are:
  • A powerful interactive Python shell
  • A Jupyter kernel to work with Python code in Jupyter notebooks and other interactive frontends.
  • The enhanced interactive Python shells have the following main features:
  • Comprehensive object introspection.
  • Input history, persistent across sessions.
  • Caching of output results during a session with automatically generated references.
  • Extensible tab completion, with support by default for completion of python variables and keywords, filenames and function keywords.
  • Extensible system of ‘magic’ commands for controlling the environment and performing many tasks related either to IPython or the operating system.
  • A rich configuration system with easy switching between different setups (simpler than changing $PYTHONSTARTUP environment variables every time).
  • Session logging and reloading.
  • Extensible syntax processing for special purpose situations.
  • Access to the system shell with user-extensible alias system.
  • Easily embeddable in other Python programs and GUIs.
  • Integrated access to the pdb debugger and the Python profiler.

New in IPython 8.11.0 (Feb 28, 2023)

  • Faster Traceback Highlighting:
  • Resurrection of pre-IPython-8 traceback highlighting code.
  • Really long and complicated files were slow to highlight in traceback with IPython 8 despite upstream improvement that make many case better. Therefore starting with IPython 8.11 when one of the highlighted file is more than 10 000 line long by default, we’ll fallback to a faster path that does not have all the features of highlighting failing AST nodes.
  • This can be configures by setting the value of Python.code.ultratb.FAST_THRESHOLD to an arbitrary low or large value.
  • Autoreload verbosity:
  • We introduce more descriptive names for the %autoreload parameter:
  • Terminal shortcuts customization:
  • Previously modifying shortcuts was only possible by hooking into startup files and practically limited to adding new shortcuts or removing all shortcuts bound to a specific key. This release enables users to override existing terminal shortcuts, disable them or add new keybindings.
  • Miscellaneous:
  • %gui should now support PySide6.
  • Cli shortcuts can now be configured
  • Capture output should now respect ; semicolon to suppress output.
  • Base64 encoded images (in jupyter frontend), will not have trailing newlines.

New in IPython 8.10.0 (Feb 10, 2023)

  • Bump minimum numpy to >=1.21 version following NEP29. PR #13930
  • Fix for compatibility with MyPy 1.0. PR #13933
  • Fix nbgrader stalling when IPython’s showtraceback function is monkeypatched. PR #13934

New in IPython 8.9.0 (Jan 27, 2023)

  • The biggest improvement for 8.9 is a drastic amelioration if the auto-suggestions sponsored by D.E. Shaw and implemented by the more and more active contributor.

New in IPython 8.8.0 (Jan 3, 2023)

  • Fixed:
  • That replace the greedy completer and improve completion, in particular for dictionary keys.
  • Hat adds py.typed to setup.cfg to make sure it is bundled in wheels.
  • That implements tab completions for IPython options in the shell when using argcomplete <https://github.com/kislyuk/argcomplete>. I believe this also needs a recent version of Traitlets.
  • Makes the inspector class of InteractiveShell configurable.
  • That remove minor-version entrypoints as the minor version entry points that would be included in the wheel would be the one of the Python version that was used to build the whl file.

New in IPython 8.7.0 (Nov 28, 2022)

  • PR #13834 bump the minimum prompt toolkit to 3.0.11.
  • IPython shipped with the py.typed marker now, and we are progressively adding more types. PR #13831
  • PR #13817 add configuration of code blacks formatting.

New in IPython 8.3.0 (Apr 30, 2022)

  • The enhanced interactive Python shells have the following main features:
  • Comprehensive object introspection.
  • Input history, persistent across sessions.
  • Caching of output results during a session with automatically generated references.
  • Extensible tab completion, with support by default for completion of python variables and keywords, filenames and function keywords.
  • Extensible system of ‘magic’ commands for controlling the environment and performing many tasks related either to IPython or the operating system.
  • A rich configuration system with easy switching between different setups (simpler than changing $PYTHONSTARTUP environment variables every time).
  • Session logging and reloading.
  • Extensible syntax processing for special purpose situations.
  • Access to the system shell with user-extensible alias system.
  • Easily embeddable in other Python programs and GUIs.
  • Integrated access to the pdb debugger and the Python profiler.

New in IPython 7.31.0 (Jan 5, 2022)

  • Comprehensive object introspection.
  • Input history, persistent across sessions.
  • Caching of output results during a session with automatically generated references.
  • Extensible tab completion, with support by default for completion of python variables and keywords, filenames and function keywords.
  • Extensible system of ‘magic’ commands for controlling the environment and performing many tasks related either to IPython or the operating system.
  • A rich configuration system with easy switching between different setups (simpler than changing $PYTHONSTARTUP environment variables every time).
  • Session logging and reloading.
  • Extensible syntax processing for special purpose situations.
  • Access to the system shell with user-extensible alias system.
  • Easily embeddable in other Python programs and GUIs.
  • Integrated access to the pdb debugger and the Python profiler.

New in IPython 8.0.0b1 Pre-release (Jan 4, 2022)

  • IPython provides a rich toolkit to help you make the most out of using Python interactively. Its main components are:
  • A powerful interactive Python shell
  • A Jupyter kernel to work with Python code in Jupyter notebooks and other interactive frontends.
  • The enhanced interactive Python shells have the following main features:
  • Comprehensive object introspection.
  • Input history, persistent across sessions.
  • Caching of output results during a session with automatically generated references.
  • Extensible tab completion, with support by default for completion of python variables and keywords, filenames and function keywords.
  • Extensible system of ‘magic’ commands for controlling the environment and performing many tasks related either to IPython or the operating system.
  • A rich configuration system with easy switching between different setups (simpler than changing $PYTHONSTARTUP environment variables every time).
  • Session logging and reloading.
  • Extensible syntax processing for special purpose situations.
  • Access to the system shell with user-extensible alias system.
  • Easily embeddable in other Python programs and GUIs.
  • Integrated access to the pdb debugger and the Python profiler.

New in IPython 7.29.0 (Oct 30, 2021)

  • IPython 7.29 brings a couple of new functionalities to IPython and a number of bugfixes. It is one of the largest recent release, relatively speaking, with close to 15 Pull Requests.
  • fix an issue where base64 was returned instead of bytes when showing figures PR #13162
  • fix compatibility with PyQt6, PySide 6 PR #13172. This may be of interest if you are running on Apple Silicon as only qt6.2+ is natively compatible.
  • fix matplotlib qtagg eventloop PR #13179
  • Multiple docs fixes, typos, … etc.
  • Debugger will now exit by default on SigInt PR #13218, this will be useful in notebook/lab if you forgot to exit the debugger. “Interrupt Kernel” will now exist the debugger.
  • It give Pdb the ability to skip code in decorators. If functions contain a special value names __debuggerskip__ = True|False, the function will not be stepped into, and Pdb will step into lower frames only if the value is set to False. The exact behavior is still likely to have corner cases and will be refined in subsequent releases. Feedback welcome. See the debugger module documentation for more info. Thanks to the D. E. Shaw group for funding this feature.
  • The main branch of IPython is receiving a number of changes as we received a NumFOCUS SDG ($4800), to help us finish replacing nose by pytest, and make IPython future proof with an 8.0 release.
  • Many thanks to all the contributors to this release. You can find all individual contributions to this milestone on github.
  • Thanks as well to the D. E. Shaw group for sponsoring work on IPython and related libraries.

New in IPython 7.28.0 (Sep 25, 2021)

  • Fixes:
  • async with doesn’t allow newlines PR #13090
  • Dynamically changing to vi mode via %config magic) PR #13091
  • Virtualenv handling fixes:
  • init_virtualenv now uses Pathlib PR #12548
  • Fix Improper path comparison of virtualenv directories PR #13140
  • Fix virtual environment user warning for lower case pathes PR #13094
  • Adapt to all sorts of drive names for cygwin PR #13153
  • New Features:
  • enable autoplay in embed YouTube player PR #13133
  • Documentation:
  • Fix formatting for the core.interactiveshell documentation PR #13118
  • Fix broken ipyparallel’s refs PR #13138
  • Improve formatting of %time documentation PR #13125
  • Reword the YouTubeVideo autoplay WN PR #13147

New in IPython 7.26.0 (Aug 1, 2021)

  • Comprehensive object introspection.
  • Input history, persistent across sessions.
  • Caching of output results during a session with automatically generated references.
  • Extensible tab completion, with support by default for completion of python variables and keywords, filenames and function keywords.
  • Extensible system of ‘magic’ commands for controlling the environment and performing many tasks related either to IPython or the operating system.
  • A rich configuration system with easy switching between different setups (simpler than changing $PYTHONSTARTUP environment variables every time).
  • Session logging and reloading.
  • Extensible syntax processing for special purpose situations.
  • Access to the system shell with user-extensible alias system.
  • Easily embeddable in other Python programs and GUIs.
  • Integrated access to the pdb debugger and the Python profiler.

New in IPython 7.25.0 (Jun 25, 2021)

  • IPython 7.21 is a minor release that contains a singe bugfix, which is highly recommended for all users of ipdb, ipython debugger %debug magic and similar.
  • Issuing commands like where from within the debugger would reset the local variables changes made by the user. It is interesting to look at the root cause of the issue as accessing an attribute (frame.f_locals) would trigger this side effects.
  • Thanks in particular to the patience from the reporters at D.E. Shaw for their initial bug report that was due to a similar coding oversight in an extension, and who took time to debug and narrow down the problem.

New in IPython 7.24.0 (May 28, 2021)

  • Misc:
  • Fix an issue where %recall would both succeeded and print an error message it failed. PR #12952
  • Drop support for NumPy 1.16 – practically has no effect beyond indicating in package metadata that we do not support it. PR #12937
  • Debugger improvements:
  • The debugger (and %debug magic) have been improved and can skip or hide frames originating from files that are not writable to the user, as these are less likely to be the source of errors, or be part of system files this can be a useful addition when debugging long errors.
  • In addition to the global skip_hidden True|False command, the debugger has gained finer grained control of predicates as to whether to a frame should be considered hidden. So far 3 predicates are available :
  • Tbhide: frames containing the local variable __tracebackhide__ set to True.
  • Readonly: frames originating from readonly files, set to False.
  • Ipython_internal: frames that are likely to be from IPython internal code, set to True.
  • You can toggle individual predicates during a session with
  • Ipdb> skip_predicates readonly True
  • Read-only files will now be considered hidden frames.
  • You can call skip_predicates without arguments to see the states of current predicates:
  • Ipdb> skip_predicates
  • Current predicates:
  • Tbhide : True
  • Readonly : False
  • Ipython_internal : True
  • If all predicates are set to False, skip_hidden will practically have no effect. We attempt to warn you when all predicates are False.

New in IPython 7.23.1 (May 5, 2021)

  • We moved to GitHub actions away from Travis-CI, the transition may not be 100% complete (not testing on nightly anymore), but as we ran out of Travis-Ci hours on the IPython organisation that was a necessary step. PR #12900.
  • We have a new dependency: matplotlib-inline, which try to extract matplotlib inline backend specific behavior. It is available on PyPI and conda-forge thus should not be a problem to upgrade to this version. If you are a package maintainer that might be an extra dependency to package first. PR #12817

New in IPython 7.23.0 (May 4, 2021)

  • Third release of IPython for 2021, mostly containing bug fixes. A couple of not typical updates:
  • We moved to GitHub actions away from Travis-CI, the transition may not be 100% complete (not testing on nightly anymore), but as we ran out of Travis-Ci hours on the IPython organisation that was a necessary step. PR #12900.
  • We have a new dependency: matplotlib-inline, which try to extract matplotlib inline backend specific behavior. It is available on PyPI and conda-forge thus should not be a problem to upgrade to this version. If you are a package maintainer that might be an extra dependency to package first. PR #12817
  • In the addition/new feature category, display() now have a clear=True option to clear the display if any further outputs arrives, allowing users to avoid having to use clear_output() directly. PR #12823.
  • In bug fixes category, this release fix an issue when printing tracebacks containing Unicode characters PR #12758.
  • In code cleanup category PR #12932 remove usage of some deprecated functionality for compatibility with Python 3.10.

New in IPython 7.22.0 (Mar 28, 2021)

  • Fix some sys.excepthook shenanigan when embedding with qt, recommended if you – for example – use napari. PR #12842.
  • Fix bug when using the new ipdb %context magic PR #12844
  • Couples of deprecation cleanup PR #12868
  • Update for new dpast.com api if you use the %pastbin magic. PR #12712
  • Remove support for numpy before 1.16. PR #12836

New in IPython 7.21.0 (Feb 27, 2021)

  • IPython 7.21 is the first release we have back on schedule of one release every month; it contains a number of minor fixes and improvements, notably, the new context command for ipdb
  • New “context” command in ipdb:
  • It is now possible to change the number of lines shown in the backtrace information in ipdb using “context” command. PR #12826
  • (thanks @MrMino, there are other improvement from them on master).
  • Other notable changes in IPython 7.21:
  • Fix some issues on new osx-arm64 PR #12804, PR #12807.
  • Compatibility with Xeus-Python for debugger protocol, PR #12809
  • Misc docs fixes for compatibility and uniformity with Numpydoc. PR #12824

New in IPython 7.20.0 (Feb 1, 2021)

  • Here are thus some of the changes for IPython 7.20:
  • Support for PyQt5 >= 5.11 PR #12715
  • %reset remove imports more agressively PR #12718
  • fix the %conda magic PR #12739
  • compatibility with Jedi 0.18, and bump minimum Jedi version. PR #12793

New in IPython 7.19.0 (Feb 1, 2021)

  • Fix to restore the ability to specify more than one extension using command line flags when using traitlets 5.0 PR #12543
  • Docs docs formatting that make the install commands work on zsh PR #12587
  • Always display the last frame in tracebacks even if hidden with __traceback_hide__ PR #12601
  • Avoid an issue where a callback can be registered multiple times. PR #12625
  • Avoid an issue in debugger mode where frames changes could be lost. PR #12627
  • Never hide the frames that invoke a debugger, even if marked as hidden by __traceback_hide__ PR #12631
  • Fix calling the debugger in a recursive manner PR #12659

New in IPython 7.9.0 (Oct 25, 2019)

  • Xterm terminal title should be restored on exit PR #11910
  • special variables _,``__``, ___ are not set anymore when cache size is 0 or less. PR #11877
  • Autoreload should have regained some speed by using a new heuristic logic to find all objects needing reload. This should avoid large objects traversal like pandas dataframes. PR #11876
  • Get ready for Python 4. PR #11874
  • env Magic nonw has euristic to hide potentially sensitive values PR #11896

New in IPython 7.8.0 (Sep 2, 2019)

  • IPython 7.8.0 contain a few bugfix and 2 new APIs:
  • Enable changing the font color for LaTeX rendering PR #11840
  • And Re-Expose some PDB API (see below)
  • Expose Pdb API:
  • Expose the built-in pdb.Pdb API. Pdb constructor arguments are generically exposed, regardless of python version. Newly exposed arguments:
  • Skip - Python 3.1+
  • Nosiginnt - Python 3.2+
  • Readrc - Python 3.6+

New in IPython 7.7.0 (Jul 28, 2019)

  • Fix a bug introduced in 7.6 where the %matplotlib magic would fail on previously acceptable arguments PR #11814.
  • Fix the manage location on freebsd PR #11808.
  • Fix error message about aliases after %reset call in ipykernel PR #11806
  • Fix Duplication completions in emacs PR #11803
  • We are planning to adopt NEP29 (still currently in draft) which may make this minor version of IPython the last one to support Python 3.5 and will make the code base more aggressive toward removing compatibility with older versions of Python.
  • GitHub now support to give only “Triage” permissions to users; if you’d like to help close stale issues and labels issues please reach to us with your GitHub Username and we’ll add you to the triage team. It is a great way to start contributing and a path toward getting commit rights.

New in IPython 7.5.0 (Apr 25, 2019)

  • IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one minor new feature. The Audio display element can now be assigned an element id when displayed in browser. See PR #11670
  • The major outstanding bug fix correct a change of behavior that was introduce in 7.4.0 where some cell magics would not be able to access or modify global scope when using the @needs_local_scope decorator. This was typically encountered with the %%time and %%timeit magics. See #11659 and PR #11698.

New in IPython 7.4.0 (Mar 22, 2019)

  • Unicode name completions:
  • Previously, we provided completion for a unicode name with its relative symbol. With this, now IPython provides complete suggestions to unicode name symbols.
  • As on the PR, if user types LAT<tab>, IPython provides a list of possible completions. In this case, it would be something like:
  • 'LATIN CAPITAL LETTER A',
  • 'LATIN CAPITAL LETTER B',
  • 'LATIN CAPITAL LETTER C',
  • 'LATIN CAPITAL LETTER D',
  • ....
  • This help to type unicode character that do not have short latex aliases, and have long unicode names. for example Ͱ, GREEK CAPITAL LETTER HETA.
  • This feature was contributed by Luciana Marques PR #11583.
  • Make audio normalization optional
  • Added ‘normalize’ argument to IPython.display.Audio. This argument applies when audio data is given as an array of samples. The default of normalize=True preserves prior behavior of normalizing the audio to the maximum possible range. Setting to False disables normalization.
  • Miscelanious:
  • Fix improper acceptation of return outside of functions. PR #11641.
  • Fixed PyQt 5.11 backwards incompatibility causing sip import failure. PR #11613.
  • Fix Bug where type? woudl crash IPython. PR #1608.
  • Allow to apply @needs_local_scope to cell magics for convenience. PR #11542.

New in IPython 7.3.0 (Feb 19, 2019)

  • Misc bug fixes and improvements:
  • Compatibility with Python 3.8.
  • Do not expand shell variable in execution magics, and added the no_var_expand decorator for magic requiring a similar functionality PR #11516
  • Add %pip and %conda magic PR #11524
  • Re-initialize posix aliases after a %reset PR #11528
  • Allow the IPython command line to run *.ipynb files PR #11529

New in IPython 7.2.0 (Dec 1, 2018)

  • Fix a bug preventing PySide2 GUI integration from working PR #11464
  • Run CI on Mac OS ! PR #11471
  • Fix IPython “Demo” mode. PR #11498
  • Fix %run magic with path in name PR #11499
  • Fix: add CWD to sys.path after stdlib PR #11502
  • Better rendering of signatures, especially long ones. PR #11505
  • Re-enable jedi by default if it’s installed PR #11506
  • Add New minimal exception reporting mode (useful for educational purpose). See PR #11509

New in IPython 7.1.1 (Nov 7, 2018)

  • New Core Dev:
  • We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic work on Prompt toolkit, and we’d like to recognise his impact by giving him commit rights. #11397
  • Notables Changes
  • Major update of “latex to unicode” tab completion map (see below)
  • Notable New Features:
  • Restore functionality and documentation of the sphinx directive, which is now stricter (fail on error by default), gained configuration options, have a brand new documentation page IPython Sphinx Directive, which need some cleanup. It is also now tested so we hope to have less regressions. PR #11402
  • IPython.display.Video now supports width and height arguments, allowing a custom width and height to be set instead of using the video’s width and height. PR #11353
  • Warn when using HTML('<iframe>') instead of IFrame PR #11350
  • Allow Dynamic switching of editing mode between vi/emacs and show normal/input mode in prompt when using vi. PR #11390. Use %config TerminalInteractiveShell.editing_mode = 'vi' or %config TerminalInteractiveShell.editing_mode = 'emacs' to dynamically spwitch
  • Notable Fixes:
  • Fix entering of multi-line block in terminal IPython, and various crashes in the new input transformation machinery PR #11354, PR #11356, PR #11358, these ones also fix a Compatibility but with Python 3.7.1.
  • Fix moving through generator stack in ipdb PR #11266
  • Magics arguments now support quoting. PR #11330
  • Re-add rprint and rprinte aliases. PR #11331
  • Remove implicit dependency to ipython_genutils PR #11317
  • Make nonlocal raise SyntaxError instead of silently failing in async mode. PR #11382
  • Fix mishandling of magics and = ! assignment just after a dedent in nested code blocks PR #11418
  • Fix instructions for custom shortcuts PR #11426
  • Notable Internals improvements:
  • Use of os.scandir (Python 3 only) to speedup some file system operations. PR #11365
  • Use perf_counter instead of clock for more precise timing result with %time PR #11376
  • Many thanks to all the contributors and in particular to bartskowron, and tonyfast who handled a pretty complicated bugs in the input machinery. We had a number of first time contributors and maybe hacktoberfest participant that made significant contributions, and helped us free some time to focus on more complicated bugs.
  • You can see all the closed issues and Merged PR, new features and fixes here.
  • Unicode Completion update
  • In IPython 7.1 the Unicode completion map has been updated and synchronized with the Julia language.
  • Added and removed character characters:
  • jmath (ȷ), \underleftrightarrow (U+034D, combining) have been added, while \textasciicaron have been removed
  • Some sequence have seen their prefix removed:
  • 6 characters text...<tab> should now be inputed with ...<tab> directly,
  • 45 characters Elz...<tab> should now be inputed with ...<tab> directly,
  • 65 characters B...<tab> should now be inputed with ...<tab> directly,
  • 450 characters m...<tab> should now be inputed with ...<tab> directly,
  • Some sequence have seen their prefix shortened:
  • 5 characters mitBbb...<tab> should now be inputed with bbi...<tab> directly,
  • 52 characters mit...<tab> should now be inputed with i...<tab> directly,
  • 216 characters mbfit...<tab> should now be inputed with bi...<tab> directly,
  • 222 characters mbf...<tab> should now be inputed with b...<tab> directly,
  • A couple of character had their sequence simplified:
  • ð, type dh<tab>, instead of eth<tab>
  • ħ, type hbar<tab>, instead of Elzxh<tab>
  • ɸ, type ltphi<tab>, instead of textphi<tab>
  • ϴ, type varTheta<tab>, instead of textTheta<tab>
  • ℇ, type eulermascheroni<tab>, instead of Eulerconst<tab>
  • ℎ, type planck<tab>, instead of Planckconst<tab>
  • U+0336 (COMBINING LONG STROKE OVERLAY), type strike<tab>, instead of Elzbar<tab>.
  • A couple of sequences have been updated:
  • varepsilon now give ɛ (GREEK SMALL LETTER EPSILON) instead of ε (GREEK LUNATE EPSILON SYMBOL),
  • underbar now give U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE).
  • IPython 7.0.0
  • Released Thursday September 27th, 2018
  • IPython 7 include major features improvement as you can read in the following changelog. This is also the second major version of IPython to support only Python 3 – starting at Python 3.4. Python 2 is still community supported on the bugfix only 5.x branch, but we remind you that Python 2 “end of life” is on Jan 1st 2020.
  • We were able to backport bug fixes to the 5.x branch thanks to our backport bot which backported more than 70 Pull-Requests, but there are still many PRs that required manually work, and this is an area of the project were you can easily contribute by looking for PRs still needed backport
  • IPython 6.x branch will likely not see any further release unless critical bugs are found.
  • Make sure you have pip > 9.0 before upgrading. You should be able to update by simply running
  • Pip install ipython --upgrade
  • Or if you have conda installed:
  • Conda install ipython
  • Prompt Toolkit 2.0
  • IPython 7.0+ now uses prompt_toolkit 2.0, if you still need to use earlier prompt_toolkit version you may need to pin IPython to <7.0.
  • Autowait: Asynchronous REPL
  • Staring with IPython 7.0 and on Python 3.6+, IPython can automatically await code at top level, you should not need to access an event loop or runner yourself. To know more read the Asynchronous in REPL: Autoawait section of our docs, see PR #11265 or try the following code:
  • Python 3.6.0
  • Type 'copyright', 'credits' or 'license' for more information
  • IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
  • In [1]: import aiohttp
  • ...: result = aiohttp.get('https://api.github.com')
  • In [2]: response = await result
  • <pause for a few 100s ms>
  • In [3]: await response.json()
  • Out[3]:
  • {'authorizations_url': 'https://api.github.com/authorizations',
  • 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}',
  • ...
  • Note
  • Async integration is experimental code, behavior may change or be removed between Python and IPython versions without warnings.
  • Integration is by default with asyncio, but other libraries can be configured, like curio or trio, to improve concurrency in the REPL:
  • In [1]: %autoawait trio
  • In [2]: import trio
  • In [3]: async def child(i):
  • ...: print(" child %s goes to sleep"%i)
  • ...: await trio.sleep(2)
  • ...: print(" child %s wakes up"%i)
  • In [4]: print('parent start')
  • ...: async with trio.open_nursery() as n:
  • ...: for i in range(3):
  • ...: n.spawn(child, i)
  • ...: print('parent end')
  • Parent start
  • child 2 goes to sleep
  • child 0 goes to sleep
  • child 1 goes to sleep
  • <about 2 seconds pause>
  • child 2 wakes up
  • child 1 wakes up
  • child 0 wakes up
  • Parent end
  • See Asynchronous in REPL: Autoawait for more information.
  • Asynchronous code in a Notebook interface or any other frontend using the Jupyter Protocol will need further updates of the IPykernel package.
  • Non-Asynchronous code
  • As the internal API of IPython is now asynchronous, IPython needs to run under an event loop. In order to allow many workflows, (like using the %run magic, or copy_pasting code that explicitly starts/stop event loop), when top-level code is detected as not being asynchronous, IPython code is advanced via a pseudo-synchronous runner, and may not advance pending tasks.
  • Change to Nested Embed
  • The introduction of the ability to run async code had some effect on the IPython.embed() API. By default embed will not allow you to run asynchronous code unless a event loop is specified.
  • Effects on Magics
  • Some magics will not work with Async, and will need updates. Contribution welcome.
  • Expected Future changes
  • We expect more internal but public IPython function to become async, and will likely end up having a persisting event loop while IPython is running.
  • Thanks
  • This took more than a year in the making, and the code was rebased a number of time leading to commit authorship that may have been lost in the final Pull-Request. Huge thanks to many people for contribution, discussion, code, documentation, use-case: dalejung, danielballan, ellisonbg, fperez, gnestor, minrk, njsmith, pganssle, tacaswell, takluyver , vidartf … And many others.
  • Autoreload Improvement
  • The magic %autoreload 2 now captures new methods added to classes. Earlier, only methods existing as of the initial import were being tracked and updated.
  • This new feature helps dual environment development - Jupyter+IDE - where the code gradually moves from notebook cells to package files, as it gets structured.
  • Example: An instance of the class MyClass will be able to access the method cube() after it is uncommented and the file file1.py saved on disk.
  • # notebook
  • From mymodule import MyClass
  • First = MyClass(5)
  • # mymodule/file1.py
  • Class MyClass:
  • def __init__(self, a=10):
  • self.a = a
  • def square(self):
  • print('compute square')
  • return self.a*self.a
  • # def cube(self):
  • # print('compute cube')
  • # return self.a*self.a*self.a
  • Misc
  • The autoindent feature that was deprecated in 5.x was re-enabled and un-deprecated in PR #11257
  • Make %run -n -i ... work correctly. Earlier, if %run was passed both arguments, -n would be silently ignored. See PR #10308
  • The %%script (as well as %%bash, %%ruby… ) cell magics now raise by default if the return code of the given code is non-zero (thus halting execution of further cells in a notebook). The behavior can be disable by passing the --no-raise-error flag.
  • Deprecations
  • A couple of unused function and methods have been deprecated and will be removed in future versions:
  • IPython.utils.io.raw_print_err
  • IPython.utils.io.raw_print
  • Backwards incompatible changes
  • The API for transforming input before it is parsed as Python code has been completely redesigned, and any custom input transformations will need to be rewritten. See Custom input transformation for details of the new API.

New in IPython 6.2.1 (Nov 6, 2017)

  • IPython 6.2.1 ships with two minor fixes leading to no completions when using Jedi 0.11+ PR #10829, and crash on some linux system with virtualenv PR #10829

New in IPython 6.0.0 (Apr 25, 2017)

  • Python 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:
  • 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 jedi, thus allowing type inference on non-executed code. If jedi is installed completion like the following are now becoming possible without code evaluation.
  • 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 are already available on the development version of jedi if you are curious.
  • The appearance of the completer is controlled by the c.TerminalInteractiveShell.display_completions option that will show the type differently depending on the value among 'column', 'multicolumn' and 'readlinelike'
  • 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 PR #10182.
  • Extra patches and updates will be needed to the ipykernel package for this feature to be available to other clients like Jupyter Notebook, Lab, Nteract, Hydrogen...
  • 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 of time given to Jedi to compute type inference can be adjusted with c.IPCompleter.jedi_compute_type_timeout. The objects whose type were not 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 Python 3 codebase, which leads us to great length to upstream patches in pip, 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.
  • The ability to use only Python 3 on the code base of IPython brings a number of advantage. Most of the newly written code make use of optional function type annotation leading to clearer code and better documentation.
  • 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 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.
  • Configurable TerminalInteractiveShell, readline interface:
  • IPython gained a new c.TerminalIPythonApp.interactive_shell_class option 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 interface which is now a separate package not actively maintained by the core team. See the project to bring back the readline interface: rlipython.
  • This change will be backported to the IPython 5.x series.
  • Miscs improvements:
  • The %%capture magic can now capture the result of a cell (from an expression on the last line), as well as printed and displayed output. PR #9851.
  • Pressing Ctrl-Z in the terminal debugger now suspends IPython, as it already does in the main terminal prompt.
  • Autoreload can now reload Enum. See #10232 and PR #10316
  • IPython.display has gained a GeoJSON object. PR #10288 and PR #10253
  • Functions Deprecated in 6.x Development cycle:
  • Loading extensions from ipython_extension_dir prints a warning that this 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. instead of IPython.utils.warn inbuilt warnings module is used.
  • The function IPython.core.oinspect.py:call_tip is unused, was marked as deprecated (raising a DeprecationWarning) and marked for later removal. PR #10104

New in IPython 5.1.0 (Sep 1, 2016)

  • Broken %timeit on Python2 due to the use of __qualname__.
  • Restore %gui qt to create and return a QApplication if necessary.
  • Don’t set terminal title by default.
  • Preserve indentation when inserting newlines with Ctrl-O.
  • Restore completion in debugger.
  • Deprecate IPython.core.debugger.Tracer() in favor of simpler, newer, APIs.
  • Restore NoOpContext context manager removed by mistake, and add DeprecationWarning.
  • Add option allowing Prompt_toolkit to use 24bits colors.
  • Fix for closing interactive matplotlib windows on OS X.
  • An embedded interactive shell instance can be used more than once.
  • More robust check for whether IPython is in a terminal.
  • Better pretty-printing of dicts on PyPy.
  • Some coloured output now looks better on dark background command prompts in Windows.
  • Improved tab completion of paths on Windows .
  • Fix tkinter event loop integration on Python 2 with future installed.
  • Restore Ctrl- as a shortcut to quit IPython.
  • Make get_ipython() accessible when modules are imported by startup files.
  • Add support for running directories containing a __main__.py file with the ipython command.
  • True Color feature:
  • prompt_toolkit uses pygments styles for syntax highlighting. By default, the colors specified in the style are approximated using a standard 256-color palette. prompt_toolkit also supports 24bit, a.k.a. “true”, a.k.a. 16-million color escape sequences which enable compatible terminals to display the exact colors specified instead of an approximation. This true_color option exposes that capability in prompt_toolkit to the IPython shell.

New in IPython 3.0.0 (Feb 28, 2015)

  • Using different kernels:
  • You can now choose a kernel for a notebook within the user interface, rather than starting up a separate notebook server for each kernel you want to use. The syntax highlighting adapts to match the language you’re working in.
  • Information about the kernel is stored in the notebook file, so when you open a notebook, it will automatically start the correct kernel.
  • It is also easier to use the Qt console and the terminal console with other kernels, using the –kernel flag.
  • Kernel authors should see Kernel specs for how to register their kernels with IPython so that these mechanisms work.
  • Typing unicode identifiers:
  • Complex expressions can be much cleaner when written with a wider choice of characters. Python 3 allows unicode identifiers, and IPython 3 makes it easier to type those, using a feature from Julia. Type a backslash followed by a LaTeX style short name, such as \alpha. Press tab, and it will turn into α.
  • Widget migration guide:
  • The widget framework has a lot of backwards incompatible changes.
  • Other new features:
  • TextWidget and TextareaWidget objects now include a placeholder attribute, for displaying placeholder text before the user has typed anything.
  • The %load magic can now find the source for objects in the user namespace. To enable searching the namespace, use the -n option.
  • DirectView objects have a new use_cloudpickle() method, which works like view.use_dill(), but causes the cloudpickle module from PiCloud’s cloud library to be used rather than dill or the builtin pickle module.
  • Added a .ipynb exporter to nbconvert. It can be used by passing --to notebook as a commandline argument to nbconvert.
  • New nbconvert preprocessor called ClearOutputPreprocessor. This clears the output from IPython notebooks.
  • New preprocessor for nbconvert that executes all the code cells in a notebook.
  • Consecutive stream (stdout/stderr) output is merged into a single output in the notebook document. Previously, all output messages were preserved as separate output fields in the JSON. Now, the same merge is applied to the stored output as the displayed output, improving document load time for notebooks with many small outputs.
  • NotebookApp.webapp_settings is deprecated and replaced with the more informatively named NotebookApp.tornado_settings.
  • Using %timeit prints warnings if there is atleast a 4x difference in timings between the slowest and fastest runs, since this might meant that the multiple runs are not independent of one another.
  • It’s now possible to provide mechanisms to integrate IPython with other event loops, in addition to the ones we already support. This lets you run GUI code in IPython with an interactive prompt, and to embed the IPython kernel in GUI applications. See Integrating with GUI event loops for details. As part of this, the direct enable_* and disable_* functions for various GUIs in IPython.lib.inputhook have been deprecated in favour of enable_gui() and disable_gui().
  • A ScrollManager was added to the notebook. The ScrollManager controls how the notebook document is scrolled using keyboard. Users can inherit from the ScrollManager or TargetScrollManager to customize how their notebook scrolls. The default ScrollManager is the SlideScrollManager, which tries to scroll to the nearest slide or sub-slide cell.
  • The function interact_manual() has been added which behaves similarly to interact(), but adds a button to explicitly run the interacted-with function, rather than doing it automatically for every change of the parameter widgets. This should be useful for long-running functions.
  • The %cython magic is now part of the Cython module. Use %load_ext Cython with a version of Cython >= 0.21 to have access to the magic now.
  • The Notebook application now offers integrated terminals on Unix platforms, intended for when it is used on a remote server. To enable these, install the terminado Python package.
  • The Notebook application can now edit any plain text files, via a full-page CodeMirror instance.
  • Setting the default highlighting language for nbconvert with the config option NbConvertBase.default_language is deprecated. Nbconvert now respects metadata stored in the kernel spec.
  • IPython can now be configured systemwide, with files in /etc/ipython or /usr/local/etc/ipython on Unix systems, or %PROGRAMDATA%\ipython on Windows.
  • Added support for configurable user-supplied Jinja HTML templates for the notebook. Paths to directories containing template files can be specified via NotebookApp.extra_template_paths. User-supplied template directories searched first by the notebook, making it possible to replace existing templates with your own files.
  • t’s also possible to override a template while also inheriting from that template, by prepending templates/ to the {% extends %} target of your child template. This is useful when you only want to override a specific block of a template.
  • Added a widget persistence API. This allows you to persist your notebooks interactive widgets. Two levels of control are provided: 1. Higher level- WidgetManager.set_state_callbacks allows you to register callbacks for loading and saving widget state. The callbacks you register are automatically called when necessary. 2. Lower level- the WidgetManager Javascript class now has get_state and set_state methods that allow you to get and set the state of the widget runtime.
  • Enhanced support for %env magic. As before, %env with no arguments displays all environment variables and values. Additionally, %env can be used to get or set individual environment variables. To display an individual value, use the %env var syntax. To set a value, use env var val or env var=val. Python value expansion using $ works as usual.
  • Backwards incompatible changes:
  • The message protocol has been updated from version 4 to version 5. Adapters are included, so IPython frontends can still talk to kernels that implement protocol version 4.
  • The notebook format has been updated from version 3 to version 4. Read-only support for v4 notebooks has been backported to IPython 2.4. Notable changes:
  • heading cells are removed in favor or markdown headings
  • notebook outputs and output messages are more consistent with each other
  • use IPython.nbformat.read() and write() to read and write notebook files instead of the deprecated IPython.nbformat.current APIs.
  • IPython.core.oinspect.getsource() call specification has changed:
  • oname keyword argument has been added for property source formatting
  • is_binary keyword argument has been dropped, passing True had previously short-circuited the function to return None unconditionally
  • Removed the octavemagic extension: it is now available as oct2py.ipython.
  • Creating PDFs with LaTeX no longer uses a post processor. Use nbconvert --to pdf instead of nbconvert --to latex --post pdf.
  • Used https://github.com/jdfreder/bootstrap2to3 to migrate the Notebook to Bootstrap 3.
  • Additional changes:
  • Set .tab-content .row 0px; left and right margin (bootstrap default is -15px;)
  • Removed height: @btn_mini_height; from .list_header>div, .list_item>div in tree.less
  • Set #header div margin-bottom: 0px;
  • Set #menus to float: left;
  • Set #maintoolbar .navbar-text to float: none;
  • Added no-padding convenience class.
  • Set border of #maintoolbar to 0px
  • Accessing the container DOM object when displaying javascript has been deprecated in IPython 2.0 in favor of accessing element. Starting with IPython 3.0 trying to access container will raise an error in browser javascript console.
  • IPython.utils.py3compat.open was removed: io.open() provides all the same functionality.
  • The NotebookManager and /api/notebooks service has been replaced by a more generic ContentsManager and /api/contents service, which supports all kinds of files.
  • The Dashboard now lists all files, not just notebooks and directories.
  • The --script hook for saving notebooks to Python scripts is removed, use ipython nbconvert --to python notebook instead.
  • The rmagic extension is deprecated, as it is now part of rpy2. See rpy2.ipython.rmagic.
  • start_kernel() and format_kernel_cmd() no longer accept a executable parameter. Use the kernelspec machinery instead.
  • The widget classes have been renamed from *Widget to *. The old names are still functional, but are deprecated. i.e. IntSliderWidget has been renamed to IntSlider.
  • The ContainerWidget was renamed to Box and no longer defaults as a flexible box in the web browser. A new FlexBox widget was added, which allows you to use the flexible box model.
  • The notebook now uses a single websocket at /kernels//channels instead of separate /kernels//{shell|iopub|stdin} channels. Messages on each channel are identified by a channel key in the message dict, for both send and recv.
  • Content Security Policy:
  • The Content Security Policy is a web standard for adding a layer of security to detect and mitigate certain classes of attacks, including Cross Site Scripting (XSS) and data injection attacks. This was introduced into the notebook to ensure that the IPython Notebook and its APIs (by default) can only be embedded in an iframe on the same origin.
  • Override headers['Content-Security-Policy'] within your notebook configuration to extend for alternate domains and security settings.
  • There is a report-uri endpoint available for logging CSP violations, located at /api/security/csp-report.

New in IPython 2.4.0 (Feb 6, 2015)

  • It adds support for the new notebook format coming in IPython 3.0, along with fixing bugs in the 2.x series.

New in IPython 2.3.0 (Oct 2, 2014)

  • IPython 2.3 includes bugfixes for 2.x, most importantly a fix for maths rendering in notebooks exported to HTML by nbconvert.

New in IPython 2.2.0 (Aug 7, 2014)

  • Pull Requests:
  • PR #6279: minor updates to release scripts
  • PR #6273: Upgrade default mathjax version
  • PR #6249: always use HTTPS getting mathjax from CDN
  • PR #6114: update hmac signature comparison
  • PR #6195: Close handle on new temporary files before returning filename
  • PR #6143: pin tornado to < 4 on travis js tests
  • PR #6134: remove rackcdn https workaround for mathjax cdn
  • PR #6120: Only allow iframe embedding on same origin
  • PR #6117: Remove / from route of TreeRedirectHandler
  • PR #6105: only set allow_origin_pat if defined
  • PR #6102: Add newline if missing to end of script magic cell
  • PR #6077: allow unicode keys in dicts in json_clean
  • PR #6061: make CORS configurable
  • PR #6081: don’t modify dict keys while iterating through them
  • PR #5803: unify visual line handling
  • PR #6005: Changed right arrow key movement function to mirror left arrow key
  • PR #6029: add pickleutil.PICKLE_PROTOCOL
  • PR #6003: Set kernel_id before checking websocket
  • PR #5994: Fix ssh tunnel for Python3
  • PR #5973: Do not create checkpoint_dir relative to current dir
  • PR #5933: fix qt_loader import hook signature
  • PR #5944: Markdown rendering bug fix
  • PR #5917: use shutil.move instead of os.rename
  • Issues:
  • 6246: Include MathJax by default or access the CDN over a secure connection
  • 5525: Websocket origin check fails when used with Apache WS proxy
  • 5901: 2 test failures in Python 3.4 in parallel group
  • 5926: QT console: text selection cannot be made from left to right with keyboard
  • 5998: use_dill does not work in Python 3.4
  • 5964: Traceback on Qt console exit
  • 5787: Error in Notebook-Generated latex (nbconvert)
  • 5950: qtconsole truncates help
  • 5943: 2.x: notebook fails to load when using HTML comments
  • 5932: Qt ImportDenier Does Not Adhere to PEP302
  • 5898: OSError when moving configuration file

New in IPython 2.1.0 (Aug 7, 2014)

  • Pull Requests:
  • PR #5871: specify encoding in msgpack.unpackb
  • PR #5869: Catch more errors from clipboard access on Windows
  • PR #5866: Make test robust against differences in line endings
  • PR #5605: Two cell toolbar fixes.
  • PR #5843: remove Firefox-specific CSS workaround
  • PR #5845: Pass Windows interrupt event to kernels as an environment variable
  • PR #5835: fix typo in v2 convert
  • PR #5841: Fix writing history with output to a file in Python 2
  • PR #5842: fix typo in nbconvert help
  • PR #5846: Fix typos in Cython example
  • PR #5839: Close graphics dev in finally clause
  • PR #5837: pass on install docs
  • PR #5832: Fixed example to work with python3
  • PR #5826: allow notebook tour instantiation to fail
  • PR #5560: Minor expansion of Cython example
  • PR #5818: interpret any exception in getcallargs as not callable
  • PR #5816: Add output to IPython directive when in verbatim mode.
  • PR #5822: Don’t overwrite widget description in interact
  • PR #5782: Silence exception thrown by completer when dir() does not return a list
  • PR #5807: Drop log level to info for Qt console shutdown
  • PR #5814: Remove -i options from mv, rm and cp aliases
  • PR #5812: Fix application name when printing subcommand help.
  • PR #5804: remove an inappropriate !
  • PR #5805: fix engine startup files
  • PR #5806: Don’t auto-move .config/ipython if symbolic link
  • PR #5716: Add booktabs package to latex base.tplx
  • PR #5669: allows threadsafe sys.stdout.flush from background threads
  • PR #5668: allow async output on the most recent request
  • PR #5768: fix cursor keys in long lines wrapped in markdown
  • PR #5788: run cells with silent=True in %run nb.ipynb
  • PR #5715: log all failed ajax API requests
  • PR #5769: Don’t urlescape the text that goes into a title tag
  • PR #5762: Fix check for pickling closures
  • PR #5766: View.map with empty sequence should return empty list
  • PR #5758: Applied bug fix: using fc and ec did not properly set the figure canvas ...
  • PR #5754: Format command name into subcommand_description at run time, not import
  • PR #5744: Describe using PyPI/pip to distribute & install extensions
  • PR #5712: monkeypatch inspect.findsource only when we use it
  • PR #5708: create checkpoints dir in notebook subdirectories
  • PR #5714: log error message when API requests fail
  • PR #5732: Quick typo fix in nbformat/convert.py
  • PR #5713: Fix a NameError in IPython.parallel
  • PR #5704: Update nbconvertapp.py
  • PR #5534: cleanup some pre css inheritance
  • PR #5699: don’t use common names in require decorators
  • PR #5692: Update notebook.rst fixing broken reference to notebook examples readme
  • PR #5693: Update parallel_intro.rst to fix a broken link to examples
  • PR #5486: disambiguate to location when no IPs can be determined
  • PR #5574: Remove the outdated keyboard shortcuts from notebook docs
  • PR #5568: Use __qualname__ in pretty reprs for Python 3
  • PR #5678: Fix copy & paste error in docstring of ImageWidget class
  • PR #5677: Fix %bookmark -l for Python 3
  • PR #5670: nbconvert: Fix CWD imports
  • PR #5647: Mention git hooks in install documentation
  • PR #5671: Fix blank slides issue in Reveal slideshow pdf export
  • PR #5657: use ‘localhost’ as default for the notebook server
  • PR #5584: more semantic icons
  • PR #5594: update components with marked-0.3.2
  • PR #5500: check for Python 3.2
  • PR #5582: reset readline after running PYTHONSTARTUP
  • PR #5630: Fixed Issue #4012 Added Help menubar link to Github markdown doc
  • PR #5613: Fixing bug #5607
  • PR #5633: Provide more help if lessc is not found.
  • PR #5620: fixed a typo in IPython.core.formatters
  • PR #5619: Fix typo in storemagic module docstring
  • PR #5592: add missing browser to notebook_aliases list
  • PR #5506: Fix ipconfig regex pattern
  • PR #5581: Fix rmagic for cells ending in comment.
  • PR #5576: only process cr if it’s found
  • PR #5478: Add git-hooks install script. Update README.md
  • PR #5546: do not shutdown notebook if ‘n’ is part of answer
  • PR #5527: Don’t remove upload items from nav tree unless explicitly requested.
  • PR #5501: remove inappropriate wheel tag override
  • PR #5548: FileNotebookManager: Use shutil.move() instead of os.rename()
  • PR #5524: never use for (var i in array)
  • PR #5459: Fix interact animation page jump FF
  • PR #5559: Minor typo fix in “Cython Magics.ipynb”
  • PR #5507: Fix typo in interactive widgets examples index notebook
  • PR #5554: Make HasTraits pickleable
  • PR #5535: fix n^2 performance issue in coalesce_streams preprocessor
  • PR #5522: fix iteration over Client
  • PR #5488: Added missing require and jquery from cdn.
  • PR #5516: ENH: list generated config files in generated, and rm them upon clean
  • PR #5493: made a minor fix to one of the widget examples
  • PR #5512: Update tooltips to refer to shift-tab
  • PR #5505: Make backport_pr work on Python 3
  • PR #5503: check explicitly for ‘dev’ before adding the note to docs
  • PR #5498: use milestones to indicate backport
  • PR #5492: Polish whatsnew docs
  • PR #5495: Fix various broken things in docs
  • PR #5496: Exclude whatsnew/pr directory from docs builds
  • PR #5489: Fix required Python versions
  • Issues (37):
  • 5364: Horizontal scrollbar hides cell’s last line on Firefox
  • 5192: horisontal scrollbar overlaps output or touches next cell
  • 5840: Third-party Windows kernels don’t get interrupt signal
  • 2412: print history to file using qtconsole and notebook
  • 5703: Notebook doesn’t render with “ask me every time” cookie setting in Firefox
  • 5817: calling mock object in IPython 2.0.0 under Python 3.4.0 raises AttributeError
  • 5499: Error running widgets nbconvert example
  • 5654: Broken links from ipython documentation
  • 5019: print in QT event callback doesn’t show up in ipython notebook.
  • 5800: Only last In prompt number set ?
  • 5801: startup_command specified in ipengine_config.py is not executed
  • 5690: ipython 2.0.0 and pandoc 1.12.2.1 problem
  • 5408: Add checking/flushing of background output from kernel in mainloop
  • 5407: clearing message handlers on status=idle loses async output
  • 5467: Incorrect behavior of up/down keyboard arrows in code cells on wrapped lines
  • 3085: nicer notebook error message when lacking permissions
  • 5765: map_sync over empty list raises IndexError
  • 5553: Notebook matplotlib inline backend: can’t set figure facecolor
  • 5710: inspect.findsource monkeypatch raises wrong exception for C extensions
  • 5706: Multi-Directory notebooks overwrite each other’s checkpoints
  • 5698: can’t require a function named f
  • 5569: Keyboard shortcuts in documentation are out of date
  • 5566: Function name printing should use __qualname__ instead of __name__ (Python 3)
  • 5676: “bookmark -l” not working in ipython 2.0
  • 5555: Differentiate more clearly between Notebooks and Folders in new UI
  • 5590: Marked double escape
  • 5514: import tab-complete fail with ipython 2.0 shell
  • 4012: Notebook: link to markdown formatting reference
  • 5611: Typo in ‘storemagic’ documentation
  • 5589: Kernel start fails when using –browser argument
  • 5491: Bug in Windows ipconfig ip address regular expression
  • 5579: rmagic extension throws ‘Error while parsing the string.’ when last line is comment
  • 5518: Ipython2 will not open ipynb in example directory
  • 5561: New widget documentation has missing notebook link
  • 5128: Page jumping when output from widget interaction replaced
  • 5519: IPython.parallel.Client behavior as iterator
  • 5510: Tab-completion for function argument list

New in IPython 2.0.0 (Aug 7, 2014)

  • interactive widgets for the notebook
  • directory navigation in the notebook dashboard
  • persistent URLs for notebooks
  • a new modal user interface in the notebook
  • a security model for notebooks

New in IPython 1.2.1 (Mar 10, 2014)

  • Bug fix release for Python 2.6 and 3.4:
  • PR #4372: Don’t assume that SyntaxTB is always called with a SyntaxError
  • PR #5166: remove mktemp usage
  • PR #5163: Simplify implementation of TemporaryWorkingDirectory.
  • PR #5105: add index to format to support py2.6

New in IPython 1.0 (Nov 6, 2013)

  • Reorganization:
  • There have been two major reorganizations in IPython 1.0
  • Added IPython.kernel for all kernel-related code. This means that IPython.zmq has been removed, and much of it is now in IPython.kernel.zmq, some of it being in the top-level IPython.kernel
  • We have removed the frontend subpackage, as it caused unnecessary depth. So what was IPython.frontend.qt is now IPython.qt, and so on. The one difference is that the notebook has been further flattened, so that IPython.frontend.html.notebook is now just IPython.html. There is a shim module, so IPython.frontend is still importable in 1.0, but there will be a warning
  • The IPython sphinx directives are now installed in IPython.sphinx, so they can be imported by other projects
  • Public APIs:
  • For the first time since 0.10 (sorry, everyone), there is an official public API for starting IPython
  • from IPython import start_ipython
  • start_ipython()
  • This is what packages should use that start their own IPython session, but don’t actually want embedded IPython (most cases). IPython.embed() is used for embedding IPython into the calling namespace, similar to calling Pdb.set_trace(), whereas start_ipython() will start a plain IPython session, loading config and startup files as normal
  • We also have added
  • from IPython import get_ipython
  • Which is a library function for getting the current IPython instance, and will return None if no IPython instance is running. This is the official way to check whether your code is called from inside an IPython session. If you want to check for IPython without unnecessarily importing IPython, use this function
  • def get_ipython()
  • """return IPython instance if there is one, None otherwise"""
  • import sys
  • if "IPython" in sys.modules
  • import IPython
  • return IPython.get_ipython()
  • Core:
  • The input transformation framework has been reworked. This fixes some corner cases, and adds more flexibility for projects which use IPython, like SymPy & SAGE. For more details, see Custom input transformation
  • Exception types can now be displayed with a custom traceback, by defining a _render_traceback_() method which returns a list of strings, each containing one line of the traceback
  • A new command, ipython history trim can be used to delete everything but the last 1000 entries in the history database
  • file__ is defined in both config files at load time, and .ipy files executed with %run
  • logstart and %logappend are no longer broken
  • Add glob expansion for %run, e.g. %run -g script.py *.txt
  • Expand variables ($foo) in Cell Magic argument line
  • By default, iptest will exclude various slow tests. All tests can be run with iptest –all
  • SQLite history can be disabled in the various cases that it does not behave well
  • edit works on interactively defined variables
  • editor hooks have been restored from quarantine, enabling TextMate as editor, etc
  • The env variable PYTHONSTARTUP is respected by IPython
  • The %matplotlib magic was added, which is like the old %pylab magic, but it does not import anything to the interactive namespace. It is recommended that users switch to %matplotlib and explicit imports
  • The --matplotlib command line flag was also added. It invokes the new %matplotlib magic and can be used in the same way as the old --pylab flag. You can either use it by itself as a flag (--matplotlib), or you can also pass a backend explicitly (--matplotlib qt or --matplotlib=wx, etc)
  • Backwards incompatible changes¶
  • Calling InteractiveShell.prefilter() will no longer perform static transformations - the processing of escaped commands such as %magic and !system, and stripping input prompts from code blocks. This functionality was duplicated in IPython.core.inputsplitter, and the latter version was already what IPython relied on. A new API to transform input will be ready before release
  • Functions from IPython.lib.inputhook to control integration with GUI event loops are no longer exposed in the top level of IPython.lib. Code calling these should make sure to import them from IPython.lib.inputhook
  • For all kernel managers, the sub_channel attribute has been renamed to iopub_channel
  • Users on Python versions before 2.6.6, 2.7.1 or 3.2 will now need to call IPython.utils.doctestreload.doctest_reload() to make doctests run correctly inside IPython. Python releases since those versions are unaffected. For details, see PR #3068 and Python issue 8048
  • The InteractiveShell.cache_main_mod() method has been removed, and new_main_mod() has a different signature, expecting a filename where earlier versions expected a namespace. See PR #3555 for details
  • The short-lived plugin system has been removed. Extensions are the way to go
  • NbConvert:
  • The major milestone for IPython 1.0 is the addition of IPython.nbconvert - tools for converting IPython notebooks to various other formats
  • Warning
  • nbconvert is a-level preview code in 1.0
  • To use nbconvert to convert various file formats
  • ipython nbconvert --to html *.ipynbSee ipython nbconvert --help for more information. nbconvert depends on pandoc for many of the translations to and from various formats
  • See also
  • Converting notebooks to other formats
  • Notebook:
  • Major changes to the IPython Notebook in 1.0
  • The notebook is now autosaved, by default at an interval of two minutes. When you press ‘save’ or Ctrl-S, a checkpoint is made, in a hidden folder. This checkpoint can be restored, so that the autosave model is strictly safer than traditional save. If you change nothing about your save habits, you will always have a checkpoint that you have written, and an autosaved file that is kept up to date
  • The notebook supports raw_input() / input(), and thus also �bug, and many other Python calls that expect user input
  • You can load custom javascript and CSS in the notebook by editing the files $(ipython locate profile)/static/custom/custom.js,css
  • Add %%html, %%svg, %%javascript, and %%latex cell magics for writing raw output in notebook cells
  • add a redirect handler and anchors on heading cells, so you can link across notebooks, directly to heading cells in other notebooks
  • Images support width and height metadata, and thereby 2x scaling (retina support)
  • repr_foo_ methods can return a tuple of (data, metadata), where metadata is a dict containing metadata about the displayed object. This is used to set size, etc. for retina graphics. To enable retina matplotlib figures, simply set InlineBackend.figure_format = 'retina' for 2x PNG figures, in your IPython config file or via the %config magic
  • Add display.FileLink and FileLinks for quickly displaying HTML links to local files
  • Cells have metadata, which can be edited via cell toolbars. This metadata can be used by external code (e.g. reveal.js or exporters), when examining the notebook
  • Fix an issue parsing LaTeX in markdown cells, which required users to type \\\, instead of \\
  • Notebook templates are rendered with Jinja instead of Tornado
  • file has been renamed %%writefile (%%file is deprecated)
  • ANSI (and VT100) color parsing has been improved in both performance and supported values
  • The static files path can be found as IPython.html.DEFAULT_STATIC_FILES_PATH, which may be changed by package managers
  • IPython’s CSS is installed in static/css/style.min.css (all style, including bootstrap), and static/css/ipython.min.css, which only has IPython’s own CSS. The latter file should be useful for embedding IPython notebooks in other pages, blogs, etc
  • The Print View has been removed. Users are encouraged to test ipython nbconvert to generate a static view
  • Javascript Components:
  • The javascript components used in the notebook have been updated significantly
  • updates to jQuery (2.0) and jQueryUI (1.10)
  • Update CodeMirror to 3.14
  • Twitter Bootstrap (2.3) for layout
  • Font-Awesome (3.1) for icons
  • highlight.js (7.3) for syntax highlighting
  • marked (0.2.8) for markdown rendering
  • require.js (2.1) for loading javascript
  • Some relevant changes that are results of this
  • Markdown cells now support GitHub-flavored Markdown (GFM), which includes ```python code blocks and tables
  • Notebook UI behaves better on more screen sizes
  • Various code cell input issues have been fixed
  • Kernel:
  • The kernel code has been substantially reorganized
  • New features in the kernel
  • Kernels support ZeroMQ IPC transport, not just TCP
  • The message protocol has added a top-level metadata field, used for information about messages
  • Add a data_pub message that functions much like display_pub, but publishes raw (usually pickled) data, rather than representations
  • Ensure that sys.stdout.encoding is defined in Kernels
  • Stdout from forked subprocesses should be forwarded to frontends (instead of crashing)
  • IPEP 13:
  • The KernelManager has been split into a KernelManager and a KernelClient. The Manager owns a kernel and starts / signals / restarts it. There is always zero or one KernelManager per Kernel. Clients communicate with Kernels via zmq channels, and there can be zero-to-many Clients connected to a Kernel at any given time
  • The KernelManager now automatically restarts the kernel when it dies, rather than requiring user input at the notebook or QtConsole UI (which may or may not exist at restart time)
  • In-process kernels:
  • The Python-language frontends, particularly the Qt console, may now communicate with in-process kernels, in addition to the traditional out-of-process kernels. An in-process kernel permits direct access to the kernel namespace, which is necessary in some applications. It should be understood, however, that the in-process kernel is not robust to bad user input and will block the main (GUI) thread while executing. Developers must decide on a case-by-case basis whether this tradeoff is appropriate for their application
  • Parallel:
  • IPython.parallel has had some refactoring as well. There are many improvements and fixes, but these are the major changes
  • Connections have been simplified. All ports and the serialization in use are written to the connection file, rather than the initial two-stage system
  • Serialization has been rewritten, fixing many bugs and dramatically improving performance serializing large containers
  • Load-balancing scheduler performance with large numbers of tasks has been dramatically improved
  • There should be fewer (hopefully zero) false-positives for engine failures
  • Increased compatibility with various use cases that produced serialization / argument errors with map, etc
  • The controller can attempt to resume operation if it has crashed, by passing ipcontroller --restore
  • Engines can monitor the Hub heartbeat, and shutdown if the Hub disappears for too long
  • add HTCondor support in launchers
  • QtConsole:
  • Various fixes, including improved performance with lots of text output, and better drag and drop support. The initial window size of the qtconsole is now configurable via IPythonWidget.width and IPythonWidget.height

New in IPython 0.13 (Nov 6, 2013)

  • Major Notebook improvements - new user interface and more:
  • The IPython Notebook, which has proven since its release to be wildly popular, has seen a massive amount of work in this release cycle, leading to a significantly improved user experience as well as many new features
  • The first user-visible change is a reorganization of the user interface; the left panel has been removed and was replaced by a real menu system and a toolbar with icons. Both the toolbar and the header above the menu can be collapsed to leave an unobstructed working area
  • New user interface for Notebook
  • The notebook handles very long outputs much better than before (this was a serious usability issue when running processes that generated massive amounts of output). Now, in the presence of outputs longer than ~100 lines, the notebook will automatically collapse to a scrollable area and the entire left part of this area controls the display: one click in this area will expand the output region completely, and a double-click will hide it completely. This figure shows both the scrolled and hidden modes
  • Scrolling and hiding of long output in the notebook
  • Note
  • The auto-folding of long outputs is disabled in Firefox due to bugs in its scrolling behavior. See PR #2047 for details
  • Uploading notebooks to the dashboard is now easier: in addition to drag and drop (which can be finicky sometimes), you can now click on the upload text and use a regular file dialog box to select notebooks to upload. Furthermore, the notebook dashboard now auto-refreshes its contents and offers buttons to shut down any running kernels (PR #1739)
  • Improved dashboard
  • Cluster management:
  • The notebook dashboard can now also start and stop clusters, thanks to a new tab in the dashboard user interface
  • Cluster management from the notebook dashboard
  • This interface allows, for each profile you have configured, to start and stop a cluster (and optionally override the default number of engines corresponding to that configuration). While this hides all error reporting, once you have a configuration that you know works smoothly, it is a very convenient interface for controlling your parallel resources
  • New notebook format:
  • The notebooks saved now use version 3 of our format, which supports heading levels as well as the concept of ‘raw’ text cells that are not rendered as Markdown. These will be useful with converters we are developing, to pass raw markup (say LaTeX). That conversion code is still under heavy development and not quite ready for prime time, but we welcome help on this front so that we can merge it for full production use as soon as possible
  • Note
  • v3 notebooks can not be read by older versions of IPython, but we provide a simple script that you can use in case you need to export a v3 notebook to share with a v2 user
  • JavaScript refactoring:
  • All the client-side JavaScript has been decoupled to ease reuse of parts of the machinery without having to build a full-blown notebook. This will make it much easier to communicate with an IPython kernel from existing web pages and to integrate single cells into other sites, without loading the full notebook document-like UI. PR #1711
  • This refactoring also enables the possibility of writing dynamic javascript widgets that are returned from Python code and that present an interactive view to the user, with callbacks in Javascript executing calls to the Kernel. This will enable many interactive elements to be added by users in notebooks
  • An example of this capability has been provided as a proof of concept in examples/widgets that lets you directly communicate with one or more parallel engines, acting as a mini-console for parallel debugging and introspection
  • Improved tooltips:
  • The object tooltips have gained some new functionality. By pressing tab several times, you can expand them to see more of a docstring, keep them visible as you fill in a function’s parameters, or transfer the information to the pager at the bottom of the screen. For the details, look at the example notebook 01_notebook_introduction.ipynb
  • Improved tooltips in the notebook
  • The new notebook tooltips
  • Other improvements to the Notebook:
  • These are some other notable small improvements to the notebook, in addition to many bug fixes and minor changes to add polish and robustness throughout
  • The notebook pager (the area at the bottom) is now resizeable by dragging its divider handle, a feature that had been requested many times by just about anyone who had used the notebook system. PR #1705
  • It is now possible to open notebooks directly from the command line; for example: ipython notebook path/ will automatically set path/ as the notebook directory, and ipython notebook path/foo.ipynb will further start with the foo.ipynb notebook opened. PR #1686
  • If a notebook directory is specified with --notebook-dir (or with the corresponding configuration flag NotebookManager.notebook_dir), all kernels start in this directory
  • Fix codemirror clearing of cells with Ctrl-Z; PR #1965
  • Text (markdown) cells now line wrap correctly in the notebook, making them much easier to edit PR #1330
  • PNG and JPEG figures returned from plots can be interactively resized in the notebook, by dragging them from their lower left corner. PR #1832
  • Clear In [] prompt numbers on “Clear All Output”. For more version-control-friendly .ipynb files, we now strip all prompt numbers when doing a “Clear all output”. This reduces the amount of noise in commit-to-commit diffs that would otherwise show the (highly variable) prompt number changes. PR #1621
  • The notebook server now requires two consecutive Ctrl-C within 5 seconds (or an interactive confirmation) to terminate operation. This makes it less likely that you will accidentally kill a long-running server by typing Ctrl-C in the wrong terminal. PR #1609
  • Using Ctrl-S (or Cmd-S on a Mac) actually saves the notebook rather than providing the fairly useless browser html save dialog. PR #1334
  • Allow accessing local files from the notebook (in urls), by serving any local file as the url files/. This makes it possible to, for example, embed local images in a notebook. PR #1211
  • Cell magics:
  • We have completely refactored the magic system, finally moving the magic objects to standalone, independent objects instead of being the mixin class we’d had since the beginning of IPython (PR #1732). Now, a separate base class is provided in IPython.core.magic.Magics that users can subclass to create their own magics. Decorators are also provided to create magics from simple functions without the need for object orientation. Please see the Magic command system docs for further details
  • All builtin magics now exist in a few subclasses that group together related functionality, and the new IPython.core.magics package has been created to organize this into smaller files
  • This cleanup was the last major piece of deep refactoring needed from the original 2001 codebase
  • We have also introduced a new type of magic function, prefixed with %% instead of %, which operates at the whole-cell level. A cell magic receives two arguments: the line it is called on (like a line magic) and the body of the cell below it
  • Cell magics are most natural in the notebook, but they also work in the terminal and qt console, with the usual approach of using a blank line to signal cell termination
  • For example, to time the execution of several statements
  • timeit x = 0 # setup
  • for i in range(100000)
  • x += i**2This is particularly useful to integrate code in another language, and cell magics already exist for shell scripts, Cython, R and Octave. Using %%script /usr/bin/foo, you can run a cell in any interpreter that accepts code via stdin
  • Another handy cell magic makes it easy to write short text files: %%file ~/save/to/here.txt
  • The following cell magics are now included by default; all those that use special interpreters (Perl, Ruby, bash, etc.) assume you have the requisite interpreter installed
  • run cell body with the underlying OS shell; this is similar to prefixing every line in the cell with
  • bash: run cell body under bash
  • capture: capture the output of the code in the cell (and stderr as well). Useful to run codes that produce too much output that you don’t even want scrolled
  • file: save cell body as a file
  • perl: run cell body using Perl
  • prun: run cell body with profiler (cell extension of %prun)
  • python3: run cell body using Python 3
  • ruby: run cell body using Ruby
  • script: run cell body with the script specified in the first line
  • sh: run cell body using sh
  • sx: run cell with system shell and capture process output (cell extension of %sx)
  • system: run cell with system shell (%%! is an alias to this)
  • timeit: time the execution of the cell (extension of %timeit)
  • This is what some of the script-related magics look like in action
  • Cluster management from the notebook dashboard
  • In addition, we have also a number of extensions that provide specialized magics. These typically require additional software to run and must be manually loaded via %load_ext , but are extremely useful. The following extensions are provided
  • Cython magics (extension cythonmagic)
  • This extension provides magics to automatically build and compile Python extension modules using the Cython language. You must install Cython separately, as well as a C compiler, for this to work. The examples directory in the source distribution ships with a full notebook demonstrating these capabilities
  • Cython magic
  • Octave magics (extension octavemagic)
  • This extension provides several magics that support calling code written in the Octave language for numerical computing. You can execute single-lines or whole blocks of Octave code, capture both output and figures inline (just like matplotlib plots), and have variables automatically converted between the two languages. To use this extension, you must have Octave installed as well as the oct2py package. The examples directory in the source distribution ships with a full notebook demonstrating these capabilities
  • Octave magic
  • R magics (extension rmagic)
  • This extension provides several magics that support calling code written in the R language for statistical data analysis. You can execute single-lines or whole blocks of R code, capture both output and figures inline (just like matplotlib plots), and have variables automatically converted between the two languages. To use this extension, you must have R installed as well as the rpy2 package that bridges Python and R. The examples directory in the source distribution ships with a full notebook demonstrating these capabilities
  • R magic
  • Tab completer improvements:
  • Useful tab-completion based on live inspection of objects is one of the most popular features of IPython. To make this process even more user-friendly, the completers of both the Qt console and the Notebook have been reworked
  • The Qt console comes with a new ncurses-like tab completer, activated by default, which lets you cycle through the available completions by pressing tab, or select a completion with the arrow keys (PR #1851)
  • ncurses-like completer, with highlighted selection
  • The new improved Qt console’s ncurses-like completer allows to easily navigate thought long list of completions
  • In the notebook, completions are now sourced both from object introspection and analysis of surrounding code, so limited completions can be offered for variables defined in the current cell, or while the kernel is busy (PR #1711)
  • We have implemented a new configurable flag to control tab completion on modules that provide the __all__ attribute
  • IPCompleter.limit_to__all__= Boolean
  • This instructs the completer to honor __all__ for the completion. Specifically, when completing on object., if True: only those names in obj.__all__ will be included. When False [default]: the __all__ attribute is ignored. PR #1529
  • Improvements to the Qt console:
  • The Qt console continues to receive improvements and refinements, despite the fact that it is by now a fairly mature and robust component. Lots of small polish has gone into it, here are a few highlights
  • A number of changes were made to the underlying code for easier integration into other projects such as Spyder (PR #2007, PR #2024)
  • Improved menus with a new Magic menu that is organized by magic groups (this was made possible by the reorganization of the magic system internals). PR #1782
  • Allow for restarting kernels without clearing the qtconsole, while leaving a visible indication that the kernel has restarted. PR #1681
  • Allow the native display of jpeg images in the qtconsole. PR #1643
  • Parallel:
  • The parallel tools have been improved and fine-tuned on multiple fronts. Now, the creation of an IPython.parallel.Client object automatically activates a line and cell magic function px that sends its code to all the engines. Further magics can be easily created with the Client.activate() method, to conveniently execute code on any subset of engines. PR #1893
  • The %%px cell magic can also be given an optional targets argument, as well as a --out argument for storing its output
  • A new magic has also been added, %pxconfig, that lets you configure various defaults of the parallel magics. As usual, type %pxconfig? for details
  • The exception reporting in parallel contexts has been improved to be easier to read. Now, IPython directly reports the remote exceptions without showing any of the internal execution parts
  • Improved parallel exceptions
  • The parallel tools now default to using NoDB as the storage backend for intermediate results. This means that the default usage case will have a significantly reduced memory footprint, though certain advanced features are not available with this backend. For more details, see IPython’s Task Database
  • The parallel magics now display all output, so you can do parallel plotting or other actions with complex display. The px magic has now both line and cell modes, and in cell mode finer control has been added about how to collate output from multiple engines. PR #1768
  • There have also been incremental improvements to the SSH launchers
  • add to_send/fetch steps for moving connection files around
  • add SSHProxyEngineSetLauncher, for invoking to ipcluster engines on a remote host. This can be used to start a set of engines via PBS/SGE/MPI remotely
  • This makes the SSHLauncher usable on machines without shared filesystems
  • A number of ‘sugar’ methods/properties were added to AsyncResult that are quite useful (PR #1548) for everday work
  • ar.wall_time = received - submitted
  • ar.serial_time = sum of serial computation time
  • ar.elapsed = time since submission (wall_time if done)
  • ar.progress = (int) number of sub-tasks that have completed
  • len(ar) = # of tasks
  • ar.wait_interactive(): prints progress
  • Added Client.spin_thread() / stop_spin_thread() for running spin in a background thread, to keep zmq queue clear. This can be used to ensure that timing information is as accurate as possible (at the cost of having a background thread active)
  • Set TaskScheduler.hwm default to 1 instead of 0. 1 has more predictable/intuitive behavior, if often slower, and thus a more logical default. Users whose workloads require maximum throughput and are largely homogeneous in time per task can make the optimization themselves, but now the behavior will be less surprising to new users. PR #1294
  • Kernel/Engine unification:
  • This is mostly work ‘under the hood’, but it is actually a major achievement for the project that has deep implications in the long term: at last, we have unified the main object that executes as the user’s interactive shell (which we refer to as the IPython kernel) with the objects that run in all the worker nodes of the parallel computing facilities (the IPython engines). Ever since the first implementation of IPython’s parallel code back in 2006, we had wanted to have these two roles be played by the same machinery, but a number of technical reasons had prevented that from being true
  • In this release we have now merged them, and this has a number of important consequences
  • It is now possible to connect any of our clients (qtconsole or terminal console) to any individual parallel engine, with the exact behavior of working at a ‘regular’ IPython console/qtconsole. This makes debugging, plotting, etc. in parallel scenarios vastly easier
  • Parallel engines can always execute arbitrary ‘IPython code’, that is, code that has magics, shell extensions, etc. In combination with the %%px magics, it is thus extremely natural for example to send to all engines a block of Cython or R code to be executed via the new Cython and R magics. For example, this snippet would send the R block to all active engines in a cluster
  • R code goes hereIt is possible to embed not only an interactive shell with the IPython.embed() call as always, but now you can also embed a kernel with IPython.embed_kernel(). Embedding an IPython kernel in an application is useful when you want to use IPython.embed() but don’t have a terminal attached on stdin and stdout
  • The new IPython.parallel.bind_kernel() allows you to promote Engines to listening Kernels, and connect QtConsoles to an Engine and debug it directly
  • In addition, having a single core object through our entire architecture also makes the project conceptually cleaner, easier to maintain and more robust. This took a lot of work to get in place, but we are thrilled to have this major piece of architecture finally where we’d always wanted it to be
  • Official Public API:
  • We have begun organizing our API for easier public use, with an eye towards an official IPython 1.0 release which will firmly maintain this API compatible for its entire lifecycle. There is now an IPython.display module that aggregates all display routines, and the IPython.config namespace has all public configuration tools. We will continue improving our public API layout so that users only need to import names one level deeper than the main IPython package to access all public namespaces
  • IPython notebook file icons:
  • The directory docs/resources in the source distribution contains SVG and PNG versions of our file icons, as well as an Info.plist.example file with instructions to install them on Mac OSX. This is a first draft of our icons, and we encourage contributions from users with graphic talent to improve them in the future
  • IPython notebook file icon
  • New top-level locate command:
  • Add locate entry points; these would be useful for quickly locating IPython directories and profiles from other (non-Python) applications. PR #1762
  • Examples
  • ipython locate
  • Users/me/.ipython
  • ipython locate profile foo
  • Users/me/.ipython/profile_foo
  • ipython locate profile
  • Users/me/.ipython/profile_default
  • ipython locate profile dne
  • ProfileLocate] Profile u'dne' not found.Other new features and improvements:
  • install_ext: A new magic function to install an IPython extension from a URL. E.g. %install_ext https://bitbucket.org/birkenfeld/ipython-physics/raw/default/physics.py
  • The %loadpy magic is no longer restricted to Python files, and has been renamed %load. The old name remains as an alias
  • New command line arguments will help external programs find IPython folders: ipython locate finds the user’s IPython directory, and ipython locate profile foo finds the folder for the ‘foo’ profile (if it exists)
  • The IPYTHON_DIR environment variable, introduced in the Great Reorganization of 0.11 and existing only in versions 0.11-0.13, has been deprecated. As described in PR #1167, the complexity and confusion of migrating to this variable is not worth the aesthetic improvement. Please use the historical IPYTHONDIR environment variable instead
  • The default value of interactivity passed from run_cell() to run_ast_nodes() is now configurable
  • New %alias_magic function to conveniently create aliases of existing magics, if you prefer to have shorter names for personal use
  • We ship unminified versions of the JavaScript libraries we use, to better comply with Debian’s packaging policies
  • Simplify the information presented by obj?/obj?? to eliminate a few redundant fields when possible. PR #2038
  • Improved continuous integration for IPython. We now have automated test runs on Shining Panda and Travis-CI, as well as Tox support
  • The vim-ipython functionality (externally developed) has been updated to the latest version
  • The %save magic now has a -f flag to force overwriting, which makes it much more usable in the notebook where it is not possible to reply to interactive questions from the kernel. PR #1937
  • Use dvipng to format sympy.Matrix, enabling display of matrices in the Qt console with the sympy printing extension. PR #1861
  • Our messaging protocol now has a reasonable test suite, helping ensure that we don’t accidentally deviate from the spec and possibly break third-party applications that may have been using it. We encourage users to contribute more stringent tests to this part of the test suite. PR #1627
  • Use LaTeX to display, on output, various built-in types with the SymPy printing extension. PR #1399
  • Add Gtk3 event loop integration and example. PR #1588
  • clear_output improvements, which allow things like progress bars and other simple animations to work well in the notebook (PR #1563)
  • clear_output() clears the line, even in terminal IPython, the QtConsole and plain Python as well, by printing r to streams
  • clear_output() avoids the flicker in the notebook by adding a delay, and firing immediately upon the next actual display message
  • display_javascript hides its output_area element, so using display to run a bunch of javascript doesn’t result in ever-growing vertical space
  • Add simple support for running inside a virtualenv. While this doesn’t supplant proper installation (as users should do), it helps ad-hoc calling of IPython from inside a virtualenv. PR #1388
  • Major Bugs fixed:
  • In this cycle, we have closed over 740 issues, but a few major ones merit special mention
  • The %pastebin magic has been updated to point to gist.github.com, since unfortunately http://paste.pocoo.org has closed down. We also added a -d flag for the user to provide a gist description string. PR #1670
  • Fix %paste that would reject certain valid inputs. PR #1258
  • Fix sending and receiving of Numpy structured arrays (those with composite dtypes, often used as recarrays). PR #2034
  • Reconnect when the websocket connection closes unexpectedly. PR #1577
  • Fix truncated representation of objects in the debugger by showing at least 80 characters’ worth of information. PR #1793
  • Fix logger to be Unicode-aware: logging could crash ipython if there was unicode in the input. PR #1792
  • Fix images missing from XML/SVG export in the Qt console. PR #1449
  • Fix deepreload on Python 3. PR #1625, as well as having a much cleaner and more robust implementation of deepreload in general. PR #1457
  • Backwards incompatible changes:
  • The exception IPython.core.error.TryNext previously accepted arguments and keyword arguments to be passed to the next implementation of the hook. This feature was removed as it made error message propagation difficult and violated the principle of loose coupling

New in IPython 0.12 (Apr 12, 2012)

  • Other important new features:
  • SSH Tunnels: In 0.11, the IPython.parallel Client could tunnel its connections to the Controller via ssh. Now, the QtConsole supports ssh tunneling, as do parallel engines.
  • relaxed command-line parsing: 0.11 was released with overly-strict command-line parsing, preventing the ability to specify arguments with spaces, e.g. ipython --pylab qt or ipython -c "print 'hi'". This has been fixed, by using argparse. The new parsing is a strict superset of 0.11, so any commands in 0.11 should still work in 0.12.
  • HistoryAccessor: The HistoryManager class for interacting with your IPython SQLite history database has been split, adding a parent HistoryAccessor class, so that users can write code to access and search their IPython history without being in an IPython session (PR #824).
  • kernel %gui and %pylab: The %gui and %pylab magics have been restored to the IPython kernel (e.g. in the qtconsole or notebook). This allows activation of pylab-mode, or eventloop integration after starting the kernel, which was unavailable in 0.11. Unlike in the terminal, this can be set only once, and cannot be changed.
  • config: A new %config magic has been added, giving easy access to the IPython configuration system at runtime (PR #923).
  • Multiline History: Multiline readline history has been restored to the Terminal frontend by default (PR #838).
  • store: The %store magic from earlier versions has been updated and re-enabled (storemagic; PR #1029). To autorestore stored variables on startup, specify c.StoreMagic.autorestore = True in ipython_config.py.
  • Major Bugs fixed:
  • In this cycle, we have closed over 500 issues, but a few major ones merit special mention:
  • Simple configuration errors should no longer crash IPython. In 0.11, errors in config files, as well as invalid trait values, could crash IPython. Now, such errors are reported, and help is displayed.
  • Certain SyntaxErrors no longer crash IPython (e.g. just typing keywords, such as return, break, etc.). See #704.
  • IPython path utils, such as get_ipython_dir() now check for write permissions, so IPython should function on systems where the default path resolution might point to a read-only location, such as HOMESHARE on Windows (#669).
  • raw_input() now works in the kernel when multiple frontends are in use. The request will be sent to the frontend that made the request, and an exception is raised if that frontend does not support stdin requests (e.g. the notebook) (#673).
  • zmq version detection no longer uses simple lexicographical comparison to check minimum version, which prevents 0.11 from working with pyzmq-2.1.10 (PR #758).
  • A bug in PySide < 1.0.7 caused crashes on OSX when tooltips were shown (#711). these tooltips are now disabled on old PySide (PR #963).
  • IPython no longer crashes when started on recent versions of Python 3 in Windows (#737).
  • Instances of classes defined interactively can now be pickled (#29;
  • PR #648). Note that pickling saves a reference to the class definition, so unpickling the instances will only work where the class has been defined.
  • Backwards incompatible changes
  • IPython connection information is no longer specified via ip/port directly, rather via json connection files. These files are stored in the security directory, and enable us to turn on HMAC message authentication by default, significantly improving the security of kernels. Various utility functions have been added to IPython.lib.kernel, for easier connecting to existing kernels.
  • KernelManager now has one ip, and several port traits, rather than several ip/port pair _addr traits. This better matches the rest of the code, where the ip cannot not be set separately for each channel.
  • Custom prompts are now configured using a new class,
  • PromptManager, which has traits for in_template, in2_template (the ...: continuation prompt), out_template and rewrite_template. This uses Python’s string formatting system, so you can use {time} and {cwd}, although we have preserved the abbreviations from previous versions, e.g. \# (prompt number) and \w (working directory). For the list of available fields, refer to the source of IPython/core/prompts.py.
  • The class inheritance of the Launchers in IPython.parallel.apps.launcher used by ipcluster has changed, so that trait names are more consistent across batch systems. This may require a few renames in your config files, if you customized the command-line args for launching controllers and engines. The configurable names have also been changed to be clearer that they point to class names, and can now be specified by name only, rather than requiring the full import path of each class, e.g.:
  • IPClusterEngines.engine_launcher = 'IPython.parallel.apps.launcher.MPIExecEngineSetLauncher'
  • IPClusterStart.controller_launcher = 'IPython.parallel.apps.launcher.SSHControllerLauncher'
  • would now be specified as:
  • IPClusterEngines.engine_launcher_class = 'MPI'
  • IPClusterStart.controller_launcher_class = 'SSH'
  • The full path will still work, and is necessary for using custom launchers not in IPython’s launcher module.
  • Further, MPIExec launcher names are now prefixed with just MPI, to better match other batch launchers, and be generally more intuitive. The MPIExec names are deprecated, but continue to work.
  • For embedding a shell, note that the parameters user_global_ns and global_ns have been deprectated in favour of user_module and module respsectively. The new parameters expect a module-like object, rather than a namespace dict. The old parameters remain for backwards compatibility, although user_global_ns is now ignored. The user_ns parameter works the same way as before, and calling embed() with no arguments still works as before.

New in IPython 0.11 (Apr 12, 2012)

  • Standalone Qt console: a new rich console has been added to IPython, started with ipython qtconsole. In this application we have tried to retain the feel of a terminal for fast and efficient workflows, while adding many features that a line-oriented terminal simply can not support, such as inline figures, full multiline editing with syntax highlighting, graphical tooltips for function calls and much more. This development was sponsored by Enthought Inc.. See below for details.
  • High-level parallel computing with ZeroMQ. Using the same architecture that our Qt console is based on, we have completely rewritten our high-level parallel computing machinery that in prior versions used the Twisted networking framework. While this change will require users to update their codes, the improvements in performance, memory control and internal consistency across our codebase convinced us it was a price worth paying. We have tried to explain how to best proceed with this update, and will be happy to answer questions that may arise. A full tutorial describing these features was presented at SciPy‘11, more details below.
  • New model for GUI/plotting support in the terminal. Now instead of the various -Xthread flags we had before, GUI support is provided without the use of any threads, by directly integrating GUI event loops with Python’s PyOS_InputHook API. A new command-line flag –gui controls GUI support, and it can also be enabled after IPython startup via the new %gui magic. This requires some changes if you want to execute GUI-using scripts inside IPython, see the GUI support section for more details.
  • A two-process architecture. The Qt console is the first use of a new model that splits IPython between a kernel process where code is executed and a client that handles user interaction. We plan on also providing terminal and web-browser based clients using this infrastructure in future releases. This model allows multiple clients to interact with an IPython process through a well-documented messaging protocol using the ZeroMQ networking library.
  • Refactoring. the entire codebase has been refactored, in order to make it more modular and easier to contribute to. IPython has traditionally been a hard project to participate because the old codebase was very monolithic. We hope this (ongoing) restructuring will make it easier for new developers to join us.
  • Vim integration. Vim can be configured to seamlessly control an IPython kernel, see the files in docs/examples/vim for the full details.
  • Integration into Microsoft Visual Studio. Thanks to the work of the Microsoft Python Tools for Visual Studio team, this version of IPython has been integrated into Microsoft Visual Studio’s Python tools open source plug-in. Details below
  • Improved unicode support. We closed many bugs related to unicode input.
  • Python 3. IPython now runs on Python 3.x. See Python 3 support for details.
  • New profile model. Profiles are now directories that contain all relevant infromation for that session, and thus better isolate IPython use-cases.
  • SQLite storage for history. All history is now stored in a SQLite database, providing support for multiple simultaneous sessions that won’t clobber each other as well as the ability to perform queries on all stored data.
  • New configuration system. All parts of IPython are now configured via a mechanism inspired by the Enthought Traits library. Any configurable element can have its attributes set either via files that now use real Python syntax or from the command-line.
  • Pasting of code with prompts. IPython now intelligently strips out input prompts , be they plain Python ones (>>> and ...) or IPython ones (In [N]: and `` ...:``).
  • Additional new features:
  • Added Bytes traitlet, removing Str. All ‘string’ traitlets should either be Unicode if a real string, or Bytes if a C-string. This removes ambiguity and helps the Python 3 transition.
  • New magic %loadpy loads a python file from disk or web URL into the current input buffer.
  • New magic %pastebin for sharing code via the ‘Lodge it’ pastebin.
  • New magic %precision for controlling float and numpy pretty printing.
  • IPython applications initiate logging, so any object can gain access to a the logger of the currently running Application with:
  • from IPython.config.application import Application
  • logger = Application.instance().log
  • You can now get help on an object halfway through typing a command. For instance, typing a = zip? shows the details of zip(). It also leaves the command at the next prompt so you can carry on with it.
  • The input history is now written to an SQLite database. The API for retrieving items from the history has also been redesigned.
  • The IPython.extensions.pretty extension has been moved out of quarantine and fully updated to the new extension API.
  • New magics for loading/unloading/reloading extensions have been added: %load_ext, %unload_ext and %reload_ext.
  • The configuration system and configuration files are brand new. See the configuration system documentation for more details.
  • The InteractiveShell class is now a Configurable subclass and has traitlets that determine the defaults and runtime environment. The __init__ method has also been refactored so this class can be instantiated and run without the old ipmaker module.
  • The methods of InteractiveShell have been organized into sections to make it easier to turn more sections of functionality into components.
  • The embedded shell has been refactored into a truly standalone subclass of InteractiveShell called InteractiveShellEmbed. All embedding logic has been taken out of the base class and put into the embedded subclass.
  • Added methods of InteractiveShell to help it cleanup after itself. The cleanup() method controls this. We couldn’t do this in __del__() because we have cycles in our object graph that prevent it from being called.
  • Created a new module IPython.utils.importstring for resolving strings like foo.bar.Bar to the actual class.
  • Completely refactored the IPython.core.prefilter module into Configurable subclasses. Added a new layer into the prefilter system, called “transformations” that all new prefilter logic should use (rather than the older “checker/handler” approach).
  • Aliases are now components (IPython.core.alias).
  • New top level embed() function that can be called to embed IPython at any place in user’s code. On the first call it will create an InteractiveShellEmbed instance and call it. In later calls, it just calls the previously created InteractiveShellEmbed.
  • Created a configuration system (IPython.config.configurable) that is based on IPython.utils.traitlets. Configurables are arranged into a runtime containment tree (not inheritance) that i) automatically propagates configuration information and ii) allows singletons to discover each other in a loosely coupled manner. In the future all parts of IPython will be subclasses of Configurable. All IPython developers should become familiar with the config system.
  • Created a new Config for holding configuration information. This is a dict like class with a few extras: i) it supports attribute style access, ii) it has a merge function that merges two Config instances recursively and iii) it will automatically create sub-Config instances for attributes that start with an uppercase character.
  • Created new configuration loaders in IPython.config.loader. These loaders provide a unified loading interface for all configuration information including command line arguments and configuration files. We have two default implementations based on argparse and plain python files. These are used to implement the new configuration system.
  • Created a top-level Application class in IPython.core.application that is designed to encapsulate the starting of any basic Python program. An application loads and merges all the configuration objects, constructs the main application, configures and initiates logging, and creates and configures any Configurable instances and then starts the application running. An extended BaseIPythonApplication class adds logic for handling the IPython directory as well as profiles, and all IPython entry points extend it.
  • The Type and Instance traitlets now handle classes given as strings, like foo.bar.Bar. This is needed for forward declarations. But, this was implemented in a careful way so that string to class resolution is done at a single point, when the parent HasTraitlets is instantiated.
  • IPython.utils.ipstruct has been refactored to be a subclass of dict. It also now has full docstrings and doctests.
  • Created a Traits like implementation in IPython.utils.traitlets. This is a pure Python, lightweight version of a library that is similar to Enthought’s Traits project, but has no dependencies on Enthought’s code. We are using this for validation, defaults and notification in our new component system. Although it is not 100% API compatible with Enthought’s Traits, we plan on moving in this direction so that eventually our implementation could be replaced by a (yet to exist) pure Python version of Enthought Traits.
  • Added a new module IPython.lib.inputhook to manage the integration with GUI event loops using PyOS_InputHook. See the docstrings in this module or the main IPython docs for details.
  • For users, GUI event loop integration is now handled through the new %gui magic command. Type %gui? at an IPython prompt for documentation.
  • For developers IPython.lib.inputhook provides a simple interface for managing the event loops in their interactive GUI applications. Examples can be found in our docs/examples/lib directory.

New in IPython 0.10.2 (Apr 12, 2012)

  • IPython 0.10.2 was released April 9, 2011. This is a minor bugfix release that preserves backward compatibility. At this point, all IPython development resources are focused on the 0.11 series that includes a complete architectural restructuring of the project as well as many new capabilities, so this is likely to be the last release of the 0.10.x series. We have tried to fix all major bugs in this series so that it remains a viable platform for those not ready yet to transition to the 0.11 and newer codebase (since that will require some porting effort, as a number of APIs have changed).
  • Thus, we are not opening a 0.10.3 active development branch yet, but if the user community requires new patches and is willing to maintain/release such a branch, we’ll be happy to host it on the IPython github repositories.
  • Highlights of this release:
  • The main one is the closing of github ticket #185, a major regression we had in 0.10.1 where pylab mode with GTK (or gthread) was not working correctly, hence plots were blocking with GTK. Since this is the default matplotlib backend on Unix systems, this was a major annoyance for many users.
  • Fix IOError bug on Windows when used with -gthread.
  • Work robustly if $HOME is missing from environment.
  • Better POSIX support in ssh scripts (remove bash-specific idioms).
  • Improved support for non-ascii characters in log files.
  • Work correctly in environments where GTK can be imported but not started (such as a linux text console without X11).

New in IPython 0.10.1 (Apr 12, 2012)

  • IPython 0.10.1 was released October 11, 2010, over a year after version 0.10. This is mostly a bugfix release, since after version 0.10 was released, the development team’s energy has been focused on the 0.11 series. We have nonetheless tried to backport what fixes we could into 0.10.1, as it remains the stable series that many users have in production systems they rely on.
  • Since the 0.11 series changes many APIs in backwards-incompatible ways, we are willing to continue maintaining the 0.10.x series. We don’t really have time to actively write new code for 0.10.x, but we are happy to accept patches and pull requests on the IPython github site. If sufficient contributions are made that improve 0.10.1, we will roll them into future releases. For this purpose, we will have a branch called 0.10.2 on github, on which you can base your contributions.
  • For this release, we applied approximately 60 commits totaling a diff of over 7000 lines:
  • 0.10.1)amirbar[dist]> git diff --oneline rel-0.10.. | wc -l
  • 7296
  • Highlights of this release:
  • The only significant new feature is that IPython’s parallel computing machinery now supports natively the Sun Grid Engine and LSF schedulers. This work was a joint contribution from Justin Riley, Satra Ghosh and Matthieu Brucher, who put a lot of work into it. We also improved traceback handling in remote tasks, as well as providing better control for remote task IDs.
  • New IPython Sphinx directive contributed by John Hunter. You can use this directive to mark blocks in reSructuredText documents as containing IPython syntax (including figures) and the will be executed during the build:
  • In [2]: plt.figure() # ensure a fresh figure
  • savefig psimple.png width=4in
  • In [3]: plt.plot([1,2,3])
  • Out[3]: []
  • Various fixes to the standalone ipython-wx application.
  • Now (2010) that argparse has become part of Python 2.7 this will be less of an issue, but Steven’s relicensing allowed us to start updating IPython to using argparse well before Python 2.7. Many thanks!
  • Robustness improvements so that IPython doesn’t crash if the readline library is absent (though obviously a lot of functionality that requires readline will not be available).
  • Improvements to tab completion in Emacs with Python 2.6.
  • Logging now supports timestamps (see %logstart? for full details).
  • A long-standing and quite annoying bug where parentheses would be added to print statements, under Python 2.5 and 2.6, was finally fixed.
  • Improved handling of libreadline on Apple OSX.
  • Fix reload method of IPython demos, which was broken.
  • Fixes for the ipipe/ibrowse system on OSX.
  • Fixes for Zope profile.
  • Fix %timeit reporting when the time is longer than 1000s.
  • Avoid lockups with ? or ?? in SunOS, due to a bug in termios.
  • The usual assortment of miscellaneous bug fixes and small improvements.

New in IPython 0.10 (Apr 12, 2012)

  • New features:
  • New %paste magic automatically extracts current contents of clipboard and pastes it directly, while correctly handling code that is indented or prepended with >>> or ... python prompt markers.
  • IPython ‘demos’, created with the IPython.demo module, can now be created from files on disk or strings in memory.
  • Added find_cmd() function to IPython.platutils module, to find commands in a cross-platform manner.
  • Many improvements and fixes to Gaël Varoquaux’s ipythonx, a WX-based lightweight IPython instance that can be easily embedded in other WX applications. These improvements have made it possible to now have an embedded IPython in Mayavi and other tools.
  • MultiengineClient objects now have a benchmark() method.
  • The manual now includes a full set of auto-generated API documents from the code sources, using Sphinx and some of our own support code. We are now using the Numpy Documentation Standard for all docstrings, and we have tried to update as many existing ones as possible to this format.
  • The new IPython.Extensions.ipy_pretty extension by Robert Kern provides configurable pretty-printing.
  • It can optionally run in a thread, and this can be toggled at runtime (allowing the loading of Matplotlib in a running session without ill effects).
  • IPython includes a copy of Steven Bethard’s argparse in the IPython.external package, so we can use it internally and it is also available to any IPython user. By installing it in this manner, we ensure zero conflicts with any system-wide installation you may already have while minimizing external dependencies for new users. In IPython 0.10, We ship argparse version 1.0.
  • An improved and much more robust test suite, that runs groups of tests in separate subprocesses using either Nose or Twisted’s trial runner to ensure proper management of Twisted-using code. The test suite degrades gracefully if optional dependencies are not available, so that the iptest command can be run with only Nose installed and nothing else. We also have more and cleaner test decorators to better select tests depending on runtime conditions, do setup/teardown, etc.
  • The new ipcluster now has a fully working ssh mode that should work on Linux, Unix and OS X. !
  • The wonderful TextMate editor can now be used with �it on OS X. Thanks to Matt Foster for this patch.
  • The documentation regarding parallel uses of IPython, including MPI and PBS, has been significantly updated and improved.
  • The developer guidelines in the documentation have been updated to explain our workflow using bzr and Launchpad.
  • Fully refactored ipcluster command line program for starting IPython clusters. This new version is a complete rewrite and 1) is fully cross platform (we now use Twisted’s process management), 2) has much improved performance, 3) uses subcommands for different types of clusters, 4) uses argparse for parsing command line options, 5) has better support for starting clusters using mpirun, 6) has experimental support for starting engines using PBS. It can also reuse FURL files, by appropriately passing options to its subcommands. However, this new version of ipcluster should be considered a technology preview. We plan on changing the API in significant ways before it is final.
  • Full description of the security model added to the docs.
  • cd completer: show bookmarks if no other completions are available.
  • sh profile: easy way to give ‘title’ to prompt: assign to variable ‘_prompt_title’. It looks like this:
  • 1> _prompt_title = 'sudo!'
  • sudo![~]|2>
  • edit: If you do ‘�it pasted_block’, pasted_block variable gets updated with new data (so repeated editing makes sense)
  • Bug fixes:
  • Fix #368719, removed top-level debian/ directory to make the job of Debian packagers easier.
  • Fix #291143 by including man pages contributed by Stephan Peijnik from the Debian project.
  • Fix #358202, effectively a race condition, by properly synchronizing file creation at cluster startup time.
  • timeit now handles correctly functions that take a long time to execute even the first time, by not repeating them.
  • Fix #239054, releasing of references after exiting.
  • Fix #341726
  • Fix #269966. This long-standing and very difficult bug (which is actually a problem in Python itself) meant long-running sessions would inevitably grow in memory size, often with catastrophic consequences if users had large objects in their scripts. Now, using %run repeatedly should not cause any memory leaks.
  • Fix #295371, bug in %history.
  • Improved support for py2exe.
  • Fix #270856: IPython hangs with PyGTK
  • Fix #270998: A magic with no docstring breaks the ‘%magic magic’
  • fix #271684: -c startup commands screw up raw vs. native history
  • Numerous bugs on Windows with the new ipcluster have been fixed.
  • The ipengine and ipcontroller scripts now handle missing furl files more gracefully by giving better error messages.
  • rehashx: Aliases no longer contain dots. python3.0 binary will create alias python30. Fixes: #259716 “commands with dots in them don’t work”
  • cpaste: %cpaste -r repeats the last pasted block. The block is assigned to pasted_block even if code raises exception.
  • Bug #274067 ‘The code in get_home_dir is broken for py2exe’ was fixed.
  • Many other small bug fixes not listed here by number (see the bzr log for more info).
  • Backwards incompatible changes
  • ipykit and related files were unmaintained and have been removed.
  • The IPython.genutils.doctest_reload() does not actually call reload(doctest) anymore, as this was causing many problems with the test suite. It still resets doctest.master to None.
  • While we have not deliberately broken Python 2.4 compatibility, only minor testing was done with Python 2.4, while 2.5 and 2.6 were fully tested. But if you encounter problems with 2.4, please do report them as bugs.
  • The ipcluster now requires a mode argument; for example to start a cluster on the local machine with 4 engines, you must now type:
  • ipcluster local -n 4
  • The controller now has a -r flag that needs to be used if you want to reuse existing furl files. Otherwise they are deleted (the default).
  • Remove ipy_leo.py. You can use easy_install ipython-extension to get it. (done to decouple it from ipython release cycle)

New in IPython 0.9.1 (Apr 12, 2012)

  • This release was quickly made to restore compatibility with Python 2.4, which version 0.9 accidentally broke. No new features were introduced, other than some additional testing support for internal use.

New in IPython 0.9 (Apr 12, 2012)

  • New features:
  • All furl files and security certificates are now put in a read-only directory named ~./ipython/security.
  • A single function get_ipython_dir(), in IPython.genutils that determines the user’s IPython directory in a robust manner.
  • Laurent’s WX application has been given a top-level script called ipython-wx, and it has received numerous fixes. We expect this code to be architecturally better integrated with Gael’s WX ‘ipython widget’ over the next few releases.
  • The Editor synchronization work by Vivian De Smedt has been merged in. This code adds a number of new editor hooks to synchronize with editors under Windows.
  • A new, still experimental but highly functional, WX shell by Gael Varoquaux. This work was sponsored by Enthought, and while it’s still very new, it is based on a more cleanly organized arhictecture of the various IPython components. We will continue to develop this over the next few releases as a model for GUI components that use IPython.
  • Another GUI frontend, Cocoa based (Cocoa is the OSX native GUI framework), authored by Barry Wark. Currently the WX and the Cocoa ones have slightly different internal organizations, but the whole team is working on finding what the right abstraction points are for a unified codebase.
  • As part of the frontend work, Barry Wark also implemented an experimental event notification system that various ipython components can use. In the next release the implications and use patterns of this system regarding the various GUI options will be worked out.
  • IPython finally has a full test system, that can test docstrings with IPython-specific functionality. There are still a few pieces missing for it to be widely accessible to all users (so they can run the test suite at any time and report problems), but it now works for the developers. We are working hard on continuing to improve it, as this was probably IPython’s major Achilles heel (the lack of proper test coverage made it effectively impossible to do large-scale refactoring). The full test suite can now be run using the iptest command line program.
  • The notion of a task has been completely reworked. An ITask interface has been created. This interface defines the methods that tasks need to implement. These methods are now responsible for things like submitting tasks and processing results. There are two basic task types: IPython.kernel.task.StringTask (this is the old Task object, but renamed) and the new IPython.kernel.task.MapTask, which is based on a function.
  • A new interface, IPython.kernel.mapper.IMapper has been defined to standardize the idea of a map method. This interface has a single map method that has the same syntax as the built-in map. We have also defined a mapper factory interface that creates objects that implement IPython.kernel.mapper.IMapper for different controllers. Both the multiengine and task controller now have mapping capabilties.
  • The parallel function capabilities have been reworks. The major changes are that i) there is now an @parallel magic that creates parallel functions, ii) the syntax for mulitple variable follows that of map, iii) both the multiengine and task controller now have a parallel function implementation.
  • All of the parallel computing capabilities from ipython1-dev have been merged into IPython proper. This resulted in the following new subpackages: IPython.kernel, IPython.kernel.core, IPython.config, IPython.tools and IPython.testing.
  • As part of merging in the ipython1-dev stuff, the setup.py script and friends have been completely refactored. Now we are checking for dependencies using the approach that matplotlib uses.
  • The documentation has been completely reorganized to accept the documentation from ipython1-dev.
  • We have switched to using Foolscap for all of our network protocols in IPython.kernel. This gives us secure connections that are both encrypted and authenticated.
  • We have a brand new COPYING.txt files that describes the IPython license and copyright. The biggest change is that we are putting “The IPython Development Team” as the copyright holder. We give more details about exactly what this means in this file. All developer should read this and use the new banner in all IPython source code files.
  • sh profile: ./foo runs foo as system command, no need to do !./foo anymore
  • String lists now support sort(field, nums = True) method (to easily sort system command output). Try it with a = !ls -l ; a.sort(1, nums=1).
  • cpaste foo’ now assigns the pasted block as string list, instead of string
  • The ipcluster script now run by default with no security. This is done because the main usage of the script is for starting things on localhost. Eventually when ipcluster is able to start things on other hosts, we will put security back.
  • cd –foo’ searches directory history for string foo, and jumps to that dir. Last part of dir name is checked first. If no matches for that are found, look at the whole path.
  • Bug fixes:
  • The Windows installer has been fixed. Now all IPython scripts have .bat versions created. Also, the Start Menu shortcuts have been updated.
  • The colors escapes in the multiengine client are now turned off on win32 as they don’t print correctly.
  • The IPython.kernel.scripts.ipengine script was exec’ing mpi_import_statement incorrectly, which was leading the engine to crash when mpi was enabled.
  • A few subpackages had missing __init__.py files.
  • The documentation is only created if Sphinx is found. Previously, the setup.py script would fail if it was missing.
  • Greedy cd completion has been disabled again (it was enabled in 0.8.4) as it caused problems on certain platforms.
  • Backwards incompatible changes
  • The clusterfile options of the ipcluster command has been removed as it was not working and it will be replaced soon by something much more robust.
  • The IPython.kernel configuration now properly find the user’s IPython directory.
  • In ipapi, the make_user_ns() function has been replaced with make_user_namespaces(), to support dict subclasses in namespace creation.
  • IPython.kernel.client.Task has been renamed IPython.kernel.client.StringTask to make way for new task types.
  • The keyword argument style has been renamed dist in scatter, gather and map.
  • Renamed the values that the rename dist keyword argument can have from ‘basic’ to ‘b’.
  • IPython has a larger set of dependencies if you want all of its capabilities. See the setup.py script for details.
  • The constructors for IPython.kernel.client.MultiEngineClient and IPython.kernel.client.TaskClient no longer take the (ip,port) tuple. Instead they take the filename of a file that contains the FURL for that client. If the FURL file is in your IPYTHONDIR, it will be found automatically and the constructor can be left empty.
  • The asynchronous clients in IPython.kernel.asyncclient are now created using the factory functions get_multiengine_client() and get_task_client(). These return a Deferred to the actual client.
  • The command line options to ipcontroller and ipengine have changed to reflect the new Foolscap network protocol and the FURL files. Please see the help for these scripts for details.
  • The configuration files for the kernel have changed because of the Foolscap stuff. If you were using custom config files before, you should delete them and regenerate new ones.