pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/py-utils
Module Name: pkgsrc
Committed By: adam
Date: Tue Nov 10 10:14:19 UTC 2026
Modified Files:
pkgsrc/devel/py-utils: Makefile distinfo
Log Message:
py-utils: updated to 4.2.0
4.2.0
Deprecate batch sizes below 1 in batcher, and in abatcher without an interval. A DeprecationWarning is issued when iteration starts, before the source is consumed, and the results and errors stay as
they were. A test suite that turns warnings into errors fails on such a size from this release on. These sizes will raise ValueError in 5.0. With an interval, abatcher keeps accepting None or a size
below 1 as no size limit, without a warning.
Accept a value that does not equal itself, such as float('nan'), when it is assigned back to its own slot of a UniqueList with on_duplicate='raise'. 4.1.4 raised ValueError: Duplicate value for it,
while any other value could already be assigned to its own slot.
Import the lazy exports that a module's __getattr__ serves for the names in its __all__ with import_global. 4.1.4 skipped every name that dir() does not list. On Python 3.13 and later,
import_global('typing') now also imports AsyncContextManager, ContextManager, ForwardRef, Match and Pattern, as it already did on 3.10 to 3.12. A lazy export that fails to resolve is still skipped.
Apply the key and value casts of a LazyCastedDict in get, as indexing already did. On an int-keyed dict, d.get('3') now finds the key stored as 3, and get returns the cast value where 4.1.4 returned
the raw stored value. A raw value that the value cast rejects now raises from get as it does from d[k]. dict.get(d, k) still reads the raw value.
Annotate the default of to_float as int | float. The documented to_float('abc', default=0.0) was a type error under mypy and pyright. A # type: ignore added for it is now reported as unused under
mypy --strict.
Keep from python_utils.types import * working on Python 3.15. Python 3.15 removed typing.ByteString and typing.no_type_check_decorator, so the star import raised AttributeError there. Both names stay
exported on 3.10 to 3.14, at their 4.1.4 positions in __all__, and 3.15 joins the CI matrix and the classifiers.
Choose the binary prefix of scale_1024 from the exact integer threshold. 4.1.4 took the prefix from a logarithm, which rounded an integer just below a boundary up to it: scale_1024(2**60 - 1, 9)
returned (1.0, 6) and scale_1024(2**50 - 1, 9) returned (0.9999999999999991, 5), while scale_1024(2**40 - 1, 9) already returned (1023.9999999990687, 3). Every power now behaves like the lower ones:
(1024.0, 5) and (1023.9999999999991, 4), so a progressbar2 DataSize prints 1024.0 PiB where 4.1.4 printed 1.0 EiB for a value a few bytes below an exbibyte. Only ints take the exact comparison. Any
other number goes through float() as before.
Keep the return type of a custom container in acontainer. The overloads only typed list, set and tuple, so await acontainer(source, frozenset) was a type error under mypy and pyright and its result
came back as Any, while the call already worked at runtime. A fourth overload types any factory that takes the collected items, so frozenset[int] and deque[int] are inferred now. Runtime behaviour is
unchanged. A # type: ignore written for such a call is now reported as unused under mypy --strict, and a factory that does not return a collection, such as sum, is rejected with type-var instead of
call-overload.
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 pkgsrc/devel/py-utils/Makefile
cvs rdiff -u -r1.20 -r1.21 pkgsrc/devel/py-utils/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-utils/Makefile
diff -u pkgsrc/devel/py-utils/Makefile:1.22 pkgsrc/devel/py-utils/Makefile:1.23
--- pkgsrc/devel/py-utils/Makefile:1.22 Sat Oct 24 09:16:38 2026
+++ pkgsrc/devel/py-utils/Makefile Tue Nov 10 10:14:19 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.22 2026/10/24 09:16:38 adam Exp $
+# $NetBSD: Makefile,v 1.23 2026/11/10 10:14:19 adam Exp $
-DISTNAME= python_utils-4.1.4
+DISTNAME= python_utils-4.2.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/python_//}
CATEGORIES= devel python
MASTER_SITES= ${MASTER_SITE_PYPI:=p/python-utils/}
Index: pkgsrc/devel/py-utils/distinfo
diff -u pkgsrc/devel/py-utils/distinfo:1.20 pkgsrc/devel/py-utils/distinfo:1.21
--- pkgsrc/devel/py-utils/distinfo:1.20 Sat Oct 24 09:16:38 2026
+++ pkgsrc/devel/py-utils/distinfo Tue Nov 10 10:14:19 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.20 2026/10/24 09:16:38 adam Exp $
+$NetBSD: distinfo,v 1.21 2026/11/10 10:14:19 adam Exp $
-BLAKE2s (python_utils-4.1.4.tar.gz) = cf6820d15d955b2b4ba0da2f543c35c76bf19252bb171a378caae95777bf4069
-SHA512 (python_utils-4.1.4.tar.gz) = 42867b6fcdde78da6f0e073a6095dff33cbcd8d6acc86c3fb7a4336297c866e5c9672dd9573d8d2f636e3f637757810a0d316689ed5b4dac60a2b8aca9700d5e
-Size (python_utils-4.1.4.tar.gz) = 80130 bytes
+BLAKE2s (python_utils-4.2.0.tar.gz) = a37cb8eb10d86cc270edcc83bed8ea821061379552dff1580fd27a918e5d1f24
+SHA512 (python_utils-4.2.0.tar.gz) = cc8761345e883c409ada6720ac22dff01c248660c82a49a12447996907e000e31512689cd17316ecd16737a11091e6aa4f0f377fd6976c8fcfaf07037864f719
+Size (python_utils-4.2.0.tar.gz) = 85524 bytes
Home |
Main Index |
Thread Index |
Old Index