Hello community, here is the log from the commit of package python3-pyte for openSUSE:Factory checked in at 2015-08-12 15:14:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-pyte (Old) and /work/SRC/openSUSE:Factory/.python3-pyte.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-pyte" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-pyte/python3-pyte.changes 2015-04-02 16:03:50.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3-pyte.new/python3-pyte.changes 2015-08-12 15:14:03.000000000 +0200 @@ -1,0 +2,11 @@ +Tue Aug 11 15:23:13 UTC 2015 - [email protected] + +- update to version 0.4.10: + * Fixed a bug in `pyte.screens.DiffScreen.draw` which marked the + wrong line as changed when `DECAWM` was enabled. + * `pyte.streams.Stream` now recognizes ESC % sequences for selecting + control character set. However, these operations are no-op in the + current version in a sense that `pyte.streams.ByteStream` does not + handle them to change encoding. + +------------------------------------------------------------------- Old: ---- pyte-0.4.9.tar.gz New: ---- pyte-0.4.10.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-pyte.spec ++++++ --- /var/tmp/diff_new_pack.Uwsg5l/_old 2015-08-12 15:14:03.000000000 +0200 +++ /var/tmp/diff_new_pack.Uwsg5l/_new 2015-08-12 15:14:03.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package python3-pyte # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: python3-pyte -Version: 0.4.9 +Version: 0.4.10 Release: 0 Summary: Simple VTXXX-compatible linux terminal emulator License: LGPL-3.0 ++++++ pyte-0.4.9.tar.gz -> pyte-0.4.10.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyte-0.4.9/AUTHORS new/pyte-0.4.10/AUTHORS --- old/pyte-0.4.9/AUTHORS 2014-03-26 22:15:01.000000000 +0100 +++ new/pyte-0.4.10/AUTHORS 2015-07-24 14:19:10.000000000 +0200 @@ -10,3 +10,5 @@ - Alexey Shamrin - Steve Cohen - Jonathan Slenders +- David O'Shea +- Andreas Stührk diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyte-0.4.9/CHANGES new/pyte-0.4.10/CHANGES --- old/pyte-0.4.9/CHANGES 2014-12-03 21:55:11.000000000 +0100 +++ new/pyte-0.4.10/CHANGES 2015-08-04 20:03:35.000000000 +0200 @@ -3,6 +3,19 @@ Here you can see the full list of changes between each pyte release. +Version 0.4.10 +-------------- + +Bugfix release, released on August 4th 2015 + +- Fixed a bug in `pyte.screens.DiffScreen.draw` which marked the wrong + line as changed when `DECAWM` was enabled. +- `pyte.streams.Stream` now recognizes ESC % sequences for selecting control + character set. However, these operations are no-op in the current version + in a sense that `pyte.streams.ByteStream` does not handle them to change + encoding. + + Version 0.4.9 ------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyte-0.4.9/PKG-INFO new/pyte-0.4.10/PKG-INFO --- old/pyte-0.4.9/PKG-INFO 2014-12-03 22:29:07.000000000 +0100 +++ new/pyte-0.4.10/PKG-INFO 2015-08-04 20:15:27.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pyte -Version: 0.4.9 +Version: 0.4.10 Summary: Simple VTXXX-compatible terminal emulator. Home-page: https://github.com/selectel/pyte Author: Sergei Lebedev @@ -17,7 +17,7 @@ | |_) || |_| || |_| __/ | .__/ \__, | \__|\___| | | __/ | - |_| |___/ 0.4.9 + |_| |___/ 0.4.10 What is ``pyte``? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyte-0.4.9/README new/pyte-0.4.10/README --- old/pyte-0.4.9/README 2014-12-03 21:54:31.000000000 +0100 +++ new/pyte-0.4.10/README 2015-07-26 22:01:39.000000000 +0200 @@ -9,7 +9,7 @@ | |_) || |_| || |_| __/ | .__/ \__, | \__|\___| | | __/ | - |_| |___/ 0.4.9 + |_| |___/ 0.4.10 What is ``pyte``? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyte-0.4.9/docs/conf.py new/pyte-0.4.10/docs/conf.py --- old/pyte-0.4.9/docs/conf.py 2014-12-03 21:54:42.000000000 +0100 +++ new/pyte-0.4.10/docs/conf.py 2015-07-26 22:01:22.000000000 +0200 @@ -50,9 +50,9 @@ # built documents. # # The short X.Y version. -version = '0.4.9' +version = '0.4.10' # The full version, including alpha/beta/rc tags. -release = '0.4.9' +release = '0.4.10' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyte-0.4.9/pyte/escape.py new/pyte-0.4.10/pyte/escape.py --- old/pyte-0.4.9/pyte/escape.py 2014-04-22 21:22:50.000000000 +0200 +++ new/pyte-0.4.10/pyte/escape.py 2015-07-26 21:45:56.000000000 +0200 @@ -3,7 +3,7 @@ pyte.escape ~~~~~~~~~~~ - This module defines bot CSI and non-CSI escape sequences, recognized + This module defines both CSI and non-CSI escape sequences, recognized by :class:`~pyte.streams.Stream` and subclasses. :copyright: (c) 2011-2013 by Selectel, see AUTHORS for details. @@ -41,6 +41,19 @@ DECRC = "8" +# "Percent" escape sequences. +# --------------------------- + +#: *Select default (ISO 646 / ISO 8859-1)*. +DEFAULT = "@" + +#: *Select UTF-8*. +UTF8 = "G" + +#: *Select UTF-8 (obsolete)*. +UTF8_OBSOLETE = "8" + + # "Sharp" escape sequences. # ------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyte-0.4.9/pyte/screens.py new/pyte-0.4.10/pyte/screens.py --- old/pyte-0.4.9/pyte/screens.py 2014-05-08 15:04:52.000000000 +0200 +++ new/pyte-0.4.10/pyte/screens.py 2015-07-24 14:18:20.000000000 +0200 @@ -624,7 +624,7 @@ * ``1`` -- Erases from beginning of line to cursor, including cursor position. * ``2`` -- Erases complete line. - :param bool private: when ``True`` character attributes aren left + :param bool private: when ``True`` character attributes are left unchanged **not implemented**. """ interval = ( @@ -652,7 +652,7 @@ including cursor position. * ``2`` -- Erases complete display. All lines are erased and changed to single-width. Cursor does not move. - :param bool private: when ``True`` character attributes aren left + :param bool private: when ``True`` character attributes are left unchanged **not implemented**. """ interval = ( @@ -883,8 +883,11 @@ super(DiffScreen, self).resize(*args, **kwargs) def draw(self, *args): - self.dirty.add(self.cursor.y) + # Call the superclass's method before marking the row as + # dirty, as when wrapping is enabled, draw() might change + # self.cursor.y. super(DiffScreen, self).draw(*args) + self.dirty.add(self.cursor.y) def index(self): if self.cursor.y == self.margins.bottom: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyte-0.4.9/pyte/streams.py new/pyte-0.4.10/pyte/streams.py --- old/pyte-0.4.9/pyte/streams.py 2014-12-03 21:43:47.000000000 +0100 +++ new/pyte-0.4.10/pyte/streams.py 2015-07-26 22:03:56.000000000 +0200 @@ -54,7 +54,7 @@ `man console_codes <http://linux.die.net/man/4/console_codes>`_ For details on console codes listed bellow in :attr:`basic`, - :attr:`escape`, :attr:`csi` and :attr:`sharp`. + :attr:`escape`, :attr:`csi`, :attr:`sharp` and :attr:`percent`. """ #: Control sequences, which don't require any arguments. @@ -86,6 +86,14 @@ esc.DECALN: "alignment_display", } + #: "percent" escape sequences (Linux sequence to select character + # set) -- ``ESC % <C>``. + percent = { + esc.DEFAULT: "charset_default", + esc.UTF8: "charset_utf8", + esc.UTF8_OBSOLETE: "charset_utf8", + } + #: CSI escape sequences -- ``CSI P1;P2;...;Pn <fn>``. csi = { esc.ICH: "insert_characters", @@ -121,6 +129,7 @@ "escape": self._escape, "arguments": self._arguments, "sharp": self._sharp, + "percent": self._percent, "charset": self._charset } @@ -135,7 +144,7 @@ self.current = "" def consume(self, char): - """Consume a single string character and advance the state as + """Consumes a single string character and advance the state as necessary. :param str char: a character to consume. @@ -157,7 +166,7 @@ raise def feed(self, chars): - """Consume a string and advance the state as necessary. + """Consumes a string and advance the state as necessary. :param str chars: a string to feed from. """ @@ -188,7 +197,7 @@ self.listeners.pop(idx) def dispatch(self, event, *args, **kwargs): - """Dispatch an event. + """Dispatches an event. Event handlers are looked up implicitly in the listeners' ``__dict__``, so, if a listener only wants to handle ``DRAW`` @@ -227,7 +236,7 @@ # ................... def _stream(self, char): - """Process a character when in the default ``"stream"`` state.""" + """Processes a character when in the default ``"stream"`` state.""" if char in self.basic: self.dispatch(self.basic[char]) elif char == ctrl.ESC: @@ -238,15 +247,23 @@ self.dispatch("draw", char) def _escape(self, char): - """Handle characters seen when in an escape sequence. + """Handles characters seen when in an escape sequence. Most non-VT52 commands start with a left-bracket after the escape and then a stream of parameters and a command; with a single notable exception -- :data:`escape.DECOM` sequence, which starts with a sharp. + + .. versionchanged:: 0.4.10 + + For compatibility with Linux terminal stream also recognizes + ``ESC % C`` sequences for selecting control character set. + However, in the current version these are no-op. """ if char == "#": self.state = "sharp" + elif char == "%": + self.state = "percent" elif char == "[": self.state = "arguments" elif char in "()": @@ -256,15 +273,19 @@ self.dispatch(self.escape[char]) def _sharp(self, char): - """Parse arguments of a `"#"` seqence.""" + """Parses arguments of a `"#"` sequence.""" self.dispatch(self.sharp[char]) + def _percent(self, char): + """Parses arguments of a `"%"` sequence.""" + self.dispatch(self.percent[char]) + def _charset(self, char): - """Parse ``G0`` or ``G1`` charset code.""" + """Parses ``G0`` or ``G1`` charset code.""" self.dispatch("set_charset", char) def _arguments(self, char): - """Parse arguments of an escape sequence. + """Parses arguments of an escape sequence. All parameters are unsigned, positive decimal integers, with the most significant digit sent first. Any parameter greater @@ -310,15 +331,15 @@ """A stream, which takes bytes (instead of strings) as input and tries to decode them using a given list of possible encodings. It uses :class:`codecs.IncrementalDecoder` internally, so broken - bytes is not an issue. + bytes are not an issue. By default, the following decoding strategy is used: - * First, try strict ``"utf-8"``, proceed if recieved and + * First, try strict ``"utf-8"``, proceed if received and :exc:`UnicodeDecodeError` ... * Try strict ``"cp437"``, failed? move on ... * Use ``"utf-8"`` with invalid bytes replaced -- this one will - allways succeed. + always succeed. >>> stream = ByteStream() >>> stream.feed(b"foo".decode("utf-8")) @@ -369,7 +390,7 @@ class DebugStream(ByteStream): - """Stream, which dumps a subset of the dispatched events to a given + r"""Stream, which dumps a subset of the dispatched events to a given file-like object (:data:`sys.stdout` by default). >>> stream = DebugStream() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyte-0.4.9/pyte.egg-info/PKG-INFO new/pyte-0.4.10/pyte.egg-info/PKG-INFO --- old/pyte-0.4.9/pyte.egg-info/PKG-INFO 2014-12-03 22:29:07.000000000 +0100 +++ new/pyte-0.4.10/pyte.egg-info/PKG-INFO 2015-08-04 20:15:26.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pyte -Version: 0.4.9 +Version: 0.4.10 Summary: Simple VTXXX-compatible terminal emulator. Home-page: https://github.com/selectel/pyte Author: Sergei Lebedev @@ -17,7 +17,7 @@ | |_) || |_| || |_| __/ | .__/ \__, | \__|\___| | | __/ | - |_| |___/ 0.4.9 + |_| |___/ 0.4.10 What is ``pyte``? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyte-0.4.9/setup.cfg new/pyte-0.4.10/setup.cfg --- old/pyte-0.4.9/setup.cfg 2014-12-03 22:29:07.000000000 +0100 +++ new/pyte-0.4.10/setup.cfg 2015-08-04 20:15:27.000000000 +0200 @@ -1,5 +1,5 @@ [egg_info] -tag_build = tag_date = 0 tag_svn_revision = 0 +tag_build = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyte-0.4.9/setup.py new/pyte-0.4.10/setup.py --- old/pyte-0.4.9/setup.py 2014-12-03 21:55:44.000000000 +0100 +++ new/pyte-0.4.10/setup.py 2015-08-04 20:15:25.000000000 +0200 @@ -18,7 +18,7 @@ LONG_DESCRIPTION = "" -CLASSIFIERS = ( +CLASSIFIERS = [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", @@ -29,7 +29,7 @@ "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Terminals :: Terminal Emulators/X Terminals", -) +] class PyTest(TestCommand): @@ -48,7 +48,7 @@ setup(name="pyte", - version="0.4.9", + version="0.4.10", packages=["pyte"], cmdclass={"test": PyTest}, tests_require=["pytest"], @@ -60,5 +60,4 @@ long_description=LONG_DESCRIPTION, classifiers=CLASSIFIERS, keywords=["vt102", "vte", "terminal emulator"], - url="https://github.com/selectel/pyte" -) + url="https://github.com/selectel/pyte") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyte-0.4.9/tests/test_diff.py new/pyte-0.4.10/tests/test_diff.py --- old/pyte-0.4.9/tests/test_diff.py 2014-03-26 22:06:05.000000000 +0100 +++ new/pyte-0.4.10/tests/test_diff.py 2015-07-24 14:18:20.000000000 +0200 @@ -120,3 +120,21 @@ screen.dirty.clear() screen.erase_in_display(2) assert screen.dirty == set(range(0, screen.lines)) + + +def test_draw_wrap(): + screen = DiffScreen(80, 24) + screen.set_mode(mo.DECAWM) + + # fill every character cell on the first row + for _ in range(80): + screen.draw("g") + assert screen.cursor.y == 0 + screen.dirty.clear() + + # now write one more character which should cause wrapping + screen.draw("h") + assert screen.cursor.y == 1 + # regression test issue #36 where the wrong line was marked as + # dirty + assert screen.dirty == set([1])
