mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-27 21:48:16 -07:00
dev-python/pyprof2calltree: Bump to 1.4.0
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user