Hello community,
here is the log from the commit of package python-jupyter_nbconvert for openSUSE:Factory checked in at 2019-04-18 09:57:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jupyter_nbconvert (Old)
and /work/SRC/openSUSE:Factory/.python-jupyter_nbconvert.new.17052 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jupyter_nbconvert"
Thu Apr 18 09:57:11 2019 rev:11 rq:695324 version:5.4.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-jupyter_nbconvert/python-jupyter_nbconvert.changes 2018-11-20 22:45:05.190222733 +0100
+++ /work/SRC/openSUSE:Factory/.python-jupyter_nbconvert.new.17052/python-jupyter_nbconvert.changes 2019-04-18 09:57:13.613371578 +0200
@@ -1,0 +2,16 @@
+Wed Mar 13 13:51:48 CET 2019 - Matej Cepl
+
+- Update to 5.4.1:
+ - New Features
+ - Expose pygments styles
+ - Tornado 6.0 support -- Convert proxy handler from callback
+ to coroutine
+ - Add option to overwrite the highlight_code filter
+ - Fixing Problems
+ - Mathjax.tpl fix for rendering Latex in html
+ - Backwards compatbility for empty kernel names
+ - Testing, Docs, and Builds
+ - DOC: Add missing language specification to code-block
+- Switch to %pytest
+
+-------------------------------------------------------------------
Old:
----
nbconvert-5.4.0.tar.gz
New:
----
nbconvert-5.4.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-jupyter_nbconvert.spec ++++++
--- /var/tmp/diff_new_pack.gaSvgV/_old 2019-04-18 09:57:14.581372187 +0200
+++ /var/tmp/diff_new_pack.gaSvgV/_new 2019-04-18 09:57:14.581372187 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-jupyter_nbconvert
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,13 +12,13 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-jupyter_nbconvert
-Version: 5.4.0
+Version: 5.4.1
Release: 0
# May not be necessary in next version
%define doc_ver 5.4
@@ -129,8 +129,7 @@
# See https://github.com/jupyter/nbconvert/issues/898
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
$python -m ipykernel.kernelspec --user
-py.test-%{$python_bin_suffix} -v --pyargs \
- -k 'not (test_svg_handling or test_pandoc_extra_args or test_markdown2rst or test_run_notebooks)' nbconvert
+%pytest --pyargs -k 'not (test_svg_handling or test_run_notebooks)' nbconvert
}
popd
++++++ nbconvert-5.4.0.tar.gz -> nbconvert-5.4.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/MANIFEST.in new/nbconvert-5.4.1/MANIFEST.in
--- old/nbconvert-5.4.0/MANIFEST.in 2018-05-10 20:32:43.000000000 +0200
+++ new/nbconvert-5.4.1/MANIFEST.in 2019-02-08 18:22:55.000000000 +0100
@@ -14,7 +14,6 @@
# Examples
graft examples
-graft scripts
# docs subdirs we want to skip
prune docs/build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/PKG-INFO new/nbconvert-5.4.1/PKG-INFO
--- old/nbconvert-5.4.0/PKG-INFO 2018-09-06 21:11:43.000000000 +0200
+++ new/nbconvert-5.4.1/PKG-INFO 2019-02-09 07:03:11.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: nbconvert
-Version: 5.4.0
+Version: 5.4.1
Summary: Converting Jupyter Notebooks
Home-page: https://jupyter.org
Author: Jupyter Development Team
@@ -10,17 +10,89 @@
Project-URL: Funding, https://numfocus.org/
Project-URL: Source, https://github.com/jupyter/nbconvert
Project-URL: Tracker, https://github.com/jupyter/nbconvert/issues
-Description:
+Description: # nbconvert
+ ### Jupyter Notebook Conversion
- Nbconvert is a Command Line tool and Python library and API to process and
- convert Jupyter notebook into a variety of other formats.
+ [![Google Group](https://img.shields.io/badge/-Google%20Group-lightgrey.svg)](https://groups.google.com/forum/#!forum/jupyter)
+ [![Build Status](https://travis-ci.org/jupyter/nbconvert.svg?branch=master)](https://travis-ci.org/jupyter/nbconvert)
+ [![Documentation Status](https://readthedocs.org/projects/nbconvert/badge/?version=latest)](https://nbconvert.readthedocs.io/en/latest/?badge=latest)
+ [![Documentation Status](https://readthedocs.org/projects/nbconvert/badge/?version=stable)](http://nbconvert.readthedocs.io/en/stable/?badge=stable)
+ [![codecov.io](https://codecov.io/github/jupyter/nbconvert/coverage.svg?branch=master)](https://codecov.io/github/jupyter/nbconvert?branch=master)
- Using nbconvert enables:
- - presentation of information in familiar formats, such as PDF.
- - publishing of research using LaTeX and opens the door for embedding notebooks in papers.
- - collaboration with others who may not use the notebook in their work.
- - sharing contents with many people via the web using HTML.
+ The **nbconvert** tool, `jupyter nbconvert`, converts notebooks to various other
+ formats via [Jinja][] templates. The nbconvert tool allows you to convert an
+ `.ipynb` notebook file into various static formats including:
+
+ * HTML
+ * LaTeX
+ * PDF
+ * Reveal JS
+ * Markdown (md)
+ * ReStructured Text (rst)
+ * executable script
+
+
+ ## Usage
+
+ From the command line, use nbconvert to convert a Jupyter notebook (*input*) to a
+ a different format (*output*). The basic command structure is:
+
+ $ jupyter nbconvert --to <output format> <input notebook>
+
+ where `<output format>` is the desired output format and `<input notebook>` is the
+ filename of the Jupyter notebook.
+
+ ### Example: Convert a notebook to HTML
+
+ Convert Juptyer notebook file, `mynotebook.ipynb`, to HTML using:
+
+ $ jupyter nbconvert --to html mynotebook.ipynb
+
+ This command creates an HTML output file named `mynotebook.html`.
+
+ ## Dev Install
+ Check if pandoc is installed (``pandoc --version``); if needed, install:
+
+ ```
+ sudo apt-get install pandoc
+ ```
+
+ Or
+
+ ```
+ brew install pandoc
+ ```
+
+ Install nbconvert for development using:
+
+ ```
+ git clone https://github.com/jupyter/nbconvert.git
+ cd nbconvert
+ pip install -e .
+ ```
+
+ Running the tests after a dev install above:
+
+ ```
+ pip install nbconvert[test]
+ py.test --pyargs nbconvert
+ ```
+
+
+ ## Resources
+
+ - [Documentation for Jupyter nbconvert](https://nbconvert.readthedocs.io/en/latest/)
+ [[PDF](https://media.readthedocs.org/pdf/nbconvert/latest/nbconvert.pdf)]
+ - [nbconvert examples on GitHub](https://github.com/jupyter/nbconvert-examples)
+ - [Issues](https://github.com/jupyter/nbconvert/issues)
+ - [Technical support - Jupyter Google Group](https://groups.google.com/forum/#!forum/jupyter)
+ - [Project Jupyter website](https://jupyter.org)
+ - [Documentation for Project Jupyter](https://jupyter.readthedocs.io/en/latest/index.html)
+ [[PDF](https://media.readthedocs.org/pdf/jupyter/latest/jupyter.pdf)]
+
+
+ [Jinja]: http://jinja.pocoo.org/
Keywords: Interactive,Interpreter,Shell,Web
Platform: Linux
@@ -39,8 +111,8 @@
Classifier: Programming Language :: Python :: 3.7
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Description-Content-Type: text/markdown
-Provides-Extra: execute
-Provides-Extra: all
-Provides-Extra: test
-Provides-Extra: serve
Provides-Extra: docs
+Provides-Extra: serve
+Provides-Extra: test
+Provides-Extra: all
+Provides-Extra: execute
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/docs/source/changelog.rst new/nbconvert-5.4.1/docs/source/changelog.rst
--- old/nbconvert-5.4.0/docs/source/changelog.rst 2018-09-06 21:08:07.000000000 +0200
+++ new/nbconvert-5.4.1/docs/source/changelog.rst 2019-02-08 20:08:25.000000000 +0100
@@ -4,6 +4,42 @@
Changes in nbconvert
====================
+5.4.1
+-----
+`5.4.1 on Github https://github.com/jupyter/nbconvert/milestones/5.4.1`__
+
+Thanks to the following 11 authors who contributed 57 commits.
+
+* Benjamin Ragan-Kelley
+* Carol Willing
+* Clayton A Davis
+* Daniel Rodriguez
+* M Pacer
+* Matthew Seal
+* Matthias Geier
+* Matthieu Parizy
+* Rüdiger Busche
+* Thomas Kluyver
+* Tyler Makaro
+
+Comprehensive notes
+~~~~~~~~~~~~~~~~~~~
+
+New Features
+++++++++++++
+- Expose pygments styles :ghpull:`889`:
+- Tornado 6.0 support -- Convert proxy handler from callback to coroutine :ghpull:`937`:
+- Add option to overwrite the highlight_code filter :ghpull:`877`:
+
+Fixing Problems
++++++++++++++++
+- Mathjax.tpl fix for rendering Latex in html :ghpull:`932`:
+- Backwards compatbility for empty kernel names :ghpull:`927` :ghpull:`924`
+
+Testing, Docs, and Builds
++++++++++++++++++++++++++
+- DOC: Add missing language specification to code-block :ghpull:`882`:
+
5.4
---
`5.4 on Github https://github.com/jupyter/nbconvert/milestones/5.4`__
@@ -59,7 +95,7 @@
Template exporters can now be assigned raw templates as string attributes by setting the ``raw_template`` variable.
-.. code-block::
+.. code-block:: python
class AttrExporter(TemplateExporter):
# If the class has a special template and you want it defined within the class
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/docs/source/development_release.rst new/nbconvert-5.4.1/docs/source/development_release.rst
--- old/nbconvert-5.4.0/docs/source/development_release.rst 2018-09-04 21:31:54.000000000 +0200
+++ new/nbconvert-5.4.1/docs/source/development_release.rst 2018-12-08 00:42:35.000000000 +0100
@@ -15,6 +15,37 @@
.. _GitHub no milestones: https://github.com/jupyter/nbconvert/pulls?utf8=%E2%9C%93&q=is%3Amerged%20is%3Apr%20no%3Amilestone%20
+Gather all PRs related to milestone
+-----------------------------------
+
+`ghpro `_ can be used to extract the pull requests by call the following from nbconvert directory (will ask for an API token the first time):
+
+ .. code:: bash
+
+ github-stats --milestone=$VERSION --since-tag $LAST_VERSION --links
+
+.. _ghpro: https://github.com/mpacer/ghpro/tree/alternate_styling
+
+Manually categorize tickets
+---------------------------
+
+Group the tickets by these general categories (or others if they are relevant). This usually a manual processes to evaluate the changes in each PR.
+
+#. New Features
+#. Deprecations
+#. Fixing Problems
+#. Testing, Docs, and Builds
+
+Collect major changes
+---------------------
+
+From the tickets write up any major features / changes that deserve a paragraph to describe how they work.
+
+Update docs/source/changelog.rst
+--------------------------------
+
+Copy these changes with the new version to the top of changelog.rst. Prior release changelogs can be used to pick formatting of the message.
+
Check installed tools
---------------------
@@ -25,11 +56,11 @@
You can remove all non-tracked files with:
-.. code:: bash
+ .. code:: bash
- git clean -xfdi
+ git clean -xfdi
-This would ask you for confirmation before removing all untracked files.
+This would ask you for confirmation before removing all untracked files.
Make sure the ``dist/`` folder is clean and avoid stale builds from
previous attempts.
@@ -63,25 +94,29 @@
twine upload dist/*
+#. The conda-forge bot will automatically add a PR on your behalf to the `nbconvert-feedstock repo `_. You may want to review this PR to ensure conda-forge will be updated cleanly.
+
+.. _conda-forge-nbconvert: https://github.com/conda-forge/nbconvert-feedstock
+
Release the new version
-----------------------
Push directly on master, including --tags separately
-
+
.. code:: bash
- git push upstream
+ git push upstream
git push upstream --tags
-Update nbviewer
----------------
-
-On nbviewer-deploy run `invoke trigger_build` and then once it's built on
-dockerhub run `invoke doitall`.
-
Return to development state
---------------------------
If all went well, change the ``notebook/_version.py`` back adding the
``.dev`` suffix.
+
+
+Email googlegroup with update letter
+------------------------------------
+
+Make sure to email jupyter@googlegroups.com with the subject line of "[ANN] NBConvert $VERSION -- ..." and include at least the significant changes, contributors, and individual PR notes (if not many significant changes).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/docs/source/execute_api.rst new/nbconvert-5.4.1/docs/source/execute_api.rst
--- old/nbconvert-5.4.0/docs/source/execute_api.rst 2018-05-10 20:32:43.000000000 +0200
+++ new/nbconvert-5.4.1/docs/source/execute_api.rst 2019-02-08 18:22:55.000000000 +0100
@@ -69,7 +69,7 @@
**Save**: Finally, save the resulting notebook with::
- with open('executed_notebook.ipynb', 'wt') as f:
+ with open('executed_notebook.ipynb', 'w', encoding='utf-8') as f:
nbformat.write(nb, f)
That's all. Your executed notebook will be saved in the current folder
@@ -122,7 +122,7 @@
the error and the original error name and message are also printed.
After an error, we can still save the notebook as before::
- with open('executed_notebook.ipynb', mode='wt') as f:
+ with open('executed_notebook.ipynb', mode='w', encoding='utf-8') as f:
nbformat.write(nb, f)
The saved notebook contains the output up until the failing cell,
@@ -143,7 +143,7 @@
print(msg)
raise
finally:
- with open(notebook_filename_out, mode='wt') as f:
+ with open(notebook_filename_out, mode='w', encoding='utf-8') as f:
nbformat.write(nb, f)
This will save the executed notebook regardless of execution errors.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/docs/source/highlighting.rst new/nbconvert-5.4.1/docs/source/highlighting.rst
--- old/nbconvert-5.4.0/docs/source/highlighting.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/nbconvert-5.4.1/docs/source/highlighting.rst 2019-02-08 18:22:55.000000000 +0100
@@ -0,0 +1,62 @@
+Customizing Syntax Highlighting
+===============================
+
+Under the hood, nbconvert uses pygments to highlight code. Both pdf and html exporting support
+changing the highlighting style.
+
+Using Builtin styles
+--------------------
+Pygments has a number of builtin styles available. To use them, we just need to set the style setting
+in the relevant preprocessor.
+
+To change the html highlighting export with:
+
+.. code-block:: bash
+
+ jupyter nbconvert --to html notebook.ipynb --CSSHTMLHeaderPreprocessor.style=<name>
+
+To change pdf and latex highlighting export with:
+
+.. code-block:: bash
+
+ jupyter nbconvert --to pdf notebook.ipynb --LatexPreprocessor.style=<name>
+
+where ``<name>`` is the name of the pygments style. Available styles may vary from system to system.
+You can find all available styles with:
+
+.. code-block:: bash
+
+ pygmentize -L styles
+
+from a terminal or
+
+.. code-block:: python
+
+ from pygments.styles import get_all_styles
+ print(list(get_all_styles()))
+
+from python.
+
+You can preview all the styles from an environment that can display html like jupyter notebook with:
+
+.. code-block:: python
+
+ from pygments.styles import get_all_styles
+ from pygments.formatters import Terminal256Formatter
+ from pygments.lexers import PythonLexer
+ from pygments import highlight
+
+ code = """
+ import os
+ def function(test=1):
+ if test in [3,4]:
+ print(test)
+ """
+ for style in get_all_styles():
+ highlighted_code = highlight(code, PythonLexer(), Terminal256Formatter(style=style))
+ print(f"{style}:\n{highlighted_code}")
+
+Making your own styles
+----------------------
+To make your own style you must subclass ``pygments.styles.Style``, and then you must register your new style with Pygments using
+their pluggin system. This is explained in detail in the `Pygments documentation http://pygments.org/docs/styles/`_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/docs/source/index.rst new/nbconvert-5.4.1/docs/source/index.rst
--- old/nbconvert-5.4.0/docs/source/index.rst 2018-05-10 20:32:43.000000000 +0200
+++ new/nbconvert-5.4.1/docs/source/index.rst 2019-02-08 18:22:55.000000000 +0100
@@ -47,6 +47,7 @@
config_options
customizing
external_exporters
+ highlighting
.. toctree::
:maxdepth: 2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/docs/source/usage.rst new/nbconvert-5.4.1/docs/source/usage.rst
--- old/nbconvert-5.4.0/docs/source/usage.rst 2018-09-04 19:37:19.000000000 +0200
+++ new/nbconvert-5.4.1/docs/source/usage.rst 2019-02-08 18:22:55.000000000 +0100
@@ -67,7 +67,7 @@
Latex report, providing a table of contents and chapters.
- - ``--template basic``
+ - ``--template base``
Very basic latex output - mainly meant as a starting point for custom
templates.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/nbconvert/_version.py new/nbconvert-5.4.1/nbconvert/_version.py
--- old/nbconvert-5.4.0/nbconvert/_version.py 2018-09-06 21:08:07.000000000 +0200
+++ new/nbconvert-5.4.1/nbconvert/_version.py 2019-02-09 07:02:32.000000000 +0100
@@ -1,4 +1,4 @@
-version_info = (5, 4, 0)
+version_info = (5, 4, 1)
pre_info = ''
dev_info = ''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/nbconvert/exporters/html.py new/nbconvert-5.4.1/nbconvert/exporters/html.py
--- old/nbconvert-5.4.0/nbconvert/exporters/html.py 2018-09-04 19:37:19.000000000 +0200
+++ new/nbconvert-5.4.1/nbconvert/exporters/html.py 2018-12-08 00:55:15.000000000 +0100
@@ -90,8 +90,9 @@
def from_notebook_node(self, nb, resources=None, **kw):
langinfo = nb.metadata.get('language_info', {})
lexer = langinfo.get('pygments_lexer', langinfo.get('name', None))
- self.register_filter('highlight_code',
- Highlight2HTML(pygments_lexer=lexer, parent=self))
+ highlight_code = self.filters.get('highlight_code', Highlight2HTML(pygments_lexer=lexer, parent=self))
+ self.register_filter('highlight_code', highlight_code)
+
output, resources = super(HTMLExporter, self).from_notebook_node(nb, resources, **kw)
att_output = self.process_attachments(nb, output)
return att_output, resources
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/nbconvert/exporters/latex.py new/nbconvert-5.4.1/nbconvert/exporters/latex.py
--- old/nbconvert-5.4.0/nbconvert/exporters/latex.py 2018-09-04 19:37:19.000000000 +0200
+++ new/nbconvert-5.4.1/nbconvert/exporters/latex.py 2018-12-08 00:55:15.000000000 +0100
@@ -78,8 +78,9 @@
def from_notebook_node(self, nb, resources=None, **kw):
langinfo = nb.metadata.get('language_info', {})
lexer = langinfo.get('pygments_lexer', langinfo.get('name', None))
- self.register_filter('highlight_code',
- Highlight2Latex(pygments_lexer=lexer, parent=self))
+ highlight_code = self.filters.get('highlight_code', Highlight2Latex(pygments_lexer=lexer, parent=self))
+ self.register_filter('highlight_code', highlight_code)
+
return super(LatexExporter, self).from_notebook_node(nb, resources, **kw)
def _create_environment(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/nbconvert/exporters/tests/test_html.py new/nbconvert-5.4.1/nbconvert/exporters/tests/test_html.py
--- old/nbconvert-5.4.0/nbconvert/exporters/tests/test_html.py 2018-09-04 19:37:19.000000000 +0200
+++ new/nbconvert-5.4.1/nbconvert/exporters/tests/test_html.py 2018-12-08 00:55:15.000000000 +0100
@@ -119,3 +119,18 @@
result = check_for_png.search(output)
self.assertTrue(result.group(0).strip().startswith(' 1\u001b[0;31m \u001b[0;32mwhile\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;32mcontinue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
+ "\u001b[0;31mKeyboardInterrupt\u001b[0m: "
+ ]
+ }
+ ],
+ "source": [
+ "while True: continue"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "done\n"
+ ]
+ }
+ ],
+ "source": [
+ "print(\"done\")"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/nbconvert/preprocessors/tests/files/Interrupt.ipynb new/nbconvert-5.4.1/nbconvert/preprocessors/tests/files/Interrupt.ipynb
--- old/nbconvert-5.4.0/nbconvert/preprocessors/tests/files/Interrupt.ipynb 2018-05-10 20:32:43.000000000 +0200
+++ new/nbconvert-5.4.1/nbconvert/preprocessors/tests/files/Interrupt.ipynb 2018-12-08 00:55:15.000000000 +0100
@@ -14,7 +14,7 @@
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
- "\u001b[0;32m<ipython-input-1-31d18a52bf41>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mwhile\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;32mcontinue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
+ "\u001b[0;32m<ipython-input-1-31d18a52bf41>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mwhile\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;32mcontinue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mKeyboardInterrupt\u001b[0m: "
]
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/nbconvert-5.4.0/nbconvert/preprocessors/tests/files/Skip Exceptions with Cell Tags-IPY6.ipynb" "new/nbconvert-5.4.1/nbconvert/preprocessors/tests/files/Skip Exceptions with Cell Tags-IPY6.ipynb"
--- "old/nbconvert-5.4.0/nbconvert/preprocessors/tests/files/Skip Exceptions with Cell Tags-IPY6.ipynb" 1970-01-01 01:00:00.000000000 +0100
+++ "new/nbconvert-5.4.1/nbconvert/preprocessors/tests/files/Skip Exceptions with Cell Tags-IPY6.ipynb" 2018-12-08 00:55:15.000000000 +0100
@@ -0,0 +1,50 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "tags": [
+ "raises-exception"
+ ]
+ },
+ "outputs": [
+ {
+ "ename": "Exception",
+ "evalue": "message",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[0;31mException\u001b[0m Traceback (most recent call last)",
+ "\u001b[0;32m<ipython-input-1-644b5753a261>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# üñîçø∂é\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"message\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
+ "\u001b[0;31mException\u001b[0m: message"
+ ]
+ }
+ ],
+ "source": [
+ "# üñîçø∂é\n",
+ "raise Exception(\"message\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ok\n"
+ ]
+ }
+ ],
+ "source": [
+ "print('ok')"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 1
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/nbconvert-5.4.0/nbconvert/preprocessors/tests/files/Skip Exceptions with Cell Tags.ipynb" "new/nbconvert-5.4.1/nbconvert/preprocessors/tests/files/Skip Exceptions with Cell Tags.ipynb"
--- "old/nbconvert-5.4.0/nbconvert/preprocessors/tests/files/Skip Exceptions with Cell Tags.ipynb" 2018-05-10 20:32:43.000000000 +0200
+++ "new/nbconvert-5.4.1/nbconvert/preprocessors/tests/files/Skip Exceptions with Cell Tags.ipynb" 2018-12-08 00:55:15.000000000 +0100
@@ -16,7 +16,7 @@
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mException\u001b[0m Traceback (most recent call last)",
- "\u001b[0;32m<ipython-input-1-644b5753a261>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# üñîçø∂é\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"message\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
+ "\u001b[0;32m<ipython-input-1-644b5753a261>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# üñîçø∂é\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"message\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mException\u001b[0m: message"
]
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/nbconvert-5.4.0/nbconvert/preprocessors/tests/files/Skip Exceptions-IPY6.ipynb" "new/nbconvert-5.4.1/nbconvert/preprocessors/tests/files/Skip Exceptions-IPY6.ipynb"
--- "old/nbconvert-5.4.0/nbconvert/preprocessors/tests/files/Skip Exceptions-IPY6.ipynb" 1970-01-01 01:00:00.000000000 +0100
+++ "new/nbconvert-5.4.1/nbconvert/preprocessors/tests/files/Skip Exceptions-IPY6.ipynb" 2018-12-08 00:55:15.000000000 +0100
@@ -0,0 +1,50 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "ename": "Exception",
+ "evalue": "message",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[1;31mException\u001b[0m Traceback (most recent call last)",
+ "\u001b[1;32m<ipython-input-1-9abc744909d9>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;31m# üñîçø∂é\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[1;32mraise\u001b[0m \u001b[0mException\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"message\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
+ "\u001b[1;31mException\u001b[0m: message"
+ ]
+ }
+ ],
+ "source": [
+ "# üñîçø∂é\n",
+ "raise Exception(\"message\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ok\n"
+ ]
+ }
+ ],
+ "source": [
+ "print('ok')"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/nbconvert-5.4.0/nbconvert/preprocessors/tests/files/Skip Exceptions.ipynb" "new/nbconvert-5.4.1/nbconvert/preprocessors/tests/files/Skip Exceptions.ipynb"
--- "old/nbconvert-5.4.0/nbconvert/preprocessors/tests/files/Skip Exceptions.ipynb" 2018-05-10 20:32:43.000000000 +0200
+++ "new/nbconvert-5.4.1/nbconvert/preprocessors/tests/files/Skip Exceptions.ipynb" 2018-12-08 00:55:15.000000000 +0100
@@ -14,7 +14,7 @@
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mException\u001b[0m Traceback (most recent call last)",
- "\u001b[1;32m<ipython-input-1-9abc744909d9>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;31m# üñîçø∂é\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[1;32mraise\u001b[0m \u001b[0mException\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"message\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
+ "\u001b[1;32m<ipython-input-1-9abc744909d9>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;31m# üñîçø∂é\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[1;32mraise\u001b[0m \u001b[0mException\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"message\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mException\u001b[0m: message"
]
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/nbconvert/preprocessors/tests/files/UnicodePy3.ipynb new/nbconvert-5.4.1/nbconvert/preprocessors/tests/files/UnicodePy3.ipynb
--- old/nbconvert-5.4.0/nbconvert/preprocessors/tests/files/UnicodePy3.ipynb 1970-01-01 01:00:00.000000000 +0100
+++ new/nbconvert-5.4.1/nbconvert/preprocessors/tests/files/UnicodePy3.ipynb 2019-02-08 18:22:55.000000000 +0100
@@ -0,0 +1,32 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\u2603\n"
+ ]
+ }
+ ],
+ "source": [
+ "print('\u2603')"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/nbconvert/preprocessors/tests/test_execute.py new/nbconvert-5.4.1/nbconvert/preprocessors/tests/test_execute.py
--- old/nbconvert-5.4.0/nbconvert/preprocessors/tests/test_execute.py 2018-09-04 19:37:19.000000000 +0200
+++ new/nbconvert-5.4.1/nbconvert/preprocessors/tests/test_execute.py 2019-02-08 18:22:55.000000000 +0100
@@ -21,6 +21,9 @@
from .base import PreprocessorTestsBase
from ..execute import ExecutePreprocessor, CellExecutionError, executenb
+import IPython
+from traitlets import TraitError
+from jupyter_client.kernelspec import KernelSpecManager
from nbconvert.filters import strip_ansi
from testpath import modified_env
from ipython_genutils.py3compat import string_types
@@ -124,11 +127,22 @@
input_files = glob.glob(os.path.join(current_dir, 'files', '*.ipynb'))
shared_opts = dict(kernel_name="python")
for filename in input_files:
+ # There is some slight differences between the output in IPython 6 and IPython 7.
+ IPY_MAJOR = IPython.version_info[0]
+ if os.path.basename(filename).endswith("-IPY6.ipynb"):
+ print(filename, IPY_MAJOR)
+ if IPY_MAJOR >= 7:
+ continue
+ elif os.path.basename(filename) in ("Interrupt.ipynb", "Skip Exceptions with Cell Tags.ipynb", "Skip Exceptions.ipynb"):
+ if IPY_MAJOR < 7:
+ continue
+
+ # Special arguments for the notebooks
if os.path.basename(filename) == "Disable Stdin.ipynb":
continue
- elif os.path.basename(filename) == "Interrupt.ipynb":
+ elif os.path.basename(filename) in ("Interrupt.ipynb", "Interrupt-IPY6.ipynb"):
opts = dict(timeout=1, interrupt_on_timeout=True, allow_errors=True)
- elif os.path.basename(filename) == "Skip Exceptions.ipynb":
+ elif os.path.basename(filename) in ("Skip Exceptions.ipynb", "Skip Exceptions-IPY6.ipynb"):
opts = dict(allow_errors=True)
else:
opts = dict()
@@ -152,6 +166,21 @@
input_nb, output_nb = self.run_notebook(filename, {}, res)
self.assert_notebooks_equal(input_nb, output_nb)
+ @pytest.mark.xfail("python3" not in KernelSpecManager().find_kernel_specs(),
+ reason="requires a python3 kernelspec")
+ def test_empty_kernel_name(self):
+ """Can kernel in nb metadata be found when an empty string is passed?
+
+ Note: this pattern should be discouraged in practice.
+ Passing in no kernel_name to ExecutePreprocessor is recommended instead.
+ """
+ filename = os.path.join(current_dir, 'files', 'UnicodePy3.ipynb')
+ res = self.build_resources()
+ input_nb, output_nb = self.run_notebook(filename, {"kernel_name": ""}, res)
+ self.assert_notebooks_equal(input_nb, output_nb)
+ with pytest.raises(TraitError):
+ input_nb, output_nb = self.run_notebook(filename, {"kernel_name": None}, res)
+
def test_disable_stdin(self):
"""Test disabling standard input"""
filename = os.path.join(current_dir, 'files', 'Disable Stdin.ipynb')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/nbconvert/preprocessors/tests/test_latex.py new/nbconvert-5.4.1/nbconvert/preprocessors/tests/test_latex.py
--- old/nbconvert-5.4.0/nbconvert/preprocessors/tests/test_latex.py 2018-05-10 20:32:43.000000000 +0200
+++ new/nbconvert-5.4.1/nbconvert/preprocessors/tests/test_latex.py 2019-02-08 18:22:55.000000000 +0100
@@ -34,3 +34,21 @@
# Verify that the markdown cell wasn't processed.
self.assertEqual(nb.cells[1].source, '$ e $')
+
+ def test_highlight(self):
+ """Check that highlighting style can be changed"""
+ nb = self.build_notebook()
+ res = self.build_resources()
+ preprocessor = self.build_preprocessor()
+
+ # Set the style to a known builtin that's not the default
+ preprocessor.style='colorful'
+ nb, res = preprocessor(nb, res)
+ style_defs = res['latex']['pygments_definitions']
+
+ # Get the default
+ from pygments.formatters import LatexFormatter
+ default_defs = LatexFormatter(style='default').get_style_defs()
+
+ # Verify that the style was in fact changed
+ assert style_defs != default_defs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/nbconvert/templates/html/mathjax.tpl new/nbconvert-5.4.1/nbconvert/templates/html/mathjax.tpl
--- old/nbconvert-5.4.0/nbconvert/templates/html/mathjax.tpl 2018-05-10 20:32:43.000000000 +0200
+++ new/nbconvert-5.4.1/nbconvert/templates/html/mathjax.tpl 2019-02-08 18:22:55.000000000 +0100
@@ -1,4 +1,4 @@
-{%- macro mathjax(url='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-A...') -%}
+{%- macro mathjax(url='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AM...') -%}
<!-- Load mathjax -->
<script src="{{url}}"></script>
<!-- MathJax configuration -->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/scripts/jupyter-nbconvert new/nbconvert-5.4.1/scripts/jupyter-nbconvert
--- old/nbconvert-5.4.0/scripts/jupyter-nbconvert 2018-05-10 20:32:43.000000000 +0200
+++ new/nbconvert-5.4.1/scripts/jupyter-nbconvert 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#!/usr/bin/env python
-
-from nbconvert.nbconvertapp import main
-
-if __name__ == '__main__':
- main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nbconvert-5.4.0/setup.py new/nbconvert-5.4.1/setup.py
--- old/nbconvert-5.4.0/setup.py 2018-09-06 21:08:07.000000000 +0200
+++ new/nbconvert-5.4.1/setup.py 2019-02-08 18:22:55.000000000 +0100
@@ -28,19 +28,18 @@
#-----------------------------------------------------------------------------
import os
-import setuptools
import io
+from setuptools import setup
from setuptools.command.bdist_egg import bdist_egg
+from setuptools.command.develop import develop
-from glob import glob
from io import BytesIO
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
-from distutils.core import setup
from distutils.cmd import Command
from distutils.command.build import build
from distutils.command.sdist import sdist
@@ -147,6 +146,7 @@
cmdclass['build'] = css_first(build)
cmdclass['sdist'] = css_first(sdist)
+cmdclass['develop'] = css_first(develop)
cmdclass['bdist_egg'] = bdist_egg if 'bdist_egg' in sys.argv else bdist_egg_disabled
for d, _, _ in os.walk(pjoin(pkg_root, 'templates')):
@@ -160,25 +160,11 @@
with io.open(pjoin(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
-long_description="""
-
-Nbconvert is a Command Line tool and Python library and API to process and
-convert Jupyter notebook into a variety of other formats.
-
-Using nbconvert enables:
-
- - presentation of information in familiar formats, such as PDF.
- - publishing of research using LaTeX and opens the door for embedding notebooks in papers.
- - collaboration with others who may not use the notebook in their work.
- - sharing contents with many people via the web using HTML.
-"""
-
setup_args = dict(
name = name,
description = "Converting Jupyter Notebooks",
long_description_content_type = 'text/markdown',
version = version_ns['__version__'],
- scripts = glob(pjoin('scripts', '*')),
packages = packages,
long_description= long_description,
package_data = package_data,
@@ -211,8 +197,7 @@
],
)
-setuptools_args = {}
-install_requires = setuptools_args['install_requires'] = [
+setup_args['install_requires'] = [
'mistune>=0.8.1',
'jinja2',
'pygments',
@@ -241,32 +226,25 @@
}
extra_requirements['all'] = sum(extra_requirements.values(), [])
-setuptools_args['extras_require'] = extra_requirements
+setup_args['extras_require'] = extra_requirements
-if 'setuptools' in sys.modules:
- from setuptools.command.develop import develop
- cmdclass['develop'] = css_first(develop)
- # force entrypoints with setuptools (needed for Windows, unconditional because of wheels)
- setup_args['entry_points'] = {
- 'console_scripts': [
- 'jupyter-nbconvert = nbconvert.nbconvertapp:main',
- ],
- "nbconvert.exporters" : [
- 'custom=nbconvert.exporters:TemplateExporter',
- 'html=nbconvert.exporters:HTMLExporter',
- 'slides=nbconvert.exporters:SlidesExporter',
- 'latex=nbconvert.exporters:LatexExporter',
- 'pdf=nbconvert.exporters:PDFExporter',
- 'markdown=nbconvert.exporters:MarkdownExporter',
- 'python=nbconvert.exporters:PythonExporter',
- 'rst=nbconvert.exporters:RSTExporter',
- 'notebook=nbconvert.exporters:NotebookExporter',
- 'asciidoc=nbconvert.exporters:ASCIIDocExporter',
- 'script=nbconvert.exporters:ScriptExporter']
- }
- setup_args.pop('scripts', None)
-
- setup_args.update(setuptools_args)
+setup_args['entry_points'] = {
+ 'console_scripts': [
+ 'jupyter-nbconvert = nbconvert.nbconvertapp:main',
+ ],
+ "nbconvert.exporters" : [
+ 'custom=nbconvert.exporters:TemplateExporter',
+ 'html=nbconvert.exporters:HTMLExporter',
+ 'slides=nbconvert.exporters:SlidesExporter',
+ 'latex=nbconvert.exporters:LatexExporter',
+ 'pdf=nbconvert.exporters:PDFExporter',
+ 'markdown=nbconvert.exporters:MarkdownExporter',
+ 'python=nbconvert.exporters:PythonExporter',
+ 'rst=nbconvert.exporters:RSTExporter',
+ 'notebook=nbconvert.exporters:NotebookExporter',
+ 'asciidoc=nbconvert.exporters:ASCIIDocExporter',
+ 'script=nbconvert.exporters:ScriptExporter']
+}
if __name__ == '__main__':
setup(**setup_args)