Hello community,

here is the log from the commit of package python-colorama for openSUSE:Factory 
checked in at 2013-05-02 11:37:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-colorama (Old)
 and      /work/SRC/openSUSE:Factory/.python-colorama.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-colorama"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-colorama/python-colorama.changes  
2012-11-21 17:06:22.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-colorama.new/python-colorama.changes     
2013-05-02 11:37:13.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Apr 29 11:52:55 UTC 2013 - [email protected]
+
+- update to 0.2.5:
+  * various small bugfixes 
+
+-------------------------------------------------------------------

Old:
----
  colorama-0.2.4.tar.gz

New:
----
  colorama-0.2.5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-colorama.spec ++++++
--- /var/tmp/diff_new_pack.8fDUK4/_old  2013-05-02 11:37:14.000000000 +0200
+++ /var/tmp/diff_new_pack.8fDUK4/_new  2013-05-02 11:37:14.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-colorama
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -13,15 +13,16 @@
 # published by the Open Source Initiative.
 
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
 
 
 Name:           python-colorama
-Version:        0.2.4
+Version:        0.2.5
 Release:        0
-License:        BSD-3-Clause
 Summary:        Cross-platform colored terminal text
-Url:            http://code.google.com/p/colorama/
+License:        BSD-3-Clause
 Group:          Development/Languages/Python
+Url:            http://code.google.com/p/colorama/
 Source:         
http://pypi.python.org/packages/source/c/colorama/colorama-%{version}.tar.gz
 BuildRequires:  python-devel
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ colorama-0.2.4.tar.gz -> colorama-0.2.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/colorama-0.2.4/CHANGELOG.rst 
new/colorama-0.2.5/CHANGELOG.rst
--- old/colorama-0.2.4/CHANGELOG.rst    1970-01-01 01:00:00.000000000 +0100
+++ new/colorama-0.2.5/CHANGELOG.rst    2011-06-25 11:59:44.000000000 +0200
@@ -0,0 +1,79 @@
+0.2.3
+       Split changelog out into separate file.
+0.2.2
+    Fix bug which caused init() to raise, introduced in 0.2.1.
+    Remove asserts which cause problems in various circumstances. At least
+    some users saw asserts fail on 'success' returned from win32 functions,
+    even though the win32 functions appear to have worked correctly.
+0.2.1
+    Completely broken: I added a bug which caused init() to raise.
+    Added some documentation for cursor positioning and clear screen to README.
+    Add 'reinit' and 'deinit' functions, as suggested by Charles FOL and
+    Romanov DA.
+0.2
+    Merge in changes from Daniel Griffith: Add ANSI cursor positioning &
+    partial support for clear screen. Patch submitted by Oscar Lester, don't
+    send RESET_ALL to non-tty. Demos split into separate files and moved into
+    their own directory. Tweak sys.path in demos so they run against local
+    source, not installed version of Colorama.
+0.1.18
+    Fix README (no such attr as Fore.DEFAULT, etc), kindly reported by nodakai.
+0.1.17
+    Prevent printing of garbage ANSI codes upon installing with pip
+0.1.16
+    Re-upload to fix previous error. Make clean now removes old MANIFEST.
+0.1.15
+    Completely broken. Distribution was empty due to leftover invalid MANIFEST
+    file from building on a different platform.
+    Fix python3 incompatibility kindly reported by G |uumlaut| nter Kolousek
+0.1.14
+    Fix hard-coded reset to white-on-black colors. Fore.RESET, Back.RESET
+    and Style.RESET_ALL now revert to the colors as they were when init()
+    was called. Some lessons hopefully learned about testing prior to release.
+0.1.13
+    Completely broken: barfed when installed using pip.
+0.1.12
+    Completely broken: contained no source code. double oops.
+0.1.11
+    Completely broken: fatal import errors on Ubuntu. oops.
+0.1.10
+    Stop emulating 'bright' text with bright backgrounds.
+    Display 'normal' text using win32 normal foreground instead of bright.
+    Drop support for 'dim' text.
+0.1.9
+    Fix incompatibility with Python 2.5 and earlier.
+    Remove setup.py dependency on setuptools, now uses stdlib distutils.
+0.1.8
+    Fix ghastly errors all over the place on Ubuntu.
+    Add init kwargs 'convert' and 'strip', which supercede the old 'wrap'.
+0.1.7
+    Python 3 compatible.
+    Fix: Now strips ansi on windows without necessarily converting it to
+    win32 calls (eg. if output is not a tty.)
+    Fix: Flaky interaction of interleaved ansi sent to stdout and stderr.
+    Improved demo.sh (hg checkout only.)
+0.1.6
+    Fix ansi sequences with no params now default to parmlist of [0].
+    Fix flaky behaviour of autoreset and reset_all atexit.
+    Fix stacking of repeated atexit calls - now just called once.
+    Fix ghastly import problems while running tests.
+    'demo.py' (hg checkout only) now demonstrates autoreset and reset atexit.
+    Provide colorama.VERSION, used by setup.py.
+    Tests defanged so they no longer actually change terminal color when run.
+0.1.5
+    Now works on Ubuntu.
+0.1.4
+    Implemented RESET_ALL on application exit
+0.1.3
+    Implemented init(wrap=False)
+0.1.2
+    Implemented init(autoreset=True)
+0.1.1
+    Minor tidy
+0.1
+    Works on Windows for foreground color, background color, bright or dim
+
+
+.. |uumlaut| unicode:: U+00FC .. u with umlaut
+   :trim:
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/colorama-0.2.4/PKG-INFO new/colorama-0.2.5/PKG-INFO
--- old/colorama-0.2.4/PKG-INFO 2011-06-25 12:18:21.000000000 +0200
+++ new/colorama-0.2.5/PKG-INFO 2013-02-20 21:05:17.000000000 +0100
@@ -1,15 +1,17 @@
-Metadata-Version: 1.0
-Name: colorama
-Version: 0.2.4
-Summary: Cross-platform colored terminal text.
-Home-page: http://code.google.com/p/colorama/
-Author: Jonathan Hartley
-Author-email: [email protected]
-License: BSD
+Metadata-Version: 1.1
+Name: colorama
+Version: 0.2.5
+Summary: Cross-platform colored terminal text.
+Home-page: http://code.google.com/p/colorama/
+Author: Jonathan Hartley
+Author-email: [email protected]
+License: BSD
 Description: Download and docs:
             http://pypi.python.org/pypi/colorama
         Development:
             http://code.google.com/p/colorama
+        Discussion group:
+             https://groups.google.com/forum/#!forum/python-colorama
         
         Description
         ===========
@@ -87,16 +89,16 @@
         constant shorthand for ANSI escape sequences::
         
             from colorama import Fore, Back, Style
-            print Fore.RED + 'some red text'
-            print Back.GREEN + and with a green background'
-            print Style.DIM + 'and in dim text'
-            print + Fore.RESET + Back.RESET + Style.RESET_ALL
-            print 'back to normal now'
+            print(Fore.RED + 'some red text')
+            print(Back.GREEN + and with a green background')
+            print(Style.DIM + 'and in dim text')
+            print(+ Fore.RESET + Back.RESET + Style.RESET_ALL)
+            print('back to normal now')
         
         or simply by manually printing ANSI sequences from your own code::
         
-            print '/033[31m' + 'some red text'
-            print '/033[30m' # and reset to default color
+            print('/033[31m' + 'some red text')
+            print('/033[30m' # and reset to default color)
         
         or Colorama can be used happily in conjunction with existing ANSI 
libraries
         such as Termcolor::
@@ -108,7 +110,7 @@
             init()
         
             # then use Termcolor for all colored text output
-            print colored('Hello, World!', 'green', 'on_red')
+            print(colored('Hello, World!', 'green', 'on_red'))
         
         Available formatting constants are::
         
@@ -139,8 +141,8 @@
         
                 from colorama import init
                 init(autoreset=True)
-                print Fore.RED + 'some red text'
-                print 'automatically back to default color again'
+                print(Fore.RED + 'some red text')
+                print('automatically back to default color again')
         
         init(strip=None):
             Pass ``True`` or ``False`` to override whether ansi codes should be
@@ -162,24 +164,34 @@
             continue to work as normal. To do cross-platform colored output, 
you can
             use Colorama's ``AnsiToWin32`` proxy directly::
         
+                import sys
                 from colorama import init, AnsiToWin32
                 init(wrap=False)
                 stream = AnsiToWin32(sys.stderr).stream
+        
+                # Python 2
                 print >>stream, Fore.BLUE + 'blue text on stderr'    
         
+                # Python 3
+                print(Fore.BLUE + 'blue text on stderr', file=stream)
+                
         
         Status & Known Problems
         =======================
         
-        I've personally only tested it on WinXP (CMD, Console2) and Ubuntu
-        (gnome-terminal, xterm), although it sounds like others are using it 
on other
-        platforms too.
+        I've personally only tested it on WinXP (CMD, Console2), Ubuntu 
+        (gnome-terminal, xterm), and OSX.
+        
+        Some presumably valid ANSI sequences aren't recognised (see details 
below)
+        but to my knowledge nobody has yet complained about this. Puzzling.
         
         See outstanding issues and wishlist at:
         http://code.google.com/p/colorama/issues/list
         
         If anything doesn't work for you, or doesn't do what you expected or 
hoped for,
-        I'd *love* to hear about it on that issues list.
+        I'd love to hear about it on that issues list, would be delighted by 
patches,
+        and would be happy to grant commit access to anyone who submits a 
working patch
+        or two.
         
         
         Recognised ANSI Sequences
@@ -251,8 +263,9 @@
         Running tests requires:
         
         - Michael Foord's 'mock' module to be installed.
-        - Either to be run under Python2.7 or 3.1 stdlib unittest, or to have 
Michael
-          Foord's 'unittest2' module to be installed.
+        - Tests are written using the 2010 era updates to 'unittest', and 
require to
+          be run either using Python2.7 or greater, or else to have Michael 
Foord's
+          'unittest2' module installed.
         
         unittest2 test discovery doesn't work for colorama, so I use 'nose'::
         
@@ -264,24 +277,25 @@
         
         Thanks
         ======
-        Daniel Griffith for multiple fabulous patches.
-        Oscar Lesta for valuable fix to stop ANSI chars being sent to non-tty 
output.
-        Roger Binns, for many suggestions, valuable feedback, & bug reports.
-        Tim Golden for thought and much appreciated feedback on the initial 
idea.
-        
-        
-Keywords: color colour terminal text ansi windows crossplatform xplatform
-Platform: UNKNOWN
-Classifier: Development Status :: 4 - Beta
-Classifier: Environment :: Console
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: BSD License
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.5
-Classifier: Programming Language :: Python :: 2.6
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.1
-Classifier: Programming Language :: Python :: 3.2
-Classifier: Topic :: Terminals
+        | User 'stuyck', for suggesting Python3 compatible updates to README.
+        | Daniel Griffith for multiple fabulous patches.
+        | Oscar Lesta for valuable fix to stop ANSI chars being sent to 
non-tty output.
+        | Roger Binns, for many suggestions, valuable feedback, & bug reports.
+        | Tim Golden for thought and much appreciated feedback on the initial 
idea.
+        
+        
+Keywords: color colour terminal text ansi windows crossplatform xplatform
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Environment :: Console
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.5
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.1
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Topic :: Terminals
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/colorama-0.2.4/README.txt 
new/colorama-0.2.5/README.txt
--- old/colorama-0.2.4/README.txt       2011-06-25 12:07:37.000000000 +0200
+++ new/colorama-0.2.5/README.txt       2013-02-20 20:48:18.000000000 +0100
@@ -2,6 +2,8 @@
     http://pypi.python.org/pypi/colorama
 Development:
     http://code.google.com/p/colorama
+Discussion group:
+     https://groups.google.com/forum/#!forum/python-colorama
 
 Description
 ===========
@@ -79,16 +81,16 @@
 constant shorthand for ANSI escape sequences::
 
     from colorama import Fore, Back, Style
-    print Fore.RED + 'some red text'
-    print Back.GREEN + and with a green background'
-    print Style.DIM + 'and in dim text'
-    print + Fore.RESET + Back.RESET + Style.RESET_ALL
-    print 'back to normal now'
+    print(Fore.RED + 'some red text')
+    print(Back.GREEN + and with a green background')
+    print(Style.DIM + 'and in dim text')
+    print(+ Fore.RESET + Back.RESET + Style.RESET_ALL)
+    print('back to normal now')
 
 or simply by manually printing ANSI sequences from your own code::
 
-    print '/033[31m' + 'some red text'
-    print '/033[30m' # and reset to default color
+    print('/033[31m' + 'some red text')
+    print('/033[30m' # and reset to default color)
 
 or Colorama can be used happily in conjunction with existing ANSI libraries
 such as Termcolor::
@@ -100,7 +102,7 @@
     init()
 
     # then use Termcolor for all colored text output
-    print colored('Hello, World!', 'green', 'on_red')
+    print(colored('Hello, World!', 'green', 'on_red'))
 
 Available formatting constants are::
 
@@ -131,8 +133,8 @@
 
         from colorama import init
         init(autoreset=True)
-        print Fore.RED + 'some red text'
-        print 'automatically back to default color again'
+        print(Fore.RED + 'some red text')
+        print('automatically back to default color again')
 
 init(strip=None):
     Pass ``True`` or ``False`` to override whether ansi codes should be
@@ -154,24 +156,34 @@
     continue to work as normal. To do cross-platform colored output, you can
     use Colorama's ``AnsiToWin32`` proxy directly::
 
+        import sys
         from colorama import init, AnsiToWin32
         init(wrap=False)
         stream = AnsiToWin32(sys.stderr).stream
+
+        # Python 2
         print >>stream, Fore.BLUE + 'blue text on stderr'    
 
+        # Python 3
+        print(Fore.BLUE + 'blue text on stderr', file=stream)
+        
 
 Status & Known Problems
 =======================
 
-I've personally only tested it on WinXP (CMD, Console2) and Ubuntu
-(gnome-terminal, xterm), although it sounds like others are using it on other
-platforms too.
+I've personally only tested it on WinXP (CMD, Console2), Ubuntu 
+(gnome-terminal, xterm), and OSX.
+
+Some presumably valid ANSI sequences aren't recognised (see details below)
+but to my knowledge nobody has yet complained about this. Puzzling.
 
 See outstanding issues and wishlist at:
 http://code.google.com/p/colorama/issues/list
 
 If anything doesn't work for you, or doesn't do what you expected or hoped for,
-I'd *love* to hear about it on that issues list.
+I'd love to hear about it on that issues list, would be delighted by patches,
+and would be happy to grant commit access to anyone who submits a working patch
+or two.
 
 
 Recognised ANSI Sequences
@@ -243,8 +255,9 @@
 Running tests requires:
 
 - Michael Foord's 'mock' module to be installed.
-- Either to be run under Python2.7 or 3.1 stdlib unittest, or to have Michael
-  Foord's 'unittest2' module to be installed.
+- Tests are written using the 2010 era updates to 'unittest', and require to
+  be run either using Python2.7 or greater, or else to have Michael Foord's
+  'unittest2' module installed.
 
 unittest2 test discovery doesn't work for colorama, so I use 'nose'::
 
@@ -256,8 +269,9 @@
 
 Thanks
 ======
-Daniel Griffith for multiple fabulous patches.
-Oscar Lesta for valuable fix to stop ANSI chars being sent to non-tty output.
-Roger Binns, for many suggestions, valuable feedback, & bug reports.
-Tim Golden for thought and much appreciated feedback on the initial idea.
+| User 'stuyck', for suggesting Python3 compatible updates to README.
+| Daniel Griffith for multiple fabulous patches.
+| Oscar Lesta for valuable fix to stop ANSI chars being sent to non-tty output.
+| Roger Binns, for many suggestions, valuable feedback, & bug reports.
+| Tim Golden for thought and much appreciated feedback on the initial idea.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/colorama-0.2.4/colorama/__init__.py 
new/colorama-0.2.5/colorama/__init__.py
--- old/colorama-0.2.4/colorama/__init__.py     2011-06-25 12:15:25.000000000 
+0200
+++ new/colorama-0.2.5/colorama/__init__.py     2013-02-20 21:03:19.000000000 
+0100
@@ -2,5 +2,5 @@
 from .ansi import Fore, Back, Style
 from .ansitowin32 import AnsiToWin32
 
-VERSION = '0.2.4'
+VERSION = '0.2.5'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/colorama-0.2.4/colorama/ansitowin32.py 
new/colorama-0.2.5/colorama/ansitowin32.py
--- old/colorama-0.2.4/colorama/ansitowin32.py  2011-06-19 21:15:41.000000000 
+0200
+++ new/colorama-0.2.5/colorama/ansitowin32.py  2011-10-15 22:48:48.000000000 
+0200
@@ -179,4 +179,11 @@
         elif command in ('J'):
             func = winterm.erase_data
             func(params, on_stderr=self.on_stderr)
+        elif command == 'A':
+            if params == () or params == None:
+                num_rows = 1
+            else:
+                num_rows = params[0]
+            func = winterm.cursor_up
+            func(num_rows, on_stderr=self.on_stderr)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/colorama-0.2.4/colorama/winterm.py 
new/colorama-0.2.5/colorama/winterm.py
--- old/colorama-0.2.4/colorama/winterm.py      2011-06-19 19:45:56.000000000 
+0200
+++ new/colorama-0.2.5/colorama/winterm.py      2013-02-20 21:01:05.000000000 
+0100
@@ -66,6 +66,14 @@
             handle = win32.STDERR
         win32.SetConsoleTextAttribute(handle, attrs)
 
+    def get_position(self, handle):
+        position = win32.GetConsoleScreenBufferInfo(handle).dwCursorPosition
+        # Because Windows coordinates are 0-based,
+        # and win32.SetConsoleCursorPosition expects 1-based.
+        position.X += 1
+        position.Y += 1
+        return position
+    
     def set_cursor_position(self, position=None, on_stderr=False):
         if position is None:
             #I'm not currently tracking the position, so there is no default.
@@ -76,13 +84,23 @@
             handle = win32.STDERR
         win32.SetConsoleCursorPosition(handle, position)
 
+    def cursor_up(self, num_rows=0, on_stderr=False):
+        if num_rows == 0:
+            return
+        handle = win32.STDOUT
+        if on_stderr:
+            handle = win32.STDERR
+        position = self.get_position(handle)
+        adjusted_position = (position.Y - num_rows, position.X)
+        self.set_cursor_position(adjusted_position, on_stderr)
+
     def erase_data(self, mode=0, on_stderr=False):
         # 0 (or None) should clear from the cursor to the end of the screen.
         # 1 should clear from the cursor to the beginning of the screen.
         # 2 should clear the entire screen. (And maybe move cursor to (1,1)?)
         #
-        # At the moment, I only support mode 2. From looking at the API, it 
-        #    should be possible to calculate a different number of bytes to 
clear, 
+        # At the moment, I only support mode 2. From looking at the API, it
+        #    should be possible to calculate a different number of bytes to 
clear,
         #    and to do so relative to the cursor position.
         if mode[0] not in (2,):
             return
@@ -90,12 +108,12 @@
         if on_stderr:
             handle = win32.STDERR
         # here's where we'll home the cursor
-        coord_screen = win32.COORD(0,0) 
+        coord_screen = win32.COORD(0,0)
         csbi = win32.GetConsoleScreenBufferInfo(handle)
         # get the number of character cells in the current buffer
         dw_con_size = csbi.dwSize.X * csbi.dwSize.Y
         # fill the entire screen with blanks
-        win32.FillConsoleOutputCharacter(handle, ord(' '), dw_con_size, 
coord_screen)
+        win32.FillConsoleOutputCharacter(handle, ' ', dw_con_size, 
coord_screen)
         # now set the buffer's attributes accordingly
         win32.FillConsoleOutputAttribute(handle, self.get_attrs(), 
dw_con_size, coord_screen );
         # put the cursor at (0, 0)

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to