11Metadata-Version: 2.4
22Name: wcwidth
3- Version: 0.5.0
3+ Version: 0.5.2
44Summary: Measures the displayed width of unicode strings in a terminal
55Project-URL: Homepage, https://github.com/jquast/wcwidth
66Author-email: Jeff Quast <contact@jeffquast.com>
@@ -119,8 +119,7 @@ Measures width of a single codepoint,
119119
120120Use function `wcwidth()`_ to determine the length of a *single unicode character*.
121121
122- See `Specification <Specification_from_pypi_>`_ of character measurements. Note that ``-1`` is
123- returned for control codes.
122+ See specification_ of character measurements. Note that ``-1`` is returned for control codes.
124123
125124wcswidth()
126125----------
@@ -135,8 +134,8 @@ Measures width of a string, returns -1 for control codes.
135134
136135Use function `wcswidth()`_ to determine the length of many, a *string of unicode characters*.
137136
138- See `Specification <Specification_from_pypi_>`_ of character measurements. Note that
139- ``-1`` is returned if control codes occurs anywhere in the string.
137+ See specification_ of character measurements. Note that ``-1`` is returned if control codes occurs
138+ anywhere in the string.
140139
141140width()
142141-------
@@ -252,7 +251,7 @@ Use `center()`_ as replacement of `str.center()`_:
252251wrap()
253252------
254253
255- Use function `` wrap()`` to wrap text containing terminal sequences, Unicode grapheme
254+ Use function `wrap()`_ to wrap text containing terminal sequences, Unicode grapheme
256255clusters, and wide characters to a given display width.
257256
258257.. code-block:: python
@@ -334,10 +333,12 @@ The ``ambiguous_width`` parameter is available on all width-measuring functions:
334333The most reliable method to detect whether a terminal profile is set for "Ambiguous width as wide"
335334mode is to display an ambiguous character surrounded by a pair of Cursor Position Report (CPR)
336335queries with a terminal in cooked or raw mode, and to parse the responses for their ``(y, x)``
337- locations, and measure the difference of the ``x`` positions. This code should also check whether
338- it is attached to a terminal and timeout, and then fallback to the preferred locale.
336+ locations and measure the difference ``x``.
339337
340- `jquast/blessed`_ library provides a `Terminal.detect_ambiguous_width()`_ method:
338+ This code should also be careful check whether it is attached to a terminal and be careful of
339+ possible timeout, slow network, or non-response when working with "dumb terminals" like a CI build.
340+
341+ `jquast/blessed`_ library provides such a helping `Terminal.detect_ambiguous_width()`_ method:
341342
342343.. code-block:: python
343344
@@ -484,6 +485,16 @@ languages.
484485History
485486=======
486487
488+ 0.5.2 *2026-01-29*
489+ * **Bugfix** Measurement of category ``Mc`` (`Spacing Combining Mark`_), approx. 443, has a more
490+ nuanced specification_, and may be categorized as either zero or wide. `PR #200`_.
491+ * **Bugfix** Measurement of "standalone" modifiers and regional indicators, `PR #202`_.
492+ * **Updated** Data files used in some automatic tests are no longer distributed. `PR #199`_
493+
494+ 0.5.1 *2026-01-27*
495+ * **Updated** generated zero and wide code tables to length of 1 to complete the previously
496+ announced removal of historical wide and zero tables. `PR #196`_.
497+
4874980.5.0 *2026-01-26*
488499 * **Drop Support** of many historical versions of wide and zero unicode tables. Only the latest
489500 Unicode version (17.0.0) is now shipped. The related ``unicode_version='auto'`` keyword of the
@@ -551,13 +562,12 @@ History
5515620.2.10 *2023-11-13*
552563 * **Bugfix** accounting of some kinds of emoji sequences using U+FE0F
553564 Variation Selector 16 (`PR #97`_).
554- * **Updated** `Specification <Specification_from_pypi_>`_ .
565+ * **Updated** specification_ .
555566
5565670.2.9 *2023-10-30*
557568 * **Bugfix** zero-width characters used in Emoji ZWJ sequences, Balinese,
558569 Jamo, Devanagari, Tamil, Kannada and others (`PR #91`_).
559- * **Updated** to include `Specification <Specification_from_pypi_>`_ of
560- character measurements.
570+ * **Updated** to include specification_ of character measurements.
561571
5625720.2.8 *2023-09-30*
563573 * Include requirements files in the source distribution (`PR #82`_).
@@ -638,7 +648,8 @@ https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c::
638648 * for any purpose and without fee is hereby granted. The author
639649 * disclaims all warranties with regard to this software.
640650
641- .. _`Specification_from_pypi`: https://wcwidth.readthedocs.io/en/latest/specs.html
651+ .. _`Spacing Combining Mark`: https://www.unicode.org/versions/latest/ch04.pdf#G134153
652+ .. _`specification`: https://wcwidth.readthedocs.io/en/latest/specs.html
642653.. _`tox`: https://tox.wiki/en/latest/
643654.. _`prospector`: https://github.com/landscapeio/prospector
644655.. _`combining`: https://en.wikipedia.org/wiki/Combining_character
@@ -682,6 +693,10 @@ https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c::
682693.. _`PR #193`: https://github.com/jquast/wcwidth/pull/193
683694.. _`PR #194`: https://github.com/jquast/wcwidth/pull/194
684695.. _`PR #195`: https://github.com/jquast/wcwidth/pull/195
696+ .. _`PR #196`: https://github.com/jquast/wcwidth/pull/196
697+ .. _`PR #199`: https://github.com/jquast/wcwidth/pull/199
698+ .. _`PR #200`: https://github.com/jquast/wcwidth/pull/200
699+ .. _`PR #202`: https://github.com/jquast/wcwidth/pull/202
685700.. _`Issue #101`: https://github.com/jquast/wcwidth/issues/101
686701.. _`Issue #190`: https://github.com/jquast/wcwidth/issues/190
687702.. _`jquast/blessed`: https://github.com/jquast/blessed
0 commit comments