Upstream update available: python3-wcwidth 0.2.13 → 0.6.0 #1
Labels
No labels
ai-summary
bot
needs-build
needs-triage
priority/medium
update/minor
upstream-update
upstream/pypi
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
rpms/python3-wcwidth#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Upstream update available:
python3-wcwidth0.2.13→0.6.0Package
python3-wcwidthpython3-wcwidthniceos-5.20.2.13-1minorpython_rpmleafstandardUpstream
pypi-0.6.00.6.0pypi_json2026-02-06T19:19:40.919510ZFalseSignals
FalseFalse-ai-summary, bot, needs-build, needs-triage, priority/medium, update/minor, upstream-update, upstream/pypiNiceSOFT 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()и др.), которые могут потребовать обновления зависимостей.python3-wcwidth.5. Риск для RPM-сборки
Вероятны проблемы со сборкой или проверками:
%checkтесты могут провалиться из-за изменения ожидаемых значений в тестах самого пакета или зависимых пакетов, если они жестко зашиты в спецификацию.6. Проверки мейнтейнера
rpm -q --whatrequires python3-wcwidth).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::
Problem
All Python string-formatting functions,
textwrap.wrap(),str.ljust(),str.rjust(), andstr.center()incorrectly measure the displayed width of a string as equal to the number oftheir codepoints.
Some examples of incorrect results:
.. code-block:: python
Solution
The lowest-level functions in this library are the POSIX.1-2001 and POSIX.1-2008
wcwidth(3)_ andwcswidth(3), which this library precisely copies by interface aswcwidth()andwcswidth()_.These functions return -1 when C0 and C1 control codes are present.
An easy-to-use
width()_ function is provided as a wrapper ofwcswidth()_ that is also capable ofmeasuring 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(), andwrap(), serving as drop-in replacements to python standard functionsof the same names.
The iterator functions
iter_graphemes()_ anditer_sequences()_ allow for careful navigation ofgrapheme and terminal control sequence boundaries.
iter_graphemes_reverse(), andgrapheme_boundary_before()are useful for editing and searching of complex unicode. Theclip()_ function extracts substrings by display column positions, andstrip_sequences()_ removesterminal 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 Widecharacter, language/grapheme clustering and complex script support, emojis and zero-width joiner,
variations, and regional indicator (flags) as a
General Tabulated Summary_ by terminal emulatorsoftware and version.
========
Overview
wcwidth()
Use function
wcwidth()to determine the length of a single unicodecodepoint.
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
Use function
wcwidth()_ to determine the length of a single unicode character.See specification_ of character measurements. Note that
-1is returned for control codes.wcswidth()
Measures width of a string, returns -1 for control codes.
.. code-block:: python
Use function
wcswidth()_ to determine the length of many, a string of unicode characters.See specification_ of character measurements. Note that
-1is returned if control codes occursanywhere in the string.
width()
Use function
width()_ to measure a string with improved handling ofcontrol_codes... code-block:: python
NiceOS maintainer checklist
Versionand related fields inSPECS/*.speconly if policy allows it.SOURCES/sources.lock.json, manifests, metadata and SBOM.Bot metadata
niceos_upstream_monitor.py 1.42026-04-27T23:09:08Z