Hello community,
here is the log from the commit of package python-notify2 for openSUSE:Factory checked in at 2017-05-08 19:03:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-notify2 (Old)
and /work/SRC/openSUSE:Factory/.python-notify2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-notify2"
Mon May 8 19:03:16 2017 rev:2 rq:493199 version:0.3.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-notify2/python-notify2.changes 2017-01-25 23:23:49.290379480 +0100
+++ /work/SRC/openSUSE:Factory/.python-notify2.new/python-notify2.changes 2017-05-08 19:03:58.935937590 +0200
@@ -1,0 +2,10 @@
+Sat May 6 11:32:19 UTC 2017 - antoine.belvire@opensuse.org
+
+- Update to version 0.3.1:
+ * Wrap notifications_registry lookup in try block not to show
+ irrelevant errors.
+ * Add LICENSE file.
+- Convert to singlespec.
+- Fix license.
+
+-------------------------------------------------------------------
Old:
----
notify2-0.3.tar.gz
New:
----
notify2-0.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-notify2.spec ++++++
--- /var/tmp/diff_new_pack.ylMmWX/_old 2017-05-08 19:03:59.435866967 +0200
+++ /var/tmp/diff_new_pack.ylMmWX/_new 2017-05-08 19:03:59.439866402 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-notify2
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 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
@@ -16,22 +16,29 @@
#
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-notify2
-Version: 0.3
+Version: 0.3.1
Release: 0
Summary: Python interface to DBus notifications
-License: BSD-3-Clause
+License: BSD-2-Clause
Group: Development/Languages/Python
Url: https://pypi.python.org/pypi/notify2/
Source: https://pypi.io/packages/source/n/notify2/notify2-%{version}.tar.gz
-BuildRequires: dbus-1-python
-BuildRequires: python-setuptools
+BuildRequires: %{python_module dbus-python}
+BuildRequires: %{python_module setuptools}
+BuildRequires: fdupes
+BuildRequires: python-rpm-macros
+%ifpython3
+Requires: dbus-1-python3
+%else
Requires: dbus-1-python
-%if 0%{?suse_version} > 1110
-BuildArch: noarch
%endif
+BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%python_subpackages
+
%description
This is a pure-python replacement for notify-python, using python-dbus
to communicate with the notifications server directly. It's compatible
@@ -42,17 +49,15 @@
%setup -q -n notify2-%{version}
%build
-python setup.py build
+%python_build
%install
-python setup.py install --prefix=%{_prefix} --root %{buildroot}
+%python_install
+%fdupes %{buildroot}/%{_prefix}
-%files
-%defattr(-,root,root)
-# Note: no need for update-alternatives, there is no conflicting path with python3-notify2
-# (no documentation, no script in bindir)
-%{python_sitelib}/notify2.py
-%{python_sitelib}/notify2.pyc
-%{python_sitelib}/notify2-%{version}-py%{py_ver}.egg-info
+%files %python_files
+%defattr(-,root,root,-)
+%doc LICENSE
+%{python_sitelib}/*
%changelog
++++++ notify2-0.3.tar.gz -> notify2-0.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify2-0.3/LICENSE new/notify2-0.3.1/LICENSE
--- old/notify2-0.3/LICENSE 1970-01-01 01:00:00.000000000 +0100
+++ new/notify2-0.3.1/LICENSE 2017-04-28 15:57:22.000000000 +0200
@@ -0,0 +1,39 @@
+notify2 is under the BSD 2-Clause License.
+
+Some of the examples (icon.py, default-action.py, multi-actions.py and qt-app.py)
+are derived from pynotify examples, and are therefore `LGPL-2.1 http://opensource.org/licenses/lgpl-2.1.php`_,
+© 2006 Christian Hammond .
+
+Contributors
+------------
+
+* Thomas Kluyver
+* John Terry
+
+License text
+------------
+
+Copyright (c) 2012, Thomas Kluyver & contributors
+
+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.
+
+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/notify2-0.3/PKG-INFO new/notify2-0.3.1/PKG-INFO
--- old/notify2-0.3/PKG-INFO 2012-05-14 20:50:17.000000000 +0200
+++ new/notify2-0.3.1/PKG-INFO 2017-04-28 16:03:25.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: notify2
-Version: 0.3
+Version: 0.3.1
Summary: Python interface to DBus notifications
Home-page: https://bitbucket.org/takluyver/pynotify2
Author: Thomas Kluyver
@@ -18,7 +18,8 @@
)
n.show()
- To see more of what's possible, refer to docstrings of methods and objects.
+ API docs are `available on ReadTheDocs https://notify2.readthedocs.org/en/latest/`_,
+ or you can refer to docstrings.
Based on the notifications spec at:
http://developer.gnome.org/notification-spec/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify2-0.3/docs/Makefile new/notify2-0.3.1/docs/Makefile
--- old/notify2-0.3/docs/Makefile 1970-01-01 01:00:00.000000000 +0100
+++ new/notify2-0.3.1/docs/Makefile 2017-04-28 15:55:54.000000000 +0200
@@ -0,0 +1,153 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = _build
+
+# 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 " 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 " 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/notify2.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/notify2.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/notify2"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/notify2"
+ @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."
+
+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."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify2-0.3/docs/conf.py new/notify2-0.3.1/docs/conf.py
--- old/notify2-0.3/docs/conf.py 1970-01-01 01:00:00.000000000 +0100
+++ new/notify2-0.3.1/docs/conf.py 2017-04-28 15:55:54.000000000 +0200
@@ -0,0 +1,253 @@
+# -*- coding: utf-8 -*-
+#
+# notify2 documentation build configuration file, created by
+# sphinx-quickstart on Fri Jun 14 11:35:07 2013.
+#
+# 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, os
+
+# To get docstrings, we need to be able to import dbus, but we don't need to
+# actually use it.
+try:
+ import dbus
+except ImportError:
+ sys.modules['dbus'] = object()
+
+# 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.intersphinx', 'sphinx.ext.viewcode']
+
+# 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'notify2'
+copyright = u'2013, 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.3'
+# The full version, including alpha/beta/rc tags.
+release = '0.3'
+
+# 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 = []
+
+
+# -- 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']
+
+# 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 = 'notify2doc'
+
+
+# -- 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]).
+latex_documents = [
+ ('index', 'notify2.tex', u'notify2 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', 'notify2', u'notify2 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', 'notify2', u'notify2 Documentation',
+ u'Thomas Kluyver', 'notify2', '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'
+
+
+# Example configuration for intersphinx: refer to the Python standard library.
+intersphinx_mapping = {'http://docs.python.org/': None}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify2-0.3/docs/index.rst new/notify2-0.3.1/docs/index.rst
--- old/notify2-0.3/docs/index.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/notify2-0.3.1/docs/index.rst 2017-04-28 15:55:54.000000000 +0200
@@ -0,0 +1,96 @@
+notify2 API documentation
+=========================
+
+notify2 is a replacement for pynotify which can be used from different GUI toolkits
+and from programs without a GUI. The API is largely the same as that of pynotify,
+but some less important parts are left out.
+
+You can alternatively use the GObject Introspection bindings to libnotify
+(``from gi.repository import Notify``). I'd recommend that for GTK applications,
+while notify2 has fewer dependencies for non-GTK applications. It should be easy
+to switch between the two.
+
+Notifications are sent to a notification daemon over `D-Bus http://www.freedesktop.org/wiki/Software/dbus/`_,
+according to the `Desktop notifications spec http://people.gnome.org/~mccann/docs/notification-spec/notification-spec-lat...`_,
+and the server is responsible for displaying them to the user. So your application
+has limited control over when and how a notification appears. For example,
+Ubuntu uses the `NotifyOSD daemon https://wiki.ubuntu.com/NotifyOSD`_.
+
+.. toctree::
+ :maxdepth: 1
+
+ license
+
+.. module:: notify2
+
+.. autofunction:: init
+
+.. autofunction:: get_server_caps
+
+.. autofunction:: get_server_info
+
+Creating and showing notifications
+----------------------------------
+
+.. autoclass:: Notification
+
+ .. automethod:: show
+
+ .. automethod:: update
+
+ .. automethod:: close
+
+Extra parameters
+----------------
+
+.. class:: Notification
+
+ .. automethod:: set_urgency
+
+ .. automethod:: set_timeout
+
+ .. automethod:: set_category
+
+ .. automethod:: set_location
+
+ .. automethod:: set_icon_from_pixbuf
+
+ .. automethod:: set_hint
+
+ .. automethod:: set_hint_byte
+
+Callbacks
+---------
+
+To receive callbacks, you must have set a D-Bus event loop when you called
+:func:`init`.
+
+.. class:: Notification
+
+ .. automethod:: connect
+
+ .. automethod:: add_action
+
+
+Constants
+---------
+
+.. data:: URGENCY_LOW
+ URGENCY_NORMAL
+ URGENCY_CRITICAL
+
+ Urgency levels to pass to :meth:`Notification.set_urgency`.
+
+.. data:: EXPIRES_DEFAULT
+ EXPIRES_NEVER
+
+ Special expiration times to pass to :meth:`Notification.set_timeout`.
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify2-0.3/docs/license.rst new/notify2-0.3.1/docs/license.rst
--- old/notify2-0.3/docs/license.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/notify2-0.3.1/docs/license.rst 2017-04-28 15:55:54.000000000 +0200
@@ -0,0 +1,42 @@
+License and Contributors
+========================
+
+notify2 is under the BSD 2-Clause License.
+
+Some of the examples (icon.py, default-action.py, multi-actions.py and qt-app.py)
+are derived from pynotify examples, and are therefore `LGPL-2.1 http://opensource.org/licenses/lgpl-2.1.php`_,
+© 2006 Christian Hammond .
+
+Contributors
+------------
+
+* Thomas Kluyver
+* John Terry
+
+License text
+------------
+
+Copyright (c) 2012, Thomas Kluyver & contributors
+
+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.
+
+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/notify2-0.3/docs/make.bat new/notify2-0.3.1/docs/make.bat
--- old/notify2-0.3/docs/make.bat 1970-01-01 01:00:00.000000000 +0100
+++ new/notify2-0.3.1/docs/make.bat 2017-04-28 15:55:54.000000000 +0200
@@ -0,0 +1,190 @@
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=_build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
+set I18NSPHINXOPTS=%SPHINXOPTS% .
+if NOT "%PAPER%" == "" (
+ set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+ set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+ :help
+ echo.Please use `make ^` where ^ 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. text to make text files
+ echo. man to make manual pages
+ echo. texinfo to make Texinfo files
+ echo. gettext to make PO message catalogs
+ echo. changes to make an overview over all changed/added/deprecated items
+ echo. linkcheck to check all external links for integrity
+ echo. doctest to run all doctests embedded in the documentation if enabled
+ goto end
+)
+
+if "%1" == "clean" (
+ for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+ del /q /s %BUILDDIR%\*
+ goto end
+)
+
+if "%1" == "html" (
+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+ goto end
+)
+
+if "%1" == "dirhtml" (
+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+ goto end
+)
+
+if "%1" == "singlehtml" (
+ %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+ goto end
+)
+
+if "%1" == "pickle" (
+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the pickle files.
+ goto end
+)
+
+if "%1" == "json" (
+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the JSON files.
+ goto end
+)
+
+if "%1" == "htmlhelp" (
+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+ goto end
+)
+
+if "%1" == "qthelp" (
+ %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+ echo.^> qcollectiongenerator %BUILDDIR%\qthelp\notify2.qhcp
+ echo.To view the help file:
+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\notify2.ghc
+ goto end
+)
+
+if "%1" == "devhelp" (
+ %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished.
+ goto end
+)
+
+if "%1" == "epub" (
+ %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The epub file is in %BUILDDIR%/epub.
+ goto end
+)
+
+if "%1" == "latex" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "text" (
+ %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The text files are in %BUILDDIR%/text.
+ goto end
+)
+
+if "%1" == "man" (
+ %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The manual pages are in %BUILDDIR%/man.
+ goto end
+)
+
+if "%1" == "texinfo" (
+ %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
+ goto end
+)
+
+if "%1" == "gettext" (
+ %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
+ goto end
+)
+
+if "%1" == "changes" (
+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.The overview file is in %BUILDDIR%/changes.
+ goto end
+)
+
+if "%1" == "linkcheck" (
+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+ goto end
+)
+
+if "%1" == "doctest" (
+ %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+ goto end
+)
+
+:end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify2-0.3/examples/notify2.py new/notify2-0.3.1/examples/notify2.py
--- old/notify2-0.3/examples/notify2.py 1970-01-01 01:00:00.000000000 +0100
+++ new/notify2-0.3.1/examples/notify2.py 2017-05-08 19:03:59.527853972 +0200
@@ -0,0 +1 @@
+symbolic link to ../notify2.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify2-0.3/notify2.py new/notify2-0.3.1/notify2.py
--- old/notify2-0.3/notify2.py 2012-05-14 20:05:30.000000000 +0200
+++ new/notify2-0.3.1/notify2.py 2017-04-28 16:02:11.000000000 +0200
@@ -10,7 +10,8 @@
)
n.show()
-To see more of what's possible, refer to docstrings of methods and objects.
+API docs are `available on ReadTheDocs https://notify2.readthedocs.org/en/latest/`_,
+or you can refer to docstrings.
Based on the notifications spec at:
http://developer.gnome.org/notification-spec/
@@ -37,6 +38,8 @@
import dbus
+__version__ = '0.3.1'
+
# Constants
EXPIRES_DEFAULT = -1
EXPIRES_NEVER = 0
@@ -53,6 +56,9 @@
_have_mainloop = False
class UninittedError(RuntimeError):
+ """Error raised if you try to communicate with the server before calling
+ :func:`init`.
+ """
pass
class UninittedDbusObj(object):
@@ -63,7 +69,8 @@
dbus_iface = UninittedDbusObj()
def init(app_name, mainloop=None):
- """Initialise the Dbus connection.
+ """Initialise the D-Bus connection. Must be called before you send any
+ notifications, or retrieve server info or capabilities.
To get callbacks from notifications, DBus must be integrated with a mainloop.
There are three ways to achieve this:
@@ -127,6 +134,9 @@
def get_server_caps():
"""Get a list of server capabilities.
+
+ These are short strings, listed `in the spec http://people.gnome.org/~mccann/docs/notification-spec/notification-spec-lat...`_.
+ Vendors may also list extra capabilities with an 'x-' prefix, e.g. 'x-canonical-append'.
"""
return [str(x) for x in dbus_iface.GetCapabilities()]
@@ -146,12 +156,20 @@
def _action_callback(nid, action):
nid, action = int(nid), str(action)
- n = notifications_registry[nid]
+ try:
+ n = notifications_registry[nid]
+ except KeyError:
+ #this message was created through some other program.
+ return
n._action_callback(action)
def _closed_callback(nid, reason):
nid, reason = int(nid), int(reason)
- n = notifications_registry[nid]
+ try:
+ n = notifications_registry[nid]
+ except KeyError:
+ #this message was created through some other program.
+ return
n._closed_callback(n)
del notifications_registry[nid]
@@ -162,7 +180,27 @@
# Controlling notifications ----------------------------------------------------
+ActionsDictClass = dict # fallback for old version of Python
+try:
+ from collections import OrderedDict
+ ActionsDictClass = OrderedDict
+except ImportError:
+ pass
+
+
class Notification(object):
+ """A notification object.
+
+ summary : str
+ The title text
+ message : str
+ The body text, if the server has the 'body' capability.
+ icon : str
+ Path to an icon image, or the name of a stock icon. Stock icons available
+ in Ubuntu are `listed here https://wiki.ubuntu.com/NotificationDevelopmentGuidelines#How_do_I_get_these...`_.
+ You can also set an icon from data in your application - see
+ :meth:`set_icon_from_pixbuf`.
+ """
id = 0
timeout = -1 # -1 = server default settings
_closed_callback = no_op
@@ -172,11 +210,14 @@
self.message = message
self.icon = icon
self.hints = {}
- self.actions = {}
+ self.actions = ActionsDictClass()
self.data = {} # Any data the user wants to attach
def show(self):
"""Ask the server to show the notification.
+
+ Call this after you have finished setting any parameters of the
+ notification that you want.
"""
nid = dbus_iface.Notify(appname, # app_name (spec names)
self.id, # replaces_id
@@ -196,8 +237,8 @@
def update(self, summary, message="", icon=None):
"""Replace the summary and body of the notification, and optionally its
- icon. You should call show() again after this to display the updated
- notification.
+ icon. You should call :meth:`show` again after this to display the
+ updated notification.
"""
self.summary = summary
self.message = message
@@ -205,14 +246,15 @@
self.icon = icon
def close(self):
- """Ask the server to close this notification.
- """
+ """Ask the server to close this notification."""
if self.id != 0:
dbus_iface.CloseNotification(self.id)
def set_hint(self, key, value):
"""n.set_hint(key, value) <--> n.hints[key] = value
+ See `hints in the spec http://people.gnome.org/~mccann/docs/notification-spec/notification-spec-lat...`_.
+
Only exists for compatibility with pynotify.
"""
self.hints[key] = value
@@ -235,12 +277,15 @@
def set_category(self, category):
"""Set the 'category' hint for this notification.
+
+ See `categories in the spec http://people.gnome.org/~mccann/docs/notification-spec/notification-spec-lat...`_.
"""
self.hints['category'] = category
def set_timeout(self, timeout):
"""Set the display duration in milliseconds, or one of the special
- values EXPIRES_DEFAULT or EXPIRES_NEVER.
+ values EXPIRES_DEFAULT or EXPIRES_NEVER. This is a request, which the
+ server might ignore.
Only exists for compatibility with pynotify; you can simply set::
@@ -259,7 +304,9 @@
return self.timeout
def add_action(self, action, label, callback, user_data=None):
- """Add an action to the notification (if the server supports it).
+ """Add an action to the notification.
+
+ Check for the 'actions' server capability before using this.
action : str
A brief key.
@@ -298,7 +345,9 @@
def connect(self, event, callback):
"""Set the callback for the notification closing; the only valid value
- for event is 'closed'. The API is compatible with pynotify.
+ for event is 'closed' (the parameter is kept for compatibility with pynotify).
+
+ The callback will be called with the :class:`Notification` instance.
"""
if event != 'closed':
raise ValueError("'closed' is the only valid value for event", event)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify2-0.3/setup.cfg new/notify2-0.3.1/setup.cfg
--- old/notify2-0.3/setup.cfg 1970-01-01 01:00:00.000000000 +0100
+++ new/notify2-0.3.1/setup.cfg 2017-04-28 16:00:23.000000000 +0200
@@ -0,0 +1,2 @@
+[bdist_wheel]
+universal=1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify2-0.3/setup.py new/notify2-0.3.1/setup.py
--- old/notify2-0.3/setup.py 2012-05-14 20:49:11.000000000 +0200
+++ new/notify2-0.3.1/setup.py 2017-04-28 15:55:54.000000000 +0200
@@ -1,9 +1,18 @@
from distutils.core import setup
+
+# To load the docstring, we need to be able to import dbus, but we don't
+# actually use it.
+try:
+ import dbus
+except ImportError:
+ import sys
+ sys.modules['dbus'] = object()
+
import notify2
long_description = notify2.__doc__
setup(name='notify2',
- version='0.3',
+ version='0.3.1',
description='Python interface to DBus notifications',
long_description=long_description,
author='Thomas Kluyver',