[Pkg-bitcoin-commits] [python-quamash] 06/78: Merge remote-tracking branch 'origin/gh45'

Jonas Smedegaard dr at jones.dk
Tue Dec 19 01:19:51 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.6.0_dfsg-1
in repository python-quamash.

commit 6d1a5561e70ce85a2bf4fa8b1074e945737bc34a
Merge: d5c67ff 1c7c11f
Author: inso <insomniak.fr at gmaiL.com>
Date:   Sat Jul 30 08:30:57 2016 +0200

    Merge remote-tracking branch 'origin/gh45'

 quamash/__init__.py | 19 +++++++++++--------
 quamash/_unix.py    |  2 --
 quamash/_windows.py |  3 ---
 3 files changed, 11 insertions(+), 13 deletions(-)

diff --cc quamash/__init__.py
index cae45b6,8e02ba8..fdfa5f2
--- a/quamash/__init__.py
+++ b/quamash/__init__.py
@@@ -169,39 -169,9 +169,32 @@@ def _make_signaller(qtimpl_qtcore, *arg
  			signal = qtimpl_qtcore.pyqtSignal(*args)
  	return Signaller()
  
- if os.name == 'nt':
- 	from . import _windows
- 	_baseclass = _windows.baseclass
- else:
- 	from . import _unix
- 	_baseclass = _unix.baseclass
- 
  
 +class _SimpleTimer(QtCore.QObject):
 +	def __init__(self, timeout, callback):
 +		super().__init__()
 +		self.callback = callback
 +		self.timer_id = self.startTimer(timeout)
 +		self.stopped = False
 +
 +	def timerEvent(self, event):  # noqa
 +		assert self.timer_id == event.timerId()
 +		if self.stopped:
 +			self.killTimer(self.timer_id)
 +		elif event.timerId() == self.timer_id:
 +			self.callback()
 +			self.killTimer(self.timer_id)
 +			self.stopped = True
 +
 +	def stop(self):
 +		self.stopped = True
 +
 +	def cancel(self):
 +		self.stopped = True
 +
 +
  @with_logger
- class QEventLoop(_baseclass):
+ class _QEventLoop:
  
  	"""
  	Implementation of asyncio event loop that uses the Qt Event loop.
@@@ -587,3 -559,22 +580,13 @@@
  			cls._logger.error(*args, **kwds)
  		except:
  			sys.stderr.write('{!r}, {!r}\n'.format(args, kwds))
+ 
+ from ._unix import _SelectorEventLoop
+ QSelectorEventLoop = type('QSelectorEventLoop', (_QEventLoop, _SelectorEventLoop), {})
+ 
+ if os.name == 'nt':
+ 	from ._windows import _ProactorEventLoop
+ 	QIOCPEventLoop = type('QSelectorEventLoop', (_QEventLoop, _ProactorEventLoop), {})
+ 	QEventLoop = QIOCPEventLoop
+ else:
+ 	QEventLoop = QSelectorEventLoop
 -
 -
 -class _Cancellable:
 -	def __init__(self, timer, loop):
 -		self.__timer = timer
 -		self.__loop = loop
 -
 -	def cancel(self):
 -		self.__timer.stop()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/python-quamash.git



More information about the Pkg-bitcoin-commits mailing list