Upstream update available: python3-wcwidth 0.2.13 → 0.6.0 #1

Open
opened 2026-04-28 02:09:08 +03:00 by sbelikov · 0 comments
Owner

Upstream update available: python3-wcwidth 0.2.130.6.0

Package

  • Package: python3-wcwidth
  • RPM name: python3-wcwidth
  • Branch: niceos-5.2
  • Current EVR: 0.2.13-1
  • Update class: minor
  • Compare method: python_rpm
  • Update policy: leaf
  • Risk tags: standard

Upstream

Signals

  • Security-relevant keywords detected: False
  • Policy blocked: False
  • Policy reason: -
  • Labels: ai-summary, bot, needs-build, needs-triage, priority/medium, update/minor, upstream-update, upstream/pypi

NiceSOFT AI preliminary analysis

1. Краткий вывод

Предлагается обновление библиотеки python3-wcwidth с версии 0.2.13 до 0.6.0. Обновление классифицируется как minor, однако релиз-ноты описывают фундаментальные изменения логики работы функций форматирования текста (textwrap, ljust, rjust, center) и добавление поддержки графем и терминальных последовательностей управления. Текущая версия использует упрощенную модель измерения ширины, тогда как новая версия реализует строгое соответствие POSIX и корректное отображение Юникода.

2. Риск для НАЙС.ОС

medium.
Хотя метка обновления помечена как minor, функциональные изменения затрагивают базовые строковые операции, которые могут использоваться множеством зависимых пакетов. Разница в поведении между версиями (например, ширина строки 'café' или 'コンニチハ') может привести к визуальному рассинхронизанию интерфейсов TUI/CLI приложений, зависящих от этой библиотеки, если они не были написаны с учетом новой логики. Отсутствие явных признаков безопасности снижает критичность, но риск регрессии функциональности остается значительным.

3. Security/CVE

Во входных данных отсутствуют признаки уязвимостей безопасности. Поле security_keywords_detected_by_script равно False, а в тексте релиз-нотов нет упоминаний исправлений эксплойтов, утечек памяти или проблем с обработкой ввода, характерных для CVE.

4. ABI/API риск

Высокий риск несоответствия поведения (behavioral breakage), даже если сигнатуры функций остаются прежними.

  • Функции ljust(), rjust(), center() и textwrap.wrap() теперь учитывают графемы и ширину символов, что меняет длину возвращаемых строк по сравнению с версией 0.2.13.
  • Добавлены новые функции (iter_graphemes, width(), clip() и др.), которые могут потребовать обновления зависимостей.
  • Для точной оценки влияния необходимо провести ручной анализ ABI/API всех пакетов, зависящих от python3-wcwidth.

5. Риск для RPM-сборки

Вероятны проблемы со сборкой или проверками:

  • Изменение требований к Python (возможна необходимость более новой версии интерпретатора, хотя явно не указано).
  • Изменение файлов манифеста или структуры пакета при переходе на новую версию PyPI.
  • %check тесты могут провалиться из-за изменения ожидаемых значений в тестах самого пакета или зависимых пакетов, если они жестко зашиты в спецификацию.
  • Необходима проверка совместимости с текущей версией Python в дистрибутиве.

6. Проверки мейнтейнера

  • Проверить список зависимых пакетов (rpm -q --whatrequires python3-wcwidth).
  • Провести тестирование ключевых TUI/CLI приложений дистрибутива, использующих эту библиотеку, на предмет визуальных артефактов (смещение текста, обрезка).
  • Запустить rpmlint и локальную сборку пакета с новой версией.
  • Сравнить выходные данные тестовых скриптов, использующих wcwidth, между старой и новой версией.
  • Убедиться, что в specfile нет жестко зашитых версий или патчей, нарушающих структуру нового релиза.

7. Рекомендация

update candidate

8. Основание рекомендации

Обновление является легитимным (policy_blocked: False, update_class: minor), но требует ручного контроля из-за изменений в логике обработки текста. Поскольку это библиотека-утилита для CLI/TUI, её обновление критически важно для корректности отображения современных Unicode-строк, и откладывать его бессмысленно. Рекомендуется включить в кандидаты на обновление после выполнения проверок из пункта 6 для минимизации риска поломки пользовательских интерфейсов.

Upstream release notes / description

Measures the displayed width of unicode strings in a terminal

|pypi_downloads| |codecov| |license|

============
Introduction

This library is mainly for CLI/TUI programs that carefully produce output for Terminals.

Installation

The stable version of this package is maintained on pypi, install or upgrade, using pip::

pip install --upgrade wcwidth

Problem

All Python string-formatting functions, textwrap.wrap(), str.ljust(), str.rjust(), and
str.center()
incorrectly measure the displayed width of a string as equal to the number of
their codepoints.

Some examples of incorrect results:

.. code-block:: python

>>> # result consumes 16 total cells, 11 expected,
>>> 'コンニチハ'.rjust(11, 'X')
'XXXXXXコンニチハ'

>>> # result consumes 5 total cells, 6 expected,
>>> 'café'.center(6, 'X')
'caféX'

Solution

The lowest-level functions in this library are the POSIX.1-2001 and POSIX.1-2008 wcwidth(3)_ and
wcswidth(3), which this library precisely copies by interface as wcwidth() and wcswidth()_.
These functions return -1 when C0 and C1 control codes are present.

An easy-to-use width()_ function is provided as a wrapper of wcswidth()_ that is also capable of
measuring most terminal control codes and sequences, like colors, bold, tabstops, and horizontal
cursor movement.

Text-justification is solved by the grapheme and sequence-aware functions ljust(),
rjust()
, center(), and wrap(), serving as drop-in replacements to python standard functions
of the same names.

The iterator functions iter_graphemes()_ and iter_sequences()_ allow for careful navigation of
grapheme and terminal control sequence boundaries. iter_graphemes_reverse(), and
grapheme_boundary_before()
are useful for editing and searching of complex unicode. The
clip()_ function extracts substrings by display column positions, and strip_sequences()_ removes
terminal escape sequences from text altogether.

Discrepancies

You may find that support varies for complex unicode sequences or codepoints.

A companion utility, jquast/ucs-detect_ was authored to gather and publish the results of Wide
character, language/grapheme clustering and complex script support, emojis and zero-width joiner,
variations, and regional indicator (flags) as a General Tabulated Summary_ by terminal emulator
software and version.

========
Overview

wcwidth()

Use function wcwidth() to determine the length of a single unicode
codepoint
.

A brief overview, through examples, for all of the public API functions.

Full API Documentation at https://wcwidth.readthedocs.io/en/latest/api.html

wcwidth()

Measures width of a single codepoint,

.. code-block:: python

>>> # '♀' narrow emoji
>>> wcwidth.wcwidth('\u2640')
1

Use function wcwidth()_ to determine the length of a single unicode character.

See specification_ of character measurements. Note that -1 is returned for control codes.

wcswidth()

Measures width of a string, returns -1 for control codes.

.. code-block:: python

>>> # '♀️' emoji w/vs-16
>>> wcwidth.wcswidth('\u2640\ufe0f')
2

Use function wcswidth()_ to determine the length of many, a string of unicode characters.

See specification_ of character measurements. Note that -1 is returned if control codes occurs
anywhere in the string.

width()

Use function width()_ to measure a string with improved handling of control_codes.

.. code-block:: python

>>> # same support as wcswidth(), eg. regional indicator flag:
>>> wcwidth.width('\U0001F1FF\U0001F1FC')
2
>>> # but also supports SGR colored text, 'WARN', followed by SGR reset
>>> wcwidth.width('\x1b[38;2;255;150;100mWARN\x1b[0m')
4
>>> # tabs,
>>> wcwidth.width('\t', tabsize=4)
4
>>> # or, tab and all other control characters can be ignored
>>> wcwidth.width('\t', control_codes='ignore')
0
>>> # "vertical" contro

NiceOS maintainer checklist

  • Confirm that the detected version is a stable upstream release.
  • Check upstream changelog for security fixes, ABI/API changes and build-system changes.
  • Check ABI/API compatibility and reverse dependencies.
  • Download source into NiceOS lookaside storage.
  • Update Version and related fields in SPECS/*.spec only if policy allows it.
  • Regenerate SOURCES/sources.lock.json, manifests, metadata and SBOM.
  • Build SRPM/RPM in a clean NiceOS buildroot.
  • Run package smoke tests.
  • Link PR/build logs and close this issue after update or triage.

Bot metadata

  • Tool: niceos_upstream_monitor.py 1.4
  • Generated at: 2026-04-27T23:09:08Z
<!-- niceos-upstream-monitor:fingerprint=upstream-update:python3-wcwidth:0.6.0 --> <!-- niceos-upstream-monitor:package=python3-wcwidth --> <!-- niceos-upstream-monitor:current=0.2.13 --> <!-- niceos-upstream-monitor:latest=0.6.0 --> # Upstream update available: `python3-wcwidth` `0.2.13` → `0.6.0` ## Package - Package: `python3-wcwidth` - RPM name: `python3-wcwidth` - Branch: `niceos-5.2` - Current EVR: `0.2.13-1` - Update class: `minor` - Compare method: `python_rpm` - Update policy: `leaf` - Risk tags: `standard` ## Upstream - Upstream type: `pypi` - Upstream project: `-` - Upstream URL: https://files.pythonhosted.org/packages/source/w/wcwidth/wcwidth-0.2.13.tar.gz - Detected version: `0.6.0` - Tag/release: `0.6.0` - Source: `pypi_json` - Published: `2026-02-06T19:19:40.919510Z` - Release URL: https://pypi.org/project/wcwidth/ - Source URL: https://files.pythonhosted.org/packages/35/a2/8e3becb46433538a38726c948d3399905a4c7cabd0df578ede5dc51f0ec2/wcwidth-0.6.0.tar.gz - Pre-release: `False` ## Signals - Security-relevant keywords detected: `False` - Policy blocked: `False` - Policy reason: `-` - Labels: `ai-summary, bot, needs-build, needs-triage, priority/medium, update/minor, upstream-update, upstream/pypi` ## NiceSOFT AI preliminary analysis ### 1. Краткий вывод Предлагается обновление библиотеки `python3-wcwidth` с версии 0.2.13 до 0.6.0. Обновление классифицируется как `minor`, однако релиз-ноты описывают фундаментальные изменения логики работы функций форматирования текста (`textwrap`, `ljust`, `rjust`, `center`) и добавление поддержки графем и терминальных последовательностей управления. Текущая версия использует упрощенную модель измерения ширины, тогда как новая версия реализует строгое соответствие POSIX и корректное отображение Юникода. ### 2. Риск для НАЙС.ОС **medium**. Хотя метка обновления помечена как `minor`, функциональные изменения затрагивают базовые строковые операции, которые могут использоваться множеством зависимых пакетов. Разница в поведении между версиями (например, ширина строки `'café'` или `'コンニチハ'`) может привести к визуальному рассинхронизанию интерфейсов TUI/CLI приложений, зависящих от этой библиотеки, если они не были написаны с учетом новой логики. Отсутствие явных признаков безопасности снижает критичность, но риск регрессии функциональности остается значительным. ### 3. Security/CVE Во входных данных отсутствуют признаки уязвимостей безопасности. Поле `security_keywords_detected_by_script` равно `False`, а в тексте релиз-нотов нет упоминаний исправлений эксплойтов, утечек памяти или проблем с обработкой ввода, характерных для CVE. ### 4. ABI/API риск Высокий риск несоответствия поведения (behavioral breakage), даже если сигнатуры функций остаются прежними. - Функции `ljust()`, `rjust()`, `center()` и `textwrap.wrap()` теперь учитывают графемы и ширину символов, что меняет длину возвращаемых строк по сравнению с версией 0.2.13. - Добавлены новые функции (`iter_graphemes`, `width()`, `clip()` и др.), которые могут потребовать обновления зависимостей. - Для точной оценки влияния необходимо провести ручной анализ ABI/API всех пакетов, зависящих от `python3-wcwidth`. ### 5. Риск для RPM-сборки Вероятны проблемы со сборкой или проверками: - Изменение требований к Python (возможна необходимость более новой версии интерпретатора, хотя явно не указано). - Изменение файлов манифеста или структуры пакета при переходе на новую версию PyPI. - `%check` тесты могут провалиться из-за изменения ожидаемых значений в тестах самого пакета или зависимых пакетов, если они жестко зашиты в спецификацию. - Необходима проверка совместимости с текущей версией Python в дистрибутиве. ### 6. Проверки мейнтейнера - [ ] Проверить список зависимых пакетов (`rpm -q --whatrequires python3-wcwidth`). - [ ] Провести тестирование ключевых TUI/CLI приложений дистрибутива, использующих эту библиотеку, на предмет визуальных артефактов (смещение текста, обрезка). - [ ] Запустить `rpmlint` и локальную сборку пакета с новой версией. - [ ] Сравнить выходные данные тестовых скриптов, использующих `wcwidth`, между старой и новой версией. - [ ] Убедиться, что в `specfile` нет жестко зашитых версий или патчей, нарушающих структуру нового релиза. ### 7. Рекомендация update candidate ### 8. Основание рекомендации Обновление является легитимным (`policy_blocked: False`, `update_class: minor`), но требует ручного контроля из-за изменений в логике обработки текста. Поскольку это библиотека-утилита для CLI/TUI, её обновление критически важно для корректности отображения современных Unicode-строк, и откладывать его бессмысленно. Рекомендуется включить в кандидаты на обновление после выполнения проверок из пункта 6 для минимизации риска поломки пользовательских интерфейсов. ## Upstream release notes / description Measures the displayed width of unicode strings in a terminal |pypi_downloads| |codecov| |license| ============ Introduction ============ This library is mainly for CLI/TUI programs that carefully produce output for Terminals. Installation ------------ The stable version of this package is maintained on pypi, install or upgrade, using pip:: pip install --upgrade wcwidth Problem ------- All Python string-formatting functions, `textwrap.wrap()`_, `str.ljust()`_, `str.rjust()`_, and `str.center()`_ **incorrectly** measure the displayed width of a string as equal to the number of their codepoints. Some examples of **incorrect results**: .. code-block:: python >>> # result consumes 16 total cells, 11 expected, >>> 'コンニチハ'.rjust(11, 'X') 'XXXXXXコンニチハ' >>> # result consumes 5 total cells, 6 expected, >>> 'café'.center(6, 'X') 'caféX' Solution -------- The lowest-level functions in this library are the POSIX.1-2001 and POSIX.1-2008 `wcwidth(3)`_ and `wcswidth(3)`_, which this library precisely copies by interface as `wcwidth()`_ and `wcswidth()`_. These functions return -1 when C0 and C1 control codes are present. An easy-to-use `width()`_ function is provided as a wrapper of `wcswidth()`_ that is also capable of measuring most terminal control codes and sequences, like colors, bold, tabstops, and horizontal cursor movement. Text-justification is solved by the grapheme and sequence-aware functions `ljust()`_, `rjust()`_, `center()`_, and `wrap()`_, serving as drop-in replacements to python standard functions of the same names. The iterator functions `iter_graphemes()`_ and `iter_sequences()`_ allow for careful navigation of grapheme and terminal control sequence boundaries. `iter_graphemes_reverse()`_, and `grapheme_boundary_before()`_ are useful for editing and searching of complex unicode. The `clip()`_ function extracts substrings by display column positions, and `strip_sequences()`_ removes terminal escape sequences from text altogether. Discrepancies ------------- You may find that support *varies* for complex unicode sequences or codepoints. A companion utility, `jquast/ucs-detect`_ was authored to gather and publish the results of Wide character, language/grapheme clustering and complex script support, emojis and zero-width joiner, variations, and regional indicator (flags) as a `General Tabulated Summary`_ by terminal emulator software and version. ======== Overview ======== wcwidth() --------- Use function ``wcwidth()`` to determine the length of a *single unicode codepoint*. A brief overview, through examples, for all of the public API functions. Full API Documentation at https://wcwidth.readthedocs.io/en/latest/api.html wcwidth() --------- Measures width of a single codepoint, .. code-block:: python >>> # '♀' narrow emoji >>> wcwidth.wcwidth('\u2640') 1 Use function `wcwidth()`_ to determine the length of a *single unicode character*. See specification_ of character measurements. Note that ``-1`` is returned for control codes. wcswidth() ---------- Measures width of a string, returns -1 for control codes. .. code-block:: python >>> # '♀️' emoji w/vs-16 >>> wcwidth.wcswidth('\u2640\ufe0f') 2 Use function `wcswidth()`_ to determine the length of many, a *string of unicode characters*. See specification_ of character measurements. Note that ``-1`` is returned if control codes occurs anywhere in the string. width() ------- Use function `width()`_ to measure a string with improved handling of ``control_codes``. .. code-block:: python >>> # same support as wcswidth(), eg. regional indicator flag: >>> wcwidth.width('\U0001F1FF\U0001F1FC') 2 >>> # but also supports SGR colored text, 'WARN', followed by SGR reset >>> wcwidth.width('\x1b[38;2;255;150;100mWARN\x1b[0m') 4 >>> # tabs, >>> wcwidth.width('\t', tabsize=4) 4 >>> # or, tab and all other control characters can be ignored >>> wcwidth.width('\t', control_codes='ignore') 0 >>> # "vertical" contro ## NiceOS maintainer checklist - [ ] Confirm that the detected version is a stable upstream release. - [ ] Check upstream changelog for security fixes, ABI/API changes and build-system changes. - [ ] Check ABI/API compatibility and reverse dependencies. - [ ] Download source into NiceOS lookaside storage. - [ ] Update `Version` and related fields in `SPECS/*.spec` only if policy allows it. - [ ] Regenerate `SOURCES/sources.lock.json`, manifests, metadata and SBOM. - [ ] Build SRPM/RPM in a clean NiceOS buildroot. - [ ] Run package smoke tests. - [ ] Link PR/build logs and close this issue after update or triage. ## Bot metadata - Tool: `niceos_upstream_monitor.py 1.4` - Generated at: `2026-04-27T23:09:08Z`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rpms/python3-wcwidth#1
No description provided.