pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/py-progressbar2



Module Name:    pkgsrc
Committed By:   adam
Date:           Tue Nov 10 09:28:07 UTC 2026

Modified Files:
        pkgsrc/devel/py-progressbar2: ALTERNATIVES Makefile PLIST distinfo

Log Message:
py-progressbar2: updated to 4.7.0

4.7.0 - 2026-11-05

Widgets are coloured by default: a bar on a colour terminal shows the
default palette without ``enable_colors=True``, spinners cycle through
colours, and the ``Bar`` fill colours are constructor arguments (``fg``,
``bg``) instead of the ``Bar.fg`` and ``Bar.bg`` class attributes. A
widget called directly returns the escape codes, and
``progressbar.utils.no_color`` strips them. Output to a file or pipe is
unchanged.

A parallel execution API: ``progressbar.map``, ``imap``,
``imap_unordered``, ``starmap``, ``thread_map``, ``process_map``,
``as_completed``, the asyncio variants ``amap``, ``aimap``,
``aimap_unordered`` and ``gather``, ``run`` for shell commands, and the
``progressbar.parallel`` decorator, with ``bar='multi'`` for an overall
bar plus a bar per task.

A forced redraw of the default widgets is 20 percent faster than in
4.6.0 and the fast path, the iterator overhead and the import time are
at or below their 4.6.0 cost, with colours on. Rendered colour escapes
are remembered per gradient and per colour, new-style templates are
validated once per template text, and captured writes take a cheaper
lock.

New-style format templates such as ``FormatLabel('{value.__class__}')``
or ``prefix='{value.__doc__} '`` now raise ``ValueError``: a template
walking dunder or frame attributes could reach interpreter internals.
Index access and ordinary attributes keep working, and a positional
field still raises ``IndexError`` as it did.

``desc`` is still the ``prefix`` alias and renders as a template, as it
did in 4.6.0. A literal brace in a description has to be doubled.

The fast bar reserves the width of ``prefix``, ``desc`` and ``suffix``
before sizing the filler, so a labelled bar no longer overflows the
terminal. Labels that are not
strings and an uncallable ``custom_len`` render as before.

The ``progressbar`` and ``bar`` commands exit with status 2 and a usage
line on an invalid option value, such as ``--size abc``, where they
printed a traceback before, and validate every argument before the
output file is opened. A pipeline whose reader goes away ends the copy
quietly with status 0.

``PROGRESSBAR_MINIMUM_UPDATE_INTERVAL`` set to a value that is not a
non-negative finite number is logged once and ignored instead of raising
at the first ``ProgressBar()``.

Deprecation warnings for ``maxval``, ``poll`` and ``currval`` name the
caller's file and line. A warnings filter by module ``progressbar`` no
longer matches them, a filter by category or message does.

``StreamWrapper.lock`` and ``listeners_lock`` are read-only properties
shared with the wrapped streams and reset after ``fork``. A subclass
that assigned its own lock raises ``AttributeError`` at construction.
``update_capturing()`` calls ``flush()`` once the last capture stops, as
in 4.6.0. ``wrapped_excepthook`` is a ``bool``.

The ``progressbar`` and ``bar`` commands, and ``python -m progressbar``,
now exit with status 130 after Ctrl-C interrupts a transfer. Previously
they exited with status 0. Scripts that check the exit status can now
distinguish an interrupted transfer from a completed copy.

The ``python-utils`` dependency now requires 4.1.4 or newer, up from
3.8.1. Older releases render a negative ``scale_1024`` power as
``0.1 YiB`` instead of the byte count. An environment that pins
``python-utils<4`` has to lift that pin before upgrading.

Captured output now survives a drain failure on the other stream, and
unwrapping restores the original stream even when its capture buffer is
closed. Built-in ``StringIO`` capture writes and drains remain atomic.
Caller-replaced buffers keep their method overrides, which run without
stream locks. As in 4.6.0, callers synchronise concurrent writes and drains
on those custom buffers. A capture-hook failure now retains the other
stream's exception in the primary failure's context chain.

Specialised format templates retain their escaping and result types.
Their field paths, including nested format specifications, are checked
before calling the application's formatter.

MultiBar expiry keeps a replacement registered under the same exact
``str`` label. Assignment, update, in-place union and ordinary removal
methods share its membership guard. Lifecycle tracking uses bar identity
without calling application hash or equality methods, and the guard resets
after fork.
Custom label objects retain their hash and equality hooks and their
identity as dictionary keys. Using one for mutation or indexing switches
that MultiBar instance permanently to the 4.6.0 concurrency contract:
callers synchronise concurrent mutation and rendering, including expiry.
These hooks run without the membership guard, even for later exact
``str`` lookups. Clearing the instance does not reset this mode. Direct
calls to ``dict`` base-class mutation methods bypass this protocol.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/py-progressbar2/ALTERNATIVES
cvs rdiff -u -r1.20 -r1.21 pkgsrc/devel/py-progressbar2/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/devel/py-progressbar2/PLIST
cvs rdiff -u -r1.12 -r1.13 pkgsrc/devel/py-progressbar2/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/py-progressbar2/ALTERNATIVES
diff -u pkgsrc/devel/py-progressbar2/ALTERNATIVES:1.1 pkgsrc/devel/py-progressbar2/ALTERNATIVES:1.2
--- pkgsrc/devel/py-progressbar2/ALTERNATIVES:1.1       Sun Mar 24 17:51:04 2024
+++ pkgsrc/devel/py-progressbar2/ALTERNATIVES   Tue Nov 10 09:28:07 2026
@@ -1 +1,2 @@
+bin/bar @PREFIX@/bin/bar-@PYVERSSUFFIX@
 bin/progressbar @PREFIX@/bin/progressbar-@PYVERSSUFFIX@

Index: pkgsrc/devel/py-progressbar2/Makefile
diff -u pkgsrc/devel/py-progressbar2/Makefile:1.20 pkgsrc/devel/py-progressbar2/Makefile:1.21
--- pkgsrc/devel/py-progressbar2/Makefile:1.20  Fri Oct 16 19:43:51 2026
+++ pkgsrc/devel/py-progressbar2/Makefile       Tue Nov 10 09:28:07 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.20 2026/10/16 19:43:51 adam Exp $
+# $NetBSD: Makefile,v 1.21 2026/11/10 09:28:07 adam Exp $
 
-DISTNAME=      progressbar2-4.6.0
+DISTNAME=      progressbar2-4.7.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/progressbar2/}
@@ -11,18 +11,17 @@ COMMENT=    Text progress bar library for P
 LICENSE=       modified-bsd
 
 TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools>=78:../../devel/py-setuptools
-TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools_scm-[0-9]*:../../devel/py-setuptools_scm
-DEPENDS+=      ${PYPKGPREFIX}-utils>=3.8.1:../../devel/py-utils
+TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools_scm>=0:../../devel/py-setuptools_scm
+DEPENDS+=      ${PYPKGPREFIX}-utils>=4.1.4:../../devel/py-utils
 TEST_DEPENDS+= ${PYPKGPREFIX}-dill>=0.3.6:../../textproc/py-dill
 TEST_DEPENDS+= ${PYPKGPREFIX}-flake8>=3.7.7:../../devel/py-flake8
-TEST_DEPENDS+= ${PYPKGPREFIX}-freezegun>=0.3.11:../../devel/py-freezegun
+TEST_DEPENDS+= ${PYPKGPREFIX}-markupsafe>=2.0:../../textproc/py-markupsafe
 TEST_DEPENDS+= ${PYPKGPREFIX}-sphinx>=1.8.5:../../textproc/py-sphinx
 TEST_DEPENDS+= ${PYPKGPREFIX}-test-cov>=2.6.1:../../devel/py-test-cov
-TEST_DEPENDS+= ${PYPKGPREFIX}-test-mypy-[0-9]*:../../devel/py-test-mypy
 
 USE_LANGUAGES= # none
 
-PY_RENAME_BINARIES=    progressbar
+PY_RENAME_BINARIES=    bar progressbar
 
 TEST_ENV+=     PYTHONPATH=${WRKSRC}/build/lib
 

Index: pkgsrc/devel/py-progressbar2/PLIST
diff -u pkgsrc/devel/py-progressbar2/PLIST:1.7 pkgsrc/devel/py-progressbar2/PLIST:1.8
--- pkgsrc/devel/py-progressbar2/PLIST:1.7      Fri Aug 14 08:29:09 2026
+++ pkgsrc/devel/py-progressbar2/PLIST  Tue Nov 10 09:28:07 2026
@@ -1,4 +1,5 @@
-@comment $NetBSD: PLIST,v 1.7 2026/08/14 08:29:09 adam Exp $
+@comment $NetBSD: PLIST,v 1.8 2026/11/10 09:28:07 adam Exp $
+bin/bar-${PYVERSSUFFIX}
 bin/progressbar-${PYVERSSUFFIX}
 ${PYSITELIB}/${WHEEL_INFODIR}/METADATA
 ${PYSITELIB}/${WHEEL_INFODIR}/RECORD
@@ -15,6 +16,30 @@ ${PYSITELIB}/progressbar/__init__.pyo
 ${PYSITELIB}/progressbar/__main__.py
 ${PYSITELIB}/progressbar/__main__.pyc
 ${PYSITELIB}/progressbar/__main__.pyo
+${PYSITELIB}/progressbar/_identity.py
+${PYSITELIB}/progressbar/_identity.pyc
+${PYSITELIB}/progressbar/_identity.pyo
+${PYSITELIB}/progressbar/_parallel/__init__.py
+${PYSITELIB}/progressbar/_parallel/__init__.pyc
+${PYSITELIB}/progressbar/_parallel/__init__.pyo
+${PYSITELIB}/progressbar/_parallel/_async.py
+${PYSITELIB}/progressbar/_parallel/_async.pyc
+${PYSITELIB}/progressbar/_parallel/_async.pyo
+${PYSITELIB}/progressbar/_parallel/_common.py
+${PYSITELIB}/progressbar/_parallel/_common.pyc
+${PYSITELIB}/progressbar/_parallel/_common.pyo
+${PYSITELIB}/progressbar/_parallel/_decorator.py
+${PYSITELIB}/progressbar/_parallel/_decorator.pyc
+${PYSITELIB}/progressbar/_parallel/_decorator.pyo
+${PYSITELIB}/progressbar/_parallel/_display.py
+${PYSITELIB}/progressbar/_parallel/_display.pyc
+${PYSITELIB}/progressbar/_parallel/_display.pyo
+${PYSITELIB}/progressbar/_parallel/_shell.py
+${PYSITELIB}/progressbar/_parallel/_shell.pyc
+${PYSITELIB}/progressbar/_parallel/_shell.pyo
+${PYSITELIB}/progressbar/_parallel/_sync.py
+${PYSITELIB}/progressbar/_parallel/_sync.pyc
+${PYSITELIB}/progressbar/_parallel/_sync.pyo
 ${PYSITELIB}/progressbar/algorithms.py
 ${PYSITELIB}/progressbar/algorithms.pyc
 ${PYSITELIB}/progressbar/algorithms.pyo

Index: pkgsrc/devel/py-progressbar2/distinfo
diff -u pkgsrc/devel/py-progressbar2/distinfo:1.12 pkgsrc/devel/py-progressbar2/distinfo:1.13
--- pkgsrc/devel/py-progressbar2/distinfo:1.12  Fri Aug 14 08:29:09 2026
+++ pkgsrc/devel/py-progressbar2/distinfo       Tue Nov 10 09:28:07 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.12 2026/08/14 08:29:09 adam Exp $
+$NetBSD: distinfo,v 1.13 2026/11/10 09:28:07 adam Exp $
 
-BLAKE2s (progressbar2-4.6.0.tar.gz) = 9ce61438c7782455cda0f64eb7fb679b2e5c0353379ceadb9c4a07cdc5381317
-SHA512 (progressbar2-4.6.0.tar.gz) = c5c60867fa46a2d1828d6cacef06b1d6b41563aa5e3e188b312b74a7dd745b89ad4c11b7147dd02d9a8ab8a80d2c366ca7348dcb9a677e2efe91dd4fa2dbd3bf
-Size (progressbar2-4.6.0.tar.gz) = 542464 bytes
+BLAKE2s (progressbar2-4.7.0.tar.gz) = 2794c462dd90073edeceb94f0f499c2245951bf4caa5eb6d8aca688cdac60eab
+SHA512 (progressbar2-4.7.0.tar.gz) = d929b5aab0df4381e4649afe7f3450221d133016d160281a6a9ab91246e9a866e7345bb8dc19b729047602bb733edc3972d95022d3c2b00eab567d1d54165bf6
+Size (progressbar2-4.7.0.tar.gz) = 751542 bytes



Home | Main Index | Thread Index | Old Index