1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
From 6f57fc0eb5f7c50d95a3a44c2acce439de8a6f67 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@debian.org>
Date: Tue, 4 Mar 2014 11:08:48 +0000
Subject: Adjust tests to support Python 3.4.
The fix for http://bugs.python.org/issue13831 broke our tests.
Monkey-patch it out so that we can still see the original problem.
Author: Colin Watson <cjwatson@debian.org>
Forwarded: https://github.com/ionelmc/python-tblib/pull/3
Last-Update: 2014-03-04
Patch-Name: py34.patch
---
README.rst | 8 ++++++--
tox.ini | 5 +++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/README.rst b/README.rst
index eb35db7..a99e8aa 100644
--- a/README.rst
+++ b/README.rst
@@ -187,7 +187,11 @@ How's this useful ? Imagine you're using multiprocessing like this::
>>> import traceback
>>> from multiprocessing import Pool
+ >>> import multiprocessing.pool
>>> from examples import func_a
+ >>> # Undo the fix for http://bugs.python.org/issue13831 so that we can
+ >>> # see the effects of our change.
+ >>> multiprocessing.pool.ExceptionWithTraceback = lambda e, t: e
>>> pool = Pool()
>>> try:
... for i in pool.map(func_a, range(5)):
@@ -196,7 +200,7 @@ How's this useful ? Imagine you're using multiprocessing like this::
... print(traceback.format_exc())
...
Traceback (most recent call last):
- File "<doctest README.rst[31]>", line 2, in <module>
+ File "<doctest README.rst[33]>", line 2, in <module>
for i in pool.map(func_a, range(5)):
File "/usr/lib/.../multiprocessing/pool.py", line ..., in map
...
@@ -221,7 +225,7 @@ Not very useful is it? Let's sort this out::
... print(traceback.format_exc())
...
Traceback (most recent call last):
- File "<doctest README.rst[36]>", line 4, in <module>
+ File "<doctest README.rst[38]>", line 4, in <module>
i.reraise()
File ".../tblib/decorators.py", line ..., in reraise
reraise(self.exc_type, self.exc_value, self.traceback)
diff --git a/tox.ini b/tox.ini
index 85055d1..c77127f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,6 +5,7 @@ envlist =
py3,
py3.2,
py3.3,
+ py3.4,
pypy
[testenv]
@@ -42,6 +43,10 @@ deps =
basepython = python3.3
deps =
{[base]deps}
+[testenv:py3.4]
+basepython = python3.4
+deps =
+ {[base]deps}
[testenv:pypy]
basepython = pypy
deps =
|