python-cached-property: update to 2.0.1
authorAlexandru Ardelean <redacted>
Thu, 16 Apr 2026 12:25:48 +0000 (12:25 +0000)
committerAlexandru Ardelean <redacted>
Thu, 16 Apr 2026 16:01:19 +0000 (19:01 +0300)
- 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 <redacted>
lang/python/python-cached-property/Makefile
lang/python/python-cached-property/test.sh [new file with mode: 0644]

index a95d298aaa9f24876e5c26b779bb847e8503954f..3ba42db1b9933e4bdab4332a277a6688dce812b8 100644 (file)
@@ -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 <javier@marcet.info>
 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 (file)
index 0000000..db3606e
--- /dev/null
@@ -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
git clone https://git.99rst.org/PROJECT