Skip to content

Commit

Permalink
Merge branch 'release/v0.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
singulared committed Jul 6, 2016
2 parents 115298b + f751d0b commit 4f261a1
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.1.1 (2016-05-12)

Fix:

- Non default asyncio loop using

## 0.1.0 (2016-05-12)

Add:
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Docker based testing
You can use docker for running:

.. code-block:: bash
DOCKER_CLUSTER=1 python setup.py test
Contribute
Expand Down
1 change: 1 addition & 0 deletions aioriak/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ async def async_create_client(self, host=None, port=None, **client_args):

def setUp(self):
super().setUp()
asyncio.set_event_loop(None)
self.loop = asyncio.new_event_loop()
self.client = self.create_client()

Expand Down
8 changes: 8 additions & 0 deletions aioriak/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ async def go():
self.assertEqual(zero_client_id,
(await self.client.get_client_id()))
self.loop.run_until_complete(go())

def test_non_zero_client_id(self):
async def go():
non_zero_client_id = b'\0\0\1\0'
await self.client.set_client_id(non_zero_client_id)
self.assertEqual(non_zero_client_id,
(await self.client.get_client_id()))
self.loop.run_until_complete(go())
4 changes: 2 additions & 2 deletions aioriak/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def _decode_quorum(self, rw):

async def _stream(self, msg_code, msg=None, expect=None):
self._writer.write(self._encode_message(msg_code, msg))
self._parser = self.StreamParserClass(self._reader)
self._parser = self.StreamParserClass(self._reader, loop=self._loop)
responses = []
async for code, pbo in self._parser:
if expect is not None and code != expect:
Expand All @@ -516,7 +516,7 @@ async def _request(self, msg_code, msg=None, expect=None):
del self._parser
else:
tail = bytearray()
self._parser = self.ParserClass(self._reader, tail)
self._parser = self.ParserClass(self._reader, tail, loop=self._loop)
code, response = await self._parser.get_pbo()

if expect is not None and code != expect:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='aioriak',
version='0.1.0',
version='0.1.1',
description='Async implementation of Riak DB python client',
author='Makc Belousov',
author_email='[email protected]',
Expand Down

0 comments on commit 4f261a1

Please sign in to comment.