Hello community,

here is the log from the commit of package python-ntfy for openSUSE:Factory 
checked in at 2018-11-30 16:32:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ntfy (Old)
 and      /work/SRC/openSUSE:Factory/.python-ntfy.new.19453 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ntfy"

Fri Nov 30 16:32:25 2018 rev:2 rq:652681 version:2.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ntfy/python-ntfy.changes  2018-04-24 
15:31:50.733009181 +0200
+++ /work/SRC/openSUSE:Factory/.python-ntfy.new.19453/python-ntfy.changes       
2018-11-30 16:32:33.301349857 +0100
@@ -1,0 +2,10 @@
+Sun Nov 25 19:51:37 UTC 2018 - [email protected]
+
+- Update to ntfy 2.7.0.
+  * Support customizing or disabling the notification icon.
+  * Support cusotmizing the notification timeout.
+  * Have auto-ntfy ignore htop by default.
+  * Make auto-ntfy send notifications in the background so that
+    control returns to the shell faster.
+
+-------------------------------------------------------------------

Old:
----
  ntfy-2.6.0.tar.xz

New:
----
  ntfy-2.7.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-ntfy.spec ++++++
--- /var/tmp/diff_new_pack.aaTHDy/_old  2018-11-30 16:32:36.025346285 +0100
+++ /var/tmp/diff_new_pack.aaTHDy/_new  2018-11-30 16:32:36.029346280 +0100
@@ -22,10 +22,10 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 
 Name:           python-ntfy
-Version:        2.6.0
+Version:        2.7.0
 Release:        0
 Summary:        A utility for sending push notifications
-License:        GPL-3.0
+License:        GPL-3.0-only
 Group:          Development/Languages/Python
 Url:            https://github.com/dschep/ntfy
 Source:         ntfy-%{version}.tar.xz

++++++ _service ++++++
--- /var/tmp/diff_new_pack.aaTHDy/_old  2018-11-30 16:32:36.065346233 +0100
+++ /var/tmp/diff_new_pack.aaTHDy/_new  2018-11-30 16:32:36.065346233 +0100
@@ -2,7 +2,7 @@
   <service name="obs_scm" mode="disabled">
     <param name="url">https://github.com/dschep/ntfy.git</param>
     <param name="scm">git</param>
-    <param name="revision">v2.6.0</param>
+    <param name="revision">v2.7.0</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="versionrewrite-pattern">v(.*)</param>
   </service>

++++++ ntfy-2.6.0.tar.xz -> ntfy-2.7.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ntfy-2.6.0/.travis.yml new/ntfy-2.7.0/.travis.yml
--- old/ntfy-2.6.0/.travis.yml  2018-03-30 15:34:44.000000000 +0200
+++ new/ntfy-2.7.0/.travis.yml  2018-11-23 23:42:53.000000000 +0100
@@ -15,9 +15,6 @@
       python: 2.7
       os: linux
     - language: python
-      python: 3.3
-      os: linux
-    - language: python
       python: 3.4
       os: linux
     - language: python
@@ -36,13 +33,14 @@
 script: |
   set -e
   coverage run --source=ntfy setup.py test
-  if ! python --version 2>&1 |egrep 'Python 3.3' ; then
+  if ! python --version 2>&1; then
     yapf -r ntfy -d
     [ "$(yapf -r ntfy -d | wc -l)" -eq 0 ]
   fi
 after_success: coveralls
 deploy:
   - provider: pypi
+    twine_version: 1.12.1
     distributions: sdist bdist_wheel
     on:
       tags: true
@@ -50,4 +48,4 @@
       repo: dschep/ntfy
     user: dschep
     password:
-      secure: 
efA3tZAR8qOiQkG+uilQE+XdNn1Et+NBZpR36xXIa5i31zUqQQma6TUEeS989nZYINzXZSjYCuIEf4lgaVI587nszsRnmlkhIEmbqPJdUmpLQGeOvlzAOglTNuu9TxalZZfNV1smFJSj+t9ulZrpTT7WBuR9EsCr6fZ21llPUy8lqeFgSqhabXfM8FsplOrKTywIa241WL5qTU3HEeBBGEgke+oG6UTs0z68Kd/nZM2ETPPcXlrzLv8IetsH388LoiV3USMivIaQoeKt0Ulp0aJaNzUBSdKepAjFejtkYv58Q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exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ntfy-2.6.0/README.rst new/ntfy-2.7.0/README.rst
--- old/ntfy-2.6.0/README.rst   2018-03-30 15:34:44.000000000 +0200
+++ new/ntfy-2.7.0/README.rst   2018-11-23 23:42:53.000000000 +0100
@@ -51,6 +51,9 @@
 require ``--system-site-packages`` for the virtualenv and OS X notifications
 don't work at all.
 
+**:penguin: NOTE:** `Linux Desktop Notifications 
<#linux-desktop-notifications---linux>`_
+require Python DBUS bindings. See `here 
<#linux-desktop-notifications---linux>`_ for more info.
+
 Shell integration
 ~~~~~~~~~~~~~~~~~
 ``ntfy`` has support for **automatically** sending notifications when long
@@ -78,12 +81,12 @@
 ~~~~~~
 ``ntfy`` has a few features that require extra dependencies.
     * ``ntfy done -p $PID`` requires installing as ``pip install ntfy[pid]``
-    * emjoi support requires installing as ``pip install ntfy[emoji]``
-    * XMPP support requires installing as ``pip install ntfy[xmpp]``
-    * Telegram support requires installing as ``pip install ntfy[telegram]``
-    * Instapush support requires installing as ``pip install ntfy[instapush]``
-    * Slack support requires installing as ``pip install ntfy[slack]``
-    * Rocket.Chat support requires installing as ``pip install 
ntfy[rocketchat]``
+    * [emoji](https://en.wikipedia.org/wiki/Emoji) support requires installing 
as ``pip install ntfy[emoji]``
+    * [XMPP](https://xmpp.org/) support requires installing as ``pip install 
ntfy[xmpp]``
+    * [Telegram](https://telegram.org/) support requires installing as ``pip 
install ntfy[telegram]``
+    * [Instapush](https://instapush.im/) support requires installing as ``pip 
install ntfy[instapush]``
+    * [Slack](https://slack.com/) support requires installing as ``pip install 
ntfy[slack]``
+    * [Rocket.Chat](https://Rocket.Chat) support requires installing as ``pip 
install ntfy[rocketchat]``
 
 To install multiple extras, separate with commas: e.g., ``pip install 
ntfy[pid,emjoi]``.
 
@@ -134,7 +137,8 @@
         backend: pushover
         user_key: hunter2
 
-See the backends below for available backends and options.
+See the backends below for available backends and options. As of v2.6.0 
``ntfy`` also supports
+`3rd party backends <#3rd-party-backends>`_
 
 `Pushover <https://pushover.net>`_ - ``pushover``
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -180,7 +184,7 @@
     * ``hostname`` (if not from jid)
     * ``port``
     * ``path_to_certs``
-    * ``mtype`` ('chat' required for Google Hangouts)
+    * ``mtype``
 
 Requires extras, install like this: ``pip install ntfy[xmpp]``.
 
@@ -190,12 +194,11 @@
 Without dnspython library installed, you will need
 to specify the server hostname if it doesn't match the jid.
 
-For example, to use Google Talk you would need to use:
-hostname = 'talk.google.com'
-
 Specify port if other than 5222.
 NOTE: Ignored without specified hostname
 
+NOTE: Google Hangouts doesn't support XMPP since 2017
+
 `Telegram <https://telegram.org>`_ - ``telegram``
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Requires extras, install like this: ``pip install ntfy[telegram]``.
@@ -270,15 +273,16 @@
 
 .. code:: shell
 
-    $ sudo apt-get install libdbus-glib-1-dev libdbus-1-dev
-    $ pip install --user dbus-python
+    $ sudo apt install python-dbus # on ubuntu/debian
 
 You will need to install some font that supports emojis (in Debian 
`fonts-symbola` or Gentoo `media-fonts/symbola`).
 
 Optional parameters:
+    * ``icon`` - Specifies path to the notification icon, empty string for no 
icon.
     * ``urgency`` - Specifies the urgency level (low, normal, critical).
     * ``transient`` - Skip the history (exp: the Gnome message tray) (true, 
false).
     * ``soundfile`` - Specifies the notification sound file (e.g. 
/usr/share/sounds/notif.wav).
+    * ``timeout`` - Specifies notification expiration time level (-1 - system 
default, 0 - never expire).
 
 Windows Desktop Notifications - ``win32``
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -365,6 +369,45 @@
     * ``password`` - login password
     * ``room`` - room/channel name to post in
 
+`Matrix.org <https://matrix.org>`_ - ``matrix``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Requires extras, install like this: ``pip install ntfy[matrix]``.
+
+Required parameters:
+    * ``url`` - URL of your homeserver instance
+    * ``roomId`` - room to post in
+    * ``userId`` - login userid
+    * ``password`` - login password
+    * ``token`` - access token
+
+You must either specify ``token``, or ``userId`` and ``password``.
+
+
+`Webpush <https://github.com/dschep/ntfy-webpush>`_ - ``ntfy_webpush``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Webpush support is provded by an external ntfy module, install like this: 
``pip install ntfy ntfy-webpush``.
+
+Required parameters:
+  * ``subscription_info`` - A `PushSubscription 
<https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription>`_ Object
+  * ``private_key`` - the path to private key file or anything else that works 
with `pywebpush <https://github.com/web-push-libs/pywebpush>`_.
+
+For more info, see _`ntfy-webpush` <https://github.com/dschep/ntfy-webpush>`_
+
+
+3rd party backends
+~~~~~~~~~~~~~~~~~~
+To use or implement your own backends, specify the full path of the module as 
your backend. The
+module needs to contain a module with a function called ``notify`` with the 
following signature:
+
+.. code:: python
+
+    def notify(title, message, **kwargs):
+        """
+        kwargs contains retcode if using ntfy done or ntfy shell-integration
+        and all options in your backend's section of the config
+        """
+        pass
+
 
 Other options
 ~~~~~~~~~~~~~
@@ -408,4 +451,5 @@
 - `sambrightman <https://github.com/sambrightman>`_ - Prowl support
 - `mlesniew <https://github.com/mlesniew>`_ - Pushalot support
 - `webworxshop <https://github.com/webworxshop>`_ - Rocket.Chat support
-- `rhabbachi <https://github.com/rhabbachi>`_ - transient option in  Linux 
desktop notifications
+- `rhabbachi <https://github.com/rhabbachi>`_ - transient option in Linux 
desktop notifications
+- `Half-Shot <https://github.com/Half-Shot>`_ - Matrix support
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ntfy-2.6.0/docs/ntfy.backends.rst 
new/ntfy-2.7.0/docs/ntfy.backends.rst
--- old/ntfy-2.6.0/docs/ntfy.backends.rst       2018-03-30 15:34:44.000000000 
+0200
+++ new/ntfy-2.7.0/docs/ntfy.backends.rst       2018-11-23 23:42:53.000000000 
+0100
@@ -101,6 +101,14 @@
     :undoc-members:
     :show-inheritance:
 
+ntfy.backends.matrix module
+-------------------------
+
+.. automodule:: ntfy.backends.matrix
+    :members:
+    :undoc-members:
+    :show-inheritance:
+
 
 Module contents
 ---------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ntfy-2.6.0/ntfy/__init__.py 
new/ntfy-2.7.0/ntfy/__init__.py
--- old/ntfy-2.6.0/ntfy/__init__.py     2018-03-30 15:34:44.000000000 +0200
+++ new/ntfy-2.7.0/ntfy/__init__.py     2018-11-23 23:42:53.000000000 +0100
@@ -6,14 +6,13 @@
 from inspect import getargspec
 from .backends.default import DefaultNotifierError
 
-__version__ = '2.6.0'
+__version__ = '2.7.0'
 
 _user_home = path.expanduser('~')
 _cwd = getcwd()
 if name != 'nt' and _cwd.startswith(_user_home):
-    default_title = '{}@{}:{}'.format(getuser(), gethostname(),
-                                      path.join('~',
-                                                _cwd[len(_user_home) + 1:]))
+    default_title = '{}@{}:{}'.format(
+        getuser(), gethostname(), path.join('~', _cwd[len(_user_home) + 1:]))
 else:
     default_title = '{}@{}:{}'.format(getuser(), gethostname(), _cwd)
 
@@ -68,7 +67,7 @@
 
             args, _, _, defaults = getargspec(notifier.notify)
             possible_args = set(args)
-            required_args = set(args[:-len(defaults)])
+            required_args =  set(args) if defaults is None else 
set(args[:-len(defaults)])
             required_args -= set(['title', 'message', 'retcode'])
             unknown_args = set(backend_config) - possible_args
             missing_args = required_args - set(backend_config)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ntfy-2.6.0/ntfy/backends/linux.py 
new/ntfy-2.7.0/ntfy/backends/linux.py
--- old/ntfy-2.6.0/ntfy/backends/linux.py       2018-03-30 15:34:44.000000000 
+0200
+++ new/ntfy-2.7.0/ntfy/backends/linux.py       2018-11-23 23:42:53.000000000 
+0100
@@ -9,6 +9,7 @@
            urgency=None,
            transient=None,
            soundfile=None,
+           timeout=-1,
            retcode=0):
     try:
         import dbus
@@ -60,5 +61,5 @@
         hints.update({'sound-file': soundfile})
 
     message = message.replace('&', '&amp;')
-    dbus_iface.Notify('ntfy', 0, path.abspath(icon), title, message, [], hints,
-                      -1)
+    dbus_iface.Notify('ntfy', 0, "" if not icon else path.abspath(icon), 
title, 
+                      message, [], hints, int(timeout))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ntfy-2.6.0/ntfy/backends/matrix.py 
new/ntfy-2.7.0/ntfy/backends/matrix.py
--- old/ntfy-2.6.0/ntfy/backends/matrix.py      1970-01-01 01:00:00.000000000 
+0100
+++ new/ntfy-2.7.0/ntfy/backends/matrix.py      2018-11-23 23:42:53.000000000 
+0100
@@ -0,0 +1,17 @@
+from matrix_client.client import MatrixClient
+
+def notify(title, message, url, roomId, userId=None, token=None, 
password=None, retcode=None):
+
+    client = MatrixClient(url)
+    if password is not None:
+        if userId is None:
+            raise Exception("Must supply 'userid' when using 'password'")
+        client.login(userId, password, sync=False)
+    elif token is not None:
+        client.api.token = token
+    else:
+        raise Exception("Must supply 'token' or 'password'")
+    msg_plain = "**{}** {}".format(title, message)
+    msg_html = "<b>{}</b> {}".format(title, message)
+    room = client.join_room(roomId)
+    room.send_html(msg_html, msg_plain)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ntfy-2.6.0/ntfy/shell_integration/auto-ntfy-done.sh 
new/ntfy-2.7.0/ntfy/shell_integration/auto-ntfy-done.sh
--- old/ntfy-2.6.0/ntfy/shell_integration/auto-ntfy-done.sh     2018-03-30 
15:34:44.000000000 +0200
+++ new/ntfy-2.7.0/ntfy/shell_integration/auto-ntfy-done.sh     2018-11-23 
23:42:53.000000000 +0100
@@ -2,7 +2,7 @@
 # If sourcing this via ntfy auto-done, it is sourced for you.
 
 # Default to ignoring some well known interactive programs
-AUTO_NTFY_DONE_IGNORE=${AUTO_NTFY_DONE_IGNORE:-ntfy emacs info less mail man 
meld most mutt nano screen ssh tail tmux vi vim watch}
+AUTO_NTFY_DONE_IGNORE=${AUTO_NTFY_DONE_IGNORE:-ntfy emacs htop info less mail 
man meld most mutt nano screen ssh tail tmux top vi vim watch}
 # Bash option example
 #AUTO_NTFY_DONE_OPTS='-b default'
 # Zsh option example
@@ -21,9 +21,9 @@
     local appname=$(basename "${ntfy_command%% *}")
     [[ " $AUTO_NTFY_DONE_IGNORE " == *" $appname "* ]] && return
 
-    ntfy $AUTO_NTFY_DONE_OPTS done \
+    (ntfy $AUTO_NTFY_DONE_OPTS done \
         $AUTO_NTFY_DONE_UNFOCUSED_ONLY $AUTO_NTFY_DONE_LONGER_THAN \
-        --formatter "$ntfy_command" "$ret_value" "$duration"
+        --formatter "$ntfy_command" "$ret_value" "$duration" &)
 }
 
 function _ntfy_preexec () {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ntfy-2.6.0/ntfy/terminal.py 
new/ntfy-2.7.0/ntfy/terminal.py
--- old/ntfy-2.6.0/ntfy/terminal.py     2018-03-30 15:34:44.000000000 +0200
+++ new/ntfy-2.7.0/ntfy/terminal.py     2018-11-23 23:42:53.000000000 +0100
@@ -1,13 +1,15 @@
 import shlex
 from os import environ, ttyname
-from subprocess import PIPE, Popen, check_output
+from subprocess import PIPE, Popen, check_output, CalledProcessError
 from sys import platform, stdout
 
 
 def linux_window_is_focused():
     xprop_cmd = shlex.split('xprop -root _NET_ACTIVE_WINDOW')
     try:
-        xprop_window_id = int(check_output(xprop_cmd).split()[-1], 16)
+        xprop_window_id = int(check_output(xprop_cmd, stdout=PIPE, 
stderr=PIPE).split()[-1], 16)
+    except CalledProcessError:
+        return False
     except ValueError:
         return False
     except OSError as e:
@@ -30,7 +32,7 @@
 def darwin_iterm2_shell_is_focused():
     focused_tty = osascript_tell(
         'iTerm',
-        'tty of current session of current terminal',
+        'tty of current session of current window',
     )
     return focused_tty == ttyname(stdout.fileno())
 
@@ -46,7 +48,7 @@
 
 def darwin_app_shell_is_focused():
     current_appid = {
-        'iTerm.app': 'iTerm',
+        'iTerm.app': 'iTerm2',
         'Apple_Terminal': 'Terminal',
     }.get(environ.get('TERM_PROGRAM'))
     focused_appid = osascript_tell(
@@ -56,7 +58,7 @@
     if current_appid == focused_appid:
         return {
             'Terminal': darwin_terminal_shell_is_focused,
-            'iTerm': darwin_iterm2_shell_is_focused,
+            'iTerm2': darwin_iterm2_shell_is_focused,
         }[current_appid]()
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ntfy-2.6.0/setup.py new/ntfy-2.7.0/setup.py
--- old/ntfy-2.6.0/setup.py     2018-03-30 15:34:44.000000000 +0200
+++ new/ntfy-2.7.0/setup.py     2018-11-23 23:42:53.000000000 +0100
@@ -16,6 +16,7 @@
     'pid':['psutil'],
     'slack':['slacker'],
     'rocketchat':['rocketchat-API'],
+    'matrix':['matrix_client'],
 }
 test_deps = ['mock', 'sleekxmpp', 'emoji', 'psutil']
 


Reply via email to