head	1.20;
access;
symbols
	pkgsrc-2026Q3:1.19.0.2
	pkgsrc-2026Q3-base:1.19
	pkgsrc-2026Q2:1.17.0.10
	pkgsrc-2026Q2-base:1.17
	pkgsrc-2026Q1:1.17.0.8
	pkgsrc-2026Q1-base:1.17
	pkgsrc-2025Q4:1.17.0.6
	pkgsrc-2025Q4-base:1.17
	pkgsrc-2025Q3:1.17.0.4
	pkgsrc-2025Q3-base:1.17
	pkgsrc-2025Q2:1.17.0.2
	pkgsrc-2025Q2-base:1.17
	pkgsrc-2025Q1:1.16.0.4
	pkgsrc-2025Q1-base:1.16
	pkgsrc-2024Q4:1.16.0.2
	pkgsrc-2024Q4-base:1.16
	pkgsrc-2024Q3:1.13.0.6
	pkgsrc-2024Q3-base:1.13
	pkgsrc-2024Q2:1.13.0.4
	pkgsrc-2024Q2-base:1.13
	pkgsrc-2024Q1:1.13.0.2
	pkgsrc-2024Q1-base:1.13
	pkgsrc-2023Q4:1.12.0.2
	pkgsrc-2023Q4-base:1.12
	pkgsrc-2023Q3:1.11.0.2
	pkgsrc-2023Q3-base:1.11
	pkgsrc-2023Q2:1.10.0.2
	pkgsrc-2023Q2-base:1.10
	pkgsrc-2023Q1:1.9.0.4
	pkgsrc-2023Q1-base:1.9
	pkgsrc-2022Q4:1.9.0.2
	pkgsrc-2022Q4-base:1.9
	pkgsrc-2022Q3:1.8.0.2
	pkgsrc-2022Q3-base:1.8
	pkgsrc-2022Q2:1.7.0.4
	pkgsrc-2022Q2-base:1.7
	pkgsrc-2022Q1:1.7.0.2
	pkgsrc-2022Q1-base:1.7
	pkgsrc-2021Q4:1.4.0.2
	pkgsrc-2021Q4-base:1.4
	pkgsrc-2021Q3:1.1.0.10
	pkgsrc-2021Q3-base:1.1
	pkgsrc-2021Q2:1.1.0.8
	pkgsrc-2021Q2-base:1.1
	pkgsrc-2021Q1:1.1.0.6
	pkgsrc-2021Q1-base:1.1
	pkgsrc-2020Q4:1.1.0.4
	pkgsrc-2020Q4-base:1.1
	pkgsrc-2020Q3:1.1.0.2
	pkgsrc-2020Q3-base:1.1;
locks; strict;
comment	@# @;


1.20
date	2026.10.07.16.23.49;	author adam;	state Exp;
branches;
next	1.19;
commitid	XJsc21mqalrB0zYG;

1.19
date	2026.08.31.09.31.18;	author adam;	state Exp;
branches;
next	1.18;
commitid	hGGv075VW7uRULTG;

1.18
date	2026.07.23.08.08.46;	author adam;	state Exp;
branches;
next	1.17;
commitid	bZJC41c5aLFfIKOG;

1.17
date	2025.04.12.21.37.07;	author adam;	state Exp;
branches;
next	1.16;
commitid	IJnVw0oumzhkcOQF;

1.16
date	2024.11.26.12.04.43;	author adam;	state Exp;
branches;
next	1.15;
commitid	P8AHChRDjloWq9zF;

1.15
date	2024.11.11.07.28.29;	author wiz;	state Exp;
branches;
next	1.14;
commitid	1fBDq3LwS98NncxF;

1.14
date	2024.10.14.11.40.01;	author adam;	state Exp;
branches;
next	1.13;
commitid	4qJf0MhtYQLaGCtF;

1.13
date	2024.01.25.10.56.02;	author adam;	state Exp;
branches;
next	1.12;
commitid	mIk33z2Vj3ybTOVE;

1.12
date	2023.09.27.09.45.27;	author adam;	state Exp;
branches;
next	1.11;
commitid	egk739hDYaY6moGE;

1.11
date	2023.08.25.11.59.25;	author adam;	state Exp;
branches;
next	1.10;
commitid	Cs6i3EDqJUsM9aCE;

1.10
date	2023.05.08.07.09.48;	author adam;	state Exp;
branches;
next	1.9;
commitid	kFVaycTgXXdG38oE;

1.9
date	2022.10.31.15.25.41;	author adam;	state Exp;
branches;
next	1.8;
commitid	dDwQpzrHy8rhSSZD;

1.8
date	2022.08.25.11.14.51;	author adam;	state Exp;
branches;
next	1.7;
commitid	f6psU4DPaQ5MDfRD;

1.7
date	2022.01.16.08.44.20;	author adam;	state Exp;
branches;
next	1.6;
commitid	Jwuw5IbaMawLUPoD;

1.6
date	2022.01.05.22.22.59;	author wiz;	state Exp;
branches;
next	1.5;
commitid	o5EUkf7pyLfvNunD;

1.5
date	2022.01.04.20.53.47;	author wiz;	state Exp;
branches;
next	1.4;
commitid	CYyhdK9qtoffkmnD;

1.4
date	2021.12.19.13.42.58;	author wiz;	state Exp;
branches;
next	1.3;
commitid	Osand19tKpbZsglD;

1.3
date	2021.12.17.08.11.56;	author adam;	state Exp;
branches;
next	1.2;
commitid	7EyEBDRZnv5rHYkD;

1.2
date	2021.11.16.19.35.49;	author adam;	state Exp;
branches;
next	1.1;
commitid	skHgDIA9ZOEQt3hD;

1.1
date	2020.08.18.20.18.56;	author riastradh;	state Exp;
branches;
next	;
commitid	tc92giMEoZBslAkC;


desc
@@


1.20
log
@py-utils: updated to 4.1.0

4.1.0

Keep UniqueList membership in sync when replacing an indexed item, and leave membership unchanged when the index is out of range, contributed
Keep UniqueList membership in sync for slice assignment, extend, pop, remove, clear, += and *=, so extend and += no longer add duplicates and removed values can be added again.
Accept one-shot iterables in UniqueList slice assignment, allow a slice to reuse the values it replaces, and reject a slice that repeats a value.
Make copy.copy and copy.deepcopy of a UniqueList return a working copy with its own membership.
Leave UniqueList membership unchanged when insert fails, and answer in for an unhashable value the way a list does.
Make CastedDict and LazyCastedDict load from pickle on every protocol, including pickles written by 4.0.1, and stop copy.copy and copy.deepcopy from casting the stored values a second time.
Cast what setdefault and |= store in a CastedDict or LazyCastedDict. A None default is stored as it is.
Cast the key of a LazyCastedDict once when it is stored. It was cast twice.
Let keyword arguments win over the mapping in update and the constructor of the casted dicts, as dict does.
Make != the opposite of == for SliceableDeque, and compare unequal to a set when an item is unhashable.
Remove the iterable of mappings from the DictUpdateArgs type alias. The code never accepted that shape.
Log the traceback in Logged.exception(), and name the caller in every record of Logged instead of logger.py. Code that passed stacklevel=2 to work around the wrong caller now points one frame too high.
Stop Logurud from crashing on a message with a brace in it. A message without arguments is logged as written, so braces that were doubled to avoid the crash now show doubled.
Keep the value of a class that combines Logged or Logurud with a type such as int or str.
Use the whole match in to_int and to_float for a pattern without a group, and never return a negative power from scale_1024.
Count every day once in timesince, describe a negative timedelta by its size, and accept a timezone-aware datetime.
Keep an acronym whole before an underscore or a digit in camel_to_underscore, so HTTP_OK becomes http_ok.
Let import_global import a nested module that nothing imported before.
Cancel the pending item of abatcher when the consumer stops early. A source that is an async generator ends at that point, where a leaked task used to take its next item.
Restart the interval of abatcher after a full batch, and accept an iterator whose __anext__ returns a future.
Accept a plain function as on_timeout in aio_generator_timeout_detector.
Truncate format_time exactly for a precision below one second, and print the placeholder for nan.
Limit the first sleep of timeout_generator and aio_timeout_generator to maximum_interval.
Let acount count down to a stop with a negative step.
Log a skipped call of sample through the logger of its module instead of the root logger, which installed a handler on it.
Keep the name, docstring and signature of a function under listify, and leave the annotations of the wrapped function alone in wraps_classmethod.
Return the value of total_seconds() from timedelta_to_seconds for a duration with a fraction.
Correct docstrings that described something else than the code does, among them to_str returning bytes and the timeouts that read 0 as none.
Run the timing tests on a fake clock, so they no longer depend on sleep accuracy, and ship conftest.py in the sdist.
@
text
@# $NetBSD: Makefile,v 1.19 2026/08/31 09:31:18 adam Exp $

DISTNAME=	python_utils-4.1.0
PKGNAME=	${PYPKGPREFIX}-${DISTNAME:S/python_//}
CATEGORIES=	devel python
MASTER_SITES=	${MASTER_SITE_PYPI:=p/python-utils/}

MAINTAINER=	pkgsrc-users@@NetBSD.org
HOMEPAGE=	https://github.com/WoLpH/python-utils
COMMENT=	Some convenient utilities not included with standard Python
LICENSE=	modified-bsd

TOOL_DEPENDS+=	${PYPKGPREFIX}-uv-build>=0.11:../../devel/py-uv-build
DEPENDS+=	${PYPKGPREFIX}-typing-extensions>3.10.0.2:../../devel/py-typing-extensions
TEST_DEPENDS+=	${PYPKGPREFIX}-loguru>=0:../../sysutils/py-loguru
TEST_DEPENDS+=	${PYPKGPREFIX}-test-asyncio>=0:../../devel/py-test-asyncio
TEST_DEPENDS+=	${PYPKGPREFIX}-test-cov>=0:../../devel/py-test-cov
TEST_DEPENDS+=	${PYPKGPREFIX}-test-mypy>=0:../../devel/py-test-mypy
TEST_DEPENDS+=	${PYPKGPREFIX}-types-setuptools>=78:../../devel/py-types-setuptools

USE_LANGUAGES=	# none

.include "../../lang/python/wheel.mk"
.include "../../mk/bsd.pkg.mk"
@


1.19
log
@py-utils: updated to 4.0.1

4.0.1

Allow uv_build 0.12.x, contributed
Keep the python_utils.types export list unique.
Delay newly published dependencies and development tools by 14 days before resolution.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.18 2026/07/23 08:08:46 adam Exp $
d3 1
a3 1
DISTNAME=	python_utils-4.0.1
d15 4
a18 4
TEST_DEPENDS+=	${PYPKGPREFIX}-loguru-[0-9]*:../../sysutils/py-loguru
TEST_DEPENDS+=	${PYPKGPREFIX}-test-asyncio-[0-9]*:../../devel/py-test-asyncio
TEST_DEPENDS+=	${PYPKGPREFIX}-test-cov-[0-9]*:../../devel/py-test-cov
TEST_DEPENDS+=	${PYPKGPREFIX}-test-mypy-[0-9]*:../../devel/py-test-mypy
@


1.18
log
@py-utils: updated to 4.0.0

Version 4.0 is a modernization release: the public helpers you already rely on
are unchanged, but the package underneath is faster to import, stricter about
types, and built with a modern toolchain.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.17 2025/04/12 21:37:07 adam Exp $
d3 1
a3 1
DISTNAME=	python_utils-4.0.0
@


1.17
log
@Fix PLIST after py-setuptools update; bump depends and revision
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.16 2024/11/26 12:04:43 adam Exp $
d3 1
a3 1
DISTNAME=	python_utils-3.9.1
a4 1
PKGREVISION=	1
d13 1
a13 1
TOOL_DEPENDS+=	${PYPKGPREFIX}-setuptools>=78:../../devel/py-setuptools
@


1.16
log
@py-utils: updated to 3.9.1

3.9.1

Made tests far more reliable and fixed python_requires
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.15 2024/11/11 07:28:29 wiz Exp $
d5 1
d14 1
a14 1
TOOL_DEPENDS+=	${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools
d20 1
a20 1
TEST_DEPENDS+=	${PYPKGPREFIX}-types-setuptools-[0-9]*:../../devel/py-types-setuptools
@


1.15
log
@py-*: remove unused tool dependency

py-setuptools includes the py-wheel functionality nowadays
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.14 2024/10/14 11:40:01 adam Exp $
d3 1
a3 1
DISTNAME=	python_utils-3.9.0
@


1.14
log
@py-utils: updated to 3.9.0

3.9.0
Unknown changes
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.13 2024/01/25 10:56:02 adam Exp $
a13 1
TOOL_DEPENDS+=	${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel
@


1.13
log
@py-utils: updated to 3.8.2

v3.8.2
Windows can also return an OSError instead of a ValueError for a fromtimestamp overflow
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.12 2023/09/27 09:45:27 adam Exp $
d3 2
a4 2
DISTNAME=	python-utils-3.8.2
PKGNAME=	${PYPKGPREFIX}-${DISTNAME:S/python-//}
a23 2
PYTHON_VERSIONS_INCOMPATIBLE=	27

@


1.12
log
@py-utils: updated to 3.8.1

v3.8.1
fixed silly typo

v3.8.0
Added slicabledeque
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.11 2023/08/25 11:59:25 adam Exp $
d3 1
a3 1
DISTNAME=	python-utils-3.8.1
d13 2
a16 1
TEST_DEPENDS+=	${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
d26 1
a26 4
do-test:
	cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX} _python_utils_tests

.include "../../lang/python/egg.mk"
@


1.11
log
@py-utils: updated to 3.7.0

v3.7.0
Fixed several typing issues and added more thorough tests

v3.6.1
Increased typing-extensions version requirement

v3.6.0
Added extra containers such as UniqueList and SlicableDeque. Added full pyright strict and mypy type checks
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.10 2023/05/08 07:09:48 adam Exp $
d3 1
a3 1
DISTNAME=	python-utils-3.7.0
d13 7
a19 6
TEST_DEPENDS+=	${PYPKGPREFIX}-loguru>=0:../../sysutils/py-loguru
TEST_DEPENDS+=	${PYPKGPREFIX}-test>=0:../../devel/py-test
TEST_DEPENDS+=	${PYPKGPREFIX}-test-asyncio>=0:../../devel/py-test-asyncio
TEST_DEPENDS+=	${PYPKGPREFIX}-test-cov>=0:../../devel/py-test-cov
TEST_DEPENDS+=	${PYPKGPREFIX}-test-mypy>=0:../../devel/py-test-mypy
TEST_DEPENDS+=	${PYPKGPREFIX}-types-setuptools>=0:../../devel/py-types-setuptools
@


1.10
log
@py-utils: updated to 3.5.2

v3.5.2
Added import shortcuts for container classes

v3.5.1
Improved type hinting

v3.5.0
Added unique list container
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.9 2022/10/31 15:25:41 adam Exp $
d3 1
a3 1
DISTNAME=	python-utils-3.5.2
@


1.9
log
@py-utils: updated to 3.4.5

v3.4.5
Added TracebackType to types

v3.4.4
Added py.typed

v3.4.3
Added py.typed

v3.4.2
Added py.typed

v3.4.1
Added py.typed

v3.4.0
added more type hints, full pyright and mypy support and added py.typed file
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2022/08/25 11:14:51 adam Exp $
d3 1
a3 1
DISTNAME=	python-utils-3.4.5
@


1.8
log
@py-utils: updated to 3.3.3

v3.3.3: fixed issue with not submitting tasks to `asyncio.wait`
v3.3.2: Fixed bug with batcher skipping items in the case of timeouts
v3.3.1: improved generator timeout handling
v3.3.0: Added (asyncio) generators for automatic batching and timeout detection
v3.2.3: Fixed loguru stack location
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2022/01/16 08:44:20 adam Exp $
d3 1
a3 1
DISTNAME=	python-utils-3.3.3
@


1.7
log
@py-utils: updated to 3.1.0

v3.1.0:
dropped python 3.6 support because it is deprecated and so we can somewhat use | as type union
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2022/01/05 22:22:59 wiz Exp $
d3 1
a3 1
DISTNAME=	python-utils-3.1.0
d13 1
d15 1
a16 1
TEST_DEPENDS+=	${PYPKGPREFIX}-test-flake8>=0:../../devel/py-test-flake8
a17 1
TEST_DEPENDS+=	${PYPKGPREFIX}-test-asyncio>=0:../../devel/py-test-asyncio
@


1.6
log
@py-utils: update to 3.0.0.

3.0.0

Python 3 update including full type hinting, asyncio tools, typing shortcuts and listify decorator for generators

2.7.1

Small documentation updates

2.7.0

added automated tox github action tests
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.5 2022/01/04 20:53:47 wiz Exp $
d3 1
a3 1
DISTNAME=	python-utils-3.0.0
@


1.5
log
@*: bump PKGREVISION for egg.mk users

They now have a tool dependency on py-setuptools instead of a DEPENDS
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2021/12/19 13:42:58 wiz Exp $
d3 1
a3 1
DISTNAME=	python-utils-2.6.0
a4 1
PKGREVISION=	1
a12 1
DEPENDS+=	${PYPKGPREFIX}-six>=0:../../lang/py-six
d16 3
@


1.4
log
@py-utils: mark as not for python 2.7

Also mark its users that way
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2021/12/17 08:11:56 adam Exp $
d5 1
@


1.3
log
@py-utils: updated to 2.6.0

v2.6.0
added exponential timeout growth
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2021/11/16 19:35:49 adam Exp $
d20 2
@


1.2
log
@py-utils: updated to 2.5.6

2.5.6:
Unknown changes
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2020/08/18 20:18:56 riastradh Exp $
d3 1
a3 1
DISTNAME=	python-utils-2.5.6
@


1.1
log
@Import python-utils-2.4.0 from pypi as devel/py-utils

From the web page:

> Python Utils is a collection of small Python functions and classes
> which make common patterns shorter and easier. It is by no means a
> complete collection but it has served me quite a bit in the past and I
> will keep extending it.
@
text
@d1 1
a1 1
#	$NetBSD$
d3 3
a5 3
DISTNAME=	python-utils-2.4.0
PKGNAME=	${PYPKGPREFIX}-${DISTNAME:C/^python-//}
CATEGORIES=	devel
a13 1

d15 2
d18 1
a18 4
# pytest chokes on pytest.ini
pre-test:
	${RUN} cd ${WRKSRC} && \
	${RM} -f pytest.ini
d21 1
a21 3
	${RUN} cd ${WRKSRC} && \
	${SETENV} ${TEST_ENV} PYTHONPATH=${WRKSRC}/build/lib \
	pytest-${PYVERSSUFFIX}
@

