[Python-modules-commits] [aioxmlrpc] 01/03: Import aioxmlrpc_0.4.orig.tar.gz
Piotr Ożarowski
piotr at moszumanska.debian.org
Tue Jun 20 14:11:53 UTC 2017
This is an automated email from the git hooks/post-receive script.
piotr pushed a commit to branch master
in repository aioxmlrpc.
commit 71c7ba02d8bae4a7929b388f2e540bba1e0a3bbe
Author: Piotr Ożarowski <piotr at debian.org>
Date: Tue Jun 20 16:07:09 2017 +0200
Import aioxmlrpc_0.4.orig.tar.gz
---
CHANGES.rst | 6 ++++++
CONTRIBUTORS.rst | 9 +++++++++
LICENSE | 2 +-
PKG-INFO | 8 +++++++-
aioxmlrpc.egg-info/PKG-INFO | 8 +++++++-
aioxmlrpc.egg-info/SOURCES.txt | 1 +
aioxmlrpc/__init__.py | 2 +-
aioxmlrpc/client.py | 12 ++++++++++--
aioxmlrpc/tests/test_client.py | 25 +++++++++++++++++++++++++
setup.cfg | 1 -
10 files changed, 67 insertions(+), 7 deletions(-)
diff --git a/CHANGES.rst b/CHANGES.rst
index 1c2a657..ff2da85 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,12 @@
Changelog
=========
+0.4 released on 2017-03-30
+--------------------------
+
+ * Fix NXDOMAIN Exception handling (Vladimir Rutsky)
+ * Fix cancel of futures handling (Gustavo Tavares Cabral)
+
0.3 released on 2016-06-16
--------------------------
diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst
new file mode 100644
index 0000000..3f53124
--- /dev/null
+++ b/CONTRIBUTORS.rst
@@ -0,0 +1,9 @@
+Contributors
+============
+
+A. Jesse Jiryu Davis
+Gustavo Tavares Cabral
+Vladimir Rutsky
+nibrag
+sayoun
+
diff --git a/LICENSE b/LICENSE
index a70b345..a62f153 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2014-2016, Guillaume Gauvrit and Contibutors
+Copyright (c) 2014-2017, Guillaume Gauvrit and Contibutors
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/PKG-INFO b/PKG-INFO
index 77385e1..d3cf3a2 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: aioxmlrpc
-Version: 0.3
+Version: 0.4
Summary: XML-RPC client for asyncio
Home-page: https://github.com/mardiros/aioxmlrpc
Author: Guillaume Gauvrit
@@ -65,6 +65,12 @@ Description: =========
Changelog
=========
+ 0.4 released on 2017-03-30
+ --------------------------
+
+ * Fix NXDOMAIN Exception handling (Vladimir Rutsky)
+ * Fix cancel of futures handling (Gustavo Tavares Cabral)
+
0.3 released on 2016-06-16
--------------------------
diff --git a/aioxmlrpc.egg-info/PKG-INFO b/aioxmlrpc.egg-info/PKG-INFO
index 77385e1..d3cf3a2 100644
--- a/aioxmlrpc.egg-info/PKG-INFO
+++ b/aioxmlrpc.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: aioxmlrpc
-Version: 0.3
+Version: 0.4
Summary: XML-RPC client for asyncio
Home-page: https://github.com/mardiros/aioxmlrpc
Author: Guillaume Gauvrit
@@ -65,6 +65,12 @@ Description: =========
Changelog
=========
+ 0.4 released on 2017-03-30
+ --------------------------
+
+ * Fix NXDOMAIN Exception handling (Vladimir Rutsky)
+ * Fix cancel of futures handling (Gustavo Tavares Cabral)
+
0.3 released on 2016-06-16
--------------------------
diff --git a/aioxmlrpc.egg-info/SOURCES.txt b/aioxmlrpc.egg-info/SOURCES.txt
index c5ffc94..c18f3fd 100644
--- a/aioxmlrpc.egg-info/SOURCES.txt
+++ b/aioxmlrpc.egg-info/SOURCES.txt
@@ -1,4 +1,5 @@
CHANGES.rst
+CONTRIBUTORS.rst
LICENSE
MANIFEST.in
README.rst
diff --git a/aioxmlrpc/__init__.py b/aioxmlrpc/__init__.py
index cdbaacb..ae86ad2 100644
--- a/aioxmlrpc/__init__.py
+++ b/aioxmlrpc/__init__.py
@@ -2,4 +2,4 @@
XML-RPC Protocol for ``asyncio``
"""
-__version__ = '0.3'
+__version__ = '0.4'
diff --git a/aioxmlrpc/client.py b/aioxmlrpc/client.py
index f75f353..5ed292b 100644
--- a/aioxmlrpc/client.py
+++ b/aioxmlrpc/client.py
@@ -73,12 +73,20 @@ class AioTransport(xmlrpc.Transport):
if response.status != 200:
raise ProtocolError(url, response.status,
body, response.headers)
+ except asyncio.CancelledError:
+ raise
except ProtocolError:
raise
except Exception as exc:
log.error('Unexpected error', exc_info=True)
- raise ProtocolError(url, response.status,
- str(exc), response.headers)
+ if response is not None:
+ errcode = response.status
+ headers = response.headers
+ else:
+ errcode = 0
+ headers = {}
+
+ raise ProtocolError(url, errcode, str(exc), headers)
return self.parse_response(body)
def parse_response(self, body):
diff --git a/aioxmlrpc/tests/test_client.py b/aioxmlrpc/tests/test_client.py
index 304045d..98fef6b 100644
--- a/aioxmlrpc/tests/test_client.py
+++ b/aioxmlrpc/tests/test_client.py
@@ -128,3 +128,28 @@ class ServerProxyTestCase(TestCase):
self.assertEqual(response, 1)
self.assertIs(self.loop, client._loop)
self.assertTrue(transp._connector.close.called)
+
+
+ at asyncio.coroutine
+def failing_request(*args, **kwargs):
+ raise OSError
+
+
+class HTTPErrorTestCase(TestCase):
+
+ def setUp(self):
+ self.loop = asyncio.new_event_loop()
+ asyncio.set_event_loop(None)
+ self.aiohttp_request = mock.patch('aiohttp.request', new=failing_request)
+ self.aiohttp_request.start()
+
+ def tearDown(self):
+ self.aiohttp_request.stop()
+
+ def test_http_error(self):
+ from aioxmlrpc.client import ServerProxy, ProtocolError
+ client = ServerProxy('http://nonexistent/nonexistent', loop=self.loop)
+ self.assertRaises(ProtocolError,
+ self.loop.run_until_complete,
+ client.name.space.proxfyiedcall()
+ )
diff --git a/setup.cfg b/setup.cfg
index 861a9f5..8bfd5a1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,4 @@
[egg_info]
tag_build =
tag_date = 0
-tag_svn_revision = 0
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/aioxmlrpc.git
More information about the Python-modules-commits
mailing list