Hello community, here is the log from the commit of package python-interlude for openSUSE:Factory checked in at 2015-05-10 10:46:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-interlude (Old) and /work/SRC/openSUSE:Factory/.python-interlude.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-interlude" Changes: -------- --- /work/SRC/openSUSE:Factory/python-interlude/python-interlude.changes 2013-12-09 16:57:46.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python-interlude.new/python-interlude.changes 2015-05-10 10:46:34.000000000 +0200 @@ -1,0 +2,15 @@ +Wed May 6 15:45:12 UTC 2015 - [email protected] + +- update to version 1.3.1: + * refactoring introduced bug: classic prompt use_ipython=False + fails if IPython available +- additional changes from version 1.3: + * needs IPython 1.1.0 or better. Skipped support for older + versions. + * added extra require, so when ipython is wanted just depend in + buildout, pip-requirements, setup, (name it) on + interlude[ipython] + * start IPython shell with a custom doctest prompt, thus it is + easier to copy-paste from the shell to the doctest + +------------------------------------------------------------------- Old: ---- interlude-1.2.tar.gz New: ---- interlude-1.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-interlude.spec ++++++ --- /var/tmp/diff_new_pack.vchLNZ/_old 2015-05-10 10:46:34.000000000 +0200 +++ /var/tmp/diff_new_pack.vchLNZ/_new 2015-05-10 10:46:34.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-interlude # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 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 @@ -17,7 +17,7 @@ Name: python-interlude -Version: 1.2 +Version: 1.3.1 Release: 0 Url: http://github.com/collective/interlude Summary: Interlude for Doctests provides an Interactive Console ++++++ interlude-1.2.tar.gz -> interlude-1.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/interlude-1.2/CHANGELOG.rst new/interlude-1.3.1/CHANGELOG.rst --- old/interlude-1.2/CHANGELOG.rst 2013-10-15 11:35:58.000000000 +0200 +++ new/interlude-1.3.1/CHANGELOG.rst 2014-02-09 23:06:52.000000000 +0100 @@ -2,6 +2,28 @@ Changes ======= +1.3.1 +----- + +- refactoring introduced bug: classic prompt ``use_ipython=False`` fails if + IPython available + [jensens, 2014-02-09] + +1.3 +--- + +- needs IPython 1.1.0 or better. Skipped support for older versions. + [jensens, 2014-02-09] + +- added extra require, so when ipython is wanted just depend in buildout, + pip-requirements, setup, (name it) on``interlude[ipython]`` + [jensens, 2014-02-09] + +- start IPython shell with a custom doctest prompt, thus it is easier to + copy-paste from the shell to the doctest (save a typing a ``%doctest_mode`` + each time. Added also option ``doctest_prompt=False`` to disable this. + [jensens, 2014-02-09] + 1.2 --- @@ -10,7 +32,7 @@ 1.1.1 ----- -- fix broken release, include *.rst with MANIFEST.in +- fix broken release, include ``*.rst`` with MANIFEST.in 1.1 --- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/interlude-1.2/PKG-INFO new/interlude-1.3.1/PKG-INFO --- old/interlude-1.2/PKG-INFO 2013-10-15 11:40:32.000000000 +0200 +++ new/interlude-1.3.1/PKG-INFO 2014-02-09 23:08:32.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: interlude -Version: 1.2 +Version: 1.3.1 Summary: Interlude for Doctests provides an Interactive Console. Home-page: http://github.com/collective/interlude Author: Jens Klein @@ -10,33 +10,44 @@ ================================ Provides an interactive shell aka console inside your doctest case. - + The console looks exact like in a doctest-case and you can copy and paste - code from the shell into your doctest. It feels as you are in the test case - itself. Its not pdb, it's a python shell. + code from the shell into your doctest. It feels as you are in the test case + itself. Its not pdb, it's a python shell. In your doctest you can invoke the shell at any point by calling:: - - >>> interact(locals()) - To make your testrunner interlude aware following is needed: + >>> interact(locals()) + + + To make your testrunner interlude aware, pass ``interact`` as a global to the + ``DocFileSuite`` as shown here:: - 1) import interlude + ... + import interlude + ... + suite = DocFileSuite( ..., globs=dict(interact=interlude.interact), ...) + ... + + + If `IPython <http://ipython.org/>`_ is available it opens an IPython prompt. + The prompt is modified and looks like in a doctest. To surpress the + prompt modifications call ``interact`` with additional kwarg + ``doctest_prompt=False``. - 2) suite = DocFileSuite( ..., globs=dict(interact=interlude.interact), ...) License ======= - `interlude` is copyright 2006-2013 by BlueDynamics Alliance, Klein & Partner KG, - Austria. It is under the `GNU Lesser General Public License (LGPLv3). + `interlude` is copyright 2006-2014 by BlueDynamics Alliance, Klein & Partner KG, + Austria. It is under the `GNU Lesser General Public License (LGPLv3). <http://opensource.org/licenses/lgpl-3.0.html>`_ - code repository at `github collective <http://github.com/collective/interlude>`_ - - written by `Jens Klein <mailto:[email protected]>`_ + - written by `Jens Klein <mailto:[email protected]>`_ - - IPython support contributed by `Alan Justino <http://github.com/alanjds>`_ + - IPython support contributed by `Alan Justino <http://github.com/alanjds>`_ - Upgrade/Bugfixes contributed by `Sune Broendum Woeller <https://github.com/sunew>`_ @@ -44,6 +55,28 @@ Changes ======= + 1.3.1 + ----- + + - refactoring introduced bug: classic prompt ``use_ipython=False`` fails if + IPython available + [jensens, 2014-02-09] + + 1.3 + --- + + - needs IPython 1.1.0 or better. Skipped support for older versions. + [jensens, 2014-02-09] + + - added extra require, so when ipython is wanted just depend in buildout, + pip-requirements, setup, (name it) on``interlude[ipython]`` + [jensens, 2014-02-09] + + - start IPython shell with a custom doctest prompt, thus it is easier to + copy-paste from the shell to the doctest (save a typing a ``%doctest_mode`` + each time. Added also option ``doctest_prompt=False`` to disable this. + [jensens, 2014-02-09] + 1.2 --- @@ -52,7 +85,7 @@ 1.1.1 ----- - - fix broken release, include *.rst with MANIFEST.in + - fix broken release, include ``*.rst`` with MANIFEST.in 1.1 --- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/interlude-1.2/README.rst new/interlude-1.3.1/README.rst --- old/interlude-1.2/README.rst 2013-10-15 11:39:44.000000000 +0200 +++ new/interlude-1.3.1/README.rst 2014-02-09 23:03:36.000000000 +0100 @@ -2,33 +2,44 @@ ================================ Provides an interactive shell aka console inside your doctest case. - + The console looks exact like in a doctest-case and you can copy and paste -code from the shell into your doctest. It feels as you are in the test case -itself. Its not pdb, it's a python shell. +code from the shell into your doctest. It feels as you are in the test case +itself. Its not pdb, it's a python shell. In your doctest you can invoke the shell at any point by calling:: - - >>> interact(locals()) -To make your testrunner interlude aware following is needed: + >>> interact(locals()) + + +To make your testrunner interlude aware, pass ``interact`` as a global to the +``DocFileSuite`` as shown here:: + + ... + import interlude + ... + suite = DocFileSuite( ..., globs=dict(interact=interlude.interact), ...) + ... + -1) import interlude +If `IPython <http://ipython.org/>`_ is available it opens an IPython prompt. +The prompt is modified and looks like in a doctest. To surpress the +prompt modifications call ``interact`` with additional kwarg +``doctest_prompt=False``. -2) suite = DocFileSuite( ..., globs=dict(interact=interlude.interact), ...) License ======= -`interlude` is copyright 2006-2013 by BlueDynamics Alliance, Klein & Partner KG, -Austria. It is under the `GNU Lesser General Public License (LGPLv3). +`interlude` is copyright 2006-2014 by BlueDynamics Alliance, Klein & Partner KG, +Austria. It is under the `GNU Lesser General Public License (LGPLv3). <http://opensource.org/licenses/lgpl-3.0.html>`_ - code repository at `github collective <http://github.com/collective/interlude>`_ -- written by `Jens Klein <mailto:[email protected]>`_ +- written by `Jens Klein <mailto:[email protected]>`_ -- IPython support contributed by `Alan Justino <http://github.com/alanjds>`_ +- IPython support contributed by `Alan Justino <http://github.com/alanjds>`_ - Upgrade/Bugfixes contributed by `Sune Broendum Woeller <https://github.com/sunew>`_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/interlude-1.2/setup.py new/interlude-1.3.1/setup.py --- old/interlude-1.2/setup.py 2013-10-15 11:39:10.000000000 +0200 +++ new/interlude-1.3.1/setup.py 2014-02-09 23:05:04.000000000 +0100 @@ -1,36 +1,39 @@ from setuptools import setup, find_packages import os -version = '1.2' -shortdesc ="Interlude for Doctests provides an Interactive Console." -longdesc = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() +version = '1.3.1' +shortdesc = "Interlude for Doctests provides an Interactive Console." +longdesc = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() longdesc += open(os.path.join(os.path.dirname(__file__), 'CHANGELOG.rst')).read() -setup(name='interlude', - version=version, - description=shortdesc, - long_description=longdesc, - classifiers=[ - 'Development Status :: 6 - Mature', - 'Intended Audience :: Developers', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)', - 'Topic :: Software Development :: Libraries :: Python Modules' - ], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers - keywords='', - author='Jens Klein', - author_email='[email protected]', - url='http://github.com/collective/interlude', - license='LGPL', - packages=find_packages('src'), - package_dir = {'': 'src'}, - namespace_packages=[], - include_package_data=True, - zip_safe=True, - install_requires=[ - 'setuptools', - ], - extras_require={}, - entry_points="", +setup( + name='interlude', + version=version, + description=shortdesc, + long_description=longdesc, + classifiers=[ + 'Development Status :: 6 - Mature', + 'Intended Audience :: Developers', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)', + 'Topic :: Software Development :: Libraries :: Python Modules' + ], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers + keywords='', + author='Jens Klein', + author_email='[email protected]', + url='http://github.com/collective/interlude', + license='LGPL', + packages=find_packages('src'), + package_dir={'': 'src'}, + namespace_packages=[], + include_package_data=True, + zip_safe=True, + install_requires=[ + 'setuptools', + ], + extras_require={ + 'ipython': ['ipython>=1.1.0'] + }, + entry_points="", ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/interlude-1.2/src/interlude/__init__.py new/interlude-1.3.1/src/interlude/__init__.py --- old/interlude-1.2/src/interlude/__init__.py 2013-06-12 11:48:52.000000000 +0200 +++ new/interlude-1.3.1/src/interlude/__init__.py 2014-02-09 23:04:12.000000000 +0100 @@ -1,21 +1,29 @@ # -# Copyright 2006-2009, BlueDynamics Alliance, Austria - http://bluedynamics.com +# Copyright 2006-2014, BlueDynamics Alliance, Austria - http://bluedynamics.com # # GNU Lesser General Public Licence -__author__ = """Jens Klein <[email protected]>""" -__docformat__ = 'plaintext' - import code import sys try: - import IPython + from IPython.terminal.embed import InteractiveShellEmbed + from IPython.config.loader import Config HAS_IPYTHON = True except ImportError: HAS_IPYTHON = False -def interact(locals=None, use_ipython=True): +DELIMITER = '\n' + '=' * 78 + '\n' + +START_BANNER = """\ +Interlude DocTest Interactive Console - (c) BlueDynamics Alliance +Note: You have the same local variables available as in your test-case. +Ctrl-D ends session and continues testing. +""" + +END_BANNER = '\nEnd of Interlude DocTest Interactive Console session' + +def interact(locals=None, use_ipython=True, doctest_prompt=True): """Provides an interactive shell aka console inside your testcase. It looks exact like in a doctestcase and you can copy and paste @@ -25,32 +33,34 @@ In your testcase or doctest you can invoke the shell at any point by calling:: - >>> interact( locals() ) #doctest: +SKIP + >>> interact( locals() ) - locals -- passed to InteractiveInterpreter.__init__() + locals + locals available in shell + + use_ipython + enabled/disable ipython (only if module installed) + + doctest_prompt + use doctest style prompt in ipython (only if module installed) """ savestdout = sys.stdout sys.stdout = sys.stderr - sys.stderr.write('\n'+'='*78) - sys.stdout.write(""" -Interlude DocTest Interactive Console - (c) BlueDynamics Alliance -Note: You have the same locals available as in your test-case. -Ctrl-D ends session and continues testing. -""") - + sys.stdout.write(DELIMITER) if use_ipython and HAS_IPYTHON: - try: - from IPython.Shell import IPShellEmbed - ipshell = IPShellEmbed(user_ns=locals) - ipshell() - except ImportError: - from IPython.frontend.terminal.embed import InteractiveShellEmbed - ipshell = InteractiveShellEmbed(user_ns=locals) - ipshell() + cfg = Config() + cfg.TerminalInteractiveShell.confirm_exit = False + if doctest_prompt: + cfg.PromptManager.in_template = u'>>> ' + cfg.PromptManager.in2_template = u'... ' + cfg.PromptManager.out_template = u'' + cfg.PromptManager.justify = False + ipshell = InteractiveShellEmbed(user_ns=locals, config=cfg) + ipshell(DELIMITER + START_BANNER) else: + sys.stdout.write(START_BANNER + '\n') console = code.InteractiveConsole(locals) console.interact() - sys.stdout.write('\nend of Interlude DocTest Interactive Console session\n') - sys.stdout.write('='*78+'\n') + sys.stdout.write(END_BANNER + DELIMITER) sys.stdout = savestdout diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/interlude-1.2/src/interlude.egg-info/PKG-INFO new/interlude-1.3.1/src/interlude.egg-info/PKG-INFO --- old/interlude-1.2/src/interlude.egg-info/PKG-INFO 2013-10-15 11:40:32.000000000 +0200 +++ new/interlude-1.3.1/src/interlude.egg-info/PKG-INFO 2014-02-09 23:08:32.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: interlude -Version: 1.2 +Version: 1.3.1 Summary: Interlude for Doctests provides an Interactive Console. Home-page: http://github.com/collective/interlude Author: Jens Klein @@ -10,33 +10,44 @@ ================================ Provides an interactive shell aka console inside your doctest case. - + The console looks exact like in a doctest-case and you can copy and paste - code from the shell into your doctest. It feels as you are in the test case - itself. Its not pdb, it's a python shell. + code from the shell into your doctest. It feels as you are in the test case + itself. Its not pdb, it's a python shell. In your doctest you can invoke the shell at any point by calling:: - - >>> interact(locals()) - To make your testrunner interlude aware following is needed: + >>> interact(locals()) + + + To make your testrunner interlude aware, pass ``interact`` as a global to the + ``DocFileSuite`` as shown here:: - 1) import interlude + ... + import interlude + ... + suite = DocFileSuite( ..., globs=dict(interact=interlude.interact), ...) + ... + + + If `IPython <http://ipython.org/>`_ is available it opens an IPython prompt. + The prompt is modified and looks like in a doctest. To surpress the + prompt modifications call ``interact`` with additional kwarg + ``doctest_prompt=False``. - 2) suite = DocFileSuite( ..., globs=dict(interact=interlude.interact), ...) License ======= - `interlude` is copyright 2006-2013 by BlueDynamics Alliance, Klein & Partner KG, - Austria. It is under the `GNU Lesser General Public License (LGPLv3). + `interlude` is copyright 2006-2014 by BlueDynamics Alliance, Klein & Partner KG, + Austria. It is under the `GNU Lesser General Public License (LGPLv3). <http://opensource.org/licenses/lgpl-3.0.html>`_ - code repository at `github collective <http://github.com/collective/interlude>`_ - - written by `Jens Klein <mailto:[email protected]>`_ + - written by `Jens Klein <mailto:[email protected]>`_ - - IPython support contributed by `Alan Justino <http://github.com/alanjds>`_ + - IPython support contributed by `Alan Justino <http://github.com/alanjds>`_ - Upgrade/Bugfixes contributed by `Sune Broendum Woeller <https://github.com/sunew>`_ @@ -44,6 +55,28 @@ Changes ======= + 1.3.1 + ----- + + - refactoring introduced bug: classic prompt ``use_ipython=False`` fails if + IPython available + [jensens, 2014-02-09] + + 1.3 + --- + + - needs IPython 1.1.0 or better. Skipped support for older versions. + [jensens, 2014-02-09] + + - added extra require, so when ipython is wanted just depend in buildout, + pip-requirements, setup, (name it) on``interlude[ipython]`` + [jensens, 2014-02-09] + + - start IPython shell with a custom doctest prompt, thus it is easier to + copy-paste from the shell to the doctest (save a typing a ``%doctest_mode`` + each time. Added also option ``doctest_prompt=False`` to disable this. + [jensens, 2014-02-09] + 1.2 --- @@ -52,7 +85,7 @@ 1.1.1 ----- - - fix broken release, include *.rst with MANIFEST.in + - fix broken release, include ``*.rst`` with MANIFEST.in 1.1 --- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/interlude-1.2/src/interlude.egg-info/requires.txt new/interlude-1.3.1/src/interlude.egg-info/requires.txt --- old/interlude-1.2/src/interlude.egg-info/requires.txt 2013-10-15 11:40:32.000000000 +0200 +++ new/interlude-1.3.1/src/interlude.egg-info/requires.txt 2014-02-09 23:08:32.000000000 +0100 @@ -1 +1,4 @@ -setuptools \ No newline at end of file +setuptools + +[ipython] +ipython>=1.1.0 \ No newline at end of file
