Hello community,
here is the log from the commit of package python-ipykernel for
openSUSE:Leap:15.2 checked in at 2020-04-08 12:49:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-ipykernel (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-ipykernel.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ipykernel"
Wed Apr 8 12:49:01 2020 rev:3 rq:791556 version:5.2.0
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-ipykernel/python-ipykernel.changes
2020-03-27 16:47:57.855927688 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.python-ipykernel.new.3248/python-ipykernel.changes
2020-04-08 12:49:29.418376853 +0200
@@ -1,0 +2,18 @@
+Sat Mar 28 16:35:30 UTC 2020 - Arun Persaud <[email protected]>
+
+- specfile:
+ * be more specific in %files section
+ * removed patch fix_jupyter_client_6.patch, included upstream
+
+- update to version 5.2.0:
+ * Produce better traceback when kernel is interrupted
+ (:ghpull:`491`)
+ * Add InProcessKernelClient.control_channel for compatibility with
+ jupyter-client v6.0.0 (:ghpull:`489`)
+ * Drop support for Python 3.4 (:ghpull:`483`)
+ * Work around issue related to Tornado with python3.8 on Windows
+ (:ghpull:`480`, :ghpull:`481`)
+ * Prevent entering event loop if it is None (:ghpull:`464`)
+ * Use shell.input_transformer_manager when available (:ghpull:`411`)
+
+-------------------------------------------------------------------
Old:
----
fix_jupyter_client_6.patch
ipykernel-5.1.4.tar.gz
New:
----
ipykernel-5.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ipykernel.spec ++++++
--- /var/tmp/diff_new_pack.ChARrJ/_old 2020-04-08 12:49:29.934377122 +0200
+++ /var/tmp/diff_new_pack.ChARrJ/_new 2020-04-08 12:49:29.934377122 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-ipykernel
#
-# Copyright (c) 2020 SUSE LLC.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,15 +19,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-ipykernel
-Version: 5.1.4
+Version: 5.2.0
Release: 0
Summary: IPython Kernel for Jupyter
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/ipython/ipykernel
Source:
https://files.pythonhosted.org/packages/source/i/ipykernel/ipykernel-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM fix_jupyter_client_6.patch --
https://github.com/ipython/ipykernel/pull/489
-Patch0: fix_jupyter_client_6.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: hicolor-icon-theme
@@ -40,6 +38,12 @@
Requires: python-traitlets >= 4.1.0
Provides: python-jupyter_ipykernel = %{version}
Obsoletes: python-jupyter_ipykernel < %{version}
+Provides: %{python_module ipykernel-doc = %{version}}
+Obsoletes: %{python_module ipykernel-doc < %{version}}
+Provides: %{python_module jupyter_ipykernel-doc = %{version}}
+Obsoletes: %{python_module jupyter_ipykernel-doc < %{version}}
+Provides: %{python_module jupyter-ipykernel-doc = %{version}}
+Obsoletes: %{python_module jupyter-ipykernel-doc < %{version}}
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module flaky}
@@ -58,13 +62,6 @@
BuildRequires: %{python_module typing}
Requires: python-typing
%endif
-Provides: %{python_module ipykernel-doc = %{version}}
-Obsoletes: %{python_module ipykernel-doc < %{version}}
-Provides: %{python_module jupyter_ipykernel-doc = %{version}}
-Obsoletes: %{python_module jupyter_ipykernel-doc < %{version}}
-Provides: %{python_module jupyter-ipykernel-doc = %{version}}
-Obsoletes: %{python_module jupyter-ipykernel-doc < %{version}}
-
%python_subpackages
%description
@@ -74,6 +71,7 @@
%package -n jupyter-ipykernel
Summary: IPython Kernel for Jupyter
+Group: Development/Languages/Python
Requires: hicolor-icon-theme
Requires: jupyter-jupyter-client
Requires: python3-ipykernel = %{version}
@@ -100,7 +98,10 @@
%files %{python_files}
%doc README.md docs/changelog.rst
%license COPYING.md
-%{python_sitelib}/*
+%{python_sitelib}/ipykernel
+%{python_sitelib}/ipykernel_launcher.py
+%{python_sitelib}/ipykernel-%{version}-py*.egg-info
+%pycache_only %{python_sitelib}/__pycache__
%files -n jupyter-ipykernel
%license COPYING.md
++++++ ipykernel-5.1.4.tar.gz -> ipykernel-5.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/.gitignore
new/ipykernel-5.2.0/.gitignore
--- old/ipykernel-5.1.4/.gitignore 2018-09-01 09:48:16.000000000 +0200
+++ new/ipykernel-5.2.0/.gitignore 1970-01-01 01:00:00.000000000 +0100
@@ -1,26 +0,0 @@
-MANIFEST
-build
-cover
-dist
-_build
-docs/man/*.gz
-docs/source/api/generated
-docs/source/config/options
-docs/source/interactive/magics-generated.txt
-docs/gh-pages
-IPython/html/notebook/static/mathjax
-IPython/html/static/style/*.map
-*.py[co]
-__pycache__
-*.egg-info
-*~
-*.bak
-.ipynb_checkpoints
-.tox
-.DS_Store
-\#*#
-.#*
-.coverage
-
-data_kernelspec
-.pytest_cache
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/.mailmap new/ipykernel-5.2.0/.mailmap
--- old/ipykernel-5.1.4/.mailmap 2015-04-09 10:09:32.000000000 +0200
+++ new/ipykernel-5.2.0/.mailmap 1970-01-01 01:00:00.000000000 +0100
@@ -1,149 +0,0 @@
-A. J. Holyoake <[email protected]> ajholyoake <[email protected]>
-Aaron Culich <[email protected]> Aaron Culich <[email protected]>
-Aron Ahmadia <[email protected]> ahmadia <[email protected]>
-Benjamin Ragan-Kelley <[email protected]> <[email protected]>
-Benjamin Ragan-Kelley <[email protected]> Min RK
-Benjamin Ragan-Kelley <[email protected]> MinRK <[email protected]>
-Barry Wark <[email protected]> Barry Wark <barrywarkatgmaildotcom>
-Ben Edwards <[email protected]> Ben Edwards <bedwards@sausage.(none)>
-Bradley M. Froehle <[email protected]> Bradley M. Froehle
<[email protected]>
-Bradley M. Froehle <[email protected]> Bradley Froehle
<[email protected]>
-Brandon Parsons <[email protected]> Brandon Parsons
<[email protected]>
-Brian E. Granger <[email protected]> Brian Granger
-Brian E. Granger <[email protected]> Brian Granger <>
-Brian E. Granger <[email protected]> bgranger <>
-Brian E. Granger <[email protected]> bgranger <bgranger@red>
-Christoph Gohlke <[email protected]> cgohlke <[email protected]>
-Cyrille Rossant <[email protected]> rossant <rossant@github>
-Damián Avila <[email protected]> damianavila
<[email protected]>
-Damián Avila <[email protected]> damianavila <[email protected]>
-Damon Allen <[email protected]> damontallen <[email protected]>
-Darren Dale <[email protected]> darren.dale <>
-Darren Dale <[email protected]> Darren Dale <>
-Dav Clark <[email protected]> Dav Clark <>
-Dav Clark <[email protected]> Dav Clark <[email protected]>
-David Hirschfeld <[email protected]> dhirschfeld
<[email protected]>
-David P. Sanders <[email protected]> David P. Sanders
<[email protected]>
-David Warde-Farley <[email protected]> David Warde-Farley <>
-Doug Blank <[email protected]> Doug Blank <[email protected]>
-Eugene Van den Bulke <[email protected]> Eugene Van den Bulke
<[email protected]>
-Evan Patterson <[email protected]>
<[email protected]>
-Evan Patterson <[email protected]> <[email protected]>
-Evan Patterson <[email protected]> <[email protected]>
-Evan Patterson <[email protected]> <[email protected]>
-Evan Patterson <[email protected]> epatters <[email protected]>
-Evan Patterson <[email protected]> epatters <[email protected]>
-Ernie French <[email protected]> Ernie French <[email protected]>
-Ernie French <[email protected]> ernie french <[email protected]>
-Ernie French <[email protected]> ernop <[email protected]>
-Fernando Perez <[email protected]> <[email protected]>
-Fernando Perez <[email protected]> Fernando Perez
<[email protected]>
-Fernando Perez <[email protected]> fperez <>
-Fernando Perez <[email protected]> fptest <>
-Fernando Perez <[email protected]> fptest1 <>
-Fernando Perez <[email protected]> Fernando Perez
<[email protected]>
-Fernando Perez <[email protected]> Fernando Perez <>
-Fernando Perez <[email protected]> Fernando Perez <fperez@maqroll>
-Frank Murphy <[email protected]> Frank Murphy <[email protected]>
-Gabriel Becker <[email protected]> gmbecker <[email protected]>
-Gael Varoquaux <[email protected]> gael.varoquaux <>
-Gael Varoquaux <[email protected]> gvaroquaux
<gvaroquaux@gvaroquaux-desktop>
-Gael Varoquaux <[email protected]> Gael Varoquaux <>
-Ingolf Becker <[email protected]> watercrossing
<[email protected]>
-Jake Vanderplas <[email protected]> Jake Vanderplas
<[email protected]>
-Jakob Gager <[email protected]> jakobgager <[email protected]>
-Jakob Gager <[email protected]> jakobgager <[email protected]>
-Jakob Gager <[email protected]> jakobgager <[email protected]>
-Jason Grout <[email protected]> <[email protected]>
-Jason Grout <[email protected]> <[email protected]>
-Jason Gors <[email protected]> jason gors <[email protected]>
-Jason Gors <[email protected]> jgors <[email protected]>
-Jens Hedegaard Nielsen <[email protected]> Jens Hedegaard Nielsen
<jhn@jhn-Znote.(none)>
-Jens Hedegaard Nielsen <[email protected]> Jens H Nielsen
<[email protected]>
-Jens Hedegaard Nielsen <[email protected]> Jens H. Nielsen
<[email protected]>
-Jez Ng <[email protected]> Jez Ng <[email protected]>
-Jonathan Frederic <[email protected]> Jonathan Frederic
<jonathan@LifebookMint.(none)>
-Jonathan Frederic <[email protected]> Jonathan Frederic
<[email protected]>
-Jonathan Frederic <[email protected]> Jonathan Frederic
<[email protected]>
-Jonathan Frederic <[email protected]> jon <[email protected]>
-Jonathan Frederic <[email protected]> U-Jon-PC\Jon <Jon@Jon-PC.(none)>
-Jonathan March <[email protected]> Jonathan March <[email protected]>
-Jonathan March <[email protected]> jdmarch <[email protected]>
-Jörgen Stenarson <[email protected]> Jörgen Stenarson
<[email protected]>
-Jörgen Stenarson <[email protected]> Jorgen Stenarson
<[email protected]>
-Jörgen Stenarson <[email protected]> Jorgen Stenarson <>
-Jörgen Stenarson <[email protected]> jstenar
<[email protected]>
-Jörgen Stenarson <[email protected]> jstenar <>
-Jörgen Stenarson <[email protected]> Jörgen Stenarson
<[email protected]>
-Juergen Hasch <[email protected]> juhasch <[email protected]>
-Juergen Hasch <[email protected]> juhasch <[email protected]>
-Julia Evans <[email protected]> Julia Evans <[email protected]>
-Kester Tong <[email protected]> KesterTong <[email protected]>
-Kyle Kelley <[email protected]> Kyle Kelley <[email protected]>
-Kyle Kelley <[email protected]> rgbkrk <[email protected]>
-Laurent Dufréchou <[email protected]> <[email protected]>
-Laurent Dufréchou <[email protected]> <laurent@Pep>
-Laurent Dufréchou <[email protected]> laurent dufrechou <>
-Laurent Dufréchou <[email protected]> laurent.dufrechou <>
-Laurent Dufréchou <[email protected]> Laurent Dufrechou <>
-Laurent Dufréchou <[email protected]> [email protected] <>
-Laurent Dufréchou <[email protected]> ldufrechou <ldufrechou@PEP>
-Lorena Pantano <[email protected]> Lorena <[email protected]>
-Luis Pedro Coelho <[email protected]> Luis Pedro Coelho <[email protected]>
-Marc Molla <[email protected]> marcmolla <[email protected]>
-Martín Gaitán <[email protected]> Martín Gaitán <[email protected]>
-Matthias Bussonnier <[email protected]> Matthias BUSSONNIER
<[email protected]>
-Matthias Bussonnier <[email protected]> Bussonnier Matthias
<[email protected]>
-Matthias Bussonnier <[email protected]> Matthias BUSSONNIER
<[email protected]>
-Matthias Bussonnier <[email protected]> Matthias Bussonnier
<carreau@Aspire.(none)>
-Michael Droettboom <[email protected]> Michael Droettboom <[email protected]>
-Nicholas Bollweg <[email protected]> Nicholas Bollweg (Nick)
<[email protected]>
-Nicolas Rougier <[email protected]> <[email protected]>
-Nikolay Koldunov <[email protected]> Nikolay Koldunov
<[email protected]>
-Omar Andrés Zapata Mesa <[email protected]> Omar Andres Zapata Mesa
<[email protected]>
-Omar Andrés Zapata Mesa <[email protected]> Omar Andres Zapata Mesa
<omazapa@tuxhome>
-Pankaj Pandey <[email protected]> Pankaj Pandey <[email protected]>
-Pascal Schetelat <[email protected]> pascal-schetelat
<[email protected]>
-Paul Ivanov <[email protected]> Paul Ivanov <[email protected]>
-Pauli Virtanen <[email protected]> Pauli Virtanen <>
-Pauli Virtanen <[email protected]> Pauli Virtanen <[email protected]>
-Pierre Gerold <[email protected]> Pierre Gerold <[email protected]>
-Pietro Berkes <[email protected]> Pietro Berkes
<[email protected]>
-Piti Ongmongkolkul <[email protected]> piti118 <[email protected]>
-Prabhu Ramachandran <[email protected]> Prabhu Ramachandran <>
-Puneeth Chaganti <[email protected]> Puneeth Chaganti
<[email protected]>
-Robert Kern <[email protected]> rkern <>
-Robert Kern <[email protected]> Robert Kern <[email protected]>
-Robert Kern <[email protected]> Robert Kern <[email protected]>
-Robert Kern <[email protected]> Robert Kern <>
-Robert Marchman <[email protected]> Robert Marchman
<[email protected]>
-Satrajit Ghosh <[email protected]> Satrajit Ghosh <[email protected]>
-Satrajit Ghosh <[email protected]> Satrajit Ghosh <[email protected]>
-Scott Sanderson <[email protected]> Scott Sanderson
<[email protected]>
-smithj1 <[email protected]> smithj1 <[email protected]>
-smithj1 <[email protected]> smithj1 <[email protected]>
-Steven Johnson <[email protected]> stevenJohnson
<[email protected]>
-Steven Silvester <[email protected]> blink1073
<[email protected]>
-S. Weber <[email protected]> s8weber <[email protected]>
-Stefan van der Walt <[email protected]> Stefan van der Walt <[email protected]>
-Silvia Vinyes <[email protected]> Silvia <silvia@silvia-U44SG.(none)>
-Silvia Vinyes <[email protected]> silviav12 <[email protected]>
-Sylvain Corlay <[email protected]> <[email protected]>
-Sylvain Corlay <[email protected]> sylvain.corlay
<[email protected]>
-Ted Drain <[email protected]> TD22057 <[email protected]>
-Théophile Studer <[email protected]> Théophile Studer
<[email protected]>
-Thomas Kluyver <[email protected]> Thomas <[email protected]>
-Thomas Spura <[email protected]> Thomas Spura <[email protected]>
-Timo Paulssen <[email protected]> timo
<[email protected]>
-vds <vds@VIVIAN> vds2212 <vds2212@VIVIAN>
-vds <vds@VIVIAN> vds <vds@vivian>
-Ville M. Vainio <[email protected]> <vivainio2@WN-W0941>
-Ville M. Vainio <[email protected]> ville <ville@VILLE-PC>
-Ville M. Vainio <[email protected]> ville <ville@ville-desktop>
-Ville M. Vainio <[email protected]> vivainio <>
-Ville M. Vainio <[email protected]> Ville M. Vainio <vivainio@villev>
-Ville M. Vainio <[email protected]> Ville M. Vainio <vivainio@ville_vmw>
-Walter Doerwald <[email protected]> walter.doerwald <>
-Walter Doerwald <[email protected]> Walter Doerwald <>
-W. Trevor King <[email protected]> W. Trevor King <[email protected]>
-Yoval P. <[email protected]> y-p <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/.travis.yml
new/ipykernel-5.2.0/.travis.yml
--- old/ipykernel-5.1.4/.travis.yml 2019-12-10 14:00:44.000000000 +0100
+++ new/ipykernel-5.2.0/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,47 +0,0 @@
-language: python
-python:
- - "nightly"
- - 3.8
- - 3.7
- - 3.6
- - 3.5
-sudo: false
-dist: xenial
-install:
- - |
- # pip install
- pip install --upgrade setuptools pip
- pip install --pre --upgrade --upgrade-strategy=eager .[test] codecov
- - |
- # install matplotlib
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then
- pip install matplotlib curio trio
- fi
- - |
- # pin tornado
- if [[ ! -z "$TORNADO" ]]; then
- pip install tornado=="$TORNADO"
- fi
- - |
- # pin IPython
- if [[ ! -z "$IPYTHON" ]]; then
- if [[ "$IPYTHON" == "master" ]]; then
- SPEC=git+https://github.com/ipython/ipython#egg=ipython
- else
- SPEC="ipython==$IPYTHON"
- fi
- pip install --upgrade --pre "$SPEC"
- fi
- - pip freeze
-script:
- - jupyter kernelspec list
- - pytest --cov ipykernel --durations 10 -v ipykernel
-after_success:
- - codecov
-matrix:
- include:
- - python: 3.6
- env:
- - IPYTHON=master
- allow_failures:
- - python: "nightly"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/PKG-INFO new/ipykernel-5.2.0/PKG-INFO
--- old/ipykernel-5.1.4/PKG-INFO 2020-01-27 11:37:26.000000000 +0100
+++ new/ipykernel-5.2.0/PKG-INFO 2020-03-21 21:59:41.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: ipykernel
-Version: 5.1.4
+Version: 5.2.0
Summary: IPython Kernel for Jupyter
Home-page: https://ipython.org
Author: IPython Development Team
@@ -17,5 +17,5 @@
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
-Requires-Python: >=3.4
+Requires-Python: >=3.5
Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/appveyor.yml
new/ipykernel-5.2.0/appveyor.yml
--- old/ipykernel-5.1.4/appveyor.yml 2018-09-14 10:31:39.000000000 +0200
+++ new/ipykernel-5.2.0/appveyor.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,33 +0,0 @@
-build: false
-shallow_clone: false
-skip_branch_with_pr: true
-clone_depth: 1
-
-environment:
-
- matrix:
- - python: "C:/Python36-x64"
- - python: "C:/Python36"
-
-cache:
- - C:\Users\appveyor\AppData\Local\pip\Cache
-
-init:
- - cmd: set PATH=%python%;%python%\scripts;%PATH%
-install:
- - cmd: |
- python -m pip install --upgrade setuptools pip wheel
- pip --version
- - cmd: |
- pip install --pre -e .
- pip install ipykernel[test]
- - cmd: |
- pip install matplotlib numpy
- pip freeze
- - cmd: python -c "import ipykernel.kernelspec;
ipykernel.kernelspec.install(user=True)"
-test_script:
- - cmd: pytest -v --cov ipykernel ipykernel
-
-on_success:
- - cmd: pip install codecov
- - cmd: codecov
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/docs/changelog.rst
new/ipykernel-5.2.0/docs/changelog.rst
--- old/ipykernel-5.1.4/docs/changelog.rst 2020-01-27 11:36:40.000000000
+0100
+++ new/ipykernel-5.2.0/docs/changelog.rst 2020-03-21 21:58:48.000000000
+0100
@@ -1,6 +1,21 @@
Changes in IPython kernel
=========================
+5.2
+---
+
+5.2.0
+*****
+
+5.2.0 Includes several bugfixes and internal logic improvements.
+
+- Produce better traceback when kernel is interrupted (:ghpull:`491`)
+- Add ``InProcessKernelClient.control_channel`` for compatibility with
jupyter-client v6.0.0 (:ghpull:`489`)
+- Drop support for Python 3.4 (:ghpull:`483`)
+- Work around issue related to Tornado with python3.8 on Windows
(:ghpull:`480`, :ghpull:`481`)
+- Prevent entering event loop if it is None (:ghpull:`464`)
+- Use ``shell.input_transformer_manager`` when available (:ghpull:`411`)
+
5.1
---
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ipykernel-5.1.4/examples/Embedding/inprocess_qtconsole.py
new/ipykernel-5.2.0/examples/Embedding/inprocess_qtconsole.py
--- old/ipykernel-5.1.4/examples/Embedding/inprocess_qtconsole.py
2015-04-09 10:09:32.000000000 +0200
+++ new/ipykernel-5.2.0/examples/Embedding/inprocess_qtconsole.py
1970-01-01 01:00:00.000000000 +0100
@@ -1,46 +0,0 @@
-from __future__ import print_function
-import os
-
-from IPython.qt.console.rich_ipython_widget import RichIPythonWidget
-from IPython.qt.inprocess import QtInProcessKernelManager
-from IPython.lib import guisupport
-
-
-def print_process_id():
- print('Process ID is:', os.getpid())
-
-
-def main():
- # Print the ID of the main process
- print_process_id()
-
- app = guisupport.get_app_qt4()
-
- # Create an in-process kernel
- # >>> print_process_id()
- # will print the same process ID as the main process
- kernel_manager = QtInProcessKernelManager()
- kernel_manager.start_kernel()
- kernel = kernel_manager.kernel
- kernel.gui = 'qt4'
- kernel.shell.push({'foo': 43, 'print_process_id': print_process_id})
-
- kernel_client = kernel_manager.client()
- kernel_client.start_channels()
-
- def stop():
- kernel_client.stop_channels()
- kernel_manager.shutdown_kernel()
- app.exit()
-
- control = RichIPythonWidget()
- control.kernel_manager = kernel_manager
- control.kernel_client = kernel_client
- control.exit_requested.connect(stop)
- control.show()
-
- guisupport.start_event_loop_qt4(app)
-
-
-if __name__ == '__main__':
- main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ipykernel-5.1.4/examples/Embedding/inprocess_terminal.py
new/ipykernel-5.2.0/examples/Embedding/inprocess_terminal.py
--- old/ipykernel-5.1.4/examples/Embedding/inprocess_terminal.py
2015-04-09 10:09:32.000000000 +0200
+++ new/ipykernel-5.2.0/examples/Embedding/inprocess_terminal.py
1970-01-01 01:00:00.000000000 +0100
@@ -1,31 +0,0 @@
-from __future__ import print_function
-import os
-
-from IPython.kernel.inprocess import InProcessKernelManager
-from IPython.terminal.console.interactiveshell import
ZMQTerminalInteractiveShell
-
-
-def print_process_id():
- print('Process ID is:', os.getpid())
-
-
-def main():
- print_process_id()
-
- # Create an in-process kernel
- # >>> print_process_id()
- # will print the same process ID as the main process
- kernel_manager = InProcessKernelManager()
- kernel_manager.start_kernel()
- kernel = kernel_manager.kernel
- kernel.gui = 'qt4'
- kernel.shell.push({'foo': 43, 'print_process_id': print_process_id})
- client = kernel_manager.client()
- client.start_channels()
-
- shell = ZMQTerminalInteractiveShell(manager=kernel_manager, client=client)
- shell.mainloop()
-
-
-if __name__ == '__main__':
- main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ipykernel-5.1.4/examples/Embedding/internal_ipkernel.py
new/ipykernel-5.2.0/examples/Embedding/internal_ipkernel.py
--- old/ipykernel-5.1.4/examples/Embedding/internal_ipkernel.py 2015-09-22
09:39:51.000000000 +0200
+++ new/ipykernel-5.2.0/examples/Embedding/internal_ipkernel.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,55 +0,0 @@
-#-----------------------------------------------------------------------------
-# Imports
-#-----------------------------------------------------------------------------
-
-import sys
-
-from IPython.lib.kernel import connect_qtconsole
-from IPython.kernel.zmq.kernelapp import IPKernelApp
-
-#-----------------------------------------------------------------------------
-# Functions and classes
-#-----------------------------------------------------------------------------
-def mpl_kernel(gui):
- """Launch and return an IPython kernel with matplotlib support for the
desired gui
- """
- kernel = IPKernelApp.instance()
- kernel.initialize(['python', '--matplotlib=%s' % gui,
- #'--log-level=10'
- ])
- return kernel
-
-
-class InternalIPKernel(object):
-
- def init_ipkernel(self, backend):
- # Start IPython kernel with GUI event loop and mpl support
- self.ipkernel = mpl_kernel(backend)
- # To create and track active qt consoles
- self.consoles = []
-
- # This application will also act on the shell user namespace
- self.namespace = self.ipkernel.shell.user_ns
-
- # Example: a variable that will be seen by the user in the shell, and
- # that the GUI modifies (the 'Counter++' button increments it):
- self.namespace['app_counter'] = 0
- #self.namespace['ipkernel'] = self.ipkernel # dbg
-
- def print_namespace(self, evt=None):
- print("\n***Variables in User namespace***")
- for k, v in self.namespace.items():
- if not k.startswith('_'):
- print('%s -> %r' % (k, v))
- sys.stdout.flush()
-
- def new_qt_console(self, evt=None):
- """start a new qtconsole connected to our kernel"""
- return connect_qtconsole(self.ipkernel.abs_connection_file,
profile=self.ipkernel.profile)
-
- def count(self, evt=None):
- self.namespace['app_counter'] += 1
-
- def cleanup_consoles(self, evt=None):
- for c in self.consoles:
- c.kill()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/examples/Embedding/ipkernel_qtapp.py
new/ipykernel-5.2.0/examples/Embedding/ipkernel_qtapp.py
--- old/ipykernel-5.1.4/examples/Embedding/ipkernel_qtapp.py 2015-04-09
10:09:32.000000000 +0200
+++ new/ipykernel-5.2.0/examples/Embedding/ipkernel_qtapp.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,75 +0,0 @@
-#!/usr/bin/env python
-"""Example integrating an IPython kernel into a GUI App.
-
-This trivial GUI application internally starts an IPython kernel, to which Qt
-consoles can be connected either by the user at the command line or started
-from the GUI itself, via a button. The GUI can also manipulate one variable in
-the kernel's namespace, and print the namespace to the console.
-
-Play with it by running the script and then opening one or more consoles, and
-pushing the 'Counter++' and 'Namespace' buttons.
-
-Upon exit, it should automatically close all consoles opened from the GUI.
-
-Consoles attached separately from a terminal will not be terminated, though
-they will notice that their kernel died.
-"""
-#-----------------------------------------------------------------------------
-# Imports
-#-----------------------------------------------------------------------------
-
-from PyQt4 import Qt
-
-from internal_ipkernel import InternalIPKernel
-
-#-----------------------------------------------------------------------------
-# Functions and classes
-#-----------------------------------------------------------------------------
-class SimpleWindow(Qt.QWidget, InternalIPKernel):
-
- def __init__(self, app):
- Qt.QWidget.__init__(self)
- self.app = app
- self.add_widgets()
- self.init_ipkernel('qt')
-
- def add_widgets(self):
- self.setGeometry(300, 300, 400, 70)
- self.setWindowTitle('IPython in your app')
-
- # Add simple buttons:
- console = Qt.QPushButton('Qt Console', self)
- console.setGeometry(10, 10, 100, 35)
- self.connect(console, Qt.SIGNAL('clicked()'), self.new_qt_console)
-
- namespace = Qt.QPushButton('Namespace', self)
- namespace.setGeometry(120, 10, 100, 35)
- self.connect(namespace, Qt.SIGNAL('clicked()'), self.print_namespace)
-
- count = Qt.QPushButton('Count++', self)
- count.setGeometry(230, 10, 80, 35)
- self.connect(count, Qt.SIGNAL('clicked()'), self.count)
-
- # Quit and cleanup
- quit = Qt.QPushButton('Quit', self)
- quit.setGeometry(320, 10, 60, 35)
- self.connect(quit, Qt.SIGNAL('clicked()'), Qt.qApp, Qt.SLOT('quit()'))
-
- self.app.connect(self.app, Qt.SIGNAL("lastWindowClosed()"),
- self.app, Qt.SLOT("quit()"))
-
- self.app.aboutToQuit.connect(self.cleanup_consoles)
-
-#-----------------------------------------------------------------------------
-# Main script
-#-----------------------------------------------------------------------------
-
-if __name__ == "__main__":
- app = Qt.QApplication([])
- # Create our window
- win = SimpleWindow(app)
- win.show()
-
- # Very important, IPython-specific step: this gets GUI event loop
- # integration going, and it replaces calling app.exec_()
- win.ipkernel.start()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/examples/Embedding/ipkernel_wxapp.py
new/ipykernel-5.2.0/examples/Embedding/ipkernel_wxapp.py
--- old/ipykernel-5.1.4/examples/Embedding/ipkernel_wxapp.py 2015-04-09
10:09:32.000000000 +0200
+++ new/ipykernel-5.2.0/examples/Embedding/ipkernel_wxapp.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,119 +0,0 @@
-#!/usr/bin/env python
-"""Example integrating an IPython kernel into a GUI App.
-
-This trivial GUI application internally starts an IPython kernel, to which Qt
-consoles can be connected either by the user at the command line or started
-from the GUI itself, via a button. The GUI can also manipulate one variable in
-the kernel's namespace, and print the namespace to the console.
-
-Play with it by running the script and then opening one or more consoles, and
-pushing the 'Counter++' and 'Namespace' buttons.
-
-Upon exit, it should automatically close all consoles opened from the GUI.
-
-Consoles attached separately from a terminal will not be terminated, though
-they will notice that their kernel died.
-
-Ref: Modified from wxPython source code wxPython/samples/simple/simple.py
-"""
-#-----------------------------------------------------------------------------
-# Imports
-#-----------------------------------------------------------------------------
-import sys
-
-import wx
-
-from internal_ipkernel import InternalIPKernel
-
-#-----------------------------------------------------------------------------
-# Functions and classes
-#-----------------------------------------------------------------------------
-
-class MyFrame(wx.Frame, InternalIPKernel):
- """
- This is MyFrame. It just shows a few controls on a wxPanel,
- and has a simple menu.
- """
-
- def __init__(self, parent, title):
- wx.Frame.__init__(self, parent, -1, title,
- pos=(150, 150), size=(350, 285))
-
- # Create the menubar
- menuBar = wx.MenuBar()
-
- # and a menu
- menu = wx.Menu()
-
- # add an item to the menu, using \tKeyName automatically
- # creates an accelerator, the third param is some help text
- # that will show up in the statusbar
- menu.Append(wx.ID_EXIT, "E&xit\tAlt-X", "Exit this simple sample")
-
- # bind the menu event to an event handler
- self.Bind(wx.EVT_MENU, self.OnTimeToClose, id=wx.ID_EXIT)
-
- # and put the menu on the menubar
- menuBar.Append(menu, "&File")
- self.SetMenuBar(menuBar)
-
- self.CreateStatusBar()
-
- # Now create the Panel to put the other controls on.
- panel = wx.Panel(self)
-
- # and a few controls
- text = wx.StaticText(panel, -1, "Hello World!")
- text.SetFont(wx.Font(14, wx.SWISS, wx.NORMAL, wx.BOLD))
- text.SetSize(text.GetBestSize())
- qtconsole_btn = wx.Button(panel, -1, "Qt Console")
- ns_btn = wx.Button(panel, -1, "Namespace")
- count_btn = wx.Button(panel, -1, "Count++")
- close_btn = wx.Button(panel, -1, "Quit")
-
- # bind the button events to handlers
- self.Bind(wx.EVT_BUTTON, self.new_qt_console, qtconsole_btn)
- self.Bind(wx.EVT_BUTTON, self.print_namespace, ns_btn)
- self.Bind(wx.EVT_BUTTON, self.count, count_btn)
- self.Bind(wx.EVT_BUTTON, self.OnTimeToClose, close_btn)
-
- # Use a sizer to layout the controls, stacked vertically and with
- # a 10 pixel border around each
- sizer = wx.BoxSizer(wx.VERTICAL)
- for ctrl in [text, qtconsole_btn, ns_btn, count_btn, close_btn]:
- sizer.Add(ctrl, 0, wx.ALL, 10)
- panel.SetSizer(sizer)
- panel.Layout()
-
- # Start the IPython kernel with gui support
- self.init_ipkernel('wx')
-
- def OnTimeToClose(self, evt):
- """Event handler for the button click."""
- print("See ya later!")
- sys.stdout.flush()
- self.cleanup_consoles(evt)
- self.Close()
- # Not sure why, but our IPython kernel seems to prevent normal WX
- # shutdown, so an explicit exit() call is needed.
- sys.exit()
-
-
-class MyApp(wx.App):
- def OnInit(self):
- frame = MyFrame(None, "Simple wxPython App")
- self.SetTopWindow(frame)
- frame.Show(True)
- self.ipkernel = frame.ipkernel
- return True
-
-#-----------------------------------------------------------------------------
-# Main script
-#-----------------------------------------------------------------------------
-
-if __name__ == '__main__':
- app = MyApp(redirect=False, clearSigInt=False)
-
- # Very important, IPython-specific step: this gets GUI event loop
- # integration going, and it replaces calling app.MainLoop()
- app.ipkernel.start()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ipykernel-5.1.4/examples/embedding/inprocess_qtconsole.py
new/ipykernel-5.2.0/examples/embedding/inprocess_qtconsole.py
--- old/ipykernel-5.1.4/examples/embedding/inprocess_qtconsole.py
1970-01-01 01:00:00.000000000 +0100
+++ new/ipykernel-5.2.0/examples/embedding/inprocess_qtconsole.py
2020-03-21 21:58:30.000000000 +0100
@@ -0,0 +1,75 @@
+from __future__ import print_function
+import os
+import sys
+
+from qtconsole.rich_ipython_widget import RichIPythonWidget
+from qtconsole.inprocess import QtInProcessKernelManager
+from IPython.lib import guisupport
+
+
+def print_process_id():
+ print('Process ID is:', os.getpid())
+
+
+def init_asyncio_patch():
+ """set default asyncio policy to be compatible with tornado
+ Tornado 6 (at least) is not compatible with the default
+ asyncio implementation on Windows
+ Pick the older SelectorEventLoopPolicy on Windows
+ if the known-incompatible default policy is in use.
+ do this as early as possible to make it a low priority and overrideable
+ ref: https://github.com/tornadoweb/tornado/issues/2608
+ FIXME: if/when tornado supports the defaults in asyncio,
+ remove and bump tornado requirement for py38
+ """
+ if sys.platform.startswith("win") and sys.version_info >= (3, 8):
+ import asyncio
+ try:
+ from asyncio import (
+ WindowsProactorEventLoopPolicy,
+ WindowsSelectorEventLoopPolicy,
+ )
+ except ImportError:
+ pass
+ # not affected
+ else:
+ if type(asyncio.get_event_loop_policy()) is
WindowsProactorEventLoopPolicy:
+ # WindowsProactorEventLoopPolicy is not compatible with
tornado 6
+ # fallback to the pre-3.8 default of Selector
+ asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())
+
+def main():
+ # Print the ID of the main process
+ print_process_id()
+
+ init_asyncio_patch()
+ app = guisupport.get_app_qt4()
+
+ # Create an in-process kernel
+ # >>> print_process_id()
+ # will print the same process ID as the main process
+ kernel_manager = QtInProcessKernelManager()
+ kernel_manager.start_kernel()
+ kernel = kernel_manager.kernel
+ kernel.gui = 'qt4'
+ kernel.shell.push({'foo': 43, 'print_process_id': print_process_id})
+
+ kernel_client = kernel_manager.client()
+ kernel_client.start_channels()
+
+ def stop():
+ kernel_client.stop_channels()
+ kernel_manager.shutdown_kernel()
+ app.exit()
+
+ control = RichIPythonWidget()
+ control.kernel_manager = kernel_manager
+ control.kernel_client = kernel_client
+ control.exit_requested.connect(stop)
+ control.show()
+
+ guisupport.start_event_loop_qt4(app)
+
+
+if __name__ == '__main__':
+ main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ipykernel-5.1.4/examples/embedding/inprocess_terminal.py
new/ipykernel-5.2.0/examples/embedding/inprocess_terminal.py
--- old/ipykernel-5.1.4/examples/embedding/inprocess_terminal.py
1970-01-01 01:00:00.000000000 +0100
+++ new/ipykernel-5.2.0/examples/embedding/inprocess_terminal.py
2020-03-21 21:58:30.000000000 +0100
@@ -0,0 +1,61 @@
+from __future__ import print_function
+import os
+import sys
+
+from ipykernel.inprocess import InProcessKernelManager
+from jupyter_console.ptshell import ZMQTerminalInteractiveShell
+
+
+def print_process_id():
+ print('Process ID is:', os.getpid())
+
+
+def init_asyncio_patch():
+ """set default asyncio policy to be compatible with tornado
+ Tornado 6 (at least) is not compatible with the default
+ asyncio implementation on Windows
+ Pick the older SelectorEventLoopPolicy on Windows
+ if the known-incompatible default policy is in use.
+ do this as early as possible to make it a low priority and overrideable
+ ref: https://github.com/tornadoweb/tornado/issues/2608
+ FIXME: if/when tornado supports the defaults in asyncio,
+ remove and bump tornado requirement for py38
+ """
+ if sys.platform.startswith("win") and sys.version_info >= (3, 8):
+ import asyncio
+ try:
+ from asyncio import (
+ WindowsProactorEventLoopPolicy,
+ WindowsSelectorEventLoopPolicy,
+ )
+ except ImportError:
+ pass
+ # not affected
+ else:
+ if type(asyncio.get_event_loop_policy()) is
WindowsProactorEventLoopPolicy:
+ # WindowsProactorEventLoopPolicy is not compatible with
tornado 6
+ # fallback to the pre-3.8 default of Selector
+ asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())
+
+
+def main():
+ print_process_id()
+
+ # Create an in-process kernel
+ # >>> print_process_id()
+ # will print the same process ID as the main process
+ init_asyncio_patch()
+ kernel_manager = InProcessKernelManager()
+ kernel_manager.start_kernel()
+ kernel = kernel_manager.kernel
+ kernel.gui = 'qt4'
+ kernel.shell.push({'foo': 43, 'print_process_id': print_process_id})
+ client = kernel_manager.client()
+ client.start_channels()
+
+ shell = ZMQTerminalInteractiveShell(manager=kernel_manager, client=client)
+ shell.mainloop()
+
+
+if __name__ == '__main__':
+ main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ipykernel-5.1.4/examples/embedding/internal_ipkernel.py
new/ipykernel-5.2.0/examples/embedding/internal_ipkernel.py
--- old/ipykernel-5.1.4/examples/embedding/internal_ipkernel.py 1970-01-01
01:00:00.000000000 +0100
+++ new/ipykernel-5.2.0/examples/embedding/internal_ipkernel.py 2020-03-21
21:58:30.000000000 +0100
@@ -0,0 +1,55 @@
+#-----------------------------------------------------------------------------
+# Imports
+#-----------------------------------------------------------------------------
+
+import sys
+
+from IPython.lib.kernel import connect_qtconsole
+from ipykernel.kernelapp import IPKernelApp
+
+#-----------------------------------------------------------------------------
+# Functions and classes
+#-----------------------------------------------------------------------------
+def mpl_kernel(gui):
+ """Launch and return an IPython kernel with matplotlib support for the
desired gui
+ """
+ kernel = IPKernelApp.instance()
+ kernel.initialize(['python', '--matplotlib=%s' % gui,
+ #'--log-level=10'
+ ])
+ return kernel
+
+
+class InternalIPKernel(object):
+
+ def init_ipkernel(self, backend):
+ # Start IPython kernel with GUI event loop and mpl support
+ self.ipkernel = mpl_kernel(backend)
+ # To create and track active qt consoles
+ self.consoles = []
+
+ # This application will also act on the shell user namespace
+ self.namespace = self.ipkernel.shell.user_ns
+
+ # Example: a variable that will be seen by the user in the shell, and
+ # that the GUI modifies (the 'Counter++' button increments it):
+ self.namespace['app_counter'] = 0
+ #self.namespace['ipkernel'] = self.ipkernel # dbg
+
+ def print_namespace(self, evt=None):
+ print("\n***Variables in User namespace***")
+ for k, v in self.namespace.items():
+ if not k.startswith('_'):
+ print('%s -> %r' % (k, v))
+ sys.stdout.flush()
+
+ def new_qt_console(self, evt=None):
+ """start a new qtconsole connected to our kernel"""
+ return connect_qtconsole(self.ipkernel.abs_connection_file,
profile=self.ipkernel.profile)
+
+ def count(self, evt=None):
+ self.namespace['app_counter'] += 1
+
+ def cleanup_consoles(self, evt=None):
+ for c in self.consoles:
+ c.kill()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/examples/embedding/ipkernel_qtapp.py
new/ipykernel-5.2.0/examples/embedding/ipkernel_qtapp.py
--- old/ipykernel-5.1.4/examples/embedding/ipkernel_qtapp.py 1970-01-01
01:00:00.000000000 +0100
+++ new/ipykernel-5.2.0/examples/embedding/ipkernel_qtapp.py 2019-12-06
18:57:22.000000000 +0100
@@ -0,0 +1,75 @@
+#!/usr/bin/env python
+"""Example integrating an IPython kernel into a GUI App.
+
+This trivial GUI application internally starts an IPython kernel, to which Qt
+consoles can be connected either by the user at the command line or started
+from the GUI itself, via a button. The GUI can also manipulate one variable in
+the kernel's namespace, and print the namespace to the console.
+
+Play with it by running the script and then opening one or more consoles, and
+pushing the 'Counter++' and 'Namespace' buttons.
+
+Upon exit, it should automatically close all consoles opened from the GUI.
+
+Consoles attached separately from a terminal will not be terminated, though
+they will notice that their kernel died.
+"""
+#-----------------------------------------------------------------------------
+# Imports
+#-----------------------------------------------------------------------------
+
+from PyQt4 import Qt
+
+from internal_ipkernel import InternalIPKernel
+
+#-----------------------------------------------------------------------------
+# Functions and classes
+#-----------------------------------------------------------------------------
+class SimpleWindow(Qt.QWidget, InternalIPKernel):
+
+ def __init__(self, app):
+ Qt.QWidget.__init__(self)
+ self.app = app
+ self.add_widgets()
+ self.init_ipkernel('qt')
+
+ def add_widgets(self):
+ self.setGeometry(300, 300, 400, 70)
+ self.setWindowTitle('IPython in your app')
+
+ # Add simple buttons:
+ console = Qt.QPushButton('Qt Console', self)
+ console.setGeometry(10, 10, 100, 35)
+ self.connect(console, Qt.SIGNAL('clicked()'), self.new_qt_console)
+
+ namespace = Qt.QPushButton('Namespace', self)
+ namespace.setGeometry(120, 10, 100, 35)
+ self.connect(namespace, Qt.SIGNAL('clicked()'), self.print_namespace)
+
+ count = Qt.QPushButton('Count++', self)
+ count.setGeometry(230, 10, 80, 35)
+ self.connect(count, Qt.SIGNAL('clicked()'), self.count)
+
+ # Quit and cleanup
+ quit = Qt.QPushButton('Quit', self)
+ quit.setGeometry(320, 10, 60, 35)
+ self.connect(quit, Qt.SIGNAL('clicked()'), Qt.qApp, Qt.SLOT('quit()'))
+
+ self.app.connect(self.app, Qt.SIGNAL("lastWindowClosed()"),
+ self.app, Qt.SLOT("quit()"))
+
+ self.app.aboutToQuit.connect(self.cleanup_consoles)
+
+#-----------------------------------------------------------------------------
+# Main script
+#-----------------------------------------------------------------------------
+
+if __name__ == "__main__":
+ app = Qt.QApplication([])
+ # Create our window
+ win = SimpleWindow(app)
+ win.show()
+
+ # Very important, IPython-specific step: this gets GUI event loop
+ # integration going, and it replaces calling app.exec_()
+ win.ipkernel.start()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/examples/embedding/ipkernel_wxapp.py
new/ipykernel-5.2.0/examples/embedding/ipkernel_wxapp.py
--- old/ipykernel-5.1.4/examples/embedding/ipkernel_wxapp.py 1970-01-01
01:00:00.000000000 +0100
+++ new/ipykernel-5.2.0/examples/embedding/ipkernel_wxapp.py 2019-12-06
18:57:22.000000000 +0100
@@ -0,0 +1,119 @@
+#!/usr/bin/env python
+"""Example integrating an IPython kernel into a GUI App.
+
+This trivial GUI application internally starts an IPython kernel, to which Qt
+consoles can be connected either by the user at the command line or started
+from the GUI itself, via a button. The GUI can also manipulate one variable in
+the kernel's namespace, and print the namespace to the console.
+
+Play with it by running the script and then opening one or more consoles, and
+pushing the 'Counter++' and 'Namespace' buttons.
+
+Upon exit, it should automatically close all consoles opened from the GUI.
+
+Consoles attached separately from a terminal will not be terminated, though
+they will notice that their kernel died.
+
+Ref: Modified from wxPython source code wxPython/samples/simple/simple.py
+"""
+#-----------------------------------------------------------------------------
+# Imports
+#-----------------------------------------------------------------------------
+import sys
+
+import wx
+
+from internal_ipkernel import InternalIPKernel
+
+#-----------------------------------------------------------------------------
+# Functions and classes
+#-----------------------------------------------------------------------------
+
+class MyFrame(wx.Frame, InternalIPKernel):
+ """
+ This is MyFrame. It just shows a few controls on a wxPanel,
+ and has a simple menu.
+ """
+
+ def __init__(self, parent, title):
+ wx.Frame.__init__(self, parent, -1, title,
+ pos=(150, 150), size=(350, 285))
+
+ # Create the menubar
+ menuBar = wx.MenuBar()
+
+ # and a menu
+ menu = wx.Menu()
+
+ # add an item to the menu, using \tKeyName automatically
+ # creates an accelerator, the third param is some help text
+ # that will show up in the statusbar
+ menu.Append(wx.ID_EXIT, "E&xit\tAlt-X", "Exit this simple sample")
+
+ # bind the menu event to an event handler
+ self.Bind(wx.EVT_MENU, self.OnTimeToClose, id=wx.ID_EXIT)
+
+ # and put the menu on the menubar
+ menuBar.Append(menu, "&File")
+ self.SetMenuBar(menuBar)
+
+ self.CreateStatusBar()
+
+ # Now create the Panel to put the other controls on.
+ panel = wx.Panel(self)
+
+ # and a few controls
+ text = wx.StaticText(panel, -1, "Hello World!")
+ text.SetFont(wx.Font(14, wx.SWISS, wx.NORMAL, wx.BOLD))
+ text.SetSize(text.GetBestSize())
+ qtconsole_btn = wx.Button(panel, -1, "Qt Console")
+ ns_btn = wx.Button(panel, -1, "Namespace")
+ count_btn = wx.Button(panel, -1, "Count++")
+ close_btn = wx.Button(panel, -1, "Quit")
+
+ # bind the button events to handlers
+ self.Bind(wx.EVT_BUTTON, self.new_qt_console, qtconsole_btn)
+ self.Bind(wx.EVT_BUTTON, self.print_namespace, ns_btn)
+ self.Bind(wx.EVT_BUTTON, self.count, count_btn)
+ self.Bind(wx.EVT_BUTTON, self.OnTimeToClose, close_btn)
+
+ # Use a sizer to layout the controls, stacked vertically and with
+ # a 10 pixel border around each
+ sizer = wx.BoxSizer(wx.VERTICAL)
+ for ctrl in [text, qtconsole_btn, ns_btn, count_btn, close_btn]:
+ sizer.Add(ctrl, 0, wx.ALL, 10)
+ panel.SetSizer(sizer)
+ panel.Layout()
+
+ # Start the IPython kernel with gui support
+ self.init_ipkernel('wx')
+
+ def OnTimeToClose(self, evt):
+ """Event handler for the button click."""
+ print("See ya later!")
+ sys.stdout.flush()
+ self.cleanup_consoles(evt)
+ self.Close()
+ # Not sure why, but our IPython kernel seems to prevent normal WX
+ # shutdown, so an explicit exit() call is needed.
+ sys.exit()
+
+
+class MyApp(wx.App):
+ def OnInit(self):
+ frame = MyFrame(None, "Simple wxPython App")
+ self.SetTopWindow(frame)
+ frame.Show(True)
+ self.ipkernel = frame.ipkernel
+ return True
+
+#-----------------------------------------------------------------------------
+# Main script
+#-----------------------------------------------------------------------------
+
+if __name__ == '__main__':
+ app = MyApp(redirect=False, clearSigInt=False)
+
+ # Very important, IPython-specific step: this gets GUI event loop
+ # integration going, and it replaces calling app.MainLoop()
+ app.ipkernel.start()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/ipykernel/_version.py
new/ipykernel-5.2.0/ipykernel/_version.py
--- old/ipykernel-5.1.4/ipykernel/_version.py 2020-01-27 11:33:05.000000000
+0100
+++ new/ipykernel-5.2.0/ipykernel/_version.py 2020-03-21 21:59:05.000000000
+0100
@@ -1,4 +1,4 @@
-version_info = (5, 1, 4)
+version_info = (5, 2, 0)
__version__ = '.'.join(map(str, version_info[:3]))
# pep440 is annoying, beta/alpha/rc should _not_ have dots or pip/setuptools
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/ipykernel/inprocess/client.py
new/ipykernel-5.2.0/ipykernel/inprocess/client.py
--- old/ipykernel-5.1.4/ipykernel/inprocess/client.py 2019-09-19
19:30:37.000000000 +0200
+++ new/ipykernel-5.2.0/ipykernel/inprocess/client.py 2020-03-21
21:58:30.000000000 +0100
@@ -41,6 +41,7 @@
shell_channel_class = Type(InProcessChannel)
iopub_channel_class = Type(InProcessChannel)
stdin_channel_class = Type(InProcessChannel)
+ control_channel_class = Type(InProcessChannel)
hb_channel_class = Type(InProcessHBChannel)
kernel = Instance('ipykernel.inprocess.ipkernel.InProcessKernel',
@@ -83,6 +84,12 @@
return self._stdin_channel
@property
+ def control_channel(self):
+ if self._control_channel is None:
+ self._control_channel = self.control_channel_class(self)
+ return self._control_channel
+
+ @property
def hb_channel(self):
if self._hb_channel is None:
self._hb_channel = self.hb_channel_class(self)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ipykernel-5.1.4/ipykernel/inprocess/tests/test_kernel.py
new/ipykernel-5.2.0/ipykernel/inprocess/tests/test_kernel.py
--- old/ipykernel-5.1.4/ipykernel/inprocess/tests/test_kernel.py
2018-09-01 09:48:16.000000000 +0200
+++ new/ipykernel-5.2.0/ipykernel/inprocess/tests/test_kernel.py
2020-03-21 21:58:30.000000000 +0100
@@ -20,9 +20,43 @@
from StringIO import StringIO
+def _init_asyncio_patch():
+ """set default asyncio policy to be compatible with tornado
+
+ Tornado 6 (at least) is not compatible with the default
+ asyncio implementation on Windows
+
+ Pick the older SelectorEventLoopPolicy on Windows
+ if the known-incompatible default policy is in use.
+
+ do this as early as possible to make it a low priority and overrideable
+
+ ref: https://github.com/tornadoweb/tornado/issues/2608
+
+ FIXME: if/when tornado supports the defaults in asyncio,
+ remove and bump tornado requirement for py38
+ """
+ if sys.platform.startswith("win") and sys.version_info >= (3, 8):
+ import asyncio
+ try:
+ from asyncio import (
+ WindowsProactorEventLoopPolicy,
+ WindowsSelectorEventLoopPolicy,
+ )
+ except ImportError:
+ pass
+ # not affected
+ else:
+ if type(asyncio.get_event_loop_policy()) is
WindowsProactorEventLoopPolicy:
+ # WindowsProactorEventLoopPolicy is not compatible with
tornado 6
+ # fallback to the pre-3.8 default of Selector
+ asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())
+
+
class InProcessKernelTestCase(unittest.TestCase):
def setUp(self):
+ _init_asyncio_patch()
self.km = InProcessKernelManager()
self.km.start_kernel()
self.kc = self.km.client()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/ipykernel/ipkernel.py
new/ipykernel-5.2.0/ipykernel/ipkernel.py
--- old/ipykernel-5.1.4/ipykernel/ipkernel.py 2019-11-12 12:58:38.000000000
+0100
+++ new/ipykernel-5.2.0/ipykernel/ipkernel.py 2020-03-21 21:58:30.000000000
+0100
@@ -451,7 +451,11 @@
return dict(status='ok', restart=restart)
def do_is_complete(self, code):
- status, indent_spaces = self.shell.input_splitter.check_complete(code)
+ transformer_manager = getattr(self.shell, 'input_transformer_manager',
None)
+ if transformer_manager is None:
+ # input_splitter attribute is deprecated
+ transformer_manager = self.shell.input_splitter
+ status, indent_spaces = transformer_manager.check_complete(code)
r = {'status': status}
if status == 'incomplete':
r['indent'] = ' ' * indent_spaces
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/ipykernel/kernelbase.py
new/ipykernel-5.2.0/ipykernel/kernelbase.py
--- old/ipykernel-5.1.4/ipykernel/kernelbase.py 2019-11-12 12:58:38.000000000
+0100
+++ new/ipykernel-5.2.0/ipykernel/kernelbase.py 2020-03-21 21:58:30.000000000
+0100
@@ -295,6 +295,10 @@
self.log.info("Entering eventloop %s", self.eventloop)
# record handle, so we can check when this changes
eventloop = self.eventloop
+ if eventloop is None:
+ self.log.info("Exiting as there is no eventloop")
+ return
+
def advance_eventloop():
# check if eventloop changed:
if self.eventloop is not eventloop:
@@ -575,7 +579,7 @@
content = parent['content']
code = content['code']
cursor_pos = content['cursor_pos']
-
+
matches = yield gen.maybe_future(self.do_complete(code, cursor_pos))
matches = json_clean(matches)
completion_msg = self.session.send(stream, 'complete_reply',
@@ -886,7 +890,7 @@
self.log.warning("Invalid Message:", exc_info=True)
except KeyboardInterrupt:
# re-raise KeyboardInterrupt, to truncate traceback
- raise KeyboardInterrupt
+ raise KeyboardInterrupt("Interrupted by user") from None
else:
break
try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/ipykernel.egg-info/PKG-INFO
new/ipykernel-5.2.0/ipykernel.egg-info/PKG-INFO
--- old/ipykernel-5.1.4/ipykernel.egg-info/PKG-INFO 2020-01-27
11:37:25.000000000 +0100
+++ new/ipykernel-5.2.0/ipykernel.egg-info/PKG-INFO 2020-03-21
21:59:41.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: ipykernel
-Version: 5.1.4
+Version: 5.2.0
Summary: IPython Kernel for Jupyter
Home-page: https://ipython.org
Author: IPython Development Team
@@ -17,5 +17,5 @@
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
-Requires-Python: >=3.4
+Requires-Python: >=3.5
Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/ipykernel.egg-info/SOURCES.txt
new/ipykernel-5.2.0/ipykernel.egg-info/SOURCES.txt
--- old/ipykernel-5.1.4/ipykernel.egg-info/SOURCES.txt 2020-01-27
11:37:26.000000000 +0100
+++ new/ipykernel-5.2.0/ipykernel.egg-info/SOURCES.txt 2020-03-21
21:59:41.000000000 +0100
@@ -1,14 +1,9 @@
-.gitignore
-.mailmap
-.travis.yml
CONTRIBUTING.md
COPYING.md
MANIFEST.in
README.md
-appveyor.yml
ipykernel_launcher.py
pyproject.toml
-readthedocs.yml
setup.cfg
setup.py
docs/Makefile
@@ -17,11 +12,11 @@
docs/index.rst
docs/make.bat
docs/requirements.txt
-examples/Embedding/inprocess_qtconsole.py
-examples/Embedding/inprocess_terminal.py
-examples/Embedding/internal_ipkernel.py
-examples/Embedding/ipkernel_qtapp.py
-examples/Embedding/ipkernel_wxapp.py
+examples/embedding/inprocess_qtconsole.py
+examples/embedding/inprocess_terminal.py
+examples/embedding/internal_ipkernel.py
+examples/embedding/ipkernel_qtapp.py
+examples/embedding/ipkernel_wxapp.py
ipykernel/__init__.py
ipykernel/__main__.py
ipykernel/_eventloop_macos.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/ipykernel.egg-info/requires.txt
new/ipykernel-5.2.0/ipykernel.egg-info/requires.txt
--- old/ipykernel-5.1.4/ipykernel.egg-info/requires.txt 2020-01-27
11:37:25.000000000 +0100
+++ new/ipykernel-5.2.0/ipykernel.egg-info/requires.txt 2020-03-21
21:59:41.000000000 +0100
@@ -7,7 +7,7 @@
appnope
[test]
-pytest
+pytest!=5.3.4
pytest-cov
flaky
nose
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/readthedocs.yml
new/ipykernel-5.2.0/readthedocs.yml
--- old/ipykernel-5.1.4/readthedocs.yml 2018-09-01 09:48:16.000000000 +0200
+++ new/ipykernel-5.2.0/readthedocs.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-python:
- version: 3.5
- pip_install: true
-requirements_file: docs/requirements.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ipykernel-5.1.4/setup.py new/ipykernel-5.2.0/setup.py
--- old/ipykernel-5.1.4/setup.py 2019-11-12 12:58:38.000000000 +0100
+++ new/ipykernel-5.2.0/setup.py 2020-03-21 21:58:30.000000000 +0100
@@ -17,8 +17,8 @@
import re
v = sys.version_info
-if v[:2] < (3, 4):
- error = "ERROR: %s requires Python version 3.4 or above." % name
+if v[:2] < (3, 5):
+ error = "ERROR: %s requires Python version 3.5 or above." % name
print(error, file=sys.stderr)
sys.exit(1)
@@ -86,7 +86,7 @@
long_description="The IPython kernel for Jupyter",
platforms="Linux, Mac OS X, Windows",
keywords=['Interactive', 'Interpreter', 'Shell', 'Web'],
- python_requires='>=3.4',
+ python_requires='>=3.5',
install_requires=[
'ipython>=5.0.0',
'traitlets>=4.1.0',
@@ -96,7 +96,7 @@
],
extras_require={
'test': [
- 'pytest',
+ 'pytest !=5.3.4',
'pytest-cov',
'flaky',
'nose', # nose because there are still a few nose.tools imports
hanging around