Hello community, here is the log from the commit of package python-wcwidth for openSUSE:Leap:15.2 checked in at 2020-03-29 14:55:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/python-wcwidth (Old) and /work/SRC/openSUSE:Leap:15.2/.python-wcwidth.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-wcwidth" Sun Mar 29 14:55:33 2020 rev:12 rq:789112 version:0.1.9 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/python-wcwidth/python-wcwidth.changes 2020-03-02 13:24:47.194568862 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.python-wcwidth.new.3160/python-wcwidth.changes 2020-03-29 14:55:34.643152504 +0200 @@ -1,0 +2,7 @@ +Wed Mar 25 14:31:41 UTC 2020 - pgaj...@suse.com + +- version update to 0.1.9 + * Performance optimization by @avylove , PR #35. + * Updated tables to Unicode Specification 13.0.0. + +------------------------------------------------------------------- Old: ---- wcwidth-0.1.8.tar.gz New: ---- wcwidth-0.1.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-wcwidth.spec ++++++ --- /var/tmp/diff_new_pack.AoJ2Xx/_old 2020-03-29 14:55:34.951152744 +0200 +++ /var/tmp/diff_new_pack.AoJ2Xx/_new 2020-03-29 14:55:34.951152744 +0200 @@ -18,14 +18,14 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-wcwidth -Version: 0.1.8 +Version: 0.1.9 Release: 0 Summary: Number of Terminal column cells of wide-character codes License: MIT Group: Development/Languages/Python URL: https://github.com/jquast/wcwidth Source: https://files.pythonhosted.org/packages/source/w/wcwidth/wcwidth-%{version}.tar.gz -BuildRequires: %{python_module nose} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -60,9 +60,7 @@ } %check -pushd wcwidth/tests -%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} nosetests-%{$python_bin_suffix} test*.py -popd +%pytest %files %{python_files} %license LICENSE.txt ++++++ wcwidth-0.1.8.tar.gz -> wcwidth-0.1.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wcwidth-0.1.8/PKG-INFO new/wcwidth-0.1.9/PKG-INFO --- old/wcwidth-0.1.8/PKG-INFO 2020-01-03 21:28:54.000000000 +0100 +++ new/wcwidth-0.1.9/PKG-INFO 2020-03-23 07:21:21.000000000 +0100 @@ -1,80 +1,81 @@ Metadata-Version: 1.1 Name: wcwidth -Version: 0.1.8 +Version: 0.1.9 Summary: Measures number of Terminal column cells of wide-character codes Home-page: https://github.com/jquast/wcwidth Author: Jeff Quast Author-email: cont...@jeffquast.com License: MIT -Description: .. image:: https://img.shields.io/travis/jquast/wcwidth.svg - :target: https://travis-ci.org/jquast/wcwidth - :alt: Travis Continous Integration - - .. image:: https://img.shields.io/coveralls/jquast/wcwidth.svg - :target: https://coveralls.io/r/jquast/wcwidth - :alt: Coveralls Code Coverage - - .. image:: https://img.shields.io/pypi/v/wcwidth.svg - :target: https://pypi.python.org/pypi/wcwidth/ - :alt: Latest Version - - .. image:: https://img.shields.io/github/license/jquast/wcwidth.svg - :target: https://pypi.python.org/pypi/wcwidth/ - :alt: License - - .. image:: https://img.shields.io/pypi/wheel/wcwidth.svg - :alt: Wheel Status - - .. image:: https://img.shields.io/pypi/dm/wcwidth.svg - :target: https://pypi.python.org/pypi/wcwidth/ - :alt: Downloads - - ============ +Description: ============ Introduction ============ This Library is mainly for those implementing a Terminal Emulator, or programs - that carefully produce output to be interpreted by one. - - **Problem Statement**: When printed to the screen, the length of the string is - usually equal to the number of cells it occupies. However, there are - categories of characters that occupy 2 cells (full-wide), and others that - occupy 0. + that carefully produce output to mimick or to be interpreted by an emulator. + **Problem Statement**: The printible length of *most* strings are equal to the + number of cells they occupy on the screen. However, there are categories of + characters that *occupy 2 cells* (full-wide), and others that *occupy 0* cells + (zero-width). **Solution**: POSIX.1-2001 and POSIX.1-2008 conforming systems provide `wcwidth(3)`_ and `wcswidth(3)`_ C functions of which this python module's functions precisely copy. *These functions return the number of cells a unicode string is expected to occupy.* - This library aims to be forward-looking, portable, and most correct. The most - current release of this API is based on the Unicode Standard release files: - - ``DerivedGeneralCategory-9.0.0.txt`` - *Date: 2016-06-01, 10:34:26 GMT* - © 2016 Unicode®, Inc. - - ``EastAsianWidth-9.0.0.txt`` - *Date: 2016-05-27, 17:00:00 GMT [KW, LI]* - © 2016 Unicode®, Inc. - - Installation ------------ - The stable version of this package is maintained on pypi, install using pip:: + The stable version of this package is maintained on pypi, install or upgrade using pip:: - pip install wcwidth + pip install --upgrade wcwidth Example ------- - To Display ``u'コンニチハ'`` right-adjusted on screen of 80 columns:: + **Problem**: given the following phrase (Japanese), - >>> from wcwidth import wcswidth >>> text = u'コンニチハ' - >>> text_len = wcswidth(text) - >>> print(u' ' * (80 - text_len) + text) + + Python **incorrectly** uses the *string length* of 5 codepoints rather than the + *printible length* of 10 cells, so that when using the `rjust` function, the + output length is wrong:: + + >>> print(len('コンニチハ')) + 5 + + >>> print('コンニチハ'.rjust(11, '_')) + ______コンニチハ + + By defining our own "rjust" function that uses wcwidth, we can correct this:: + + >>> def wc_rjust(text, length, padding=' '): + ... from wcwidth import wcswidth + ... return padding * max(0, (length - wcswidth(text))) + text + ... + + Our **Solution** uses wcswidth to determine the string length correctly:: + + >>> from wcwidth import wcswidth + >>> print(wcswidth('コンニチハ')) + 10 + + >>> print(wc_rjust('コンニチハ', 11, '_')) + _コンニチハ + + Uses + ---- + + This library is used in: + + - asciimatics_: Package to help people create full-screen text UIs. + - blessed_: a simplified wrapper around curses. + - curtsies_: Curses wrapper with a display based on compositing 2d arrays of text. + - ftfy_: Fixes mojibake and other glitches in Unicode text, after the fact. + - pyte_: a Simple VTXXX-compatible linux terminal emulator. + - python-prompt-toolkit_: a Powerful interactive command line building library. + - termtosvg_: Terminal recorder that renders sessions as SVG animations. + wcwidth, wcswidth ----------------- @@ -108,9 +109,11 @@ Caveats ======= - This library attempts to determine the printable width by an unknown targeted - terminal emulator. It does not provide any ability to discern what the target - emulator software, version, of level of support is. Results may vary! + This library attempts to determine the printable width by a fictional terminal, + using the very latest Unicode specification, though some work is in progress for + the ability to select a version, there is no standards conforming ability to + discern what the target emulator software, version, of level of support is. + Results may vary! A `crude method <http://blessed.readthedocs.org/en/latest/examples.html#detect-multibyte-py>`_ @@ -118,11 +121,7 @@ performed using the VT100 Query Cursor Position sequence. The libc version of `wcwidth(3)`_ is often several unicode releases behind, - and therefor several levels of support lower than this python library. You - may determine an exacting list of these discrepancies using the project - file `wcwidth-libc-comparator.py - <https://github.com/jquast/wcwidth/tree/master/bin/wcwidth-libc-comparator.py>`_. - + and therefor several levels of support lower than this python library. ========== Developing @@ -140,6 +139,22 @@ tox + Use the interactive browser:: + + python bin/wcwidth-browser.py + + This library aims to be forward-looking, portable, and most correct. The most + current release of this API is based on the Unicode Standard release files: + + ``DerivedGeneralCategory-13.0.0.txt`` + *Date: 2019-10-21, 14:30:32 GMT* + © 2019 Unicode®, Inc. + + ``EastAsianWidth-13.0.0.txt`` + *Date: 2020-01-21, 18:14:00 GMT [KW, LI]* + © 2020 Unicode®, Inc. + + Updating Tables --------------- @@ -153,24 +168,14 @@ - `wcwidth/table_wide.py <https://github.com/jquast/wcwidth/tree/master/wcwidth/table_wide.py>`_ - `wcwidth/table_zero.py <https://github.com/jquast/wcwidth/tree/master/wcwidth/table_zero.py>`_ - Uses - ---- - - This library is used in: - - - `jquast/blessed`_, a simplified wrapper around curses. - - - `jonathanslenders/python-prompt-toolkit`_, a Library for building powerful - interactive command lines in Python. - - Additional tools for displaying and testing wcwidth are found in the `bin/ - <https://github.com/jquast/wcwidth/tree/master/bin>`_ folder of this project's - source code. They are not distributed. - ======= History ======= + 0.1.9 *2020-03-22* + * **Performance** optimization by `Avram Lubkin`_, `PR #35`_. + * **Updated** tables to Unicode Specification 13.0.0. + 0.1.8 *2020-01-01* * **Updated** tables to Unicode Specification 12.0.0. (`PR #30`_). @@ -225,14 +230,22 @@ .. _`Thomas Ballinger`: https://github.com/thomasballinger .. _`Leta Montopoli`: https://github.com/lmontopo .. _`Philip Craig`: https://github.com/philipc + .. _`Avram Lubkin`: https://github.com/avylove .. _`PR #3`: https://github.com/jquast/wcwidth/pull/3 .. _`PR #4`: https://github.com/jquast/wcwidth/pull/4 .. _`PR #5`: https://github.com/jquast/wcwidth/pull/5 .. _`PR #11`: https://github.com/jquast/wcwidth/pull/11 .. _`PR #18`: https://github.com/jquast/wcwidth/pull/18 .. _`PR #30`: https://github.com/jquast/wcwidth/pull/30 - .. _`jquast/blessed`: https://github.com/jquast/blessed - .. _`jonathanslenders/python-prompt-toolkit`: https://github.com/jonathanslenders/python-prompt-toolkit + .. _`PR #35`: https://github.com/jquast/wcwidth/pull/35 + .. _blessed: https://github.com/jquast/blessed + .. _python-prompt-toolkit: https://github.com/prompt-toolkit/python-prompt-toolkit + .. _pyte: https://github.com/selectel/pyte + .. _asciimatics: https://github.com/peterbrittain/asciimatics + .. _ftfy: https://github.com/LuminosoInsight/python-ftfy + .. _curtsies: https://github.com/bpython/curtsies + .. _bpython: https://github.com/bpython/bpython + .. _termtosvg: https://github.com/nbedos/termtosvg .. _`wcwidth(3)`: http://man7.org/linux/man-pages/man3/wcwidth.3.html .. _`wcswidth(3)`: http://man7.org/linux/man-pages/man3/wcswidth.3.html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wcwidth-0.1.8/README.rst new/wcwidth-0.1.9/README.rst --- old/wcwidth-0.1.8/README.rst 2020-01-02 02:20:42.000000000 +0100 +++ new/wcwidth-0.1.9/README.rst 2020-03-23 07:20:47.000000000 +0100 @@ -1,72 +1,73 @@ -.. image:: https://img.shields.io/travis/jquast/wcwidth.svg - :target: https://travis-ci.org/jquast/wcwidth - :alt: Travis Continous Integration - -.. image:: https://img.shields.io/coveralls/jquast/wcwidth.svg - :target: https://coveralls.io/r/jquast/wcwidth - :alt: Coveralls Code Coverage - -.. image:: https://img.shields.io/pypi/v/wcwidth.svg - :target: https://pypi.python.org/pypi/wcwidth/ - :alt: Latest Version - -.. image:: https://img.shields.io/github/license/jquast/wcwidth.svg - :target: https://pypi.python.org/pypi/wcwidth/ - :alt: License - -.. image:: https://img.shields.io/pypi/wheel/wcwidth.svg - :alt: Wheel Status - -.. image:: https://img.shields.io/pypi/dm/wcwidth.svg - :target: https://pypi.python.org/pypi/wcwidth/ - :alt: Downloads - ============ Introduction ============ This Library is mainly for those implementing a Terminal Emulator, or programs -that carefully produce output to be interpreted by one. - -**Problem Statement**: When printed to the screen, the length of the string is -usually equal to the number of cells it occupies. However, there are -categories of characters that occupy 2 cells (full-wide), and others that -occupy 0. +that carefully produce output to mimick or to be interpreted by an emulator. +**Problem Statement**: The printible length of *most* strings are equal to the +number of cells they occupy on the screen. However, there are categories of +characters that *occupy 2 cells* (full-wide), and others that *occupy 0* cells +(zero-width). **Solution**: POSIX.1-2001 and POSIX.1-2008 conforming systems provide `wcwidth(3)`_ and `wcswidth(3)`_ C functions of which this python module's functions precisely copy. *These functions return the number of cells a unicode string is expected to occupy.* -This library aims to be forward-looking, portable, and most correct. The most -current release of this API is based on the Unicode Standard release files: - -``DerivedGeneralCategory-9.0.0.txt`` - *Date: 2016-06-01, 10:34:26 GMT* - © 2016 Unicode®, Inc. - -``EastAsianWidth-9.0.0.txt`` - *Date: 2016-05-27, 17:00:00 GMT [KW, LI]* - © 2016 Unicode®, Inc. - - Installation ------------ -The stable version of this package is maintained on pypi, install using pip:: +The stable version of this package is maintained on pypi, install or upgrade using pip:: - pip install wcwidth + pip install --upgrade wcwidth Example ------- -To Display ``u'コンニチハ'`` right-adjusted on screen of 80 columns:: +**Problem**: given the following phrase (Japanese), - >>> from wcwidth import wcswidth >>> text = u'コンニチハ' - >>> text_len = wcswidth(text) - >>> print(u' ' * (80 - text_len) + text) + +Python **incorrectly** uses the *string length* of 5 codepoints rather than the +*printible length* of 10 cells, so that when using the `rjust` function, the +output length is wrong:: + + >>> print(len('コンニチハ')) + 5 + + >>> print('コンニチハ'.rjust(11, '_')) + ______コンニチハ + +By defining our own "rjust" function that uses wcwidth, we can correct this:: + + >>> def wc_rjust(text, length, padding=' '): + ... from wcwidth import wcswidth + ... return padding * max(0, (length - wcswidth(text))) + text + ... + +Our **Solution** uses wcswidth to determine the string length correctly:: + + >>> from wcwidth import wcswidth + >>> print(wcswidth('コンニチハ')) + 10 + + >>> print(wc_rjust('コンニチハ', 11, '_')) + _コンニチハ + +Uses +---- + +This library is used in: + +- asciimatics_: Package to help people create full-screen text UIs. +- blessed_: a simplified wrapper around curses. +- curtsies_: Curses wrapper with a display based on compositing 2d arrays of text. +- ftfy_: Fixes mojibake and other glitches in Unicode text, after the fact. +- pyte_: a Simple VTXXX-compatible linux terminal emulator. +- python-prompt-toolkit_: a Powerful interactive command line building library. +- termtosvg_: Terminal recorder that renders sessions as SVG animations. + wcwidth, wcswidth ----------------- @@ -100,9 +101,11 @@ Caveats ======= -This library attempts to determine the printable width by an unknown targeted -terminal emulator. It does not provide any ability to discern what the target -emulator software, version, of level of support is. Results may vary! +This library attempts to determine the printable width by a fictional terminal, +using the very latest Unicode specification, though some work is in progress for +the ability to select a version, there is no standards conforming ability to +discern what the target emulator software, version, of level of support is. +Results may vary! A `crude method <http://blessed.readthedocs.org/en/latest/examples.html#detect-multibyte-py>`_ @@ -110,11 +113,7 @@ performed using the VT100 Query Cursor Position sequence. The libc version of `wcwidth(3)`_ is often several unicode releases behind, -and therefor several levels of support lower than this python library. You -may determine an exacting list of these discrepancies using the project -file `wcwidth-libc-comparator.py -<https://github.com/jquast/wcwidth/tree/master/bin/wcwidth-libc-comparator.py>`_. - +and therefor several levels of support lower than this python library. ========== Developing @@ -132,6 +131,22 @@ tox +Use the interactive browser:: + + python bin/wcwidth-browser.py + +This library aims to be forward-looking, portable, and most correct. The most +current release of this API is based on the Unicode Standard release files: + +``DerivedGeneralCategory-13.0.0.txt`` + *Date: 2019-10-21, 14:30:32 GMT* + © 2019 Unicode®, Inc. + +``EastAsianWidth-13.0.0.txt`` + *Date: 2020-01-21, 18:14:00 GMT [KW, LI]* + © 2020 Unicode®, Inc. + + Updating Tables --------------- @@ -145,24 +160,14 @@ - `wcwidth/table_wide.py <https://github.com/jquast/wcwidth/tree/master/wcwidth/table_wide.py>`_ - `wcwidth/table_zero.py <https://github.com/jquast/wcwidth/tree/master/wcwidth/table_zero.py>`_ -Uses ----- - -This library is used in: - -- `jquast/blessed`_, a simplified wrapper around curses. - -- `jonathanslenders/python-prompt-toolkit`_, a Library for building powerful - interactive command lines in Python. - -Additional tools for displaying and testing wcwidth are found in the `bin/ -<https://github.com/jquast/wcwidth/tree/master/bin>`_ folder of this project's -source code. They are not distributed. - ======= History ======= +0.1.9 *2020-03-22* + * **Performance** optimization by `Avram Lubkin`_, `PR #35`_. + * **Updated** tables to Unicode Specification 13.0.0. + 0.1.8 *2020-01-01* * **Updated** tables to Unicode Specification 12.0.0. (`PR #30`_). @@ -217,13 +222,21 @@ .. _`Thomas Ballinger`: https://github.com/thomasballinger .. _`Leta Montopoli`: https://github.com/lmontopo .. _`Philip Craig`: https://github.com/philipc +.. _`Avram Lubkin`: https://github.com/avylove .. _`PR #3`: https://github.com/jquast/wcwidth/pull/3 .. _`PR #4`: https://github.com/jquast/wcwidth/pull/4 .. _`PR #5`: https://github.com/jquast/wcwidth/pull/5 .. _`PR #11`: https://github.com/jquast/wcwidth/pull/11 .. _`PR #18`: https://github.com/jquast/wcwidth/pull/18 .. _`PR #30`: https://github.com/jquast/wcwidth/pull/30 -.. _`jquast/blessed`: https://github.com/jquast/blessed -.. _`jonathanslenders/python-prompt-toolkit`: https://github.com/jonathanslenders/python-prompt-toolkit +.. _`PR #35`: https://github.com/jquast/wcwidth/pull/35 +.. _blessed: https://github.com/jquast/blessed +.. _python-prompt-toolkit: https://github.com/prompt-toolkit/python-prompt-toolkit +.. _pyte: https://github.com/selectel/pyte +.. _asciimatics: https://github.com/peterbrittain/asciimatics +.. _ftfy: https://github.com/LuminosoInsight/python-ftfy +.. _curtsies: https://github.com/bpython/curtsies +.. _bpython: https://github.com/bpython/bpython +.. _termtosvg: https://github.com/nbedos/termtosvg .. _`wcwidth(3)`: http://man7.org/linux/man-pages/man3/wcwidth.3.html .. _`wcswidth(3)`: http://man7.org/linux/man-pages/man3/wcswidth.3.html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wcwidth-0.1.8/setup.cfg new/wcwidth-0.1.9/setup.cfg --- old/wcwidth-0.1.8/setup.cfg 2020-01-03 21:28:54.000000000 +0100 +++ new/wcwidth-0.1.9/setup.cfg 2020-03-23 07:21:21.000000000 +0100 @@ -1,9 +1,6 @@ [bdist_wheel] universal = 1 -[metadata] -license_file = LICENSE.txt - [egg_info] tag_build = tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wcwidth-0.1.8/setup.py new/wcwidth-0.1.9/setup.py --- old/wcwidth-0.1.8/setup.py 2020-01-02 02:14:21.000000000 +0100 +++ new/wcwidth-0.1.9/setup.py 2020-03-23 05:36:51.000000000 +0100 @@ -273,7 +273,7 @@ import codecs setuptools.setup( name='wcwidth', - version='0.1.8', + version='0.1.9', description=("Measures number of Terminal column cells " "of wide-character codes"), long_description=codecs.open( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wcwidth-0.1.8/wcwidth/table_wide.py new/wcwidth-0.1.9/wcwidth/table_wide.py --- old/wcwidth-0.1.8/wcwidth/table_wide.py 2020-01-02 02:14:21.000000000 +0100 +++ new/wcwidth-0.1.9/wcwidth/table_wide.py 2020-03-23 05:40:34.000000000 +0100 @@ -1,7 +1,7 @@ """Wide_Eastasian table. Created by setup.py.""" -# Generated: 2020-01-01T22:59:30.491382 -# Source: EastAsianWidth-12.1.0.txt -# Date: 2019-03-31, 22:01:58 GMT [KW, LI] +# Generated: 2020-03-23T04:40:34.676535 +# Source: EastAsianWidth-13.0.0.txt +# Date: 2029-01-21, 18:14:00 GMT [KW, LI] WIDE_EASTASIAN = ( (0x1100, 0x115f,), # Hangul Choseong Kiyeok ..Hangul Choseong Filler (0x231a, 0x231b,), # Watch ..Hourglass @@ -45,10 +45,9 @@ (0x3000, 0x303e,), # Ideographic Space ..Ideographic Variation In (0x3041, 0x3096,), # Hiragana Letter Small A ..Hiragana Letter Small Ke (0x3099, 0x30ff,), # Combining Katakana-hirag..Katakana Digraph Koto - (0x3105, 0x312f,), # Bopomofo Letter B .. + (0x3105, 0x312f,), # Bopomofo Letter B ..Bopomofo Letter Nn (0x3131, 0x318e,), # Hangul Letter Kiyeok ..Hangul Letter Araeae - (0x3190, 0x31ba,), # Ideographic Annotation L..Bopomofo Letter Zy - (0x31c0, 0x31e3,), # Cjk Stroke T ..Cjk Stroke Q + (0x3190, 0x31e3,), # Ideographic Annotation L..Cjk Stroke Q (0x31f0, 0x321e,), # Katakana Letter Small Ku..Parenthesized Korean Cha (0x3220, 0x3247,), # Parenthesized Ideograph ..Circled Ideograph Koto (0x3250, 0x4dbf,), # Partnership Sign .. @@ -63,22 +62,24 @@ (0xfe68, 0xfe6b,), # Small Reverse Solidus ..Small Commercial At (0xff01, 0xff60,), # Fullwidth Exclamation Ma..Fullwidth Right White Pa (0xffe0, 0xffe6,), # Fullwidth Cent Sign ..Fullwidth Won Sign - (0x16fe0, 0x16fe3,), # (nil) .. + (0x16fe0, 0x16fe4,), # Tangut Iteration Mark .. + (0x16ff0, 0x16ff1,), # (nil) .. (0x17000, 0x187f7,), # (nil) .. - (0x18800, 0x18af2,), # (nil) .. - (0x1b000, 0x1b11e,), # Katakana Letter Archaic .. + (0x18800, 0x18cd5,), # Tangut Component-001 .. + (0x18d00, 0x18d08,), # (nil) .. + (0x1b000, 0x1b11e,), # Katakana Letter Archaic ..Hentaigana Letter N-mu-m (0x1b150, 0x1b152,), # (nil) .. (0x1b164, 0x1b167,), # (nil) .. - (0x1b170, 0x1b2fb,), # (nil) .. + (0x1b170, 0x1b2fb,), # Nushu Character-1b170 ..Nushu Character-1b2fb (0x1f004, 0x1f004,), # Mahjong Tile Red Dragon ..Mahjong Tile Red Dragon (0x1f0cf, 0x1f0cf,), # Playing Card Black Joker..Playing Card Black Joker (0x1f18e, 0x1f18e,), # Negative Squared Ab ..Negative Squared Ab (0x1f191, 0x1f19a,), # Squared Cl ..Squared Vs (0x1f200, 0x1f202,), # Square Hiragana Hoka ..Squared Katakana Sa - (0x1f210, 0x1f23b,), # Squared Cjk Unified Ideo.. + (0x1f210, 0x1f23b,), # Squared Cjk Unified Ideo..Squared Cjk Unified Ideo (0x1f240, 0x1f248,), # Tortoise Shell Bracketed..Tortoise Shell Bracketed (0x1f250, 0x1f251,), # Circled Ideograph Advant..Circled Ideograph Accept - (0x1f260, 0x1f265,), # (nil) .. + (0x1f260, 0x1f265,), # Rounded Symbol For Fu ..Rounded Symbol For Cai (0x1f300, 0x1f320,), # Cyclone ..Shooting Star (0x1f32d, 0x1f335,), # Hot Dog ..Cactus (0x1f337, 0x1f37c,), # Tulip ..Baby Bottle @@ -93,27 +94,29 @@ (0x1f4ff, 0x1f53d,), # Prayer Beads ..Down-pointing Small Red (0x1f54b, 0x1f54e,), # Kaaba ..Menorah With Nine Branch (0x1f550, 0x1f567,), # Clock Face One Oclock ..Clock Face Twelve-thirty - (0x1f57a, 0x1f57a,), # (nil) .. + (0x1f57a, 0x1f57a,), # Man Dancing ..Man Dancing (0x1f595, 0x1f596,), # Reversed Hand With Middl..Raised Hand With Part Be - (0x1f5a4, 0x1f5a4,), # (nil) .. + (0x1f5a4, 0x1f5a4,), # Black Heart ..Black Heart (0x1f5fb, 0x1f64f,), # Mount Fuji ..Person With Folded Hands (0x1f680, 0x1f6c5,), # Rocket ..Left Luggage (0x1f6cc, 0x1f6cc,), # Sleeping Accommodation ..Sleeping Accommodation - (0x1f6d0, 0x1f6d2,), # Place Of Worship .. - (0x1f6d5, 0x1f6d5,), # (nil) .. + (0x1f6d0, 0x1f6d2,), # Place Of Worship ..Shopping Trolley + (0x1f6d5, 0x1f6d7,), # (nil) .. (0x1f6eb, 0x1f6ec,), # Airplane Departure ..Airplane Arriving - (0x1f6f4, 0x1f6fa,), # (nil) .. + (0x1f6f4, 0x1f6fc,), # Scooter .. (0x1f7e0, 0x1f7eb,), # (nil) .. - (0x1f90d, 0x1f971,), # (nil) .. - (0x1f973, 0x1f976,), # (nil) .. - (0x1f97a, 0x1f9a2,), # (nil) .. - (0x1f9a5, 0x1f9aa,), # (nil) .. - (0x1f9ae, 0x1f9ca,), # (nil) .. - (0x1f9cd, 0x1f9ff,), # (nil) .. - (0x1fa70, 0x1fa73,), # (nil) .. + (0x1f90c, 0x1f93a,), # (nil) ..Fencer + (0x1f93c, 0x1f945,), # Wrestlers ..Goal Net + (0x1f947, 0x1f978,), # First Place Medal .. + (0x1f97a, 0x1f9cb,), # Face With Pleading Eyes .. + (0x1f9cd, 0x1f9ff,), # (nil) ..Nazar Amulet + (0x1fa70, 0x1fa74,), # (nil) .. (0x1fa78, 0x1fa7a,), # (nil) .. - (0x1fa80, 0x1fa82,), # (nil) .. - (0x1fa90, 0x1fa95,), # (nil) .. + (0x1fa80, 0x1fa86,), # (nil) .. + (0x1fa90, 0x1faa8,), # (nil) .. + (0x1fab0, 0x1fab6,), # (nil) .. + (0x1fac0, 0x1fac2,), # (nil) .. + (0x1fad0, 0x1fad6,), # (nil) .. (0x20000, 0x2fffd,), # Cjk Unified Ideograph-20.. (0x30000, 0x3fffd,), # (nil) .. ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wcwidth-0.1.8/wcwidth/table_zero.py new/wcwidth-0.1.9/wcwidth/table_zero.py --- old/wcwidth-0.1.8/wcwidth/table_zero.py 2020-01-02 02:14:21.000000000 +0100 +++ new/wcwidth-0.1.9/wcwidth/table_zero.py 2020-03-23 05:40:34.000000000 +0100 @@ -1,7 +1,7 @@ """Zero_Width table. Created by setup.py.""" -# Generated: 2020-01-01T22:59:30.515579 -# Source: DerivedGeneralCategory-9.0.0.txt -# Date: 2016-06-01, 10:34:26 GMT +# Generated: 2020-03-23T04:40:34.685051 +# Source: DerivedGeneralCategory-13.0.0.txt +# Date: 2019-10-21, 14:30:32 GMT ZERO_WIDTH = ( (0x0300, 0x036f,), # Combining Grave Accent ..Combining Latin Small Le (0x0483, 0x0489,), # Combining Cyrillic Titlo..Combining Cyrillic Milli @@ -21,12 +21,13 @@ (0x0730, 0x074a,), # Syriac Pthaha Above ..Syriac Barrekh (0x07a6, 0x07b0,), # Thaana Abafili ..Thaana Sukun (0x07eb, 0x07f3,), # Nko Combining Short High..Nko Combining Double Dot + (0x07fd, 0x07fd,), # Nko Dantayalan ..Nko Dantayalan (0x0816, 0x0819,), # Samaritan Mark In ..Samaritan Mark Dagesh (0x081b, 0x0823,), # Samaritan Mark Epentheti..Samaritan Vowel Sign A (0x0825, 0x0827,), # Samaritan Vowel Sign Sho..Samaritan Vowel Sign U (0x0829, 0x082d,), # Samaritan Vowel Sign Lon..Samaritan Mark Nequdaa (0x0859, 0x085b,), # Mandaic Affrication Mark..Mandaic Gemination Mark - (0x08d4, 0x08e1,), # (nil) .. + (0x08d3, 0x08e1,), # Arabic Small Low Waw ..Arabic Small High Sign S (0x08e3, 0x0902,), # Arabic Turned Damma Belo..Devanagari Sign Anusvara (0x093a, 0x093a,), # Devanagari Vowel Sign Oe..Devanagari Vowel Sign Oe (0x093c, 0x093c,), # Devanagari Sign Nukta ..Devanagari Sign Nukta @@ -39,6 +40,7 @@ (0x09c1, 0x09c4,), # Bengali Vowel Sign U ..Bengali Vowel Sign Vocal (0x09cd, 0x09cd,), # Bengali Sign Virama ..Bengali Sign Virama (0x09e2, 0x09e3,), # Bengali Vowel Sign Vocal..Bengali Vowel Sign Vocal + (0x09fe, 0x09fe,), # Bengali Sandhi Mark ..Bengali Sandhi Mark (0x0a01, 0x0a02,), # Gurmukhi Sign Adak Bindi..Gurmukhi Sign Bindi (0x0a3c, 0x0a3c,), # Gurmukhi Sign Nukta ..Gurmukhi Sign Nukta (0x0a41, 0x0a42,), # Gurmukhi Vowel Sign U ..Gurmukhi Vowel Sign Uu @@ -53,17 +55,19 @@ (0x0ac7, 0x0ac8,), # Gujarati Vowel Sign E ..Gujarati Vowel Sign Ai (0x0acd, 0x0acd,), # Gujarati Sign Virama ..Gujarati Sign Virama (0x0ae2, 0x0ae3,), # Gujarati Vowel Sign Voca..Gujarati Vowel Sign Voca + (0x0afa, 0x0aff,), # Gujarati Sign Sukun ..Gujarati Sign Two-circle (0x0b01, 0x0b01,), # Oriya Sign Candrabindu ..Oriya Sign Candrabindu (0x0b3c, 0x0b3c,), # Oriya Sign Nukta ..Oriya Sign Nukta (0x0b3f, 0x0b3f,), # Oriya Vowel Sign I ..Oriya Vowel Sign I (0x0b41, 0x0b44,), # Oriya Vowel Sign U ..Oriya Vowel Sign Vocalic (0x0b4d, 0x0b4d,), # Oriya Sign Virama ..Oriya Sign Virama - (0x0b56, 0x0b56,), # Oriya Ai Length Mark ..Oriya Ai Length Mark + (0x0b55, 0x0b56,), # (nil) ..Oriya Ai Length Mark (0x0b62, 0x0b63,), # Oriya Vowel Sign Vocalic..Oriya Vowel Sign Vocalic (0x0b82, 0x0b82,), # Tamil Sign Anusvara ..Tamil Sign Anusvara (0x0bc0, 0x0bc0,), # Tamil Vowel Sign Ii ..Tamil Vowel Sign Ii (0x0bcd, 0x0bcd,), # Tamil Sign Virama ..Tamil Sign Virama (0x0c00, 0x0c00,), # Telugu Sign Combining Ca..Telugu Sign Combining Ca + (0x0c04, 0x0c04,), # Telugu Sign Combining An..Telugu Sign Combining An (0x0c3e, 0x0c40,), # Telugu Vowel Sign Aa ..Telugu Vowel Sign Ii (0x0c46, 0x0c48,), # Telugu Vowel Sign E ..Telugu Vowel Sign Ai (0x0c4a, 0x0c4d,), # Telugu Vowel Sign O ..Telugu Sign Virama @@ -75,10 +79,12 @@ (0x0cc6, 0x0cc6,), # Kannada Vowel Sign E ..Kannada Vowel Sign E (0x0ccc, 0x0ccd,), # Kannada Vowel Sign Au ..Kannada Sign Virama (0x0ce2, 0x0ce3,), # Kannada Vowel Sign Vocal..Kannada Vowel Sign Vocal - (0x0d01, 0x0d01,), # Malayalam Sign Candrabin..Malayalam Sign Candrabin + (0x0d00, 0x0d01,), # Malayalam Sign Combining..Malayalam Sign Candrabin + (0x0d3b, 0x0d3c,), # Malayalam Sign Vertical ..Malayalam Sign Circular (0x0d41, 0x0d44,), # Malayalam Vowel Sign U ..Malayalam Vowel Sign Voc (0x0d4d, 0x0d4d,), # Malayalam Sign Virama ..Malayalam Sign Virama (0x0d62, 0x0d63,), # Malayalam Vowel Sign Voc..Malayalam Vowel Sign Voc + (0x0d81, 0x0d81,), # (nil) .. (0x0dca, 0x0dca,), # Sinhala Sign Al-lakuna ..Sinhala Sign Al-lakuna (0x0dd2, 0x0dd4,), # Sinhala Vowel Sign Ketti..Sinhala Vowel Sign Ketti (0x0dd6, 0x0dd6,), # Sinhala Vowel Sign Diga ..Sinhala Vowel Sign Diga @@ -86,8 +92,7 @@ (0x0e34, 0x0e3a,), # Thai Character Sara I ..Thai Character Phinthu (0x0e47, 0x0e4e,), # Thai Character Maitaikhu..Thai Character Yamakkan (0x0eb1, 0x0eb1,), # Lao Vowel Sign Mai Kan ..Lao Vowel Sign Mai Kan - (0x0eb4, 0x0eb9,), # Lao Vowel Sign I ..Lao Vowel Sign Uu - (0x0ebb, 0x0ebc,), # Lao Vowel Sign Mai Kon ..Lao Semivowel Sign Lo + (0x0eb4, 0x0ebc,), # Lao Vowel Sign I ..Lao Semivowel Sign Lo (0x0ec8, 0x0ecd,), # Lao Tone Mai Ek ..Lao Niggahita (0x0f18, 0x0f19,), # Tibetan Astrological Sig..Tibetan Astrological Sig (0x0f35, 0x0f35,), # Tibetan Mark Ngas Bzung ..Tibetan Mark Ngas Bzung @@ -136,7 +141,7 @@ (0x1a65, 0x1a6c,), # Tai Tham Vowel Sign I ..Tai Tham Vowel Sign Oa B (0x1a73, 0x1a7c,), # Tai Tham Vowel Sign Oa A..Tai Tham Sign Khuen-lue (0x1a7f, 0x1a7f,), # Tai Tham Combining Crypt..Tai Tham Combining Crypt - (0x1ab0, 0x1abe,), # Combining Doubled Circum..Combining Parentheses Ov + (0x1ab0, 0x1ac0,), # Combining Doubled Circum.. (0x1b00, 0x1b03,), # Balinese Sign Ulu Ricem ..Balinese Sign Surang (0x1b34, 0x1b34,), # Balinese Sign Rerekan ..Balinese Sign Rerekan (0x1b36, 0x1b3a,), # Balinese Vowel Sign Ulu ..Balinese Vowel Sign Ra R @@ -159,8 +164,8 @@ (0x1ced, 0x1ced,), # Vedic Sign Tiryak ..Vedic Sign Tiryak (0x1cf4, 0x1cf4,), # Vedic Tone Candra Above ..Vedic Tone Candra Above (0x1cf8, 0x1cf9,), # Vedic Tone Ring Above ..Vedic Tone Double Ring A - (0x1dc0, 0x1df5,), # Combining Dotted Grave A..Combining Up Tack Above - (0x1dfb, 0x1dff,), # (nil) ..Combining Right Arrowhea + (0x1dc0, 0x1df9,), # Combining Dotted Grave A..Combining Wide Inverted + (0x1dfb, 0x1dff,), # Combining Deletion Mark ..Combining Right Arrowhea (0x20d0, 0x20f0,), # Combining Left Harpoon A..Combining Asterisk Above (0x2cef, 0x2cf1,), # Coptic Combining Ni Abov..Coptic Combining Spiritu (0x2d7f, 0x2d7f,), # Tifinagh Consonant Joine..Tifinagh Consonant Joine @@ -175,14 +180,16 @@ (0xa806, 0xa806,), # Syloti Nagri Sign Hasant..Syloti Nagri Sign Hasant (0xa80b, 0xa80b,), # Syloti Nagri Sign Anusva..Syloti Nagri Sign Anusva (0xa825, 0xa826,), # Syloti Nagri Vowel Sign ..Syloti Nagri Vowel Sign - (0xa8c4, 0xa8c5,), # Saurashtra Sign Virama .. + (0xa82c, 0xa82c,), # (nil) .. + (0xa8c4, 0xa8c5,), # Saurashtra Sign Virama ..Saurashtra Sign Candrabi (0xa8e0, 0xa8f1,), # Combining Devanagari Dig..Combining Devanagari Sig + (0xa8ff, 0xa8ff,), # Devanagari Vowel Sign Ay..Devanagari Vowel Sign Ay (0xa926, 0xa92d,), # Kayah Li Vowel Ue ..Kayah Li Tone Calya Plop (0xa947, 0xa951,), # Rejang Vowel Sign I ..Rejang Consonant Sign R (0xa980, 0xa982,), # Javanese Sign Panyangga ..Javanese Sign Layar (0xa9b3, 0xa9b3,), # Javanese Sign Cecak Telu..Javanese Sign Cecak Telu (0xa9b6, 0xa9b9,), # Javanese Vowel Sign Wulu..Javanese Vowel Sign Suku - (0xa9bc, 0xa9bc,), # Javanese Vowel Sign Pepe..Javanese Vowel Sign Pepe + (0xa9bc, 0xa9bd,), # Javanese Vowel Sign Pepe..Javanese Consonant Sign (0xa9e5, 0xa9e5,), # Myanmar Sign Shan Saw ..Myanmar Sign Shan Saw (0xaa29, 0xaa2e,), # Cham Vowel Sign Aa ..Cham Vowel Sign Oe (0xaa31, 0xaa32,), # Cham Vowel Sign Au ..Cham Vowel Sign Ue @@ -212,6 +219,9 @@ (0x10a38, 0x10a3a,), # Kharoshthi Sign Bar Abov..Kharoshthi Sign Dot Belo (0x10a3f, 0x10a3f,), # Kharoshthi Virama ..Kharoshthi Virama (0x10ae5, 0x10ae6,), # Manichaean Abbreviation ..Manichaean Abbreviation + (0x10d24, 0x10d27,), # Hanifi Rohingya Sign Har..Hanifi Rohingya Sign Tas + (0x10eab, 0x10eac,), # (nil) .. + (0x10f46, 0x10f50,), # Sogdian Combining Dot Be..Sogdian Combining Stroke (0x11001, 0x11001,), # Brahmi Sign Anusvara ..Brahmi Sign Anusvara (0x11038, 0x11046,), # Brahmi Vowel Sign Aa ..Brahmi Virama (0x1107f, 0x11081,), # Brahmi Number Joiner ..Kaithi Sign Anusvara @@ -223,21 +233,23 @@ (0x11173, 0x11173,), # Mahajani Sign Nukta ..Mahajani Sign Nukta (0x11180, 0x11181,), # Sharada Sign Candrabindu..Sharada Sign Anusvara (0x111b6, 0x111be,), # Sharada Vowel Sign U ..Sharada Vowel Sign O - (0x111ca, 0x111cc,), # Sharada Sign Nukta ..Sharada Extra Short Vowe + (0x111c9, 0x111cc,), # Sharada Sandhi Mark ..Sharada Extra Short Vowe + (0x111cf, 0x111cf,), # (nil) .. (0x1122f, 0x11231,), # Khojki Vowel Sign U ..Khojki Vowel Sign Ai (0x11234, 0x11234,), # Khojki Sign Anusvara ..Khojki Sign Anusvara (0x11236, 0x11237,), # Khojki Sign Nukta ..Khojki Sign Shadda - (0x1123e, 0x1123e,), # (nil) .. + (0x1123e, 0x1123e,), # Khojki Sign Sukun ..Khojki Sign Sukun (0x112df, 0x112df,), # Khudawadi Sign Anusvara ..Khudawadi Sign Anusvara (0x112e3, 0x112ea,), # Khudawadi Vowel Sign U ..Khudawadi Sign Virama (0x11300, 0x11301,), # Grantha Sign Combining A..Grantha Sign Candrabindu - (0x1133c, 0x1133c,), # Grantha Sign Nukta ..Grantha Sign Nukta + (0x1133b, 0x1133c,), # Combining Bindu Below ..Grantha Sign Nukta (0x11340, 0x11340,), # Grantha Vowel Sign Ii ..Grantha Vowel Sign Ii (0x11366, 0x1136c,), # Combining Grantha Digit ..Combining Grantha Digit (0x11370, 0x11374,), # Combining Grantha Letter..Combining Grantha Letter - (0x11438, 0x1143f,), # (nil) .. - (0x11442, 0x11444,), # (nil) .. - (0x11446, 0x11446,), # (nil) .. + (0x11438, 0x1143f,), # Newa Vowel Sign U ..Newa Vowel Sign Ai + (0x11442, 0x11444,), # Newa Sign Virama ..Newa Sign Anusvara + (0x11446, 0x11446,), # Newa Sign Nukta ..Newa Sign Nukta + (0x1145e, 0x1145e,), # Newa Sandhi Mark ..Newa Sandhi Mark (0x114b3, 0x114b8,), # Tirhuta Vowel Sign U ..Tirhuta Vowel Sign Vocal (0x114ba, 0x114ba,), # Tirhuta Vowel Sign Short..Tirhuta Vowel Sign Short (0x114bf, 0x114c0,), # Tirhuta Sign Candrabindu..Tirhuta Sign Anusvara @@ -256,16 +268,43 @@ (0x1171d, 0x1171f,), # Ahom Consonant Sign Medi..Ahom Consonant Sign Medi (0x11722, 0x11725,), # Ahom Vowel Sign I ..Ahom Vowel Sign Uu (0x11727, 0x1172b,), # Ahom Vowel Sign Aw ..Ahom Sign Killer - (0x11c30, 0x11c36,), # (nil) .. - (0x11c38, 0x11c3d,), # (nil) .. - (0x11c3f, 0x11c3f,), # (nil) .. - (0x11c92, 0x11ca7,), # (nil) .. - (0x11caa, 0x11cb0,), # (nil) .. - (0x11cb2, 0x11cb3,), # (nil) .. - (0x11cb5, 0x11cb6,), # (nil) .. + (0x1182f, 0x11837,), # Dogra Vowel Sign U ..Dogra Sign Anusvara + (0x11839, 0x1183a,), # Dogra Sign Virama ..Dogra Sign Nukta + (0x1193b, 0x1193c,), # (nil) .. + (0x1193e, 0x1193e,), # (nil) .. + (0x11943, 0x11943,), # (nil) .. + (0x119d4, 0x119d7,), # (nil) .. + (0x119da, 0x119db,), # (nil) .. + (0x119e0, 0x119e0,), # (nil) .. + (0x11a01, 0x11a0a,), # Zanabazar Square Vowel S..Zanabazar Square Vowel L + (0x11a33, 0x11a38,), # Zanabazar Square Final C..Zanabazar Square Sign An + (0x11a3b, 0x11a3e,), # Zanabazar Square Cluster..Zanabazar Square Cluster + (0x11a47, 0x11a47,), # Zanabazar Square Subjoin..Zanabazar Square Subjoin + (0x11a51, 0x11a56,), # Soyombo Vowel Sign I ..Soyombo Vowel Sign Oe + (0x11a59, 0x11a5b,), # Soyombo Vowel Sign Vocal..Soyombo Vowel Length Mar + (0x11a8a, 0x11a96,), # Soyombo Final Consonant ..Soyombo Sign Anusvara + (0x11a98, 0x11a99,), # Soyombo Gemination Mark ..Soyombo Subjoiner + (0x11c30, 0x11c36,), # Bhaiksuki Vowel Sign I ..Bhaiksuki Vowel Sign Voc + (0x11c38, 0x11c3d,), # Bhaiksuki Vowel Sign E ..Bhaiksuki Sign Anusvara + (0x11c3f, 0x11c3f,), # Bhaiksuki Sign Virama ..Bhaiksuki Sign Virama + (0x11c92, 0x11ca7,), # Marchen Subjoined Letter..Marchen Subjoined Letter + (0x11caa, 0x11cb0,), # Marchen Subjoined Letter..Marchen Vowel Sign Aa + (0x11cb2, 0x11cb3,), # Marchen Vowel Sign U ..Marchen Vowel Sign E + (0x11cb5, 0x11cb6,), # Marchen Sign Anusvara ..Marchen Sign Candrabindu + (0x11d31, 0x11d36,), # Masaram Gondi Vowel Sign..Masaram Gondi Vowel Sign + (0x11d3a, 0x11d3a,), # Masaram Gondi Vowel Sign..Masaram Gondi Vowel Sign + (0x11d3c, 0x11d3d,), # Masaram Gondi Vowel Sign..Masaram Gondi Vowel Sign + (0x11d3f, 0x11d45,), # Masaram Gondi Vowel Sign..Masaram Gondi Virama + (0x11d47, 0x11d47,), # Masaram Gondi Ra-kara ..Masaram Gondi Ra-kara + (0x11d90, 0x11d91,), # Gunjala Gondi Vowel Sign..Gunjala Gondi Vowel Sign + (0x11d95, 0x11d95,), # Gunjala Gondi Sign Anusv..Gunjala Gondi Sign Anusv + (0x11d97, 0x11d97,), # Gunjala Gondi Virama ..Gunjala Gondi Virama + (0x11ef3, 0x11ef4,), # Makasar Vowel Sign I ..Makasar Vowel Sign U (0x16af0, 0x16af4,), # Bassa Vah Combining High..Bassa Vah Combining High (0x16b30, 0x16b36,), # Pahawh Hmong Mark Cim Tu..Pahawh Hmong Mark Cim Ta + (0x16f4f, 0x16f4f,), # (nil) .. (0x16f8f, 0x16f92,), # Miao Tone Right ..Miao Tone Below + (0x16fe4, 0x16fe4,), # (nil) .. (0x1bc9d, 0x1bc9e,), # Duployan Thick Letter Se..Duployan Double Mark (0x1d167, 0x1d169,), # Musical Symbol Combining..Musical Symbol Combining (0x1d17b, 0x1d182,), # Musical Symbol Combining..Musical Symbol Combining @@ -278,12 +317,14 @@ (0x1da84, 0x1da84,), # Signwriting Location Hea..Signwriting Location Hea (0x1da9b, 0x1da9f,), # Signwriting Fill Modifie..Signwriting Fill Modifie (0x1daa1, 0x1daaf,), # Signwriting Rotation Mod..Signwriting Rotation Mod - (0x1e000, 0x1e006,), # (nil) .. - (0x1e008, 0x1e018,), # (nil) .. - (0x1e01b, 0x1e021,), # (nil) .. - (0x1e023, 0x1e024,), # (nil) .. - (0x1e026, 0x1e02a,), # (nil) .. + (0x1e000, 0x1e006,), # Combining Glagolitic Let..Combining Glagolitic Let + (0x1e008, 0x1e018,), # Combining Glagolitic Let..Combining Glagolitic Let + (0x1e01b, 0x1e021,), # Combining Glagolitic Let..Combining Glagolitic Let + (0x1e023, 0x1e024,), # Combining Glagolitic Let..Combining Glagolitic Let + (0x1e026, 0x1e02a,), # Combining Glagolitic Let..Combining Glagolitic Let + (0x1e130, 0x1e136,), # (nil) .. + (0x1e2ec, 0x1e2ef,), # (nil) .. (0x1e8d0, 0x1e8d6,), # Mende Kikakui Combining ..Mende Kikakui Combining - (0x1e944, 0x1e94a,), # (nil) .. + (0x1e944, 0x1e94a,), # Adlam Alif Lengthener ..Adlam Nukta (0xe0100, 0xe01ef,), # Variation Selector-17 ..Variation Selector-256 ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wcwidth-0.1.8/wcwidth/wcwidth.py new/wcwidth-0.1.9/wcwidth/wcwidth.py --- old/wcwidth-0.1.8/wcwidth/wcwidth.py 2020-01-02 02:14:21.000000000 +0100 +++ new/wcwidth-0.1.9/wcwidth/wcwidth.py 2020-03-23 05:36:17.000000000 +0100 @@ -74,7 +74,36 @@ from .table_zero import ZERO_WIDTH -def _bisearch(ucs, table): +# NOTE: created by hand, there isn't anything identifiable other than +# general Cf category code to identify these, and some characters in Cf +# category code are of non-zero width. +# Also includes some Cc, Mn, Zl, and Zp characters +ZERO_WIDTH_CF = set([ + 0, # Null (Cc) + 0x034F, # Combining grapheme joiner (Mn) + 0x200B, # Zero width space + 0x200C, # Zero width non-joiner + 0x200D, # Zero width joiner + 0x200E, # Left-to-right mark + 0x200F, # Right-to-left mark + 0x2028, # Line separator (Zl) + 0x2029, # Paragraph separator (Zp) + 0x202A, # Left-to-right embedding + 0x202B, # Right-to-left embedding + 0x202C, # Pop directional formatting + 0x202D, # Left-to-right override + 0x202E, # Right-to-left override + 0x2060, # Word joiner + 0x2061, # Function application + 0x2062, # Invisible times + 0x2063, # Invisible separator +]) + +UBOUND_ZERO_WIDTH = len(ZERO_WIDTH) - 1 +UBOUND_WIDE_EASTASIAN = len(WIDE_EASTASIAN) - 1 + + +def _bisearch(ucs, table, ubound): """ Auxiliary function for binary search in interval table. @@ -85,7 +114,6 @@ :returns: 1 if ordinal value ucs is found within lookup table, else 0. """ lbound = 0 - ubound = len(table) - 1 if ucs < table[0][0] or ucs > table[ubound][1]: return 0 @@ -101,7 +129,7 @@ return 0 -def wcwidth(wc): +def wcwidth(wc): # pylint: disable=invalid-name r""" Given one unicode character, return its printable length on a terminal. @@ -152,23 +180,9 @@ Full-width (F) category as defined in Unicode Technical Report #11 have a column width of 2. """ - # pylint: disable=C0103 - # Invalid argument name "wc" ucs = ord(wc) - # NOTE: created by hand, there isn't anything identifiable other than - # general Cf category code to identify these, and some characters in Cf - # category code are of non-zero width. - - # pylint: disable=too-many-boolean-expressions - # Too many boolean expressions in if statement (7/5) - if (ucs == 0 or - ucs == 0x034F or - 0x200B <= ucs <= 0x200F or - ucs == 0x2028 or - ucs == 0x2029 or - 0x202A <= ucs <= 0x202E or - 0x2060 <= ucs <= 0x2063): + if ucs in ZERO_WIDTH_CF: return 0 # C0/C1 control characters @@ -176,10 +190,10 @@ return -1 # combining characters with zero width - if _bisearch(ucs, ZERO_WIDTH): + if _bisearch(ucs, ZERO_WIDTH, UBOUND_ZERO_WIDTH): return 0 - return 1 + _bisearch(ucs, WIDE_EASTASIAN) + return 1 + _bisearch(ucs, WIDE_EASTASIAN, UBOUND_WIDE_EASTASIAN) def wcswidth(pwcs, n=None): @@ -202,6 +216,5 @@ wcw = wcwidth(char) if wcw < 0: return -1 - else: - width += wcw + width += wcw return width diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wcwidth-0.1.8/wcwidth.egg-info/PKG-INFO new/wcwidth-0.1.9/wcwidth.egg-info/PKG-INFO --- old/wcwidth-0.1.8/wcwidth.egg-info/PKG-INFO 2020-01-03 21:28:54.000000000 +0100 +++ new/wcwidth-0.1.9/wcwidth.egg-info/PKG-INFO 2020-03-23 07:21:21.000000000 +0100 @@ -1,80 +1,81 @@ Metadata-Version: 1.1 Name: wcwidth -Version: 0.1.8 +Version: 0.1.9 Summary: Measures number of Terminal column cells of wide-character codes Home-page: https://github.com/jquast/wcwidth Author: Jeff Quast Author-email: cont...@jeffquast.com License: MIT -Description: .. image:: https://img.shields.io/travis/jquast/wcwidth.svg - :target: https://travis-ci.org/jquast/wcwidth - :alt: Travis Continous Integration - - .. image:: https://img.shields.io/coveralls/jquast/wcwidth.svg - :target: https://coveralls.io/r/jquast/wcwidth - :alt: Coveralls Code Coverage - - .. image:: https://img.shields.io/pypi/v/wcwidth.svg - :target: https://pypi.python.org/pypi/wcwidth/ - :alt: Latest Version - - .. image:: https://img.shields.io/github/license/jquast/wcwidth.svg - :target: https://pypi.python.org/pypi/wcwidth/ - :alt: License - - .. image:: https://img.shields.io/pypi/wheel/wcwidth.svg - :alt: Wheel Status - - .. image:: https://img.shields.io/pypi/dm/wcwidth.svg - :target: https://pypi.python.org/pypi/wcwidth/ - :alt: Downloads - - ============ +Description: ============ Introduction ============ This Library is mainly for those implementing a Terminal Emulator, or programs - that carefully produce output to be interpreted by one. - - **Problem Statement**: When printed to the screen, the length of the string is - usually equal to the number of cells it occupies. However, there are - categories of characters that occupy 2 cells (full-wide), and others that - occupy 0. + that carefully produce output to mimick or to be interpreted by an emulator. + **Problem Statement**: The printible length of *most* strings are equal to the + number of cells they occupy on the screen. However, there are categories of + characters that *occupy 2 cells* (full-wide), and others that *occupy 0* cells + (zero-width). **Solution**: POSIX.1-2001 and POSIX.1-2008 conforming systems provide `wcwidth(3)`_ and `wcswidth(3)`_ C functions of which this python module's functions precisely copy. *These functions return the number of cells a unicode string is expected to occupy.* - This library aims to be forward-looking, portable, and most correct. The most - current release of this API is based on the Unicode Standard release files: - - ``DerivedGeneralCategory-9.0.0.txt`` - *Date: 2016-06-01, 10:34:26 GMT* - © 2016 Unicode®, Inc. - - ``EastAsianWidth-9.0.0.txt`` - *Date: 2016-05-27, 17:00:00 GMT [KW, LI]* - © 2016 Unicode®, Inc. - - Installation ------------ - The stable version of this package is maintained on pypi, install using pip:: + The stable version of this package is maintained on pypi, install or upgrade using pip:: - pip install wcwidth + pip install --upgrade wcwidth Example ------- - To Display ``u'コンニチハ'`` right-adjusted on screen of 80 columns:: + **Problem**: given the following phrase (Japanese), - >>> from wcwidth import wcswidth >>> text = u'コンニチハ' - >>> text_len = wcswidth(text) - >>> print(u' ' * (80 - text_len) + text) + + Python **incorrectly** uses the *string length* of 5 codepoints rather than the + *printible length* of 10 cells, so that when using the `rjust` function, the + output length is wrong:: + + >>> print(len('コンニチハ')) + 5 + + >>> print('コンニチハ'.rjust(11, '_')) + ______コンニチハ + + By defining our own "rjust" function that uses wcwidth, we can correct this:: + + >>> def wc_rjust(text, length, padding=' '): + ... from wcwidth import wcswidth + ... return padding * max(0, (length - wcswidth(text))) + text + ... + + Our **Solution** uses wcswidth to determine the string length correctly:: + + >>> from wcwidth import wcswidth + >>> print(wcswidth('コンニチハ')) + 10 + + >>> print(wc_rjust('コンニチハ', 11, '_')) + _コンニチハ + + Uses + ---- + + This library is used in: + + - asciimatics_: Package to help people create full-screen text UIs. + - blessed_: a simplified wrapper around curses. + - curtsies_: Curses wrapper with a display based on compositing 2d arrays of text. + - ftfy_: Fixes mojibake and other glitches in Unicode text, after the fact. + - pyte_: a Simple VTXXX-compatible linux terminal emulator. + - python-prompt-toolkit_: a Powerful interactive command line building library. + - termtosvg_: Terminal recorder that renders sessions as SVG animations. + wcwidth, wcswidth ----------------- @@ -108,9 +109,11 @@ Caveats ======= - This library attempts to determine the printable width by an unknown targeted - terminal emulator. It does not provide any ability to discern what the target - emulator software, version, of level of support is. Results may vary! + This library attempts to determine the printable width by a fictional terminal, + using the very latest Unicode specification, though some work is in progress for + the ability to select a version, there is no standards conforming ability to + discern what the target emulator software, version, of level of support is. + Results may vary! A `crude method <http://blessed.readthedocs.org/en/latest/examples.html#detect-multibyte-py>`_ @@ -118,11 +121,7 @@ performed using the VT100 Query Cursor Position sequence. The libc version of `wcwidth(3)`_ is often several unicode releases behind, - and therefor several levels of support lower than this python library. You - may determine an exacting list of these discrepancies using the project - file `wcwidth-libc-comparator.py - <https://github.com/jquast/wcwidth/tree/master/bin/wcwidth-libc-comparator.py>`_. - + and therefor several levels of support lower than this python library. ========== Developing @@ -140,6 +139,22 @@ tox + Use the interactive browser:: + + python bin/wcwidth-browser.py + + This library aims to be forward-looking, portable, and most correct. The most + current release of this API is based on the Unicode Standard release files: + + ``DerivedGeneralCategory-13.0.0.txt`` + *Date: 2019-10-21, 14:30:32 GMT* + © 2019 Unicode®, Inc. + + ``EastAsianWidth-13.0.0.txt`` + *Date: 2020-01-21, 18:14:00 GMT [KW, LI]* + © 2020 Unicode®, Inc. + + Updating Tables --------------- @@ -153,24 +168,14 @@ - `wcwidth/table_wide.py <https://github.com/jquast/wcwidth/tree/master/wcwidth/table_wide.py>`_ - `wcwidth/table_zero.py <https://github.com/jquast/wcwidth/tree/master/wcwidth/table_zero.py>`_ - Uses - ---- - - This library is used in: - - - `jquast/blessed`_, a simplified wrapper around curses. - - - `jonathanslenders/python-prompt-toolkit`_, a Library for building powerful - interactive command lines in Python. - - Additional tools for displaying and testing wcwidth are found in the `bin/ - <https://github.com/jquast/wcwidth/tree/master/bin>`_ folder of this project's - source code. They are not distributed. - ======= History ======= + 0.1.9 *2020-03-22* + * **Performance** optimization by `Avram Lubkin`_, `PR #35`_. + * **Updated** tables to Unicode Specification 13.0.0. + 0.1.8 *2020-01-01* * **Updated** tables to Unicode Specification 12.0.0. (`PR #30`_). @@ -225,14 +230,22 @@ .. _`Thomas Ballinger`: https://github.com/thomasballinger .. _`Leta Montopoli`: https://github.com/lmontopo .. _`Philip Craig`: https://github.com/philipc + .. _`Avram Lubkin`: https://github.com/avylove .. _`PR #3`: https://github.com/jquast/wcwidth/pull/3 .. _`PR #4`: https://github.com/jquast/wcwidth/pull/4 .. _`PR #5`: https://github.com/jquast/wcwidth/pull/5 .. _`PR #11`: https://github.com/jquast/wcwidth/pull/11 .. _`PR #18`: https://github.com/jquast/wcwidth/pull/18 .. _`PR #30`: https://github.com/jquast/wcwidth/pull/30 - .. _`jquast/blessed`: https://github.com/jquast/blessed - .. _`jonathanslenders/python-prompt-toolkit`: https://github.com/jonathanslenders/python-prompt-toolkit + .. _`PR #35`: https://github.com/jquast/wcwidth/pull/35 + .. _blessed: https://github.com/jquast/blessed + .. _python-prompt-toolkit: https://github.com/prompt-toolkit/python-prompt-toolkit + .. _pyte: https://github.com/selectel/pyte + .. _asciimatics: https://github.com/peterbrittain/asciimatics + .. _ftfy: https://github.com/LuminosoInsight/python-ftfy + .. _curtsies: https://github.com/bpython/curtsies + .. _bpython: https://github.com/bpython/bpython + .. _termtosvg: https://github.com/nbedos/termtosvg .. _`wcwidth(3)`: http://man7.org/linux/man-pages/man3/wcwidth.3.html .. _`wcswidth(3)`: http://man7.org/linux/man-pages/man3/wcswidth.3.html