From: Alexandru Ardelean Date: Thu, 16 Apr 2026 12:25:48 +0000 (+0000) Subject: python-cached-property: update to 2.0.1 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=6defd87092d8f3872ede6ff728c294bbd7f192b5;p=openwrt-packages.git python-cached-property: update to 2.0.1 - bump 1.5.2 -> 2.0.1 - add PYPI_SOURCE_NAME:=cached_property (PyPI renamed tarball from cached-property to cached_property) - add PKG_BUILD_DEPENDS:=python-setuptools/host - add +python3-asyncio +python3-logging to DEPENDS (new in 2.x) - add test.sh Signed-off-by: Alexandru Ardelean --- diff --git a/lang/python/python-cached-property/Makefile b/lang/python/python-cached-property/Makefile index a95d298aa..3ba42db1b 100644 --- a/lang/python/python-cached-property/Makefile +++ b/lang/python/python-cached-property/Makefile @@ -1,11 +1,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-cached-property -PKG_VERSION:=1.5.2 -PKG_RELEASE:=2 +PKG_VERSION:=2.0.1 +PKG_RELEASE:=1 PYPI_NAME:=cached-property -PKG_HASH:=9fa5755838eecbb2d234c3aa390bd80fbd3ac6b6869109bfc1b499f7bd89a130 +PYPI_SOURCE_NAME:=cached_property +PKG_HASH:=484d617105e3ee0e4f1f58725e72a8ef9e93deee462222dbd51cd91230897641 + +PKG_BUILD_DEPENDS:=python-setuptools/host PKG_MAINTAINER:=Javier Marcet PKG_LICENSE:=BSD-3-Clause @@ -21,7 +24,7 @@ define Package/python3-cached-property SUBMENU:=Python TITLE:=A decorator for caching properties in classes URL:=https://github.com/pydanny/cached-property - DEPENDS:=+python3-light + DEPENDS:=+python3-light +python3-asyncio +python3-logging endef define Package/python3-cached-property/description diff --git a/lang/python/python-cached-property/test.sh b/lang/python/python-cached-property/test.sh new file mode 100644 index 000000000..db3606ea1 --- /dev/null +++ b/lang/python/python-cached-property/test.sh @@ -0,0 +1,20 @@ +[ "$1" = python3-cached-property ] || exit 0 + +python3 - << 'EOF' +from cached_property import cached_property + +class MyClass: + def __init__(self): + self._calls = 0 + + @cached_property + def value(self): + self._calls += 1 + return 42 + +obj = MyClass() +assert obj.value == 42 +assert obj.value == 42 +assert obj._calls == 1, f"Expected 1 call, got {obj._calls}" +print("python3-cached-property OK") +EOF