Hello community, here is the log from the commit of package python-backcall for openSUSE:Factory checked in at 2020-07-15 12:14:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-backcall (Old) and /work/SRC/openSUSE:Factory/.python-backcall.new.3060 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-backcall" Wed Jul 15 12:14:33 2020 rev:3 rq:820774 version:0.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-backcall/python-backcall.changes 2018-05-29 10:30:14.037026033 +0200 +++ /work/SRC/openSUSE:Factory/.python-backcall.new.3060/python-backcall.changes 2020-07-15 12:15:36.676820377 +0200 @@ -1,0 +2,12 @@ +Sun Jul 12 21:50:04 UTC 2020 - Arun Persaud <a...@gmx.de> + +- specfile: + * update copyright year + * license included in tar-ball + * be more specific in %files section + +- update to version 0.2.0: + * license in tar-ball + * moved to flit + +------------------------------------------------------------------- Old: ---- LICENSE backcall-0.1.0.tar.gz New: ---- backcall-0.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-backcall.spec ++++++ --- /var/tmp/diff_new_pack.8qg5Mh/_old 2020-07-15 12:15:40.356824230 +0200 +++ /var/tmp/diff_new_pack.8qg5Mh/_new 2020-07-15 12:15:40.360824234 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-backcall # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# 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 @@ -12,25 +12,25 @@ # 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-backcall -Version: 0.1.0 +Version: 0.2.0 Release: 0 Summary: Specifications for callback functions passed in to an API License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/takluyver/backcall Source0: https://files.pythonhosted.org/packages/source/b/backcall/backcall-%{version}.tar.gz -Source1: https://raw.githubusercontent.com/takluyver/backcall/cff13f5e4bd2a2af82fc5174e38cca0f9b7c21d2/LICENSE BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch +# %python_subpackages %description @@ -43,7 +43,6 @@ %prep %setup -q -n backcall-%{version} -cp %{SOURCE1} . %build %python_build @@ -53,11 +52,12 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_exec -m pytest tests +%pytest tests %files %{python_files} %license LICENSE %doc README.rst -%{python_sitelib}/* +%{python_sitelib}/backcall +%{python_sitelib}/backcall-%{version}-py*.egg-info %changelog ++++++ backcall-0.1.0.tar.gz -> backcall-0.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/backcall-0.1.0/.gitignore new/backcall-0.2.0/.gitignore --- old/backcall-0.1.0/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/backcall-0.2.0/.gitignore 2017-12-31 14:01:02.611715000 +0100 @@ -0,0 +1,13 @@ +*.py[cod] +.ipynb_checkpoints + +dist +build +MANIFEST + +.coverage +.tox +nosetests.xml + +# Sphinx +docs/_build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/backcall-0.1.0/.travis.yml new/backcall-0.2.0/.travis.yml --- old/backcall-0.1.0/.travis.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/backcall-0.2.0/.travis.yml 2020-06-09 16:58:18.866017000 +0200 @@ -0,0 +1,16 @@ +# Config file for automatic testing at travis-ci.org + +language: python + +python: + - 3.8 + - 3.7 + - 3.6 + - 3.5 + - 2.7 + +install: pip install pytest + +# command to run tests, e.g. python setup.py test +script: py.test +sudo: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/backcall-0.1.0/Demo.ipynb new/backcall-0.2.0/Demo.ipynb --- old/backcall-0.1.0/Demo.ipynb 1970-01-01 01:00:00.000000000 +0100 +++ new/backcall-0.2.0/Demo.ipynb 2017-12-31 14:01:02.611715000 +0100 @@ -0,0 +1,267 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a93737702b08a2fa642c7d8d48d2c21bc861517829a003be0e34b3088ed649f6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Version 1" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "My software has a callback API, to call functions with one argument:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "tone_detected_callbacks = []\n", + "def on_tone_detected(callback):\n", + " tone_detected_callbacks.append(callback)\n", + "\n", + "def tone_detected(pitch):\n", + " for callback in tone_detected_callbacks:\n", + " callback(pitch)" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 1 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Sara writes a plugin which provides a callback:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def tone_callback_a(pitch):\n", + " print(\"Tone detected at %f Hz\" % pitch)\n", + "\n", + "on_tone_detected(tone_callback_a)" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 2 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "And there was much rejoicing." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "tone_detected(227.5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tone detected at 227.500000 Hz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Version 2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The software becomes more complex, and it can provide more information to callbacks:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def tone_detected(pitch, duration):\n", + " for callback in tone_detected_callbacks:\n", + " callback(pitch, duration)" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 4 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "But Sara's plugin hasn't been updated yet, so it doesn't expect the extra parameter." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "tone_detected(227.5, 3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "TypeError", + "evalue": "tone_callback_a() takes 1 positional argument but 2 were given", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", + "\u001b[1;32m<ipython-input-5-fc61d95b6669>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mtone_detected\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m227.5\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m3\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[1;32m<ipython-input-4-dc14bf1e421f>\u001b[0m in \u001b[0;36mtone_detected\u001b[1;34m(pitch, duration)\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mtone_detected\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mpitch\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mduration\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mcallback\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mtone_detected_callbacks\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mcallback\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mpitch\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mduration\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[1;31mTypeError\u001b[0m: tone_callback_a() takes 1 positional argument but 2 were given" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Using backcall" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "`backcall` is a library to solve this problem, so you can extend callback APIs in a backwards compatible way." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from backcall import callback_prototype\n", + "\n", + "# A callback prototype specifies what parameters we're going to pass\n", + "\n", + "@callback_prototype\n", + "def tone_detected_cb(pitch, duration):\n", + " pass\n", + "\n", + "tone_detected_callbacks = []\n", + "def on_tone_detected(callback):\n", + " # This inspects callback, and wraps it in a function that will discard extra arguments\n", + " adapted = tone_detected_cb.adapt(callback)\n", + " tone_detected_callbacks.append(adapted)\n", + "\n", + "def tone_detected(pitch, duration):\n", + " for callback in tone_detected_callbacks:\n", + " callback(pitch, duration)" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 6 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Registering the callback looks just the same as before - callback providers don't need to do anything special." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "on_tone_detected(tone_callback_a)" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 7 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now the extra parameter is discarded, and Sara's plugin gets only the information it expects." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "tone_detected(227.5, 3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tone detected at 227.500000 Hz\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Plus you've got an introspectable reference for the expected callback signature:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "help(tone_detected_cb)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Help on function tone_detected_cb in module __main__:\n", + "\n", + "tone_detected_cb(pitch, duration)\n", + "\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/backcall-0.1.0/LICENSE new/backcall-0.2.0/LICENSE --- old/backcall-0.1.0/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/backcall-0.2.0/LICENSE 2017-12-31 14:01:02.611715000 +0100 @@ -0,0 +1,27 @@ +Copyright (c) 2014, Thomas Kluyver +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +* Neither the name of the {organization} nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/backcall-0.1.0/PKG-INFO new/backcall-0.2.0/PKG-INFO --- old/backcall-0.1.0/PKG-INFO 2014-02-14 00:13:55.000000000 +0100 +++ new/backcall-0.2.0/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,58 +1,7 @@ Metadata-Version: 1.1 Name: backcall -Version: 0.1.0 +Version: 0.2.0 Summary: Specifications for callback functions passed in to an API Home-page: https://github.com/takluyver/backcall Author: Thomas Kluyver -Author-email: tak...@gmail.com -License: BSD -Description: ======== - backcall - ======== - - .. image:: https://travis-ci.org/takluyver/backcall.png?branch=master - :target: https://travis-ci.org/takluyver/backcall - - Specifications for callback functions passed in to an API - - If your code lets other people supply callback functions, it's important to - specify the function signature you expect, and check that functions support that. - Adding extra parameters later would break other peoples code unless you're careful. - - backcall provides a way of specifying the callback signature using a prototype - function:: - - from backcall import callback_prototype - - @callback_prototype - def handle_ping(sender, delay=None): - # Specify positional parameters without a default, and keyword - # parameters with a default. - pass - - def register_ping_handler(callback): - # This checks and adapts the function passed in: - callback = handle_ping.adapt(callback) - ping_callbacks.append(callback) - - If the callback takes fewer parameters than your prototype, *backcall* will wrap - it in a function that discards the extra arguments. If the callback expects - more arguments, a TypeError is thrown when it is registered. - - For more details, see the `docs <http://backcall.readthedocs.org/en/latest/>`_ or - the `Demo notebook <http://nbviewer.ipython.org/github/takluyver/backcall/blob/master/Demo.ipynb>`_. - - The tests are run with `pytest <http://pytest.org/latest/>`_. In the root directory, - execute:: - - py.test - -Platform: UNKNOWN -Classifier: Development Status :: 2 - Pre-Alpha -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: BSD License -Classifier: Natural Language :: English -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.3 +Author-email: tho...@kluyver.me.uk diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/backcall-0.1.0/backcall/__init__.py new/backcall-0.2.0/backcall/__init__.py --- old/backcall-0.1.0/backcall/__init__.py 2014-01-31 23:55:12.000000000 +0100 +++ new/backcall-0.2.0/backcall/__init__.py 2020-06-09 17:08:26.883726400 +0200 @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- +"""Specifications for callback functions passed in to an API""" from .backcall import callback_prototype __author__ = 'Thomas Kluyver' __email__ = 'tak...@gmail.com' -__version__ = '0.1.0' \ No newline at end of file +__version__ = '0.2.0' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/backcall-0.1.0/docs/Makefile new/backcall-0.2.0/docs/Makefile --- old/backcall-0.1.0/docs/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/backcall-0.2.0/docs/Makefile 2017-12-31 14:01:02.612715200 +0100 @@ -0,0 +1,177 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make <target>' where <target> is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/backcall.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/backcall.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/backcall" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/backcall" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/backcall-0.1.0/docs/conf.py new/backcall-0.2.0/docs/conf.py --- old/backcall-0.1.0/docs/conf.py 1970-01-01 01:00:00.000000000 +0100 +++ new/backcall-0.2.0/docs/conf.py 2020-06-09 17:08:49.659793100 +0200 @@ -0,0 +1,264 @@ +# -*- coding: utf-8 -*- +# +# backcall documentation build configuration file, created by +# sphinx-quickstart on Thu Feb 13 12:19:05 2014. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys +import os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.viewcode', + 'sphinx.ext.intersphinx', +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'backcall' +copyright = u'2014, Thomas Kluyver' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '0.2' +# The full version, including alpha/beta/rc tags. +release = version + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + +intersphinx_mapping = {'python': ('http://docs.python.org/3/', None)} + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# "<project> v<release> documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +#html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a <link> tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'backcalldoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + ('index', 'backcall.tex', u'backcall Documentation', + u'Thomas Kluyver', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'backcall', u'backcall Documentation', + [u'Thomas Kluyver'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'backcall', u'backcall Documentation', + u'Thomas Kluyver', 'backcall', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/backcall-0.1.0/docs/index.rst new/backcall-0.2.0/docs/index.rst --- old/backcall-0.1.0/docs/index.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/backcall-0.2.0/docs/index.rst 2017-12-31 14:01:02.612715200 +0100 @@ -0,0 +1,72 @@ +==================================== +Welcome to backcall's documentation! +==================================== + +.. module:: backcall + :synopsis: Backwards compatible callback APIs + +backcall is a Python module to write backwards compatible callback APIs. That is, +you can add parameters to your calls without breaking third party callback +functions that don't expect those newer parameters. For an example of using it, see the +`Demo notebook <http://nbviewer.ipython.org/github/takluyver/backcall/blob/master/Demo.ipynb>`_. + +It can be installed like any other Python package:: + + pip install backcall + +To use backcall, you first define a 'callback prototype' - a function which +takes all of the parameters you're going to pass. Parameters without a default +are to be passed positionally. Parameters with a default, or keyword-only +parameters on Python 3, are to be passed as keyword arguments. The prototype +doesn't need to do anything; only the signature is used. + +:: + + def msg_received_prototype(positional1, positional2, kw1=None, *, kw2): + pass + +Decorate your callback prototype with :func:`callback_prototype`: + +.. autofunction:: callback_prototype + +You can use the new ``adapt`` function to prepare callbacks when they are +registered with the callback API. + +.. function:: prototype.adapt(callback) + + Inspects the signature of ``callback``. If it takes all of the arguments + in ``prototype``, it is returned unmodified. If it takes a subset of those + arguments, a wrapper is returned which will discard the extra arguments and + call ``callback``. If it takes arguments not specified by the prototype, + :exc:`TypeError` is raised. + +Limitations +=========== + +* Callback functions can't have any extra arguments - even if they have default + values, :func:`prototype.adapt` wants to match each argument to something in + the prototype. +* The callback API can't specify that callbacks *must* take certain arguments. + A function that takes no arguments is a valid callback anywhere. + +Both of these limitations could be removed in a later version, but I want to see +what's important first. + +* Callback functions must have introspectable signatures. Practically, this means + functions defined in compiled code can't be used as callbacks without wrapping + them in a Python function. + +Signature introspection +======================= + +backcall includes a backported copy of the Python 3.3+ :class:`inspect.Signature` +machinery to support Python 2.7. This was backported by `Min RK <https://github.com/minrk>`_ +for IPython, and copied here. + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`search` + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/backcall-0.1.0/pyproject.toml new/backcall-0.2.0/pyproject.toml --- old/backcall-0.1.0/pyproject.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/backcall-0.2.0/pyproject.toml 2020-06-09 16:59:15.076172800 +0200 @@ -0,0 +1,16 @@ +[build-system] +requires = ["flit_core >=2,<4"] +build-backend = "flit_core.buildapi" + +[tool.flit.metadata] +module = "backcall" +author = "Thomas Kluyver" +author-email = "tho...@kluyver.me.uk" +home-page = "https://github.com/takluyver/backcall" +description-file = "README.rst" +classifiers = [ + 'License :: OSI Approved :: BSD License', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/backcall-0.1.0/setup.py new/backcall-0.2.0/setup.py --- old/backcall-0.1.0/setup.py 2014-01-31 23:55:12.000000000 +0100 +++ new/backcall-0.2.0/setup.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,27 +1,20 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- +# setup.py generated by flit for tools that don't yet use PEP 517 + from distutils.core import setup -readme = open('README.rst').read() +packages = \ +['backcall'] + +package_data = \ +{'': ['*']} -setup( - name='backcall', - version='0.1.0', - description='Specifications for callback functions passed in to an API', - long_description=readme, - author='Thomas Kluyver', - author_email='tak...@gmail.com', - url='https://github.com/takluyver/backcall', - packages=['backcall'], - license="BSD", - classifiers=[ - 'Development Status :: 2 - Pre-Alpha', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: BSD License', - 'Natural Language :: English', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - ], -) \ No newline at end of file +setup(name='backcall', + version='0.2.0', + description='Specifications for callback functions passed in to an API', + author='Thomas Kluyver', + author_email='tho...@kluyver.me.uk', + url='https://github.com/takluyver/backcall', + packages=packages, + package_data=package_data, + )