@@ -1,3 +1,4 @@
#!/bin/sh
-pytest --automake
+# reads portalocker/__init__.py from the source tree, which is not installed
+pytest --automake --deselect portalocker_tests/test_optional_redis.py::test_redislock_stub_import_and_raise_in_process
similarity index 63%
rename from meta-python/recipes-extended/python3-portalocker/python3-portalocker_3.2.0.bb
rename to meta-python/recipes-extended/python3-portalocker/python3-portalocker_4.4.2.bb
@@ -4,11 +4,11 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=152634da660a374ca18c0734ed07c63c"
-SRC_URI[sha256sum] = "1f3002956a54a8c3730586c5c77bf18fae4149e07eaf1c29fc3faf4d5a3f89ac"
+SRC_URI[sha256sum] = "7ac85bb2aa3c7873bf2ac72586fc6154afa4671ac786994a16617a6b7ccb3e5e"
DEPENDS += "python3-setuptools-scm-native"
-inherit pypi python_setuptools_build_meta ptest
+inherit pypi python_uv_build ptest
SRC_URI += " \
file://run-ptest \
@@ -18,6 +18,7 @@ RDEPENDS:${PN}-ptest += " \
python3-multiprocessing \
python3-pytest \
python3-redis \
+ python3-typing-extensions \
python3-unittest-automake-output \
redis \
"
@@ -26,6 +27,10 @@ do_install_ptest() {
install -d ${D}${PTEST_PATH}/portalocker_tests
cp -rf ${S}/portalocker_tests/* ${D}${PTEST_PATH}/portalocker_tests/
rm -rf ${D}${PTEST_PATH}/portalocker_tests/test_combined.py
+ # the redis lock tests need fakeredis, which isn't packaged
+ rm -f ${D}${PTEST_PATH}/portalocker_tests/test_redis.py ${D}${PTEST_PATH}/portalocker_tests/test_redis_random_sleep.py
+ # test_readme.py runs the examples from README.md
+ install -m 0644 ${S}/README.md ${D}${PTEST_PATH}/
}
RDEPENDS:${PN} += " \
Upstream builds with uv_build now; inherit python_uv_build. Add python3-typing-extensions to the ptest RDEPENDS, ship README.md for test_readme.py, drop the redis lock tests which now need fakeredis (not packaged), and deselect test_redislock_stub_import_and_raise_in_process which reads portalocker/__init__.py from the source tree. Changes: - Breaking (4.0.0): Python 3.10 or newer required; build backend switched to uv_build (4.4.2 now requires uv_build>=0.11,<1). - pywin32 is no longer installed by default on Windows; POSIX lock exception str() output changed; Lock resolves paths with abspath. - Added PidFileLock; fixed TemporaryFileLock/PidFileLock unlock-then- unlink race that could let two processes hold one lock. - Large set of RedisLock fixes (loss surfacing, fencing tokens, fork safety); stricter typing of Lock file handles (4.3.0). - 4.4.0: passing a bool as timeout/check_interval is deprecated (TypeError in 5.0); 4.4.1: open_atomic anchors relative paths. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> --- .../python3-portalocker/python3-portalocker/run-ptest | 3 ++- ...portalocker_3.2.0.bb => python3-portalocker_4.4.2.bb} | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) rename meta-python/recipes-extended/python3-portalocker/{python3-portalocker_3.2.0.bb => python3-portalocker_4.4.2.bb} (63%)