[Pkg-bitcoin-commits] [python-quamash] 67/269: Merge branch 'unix' of https://github.com/aknuds1/quamash

Jonas Smedegaard dr at jones.dk
Fri Nov 24 11:26:17 UTC 2017


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

js pushed a commit to branch master
in repository python-quamash.

commit 8236bfa0d0917939b9e7913e60deb343866eb5ac
Merge: a4dddf6 f3cf538
Author: Mark Harviston <mark.harviston at gmail.com>
Date:   Thu Jul 10 21:19:24 2014 -0700

    Merge branch 'unix' of https://github.com/aknuds1/quamash

 README                   |   6 +-
 quamash/__init__.py      | 162 +++++++--------------------------
 quamash/_common.py       |   5 ++
 quamash/_unix.py         | 229 ++++++++++++++++++++++++++++++++++++++++++++++-
 quamash/_windows.py      |  78 +++++++++++++++-
 tests/test_qeventloop.py |   4 +-
 6 files changed, 347 insertions(+), 137 deletions(-)

diff --cc quamash/__init__.py
index 3c255ca,89db1e5..ef30d0e
--- a/quamash/__init__.py
+++ b/quamash/__init__.py
@@@ -203,24 -158,18 +176,23 @@@ else
  
  
  @with_logger
- class QEventLoop(QtCore.QObject, _baseclass):
+ class QEventLoop(_baseclass):
  	"""
  	Implementation of asyncio event loop that uses the Qt Event loop
 -	>>> @quamash.task
 -	>>> def my_task(x):
 -	>>>     return x + 2
 +	>>> import quamash, asyncio
 +	>>> try: from PyQt5.QtWidgets import QApplication
 +	... except ImportError: from PySide.QtCore import QApplication
  	>>>
 -	>>> app = QApplication()
 -	>>> with QEventLoop(app) as loop:
 -	>>>     y = loop.call_soon(my_task)
 +	>>> app = QApplication([])
  	>>>
 -	>>>     assert y == 4
 +	>>> @asyncio.coroutine
 +	... def xplusy(x, y):
 +	...     yield from asyncio.sleep(2)
 +	...     assert x + y == 4
 +	...     yield from asyncio.sleep(2)
 +	>>> 
 +	>>> with QEventLoop(app) as loop:
 +	...     loop.run_until_complete(xplusy(2,2))
  	"""
  	def __init__(self, app):
  		self.__timers = []

-- 
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