[py-svn] commit/py: hpk42: fix issue4 - large calls to ansi_print can fail on Windows

Bitbucket commits-noreply at bitbucket.org
Wed Apr 6 09:25:22 CEST 2011


1 new changeset in py:

http://bitbucket.org/hpk42/py/changeset/af470ecdf284/
changeset:   r2014:af470ecdf284
user:        hpk42
date:        2011-04-06 09:22:21
summary:     fix issue4 - large calls to ansi_print can fail on Windows
(this is Amaury's fix from the pypy copy)
affected #:  4 files (145 bytes)

--- a/CHANGELOG	Fri Mar 11 13:48:50 2011 +0100
+++ b/CHANGELOG	Wed Apr 06 09:22:21 2011 +0200
@@ -2,6 +2,7 @@
 ==================================================
 
 - fix terminal coloring issue for skipped tests (thanks Amaury)
+- fix issue4 - large calls to ansi_print (thanks Amaury)
 
 Changes between 1.4.1 and 1.4.2
 ==================================================


--- a/py/__init__.py	Fri Mar 11 13:48:50 2011 +0100
+++ b/py/__init__.py	Wed Apr 06 09:22:21 2011 +0200
@@ -8,7 +8,7 @@
 
 (c) Holger Krekel and others, 2004-2010
 """
-__version__ = '1.4.3.dev0'
+__version__ = '1.4.3'
 
 from py import _apipkg
 


--- a/py/_io/terminalwriter.py	Fri Mar 11 13:48:50 2011 +0100
+++ b/py/_io/terminalwriter.py	Wed Apr 06 09:22:21 2011 +0200
@@ -81,7 +81,9 @@
         oldcolors = GetConsoleInfo(handle).wAttributes
         attr |= (oldcolors & 0x0f0)
         SetConsoleTextAttribute(handle, attr)
-        file.write(text)
+        while len(text) > 32768:
+            file.write(text[:32768])
+            text = text[32768:]
         SetConsoleTextAttribute(handle, oldcolors)
     else:
         file.write(text)


--- a/setup.py	Fri Mar 11 13:48:50 2011 +0100
+++ b/setup.py	Wed Apr 06 09:22:21 2011 +0200
@@ -9,7 +9,7 @@
         name='py',
         description='library with cross-python path, ini-parsing, io, code, log facilities',
         long_description = open('README.txt').read(),
-        version='1.4.3.dev0',
+        version='1.4.3',
         url='http://pylib.org',
         license='MIT license',
         platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
@@ -37,4 +37,4 @@
     )
 
 if __name__ == '__main__':
-    main()
+    main()
\ No newline at end of file

Repository URL: https://bitbucket.org/hpk42/py/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the pytest-commit mailing list