[Python-modules-commits] [python-hbmqtt] 03/05: merge patched into master
Stein Magnus Jodal
jodal at moszumanska.debian.org
Wed Jul 26 13:19:09 UTC 2017
This is an automated email from the git hooks/post-receive script.
jodal pushed a commit to branch master
in repository python-hbmqtt.
commit 63df6c007731dc6cc0b015a0957896c9e97ca690
Merge: d09e0c6 546888e
Author: Stein Magnus Jodal <jodal at debian.org>
Date: Wed Jul 26 14:57:54 2017 +0200
merge patched into master
debian/.git-dpm | 4 +-
.../0001-transitions-0.5.0-compatability.patch | 65 ++++++++++++++++++++++
debian/patches/series | 1 +
hbmqtt/broker.py | 17 +++---
setup.py | 2 +-
5 files changed, 79 insertions(+), 10 deletions(-)
diff --cc debian/.git-dpm
index a85c54f,0000000..75b252b
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
+# see git-dpm(1) from git-dpm package
- da5faab0b6d7197934f241864deef23388cf2248
- da5faab0b6d7197934f241864deef23388cf2248
++546888e06923b24d138f5e9ac1fb6219f1889ead
++546888e06923b24d138f5e9ac1fb6219f1889ead
+da5faab0b6d7197934f241864deef23388cf2248
+da5faab0b6d7197934f241864deef23388cf2248
+python-hbmqtt_0.9.orig.tar.gz
+e0b3bb04b278ac8da99034fe35052e87674b0133
+45078
+debianTag="debian/%e%v"
+patchedTag="patched/%e%v"
+upstreamTag="upstream/%e%u"
diff --cc debian/patches/0001-transitions-0.5.0-compatability.patch
index 0000000,0000000..eece46c
new file mode 100644
--- /dev/null
+++ b/debian/patches/0001-transitions-0.5.0-compatability.patch
@@@ -1,0 -1,0 +1,65 @@@
++From 546888e06923b24d138f5e9ac1fb6219f1889ead Mon Sep 17 00:00:00 2001
++From: Stein Magnus Jodal <jodal at debian.org>
++Date: Wed, 26 Jul 2017 14:56:56 +0200
++Subject: transitions 0.5.0 compatability
++
++---
++ hbmqtt/broker.py | 17 ++++++++++-------
++ setup.py | 2 +-
++ 2 files changed, 11 insertions(+), 8 deletions(-)
++
++diff --git a/hbmqtt/broker.py b/hbmqtt/broker.py
++index d2d4311..ab33ab4 100644
++--- a/hbmqtt/broker.py
+++++ b/hbmqtt/broker.py
++@@ -216,9 +216,10 @@ class Broker:
++ self._retained_messages = dict()
++ self.transitions.start()
++ self.logger.debug("Broker starting")
++- except MachineError as me:
++- self.logger.warn("[WARN-0001] Invalid method call at this moment: %s" % me)
++- raise BrokerException("Broker instance can't be started: %s" % me)
+++ except (MachineError, ValueError) as exc:
+++ # Backwards compat: MachineError is raised by transitions < 0.5.0.
+++ self.logger.warning("[WARN-0001] Invalid method call at this moment: %s" % exc)
+++ raise BrokerException("Broker instance can't be started: %s" % exc)
++
++ yield from self.plugins_manager.fire_event(EVENT_BROKER_PRE_START)
++ try:
++@@ -302,9 +303,10 @@ class Broker:
++ self._subscriptions = dict()
++ self._retained_messages = dict()
++ self.transitions.shutdown()
++- except MachineError as me:
++- self.logger.debug("Invalid method call at this moment: %s" % me)
++- raise BrokerException("Broker instance can't be stopped: %s" % me)
+++ except (MachineError, ValueError) as exc:
+++ # Backwards compat: MachineError is raised by transitions < 0.5.0.
+++ self.logger.debug("Invalid method call at this moment: %s" % exc)
+++ raise BrokerException("Broker instance can't be stopped: %s" % exc)
++
++ # Fire broker_shutdown event to plugins
++ yield from self.plugins_manager.fire_event(EVENT_BROKER_PRE_SHUTDOWN)
++@@ -393,7 +395,8 @@ class Broker:
++ try:
++ client_session.transitions.connect()
++ break
++- except MachineError:
+++ except (MachineError, ValueError):
+++ # Backwards compat: MachineError is raised by transitions < 0.5.0.
++ self.logger.warning("Client %s is reconnecting too quickly, make it wait" % client_session.client_id)
++ # Wait a bit may be client is reconnecting too fast
++ yield from asyncio.sleep(1, loop=self._loop)
++diff --git a/setup.py b/setup.py
++index 31b7d93..499ef4b 100644
++--- a/setup.py
+++++ b/setup.py
++@@ -17,7 +17,7 @@ setup(
++ include_package_data=True,
++ platforms='all',
++ install_requires=[
++- 'transitions==0.2.5',
+++ 'transitions',
++ 'websockets',
++ 'passlib',
++ 'docopt',
diff --cc debian/patches/series
index 0000000,0000000..af6cc41
new file mode 100644
--- /dev/null
+++ b/debian/patches/series
@@@ -1,0 -1,0 +1,1 @@@
++0001-transitions-0.5.0-compatability.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-hbmqtt.git
More information about the Python-modules-commits
mailing list