head 1.3; access; symbols pkgsrc-2026Q2:1.2.0.4 pkgsrc-2026Q2-base:1.2 pkgsrc-2026Q1:1.2.0.2 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.1.0.26 pkgsrc-2025Q4-base:1.1 pkgsrc-2025Q3:1.1.0.24 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.22 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.20 pkgsrc-2025Q1-base:1.1 pkgsrc-2024Q4:1.1.0.18 pkgsrc-2024Q4-base:1.1 pkgsrc-2024Q3:1.1.0.16 pkgsrc-2024Q3-base:1.1 pkgsrc-2024Q2:1.1.0.14 pkgsrc-2024Q2-base:1.1 pkgsrc-2024Q1:1.1.0.12 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.10 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.8 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.6 pkgsrc-2023Q2-base:1.1 pkgsrc-2023Q1:1.1.0.4 pkgsrc-2023Q1-base:1.1 pkgsrc-2022Q4:1.1.0.2 pkgsrc-2022Q4-base:1.1; locks; strict; comment @# @; 1.3 date 2026.06.28.15.40.18; author wiz; state dead; branches; next 1.2; commitid Smom2RBzpbB21ALG; 1.2 date 2026.01.08.09.27.06; author wiz; state Exp; branches; next 1.1; commitid k8EmALeFomPNrzpG; 1.1 date 2022.11.20.19.03.47; author adam; state Exp; branches; next ; commitid JTTHni90X7jrrt2E; desc @@ 1.3 log @py-numpy: update to 2.5.0. Numpy 2.5.0 is a transitional release. It drops support for Python 3.11, marking the end of distutils, and expires a large number of deprecations made in the 2.0.x release. It also improves free threading and brings sorting into compliance with the array-api standard with the addition of descending sorts. There is also a fair amount of preparation for Python 3.15, which will be supported starting with the first rc. Highlights Distutils has been removed. Many expired deprecations. Many new deprecations. Many static typing improvements. Improved support for free threading. Support for descending sorts. @ text @$NetBSD: patch-numpy_distutils_log.py,v 1.2 2026/01/08 09:27:06 wiz Exp $ Backport distutils.log.Log from setuptools < 65.6.0. --- numpy/distutils/log.py.orig 2025-12-20 07:38:18.000000000 +0000 +++ numpy/distutils/log.py @@@@ -1,8 +1,8 @@@@ from distutils.log import * # noqa: F403 # Colored log import sys from distutils.log import * # noqa: F403 -from distutils.log import Log as old_Log from distutils.log import _global_log +from logging import Logger from numpy.distutils.misc_util import (red_text, default_text, cyan_text, green_text, is_sequence, is_string) @@@@ -16,10 +16,51 @@@@ def _fix_args(args,flag=1): return args -class Log(old_Log): +class Log(Logger): + def __init__(self, threshold=WARN): + self.threshold = threshold + def _log(self, level, msg, args): + if level not in (DEBUG, INFO, WARN, ERROR, FATAL): + raise ValueError('%s wrong log level' % str(level)) + if level >= self.threshold: if args: + msg = msg % args + if level in (WARN, ERROR, FATAL): + stream = sys.stderr + else: + stream = sys.stdout + try: + stream.write('%s\n' % msg) + except UnicodeEncodeError: + # emulate backslashreplace error handler + encoding = stream.encoding + msg = msg.encode(encoding, "backslashreplace").decode(encoding) + stream.write('%s\n' % msg) + stream.flush() + + def log(self, level, msg, *args): + self._log(level, msg, args) + + def debug(self, msg, *args): + self._log(DEBUG, msg, args) + + def info(self, msg, *args): + self._log(INFO, msg, args) + + def warn(self, msg, *args): + self._log(WARN, msg, args) + + def error(self, msg, *args): + self._log(ERROR, msg, args) + + def fatal(self, msg, *args): + self._log(FATAL, msg, args) + + def _log(self, level, msg, args): + if level >= self.threshold: + if args: msg = msg % _fix_args(args) if 0: if msg.startswith('copying ') and msg.find(' -> ') != -1: @@@@ -44,6 +85,7 @@@@ _global_log.__class__ = Log _global_log.__class__ = Log +_global_log.threshold = WARN good = _global_log.good @ 1.2 log @py-numpy: update to 2.4.0. NumPy 2.4.0 released 20 Dec, 2025 – The NumPy 2.4.0 release continues the work to improve free threaded Python support, user dtypes implementation, and annotations. There are many expired deprecations and bug fixes as well. Highlights are: Many annotation improvements. In particular, runtime signature introspection. New casting kwarg 'same_value' for casting by value. New PyUFunc_AddLoopsFromSpec function that can be used to add user sort loops using the ArrayMethod API. New __numpy_dtype__ protocol. This release supports Python versions 3.11-3.14 @ text @d1 1 a1 1 $NetBSD: patch-numpy_distutils_log.py,v 1.1 2022/11/20 19:03:47 adam Exp $ @ 1.1 log @py-numpy: updated to 1.23.5 1.23.5 TST, MAINT: Replace most setup with setup_method (also teardown) MAINT, CI: Switch to cygwin/cygwin-install-action@@v2 TST: Make test_partial_iteration_cleanup robust but require leak... MAINT: Ensure graceful handling of large header sizes TYP: Spelling alignment for array flag literal BUG: Fix bounds checking for ``random.logseries`` DEV: Update GH actions and Dockerfile for Gitpod CI: Only fetch in actions/checkout BUG: Decrement ref count in gentype_reduce if allocated memory... BUG: Histogramdd breaks on big arrays in Windows @ text @d1 1 a1 1 $NetBSD$ d5 1 a5 1 --- numpy/distutils/log.py.orig 2022-11-20 17:58:45.000000000 +0000 d7 1 a7 1 @@@@ -1,8 +1,8 @@@@ d17 1 a17 1 @@@@ -16,7 +16,48 @@@@ def _fix_args(args,flag=1): d26 1 a26 1 + def _log(self, level, msg, args): d30 2 a31 2 + if level >= self.threshold: + if args: d64 7 a70 4 def _log(self, level, msg, args): if level >= self.threshold: if args: @@@@ -44,6 +85,7 @@@@ class Log(old_Log): @