Skip to content

Commit 7b44490

Browse files
committed
Merge branch '0.16'
2 parents 958911b + 55dc13b commit 7b44490

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

CHANGES.txt

+9
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,20 @@ CHANGES
1717

1818
- Fix keep-alive support for aiohttp clients #406
1919

20+
21+
0.16.4 (06-13-2015)
22+
-------------------
23+
24+
- Don't clear current exception in multidict's `__repr__` (cythonized
25+
versions) #410
26+
27+
2028
0.16.3 (05-30-2015)
2129
-------------------
2230

2331
- Fix StaticRoute vulnerability to directory traversal attacks #380
2432

33+
2534
0.16.2 (05-27-2015)
2635
-------------------
2736

aiohttp/_multidict.pyx

+4-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ cdef class _Base:
108108
return _ValuesView.__new__(_ValuesView, self._items)
109109

110110
def __repr__(self):
111-
body = ', '.join("'{}': {!r}".format(k, v) for k, v in self.items())
111+
lst = []
112+
for k, v in self._items:
113+
lst.append("'{}': {!r}".format(k, v))
114+
body = ', '.join(lst)
112115
return '<{} {{{}}}>'.format(self.__class__.__name__, body)
113116

114117
def __richcmp__(self, other, op):

tests/test_multidict.py

+8
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,14 @@ def test_isdisjoint2(self):
215215
d = self.make_dict([('key', 'value1')])
216216
self.assertFalse(d.keys().isdisjoint({'key'}))
217217

218+
def test_clear_exception_issue_410(self):
219+
d = self.make_dict()
220+
try:
221+
raise Exception
222+
except Exception:
223+
repr(d)
224+
self.assertIsNotNone(sys.exc_info()[0])
225+
218226

219227
class _MultiDictTests(_BaseTest):
220228

0 commit comments

Comments
 (0)