dev-python/pyprof2calltree: Bump to 1.4.0

This commit is contained in:
Michał Górny
2017-05-17 20:57:42 +02:00
parent 6d020b8c95
commit 2158b8709b
3 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
From 582eeeaa930639ccfe9b789b057f170824edd73a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Wed, 17 May 2017 20:53:29 +0200
Subject: [PATCH] tests: Fix StringIO import for Python 3
Python 3 no longer provides a 'cStringIO' module. Use StringIO from 'io'
module instead.
---
tests/test_integration.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/test_integration.py b/tests/test_integration.py
index e6f432c..cf02a4f 100644
--- a/tests/test_integration.py
+++ b/tests/test_integration.py
@@ -3,7 +3,10 @@ import pstats
import unittest
from .profile_code import top, expected_output
-from cStringIO import StringIO
+try:
+ from cStringIO import StringIO
+except ImportError:
+ from io import StringIO
from pyprof2calltree import CalltreeConverter
class MockTimeProfile(cProfile.Profile):
--
2.13.0