Mock Version: 4.1 Mock Version: 4.1 Mock Version: 4.1 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target x86_64 --nodeps /builddir/build/SPECS/python-filelock.spec'], chrootPath='/var/lib/mock/dist-oc9-epol-build-233640-81887/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=991gid=135user='mockbuild'nspawn_args=[]unshare_net=FalseprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target x86_64 --nodeps /builddir/build/SPECS/python-filelock.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: x86_64 Building for target x86_64 Wrote: /builddir/build/SRPMS/python-filelock-3.12.4-5.oc9.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target x86_64 --nodeps /builddir/build/SPECS/python-filelock.spec'], chrootPath='/var/lib/mock/dist-oc9-epol-build-233640-81887/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=991gid=135user='mockbuild'nspawn_args=[]unshare_net=FalseraiseExc=FalseprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target x86_64 --nodeps /builddir/build/SPECS/python-filelock.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.dVbWnG + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf filelock-3.12.4 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/filelock-3.12.4.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd filelock-3.12.4 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/python-filelock-3.12.4-CVE-2025-68146.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.wlW5BT + umask 022 + cd /builddir/build/BUILD + cd filelock-3.12.4 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo 'python3dist(toml)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + RPM_TOXENV=py311 + HOSTNAME=rpmbuild + /usr/bin/python3 -s /usr/lib/rpm/OpenCloudOS/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 -r Import error: No module named 'toml' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-filelock-3.12.4-5.oc9.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target x86_64 --nodeps /builddir/build/SPECS/python-filelock.spec'], chrootPath='/var/lib/mock/dist-oc9-epol-build-233640-81887/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=991gid=135user='mockbuild'nspawn_args=[]unshare_net=FalseraiseExc=FalseprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target x86_64 --nodeps /builddir/build/SPECS/python-filelock.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.8I5kin + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf filelock-3.12.4 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/filelock-3.12.4.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd filelock-3.12.4 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/python-filelock-3.12.4-CVE-2025-68146.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.W5LMS1 + umask 022 + cd /builddir/build/BUILD + cd filelock-3.12.4 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo 'python3dist(toml)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + RPM_TOXENV=py311 + HOSTNAME=rpmbuild + /usr/bin/python3 -s /usr/lib/rpm/OpenCloudOS/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 -r Handling hatch-vcs>=0.3 from build-system.requires Requirement not satisfied: hatch-vcs>=0.3 Handling hatchling>=1.18 from build-system.requires Requirement not satisfied: hatchling>=1.18 Exiting dependency generation pass: build backend + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-filelock-3.12.4-5.oc9.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target x86_64 --nodeps /builddir/build/SPECS/python-filelock.spec'], chrootPath='/var/lib/mock/dist-oc9-epol-build-233640-81887/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=991gid=135user='mockbuild'nspawn_args=[]unshare_net=FalseraiseExc=FalseprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target x86_64 --nodeps /builddir/build/SPECS/python-filelock.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.PGC0Ux + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf filelock-3.12.4 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/filelock-3.12.4.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd filelock-3.12.4 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/python-filelock-3.12.4-CVE-2025-68146.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.uXE7qk + umask 022 + cd /builddir/build/BUILD + cd filelock-3.12.4 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo 'python3dist(toml)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + RPM_TOXENV=py311 + HOSTNAME=rpmbuild + /usr/bin/python3 -s /usr/lib/rpm/OpenCloudOS/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 -r Handling hatch-vcs>=0.3 from build-system.requires Requirement satisfied: hatch-vcs>=0.3 (installed: hatch-vcs 0.4.0) Handling hatchling>=1.18 from build-system.requires Requirement satisfied: hatchling>=1.18 (installed: hatchling 1.18.0) Handling furo>=2023.7.26; extra == 'docs' from wheel metadata: Requires-Dist Ignoring alien requirement: furo>=2023.7.26; extra == 'docs' Handling sphinx-autodoc-typehints!=1.23.4,>=1.24; extra == 'docs' from wheel metadata: Requires-Dist Ignoring alien requirement: sphinx-autodoc-typehints!=1.23.4,>=1.24; extra == 'docs' Handling sphinx>=7.1.2; extra == 'docs' from wheel metadata: Requires-Dist Ignoring alien requirement: sphinx>=7.1.2; extra == 'docs' Handling covdefaults>=2.3; extra == 'testing' from wheel metadata: Requires-Dist Ignoring alien requirement: covdefaults>=2.3; extra == 'testing' Handling coverage>=7.3; extra == 'testing' from wheel metadata: Requires-Dist Ignoring alien requirement: coverage>=7.3; extra == 'testing' Handling diff-cover>=7.7; extra == 'testing' from wheel metadata: Requires-Dist Ignoring alien requirement: diff-cover>=7.7; extra == 'testing' Handling pytest-cov>=4.1; extra == 'testing' from wheel metadata: Requires-Dist Ignoring alien requirement: pytest-cov>=4.1; extra == 'testing' Handling pytest-mock>=3.11.1; extra == 'testing' from wheel metadata: Requires-Dist Ignoring alien requirement: pytest-mock>=3.11.1; extra == 'testing' Handling pytest-timeout>=2.1; extra == 'testing' from wheel metadata: Requires-Dist Ignoring alien requirement: pytest-timeout>=2.1; extra == 'testing' Handling pytest>=7.4; extra == 'testing' from wheel metadata: Requires-Dist Ignoring alien requirement: pytest>=7.4; extra == 'testing' Handling typing-extensions>=4.7.1; python_version < '3.11' and extra == 'typing' from wheel metadata: Requires-Dist Ignoring alien requirement: typing-extensions>=4.7.1; python_version < '3.11' and extra == 'typing' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-filelock-3.12.4-5.oc9.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --noclean --target x86_64 --nodeps /builddir/build/SPECS/python-filelock.spec'], chrootPath='/var/lib/mock/dist-oc9-epol-build-233640-81887/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=991gid=135user='mockbuild'nspawn_args=[]unshare_net=FalseprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --noclean --target x86_64 --nodeps /builddir/build/SPECS/python-filelock.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: x86_64 Building for target x86_64 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.DxhrgL + umask 022 + cd /builddir/build/BUILD + cd filelock-3.12.4 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo 'python3dist(toml)' + rm -rfv filelock-3.12.4.dist-info/ removed 'filelock-3.12.4.dist-info/METADATA' removed directory 'filelock-3.12.4.dist-info/' + '[' -f /usr/bin/python3 ']' + RPM_TOXENV=py311 + HOSTNAME=rpmbuild + /usr/bin/python3 -s /usr/lib/rpm/OpenCloudOS/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 -r Handling hatch-vcs>=0.3 from build-system.requires Requirement satisfied: hatch-vcs>=0.3 (installed: hatch-vcs 0.4.0) Handling hatchling>=1.18 from build-system.requires Requirement satisfied: hatchling>=1.18 (installed: hatchling 1.18.0) Handling furo>=2023.7.26; extra == 'docs' from wheel metadata: Requires-Dist Ignoring alien requirement: furo>=2023.7.26; extra == 'docs' Handling sphinx-autodoc-typehints!=1.23.4,>=1.24; extra == 'docs' from wheel metadata: Requires-Dist Ignoring alien requirement: sphinx-autodoc-typehints!=1.23.4,>=1.24; extra == 'docs' Handling sphinx>=7.1.2; extra == 'docs' from wheel metadata: Requires-Dist Ignoring alien requirement: sphinx>=7.1.2; extra == 'docs' Handling covdefaults>=2.3; extra == 'testing' from wheel metadata: Requires-Dist Ignoring alien requirement: covdefaults>=2.3; extra == 'testing' Handling coverage>=7.3; extra == 'testing' from wheel metadata: Requires-Dist Ignoring alien requirement: coverage>=7.3; extra == 'testing' Handling diff-cover>=7.7; extra == 'testing' from wheel metadata: Requires-Dist Ignoring alien requirement: diff-cover>=7.7; extra == 'testing' Handling pytest-cov>=4.1; extra == 'testing' from wheel metadata: Requires-Dist Ignoring alien requirement: pytest-cov>=4.1; extra == 'testing' Handling pytest-mock>=3.11.1; extra == 'testing' from wheel metadata: Requires-Dist Ignoring alien requirement: pytest-mock>=3.11.1; extra == 'testing' Handling pytest-timeout>=2.1; extra == 'testing' from wheel metadata: Requires-Dist Ignoring alien requirement: pytest-timeout>=2.1; extra == 'testing' Handling pytest>=7.4; extra == 'testing' from wheel metadata: Requires-Dist Ignoring alien requirement: pytest>=7.4; extra == 'testing' Handling typing-extensions>=4.7.1; python_version < '3.11' and extra == 'typing' from wheel metadata: Requires-Dist Ignoring alien requirement: typing-extensions>=4.7.1; python_version < '3.11' and extra == 'typing' + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.iCoP37 + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -Wl,--build-id=sha1' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd filelock-3.12.4 + mkdir -p /builddir/build/BUILD/filelock-3.12.4/.pyproject-builddir + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -Wl,--build-id=sha1' + TMPDIR=/builddir/build/BUILD/filelock-3.12.4/.pyproject-builddir + /usr/bin/python3 -m pip wheel --wheel-dir /builddir/build/BUILD/filelock-3.12.4/pyproject-wheeldir --no-deps --use-pep517 --no-build-isolation --disable-pip-version-check --no-clean --progress-bar off --verbose . Processing /builddir/build/BUILD/filelock-3.12.4 Preparing metadata (pyproject.toml): started Running command Preparing metadata (pyproject.toml) Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: filelock Building wheel for filelock (pyproject.toml): started Running command Building wheel for filelock (pyproject.toml) Building wheel for filelock (pyproject.toml): finished with status 'done' Created wheel for filelock: filename=filelock-3.12.4-py3-none-any.whl size=11959 sha256=d54135084a6701f264d1ea9baa46a1ef96f0dc657c8a4f2fe54a166dfdd072fc Stored in directory: /builddir/.cache/pip/wheels/b7/a9/05/12f10c42a3eeababe1977119200dfaea94d37f94d8addbf08e Successfully built filelock + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.Ut9cpg + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64 '!=' / ']' + rm -rf /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64 ++ dirname /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64 + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64 + cd filelock-3.12.4 ++ ls /builddir/build/BUILD/filelock-3.12.4/pyproject-wheeldir/filelock-3.12.4-py3-none-any.whl ++ xargs basename --multiple ++ sed -E 's/([^-]+)-([^-]+)-.+\.whl/\1==\2/' + specifier=filelock==3.12.4 + TMPDIR=/builddir/build/BUILD/filelock-3.12.4/.pyproject-builddir + /usr/bin/python3 -m pip install --root /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64 --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location --no-index --no-cache-dir --find-links /builddir/build/BUILD/filelock-3.12.4/pyproject-wheeldir filelock==3.12.4 Using pip 23.3.1 from /usr/lib/python3.11/site-packages/pip (python 3.11) Looking in links: /builddir/build/BUILD/filelock-3.12.4/pyproject-wheeldir Processing ./pyproject-wheeldir/filelock-3.12.4-py3-none-any.whl Installing collected packages: filelock Successfully installed filelock-3.12.4 + '[' -d /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/bin ']' + rm -f /builddir/build/BUILD/pyproject-ghost-distinfo + site_dirs=() + '[' -d /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages ']' + site_dirs+=("/usr/lib/python3.11/site-packages") + '[' /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib64/python3.11/site-packages '!=' /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages ']' + '[' -d /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib64/python3.11/site-packages ']' + for site_dir in ${site_dirs[@]} + for distinfo in /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64$site_dir/*.dist-info + echo '%ghost /usr/lib/python3.11/site-packages/filelock-3.12.4.dist-info' + sed -i s/pip/rpm/ /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock-3.12.4.dist-info/INSTALLER + PYTHONPATH=/usr/lib/rpm/OpenCloudOS + /usr/bin/python3 -B /usr/lib/rpm/OpenCloudOS/pyproject_preprocess_record.py --buildroot /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64 --record /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock-3.12.4.dist-info/RECORD --output /builddir/build/BUILD/pyproject-record + rm -fv /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock-3.12.4.dist-info/RECORD removed '/builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock-3.12.4.dist-info/RECORD' + rm -fv /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock-3.12.4.dist-info/REQUESTED removed '/builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock-3.12.4.dist-info/REQUESTED' + /usr/bin/python3 /usr/lib/rpm/OpenCloudOS/pyproject_save_files.py --output-files /builddir/build/BUILD/pyproject-files --output-modules /builddir/build/BUILD/pyproject-modules --buildroot /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64 --sitelib /usr/lib/python3.11/site-packages --sitearch /usr/lib64/python3.11/site-packages --python-version 3.11 --pyproject-record /builddir/build/BUILD/pyproject-record --prefix /usr filelock + /usr/bin/find-debuginfo -j32 --strict-build-id -m -i --build-id-seed 3.12.4-5.oc9 --unique-debug-suffix -3.12.4-5.oc9.x86_64 --unique-debug-src-base python-filelock-3.12.4-5.oc9.x86_64 -S debugsourcefiles.list /builddir/build/BUILD/filelock-3.12.4 find: 'debug': No such file or directory + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/OpenCloudOS/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/OpenCloudOS/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/OpenCloudOS/brp-mangle-shebangs + /usr/lib/rpm/OpenCloudOS/brp-python-bytecompile '' 1 0 Bytecompiling .py files below /builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11 using python3.11 + /usr/lib/rpm/OpenCloudOS/brp-python-hardlink Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.72xTmM + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -Wl,--build-id=sha1' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd filelock-3.12.4 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -Wl,--build-id=sha1' + PATH=/builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib64/python3.11/site-packages:/builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/filelock-3.12.4/.pyproject-builddir' + /usr/bin/pytest ============================= test session starts ============================== platform linux -- Python 3.11.6, pytest-7.4.0, pluggy-1.3.0 rootdir: /builddir/build/BUILD/filelock-3.12.4 plugins: timeout-2.1.0, mock-3.11.1 collected 94 items tests/test_error.py .... [ 4%] tests/test_filelock.py F.F.F.F.F.F.F.F.F.F.F.F.F.F.ssssssssssssssssssssF [ 56%] .F.F.F.F.F.F.F.F.F.F..F.F.F.F..F.F.F.F.F. [100%] =================================== FAILURES =================================== _______________________ test_simple[a-str-UnixFileLock] ________________________ lock_type = , path_type = filename = 'a' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_simple_a_str_UnixFileLock0') caplog = <_pytest.logging.LogCaptureFixture object at 0x7f836deae5d0> @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) @pytest.mark.parametrize("path_type", [str, PurePath, Path]) @pytest.mark.parametrize("filename", ["a", "new/b", "new2/new3/c"]) def test_simple( lock_type: type[BaseFileLock], path_type: type[str | Path], filename: str, tmp_path: Path, caplog: pytest.LogCaptureFixture, ) -> None: caplog.set_level(logging.DEBUG) # test lock creation by passing a `str` lock_path = tmp_path / filename lock = lock_type(path_type(lock_path)) > with lock as locked: tests/test_filelock.py:41: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ------------------------------ Captured log call ------------------------------- DEBUG filelock:_api.py:219 Attempting to acquire lock 140202461378000 on /tmp/pytest-of-mockbuild/pytest-0/test_simple_a_str_UnixFileLock0/a _____________________ test_simple[a-PurePath-UnixFileLock] _____________________ lock_type = path_type = , filename = 'a' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_simple_a_PurePath_UnixFil0') caplog = <_pytest.logging.LogCaptureFixture object at 0x7f836e0b6050> @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) @pytest.mark.parametrize("path_type", [str, PurePath, Path]) @pytest.mark.parametrize("filename", ["a", "new/b", "new2/new3/c"]) def test_simple( lock_type: type[BaseFileLock], path_type: type[str | Path], filename: str, tmp_path: Path, caplog: pytest.LogCaptureFixture, ) -> None: caplog.set_level(logging.DEBUG) # test lock creation by passing a `str` lock_path = tmp_path / filename lock = lock_type(path_type(lock_path)) > with lock as locked: tests/test_filelock.py:41: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ------------------------------ Captured log call ------------------------------- DEBUG filelock:_api.py:219 Attempting to acquire lock 140202463690128 on /tmp/pytest-of-mockbuild/pytest-0/test_simple_a_PurePath_UnixFil0/a _______________________ test_simple[a-Path-UnixFileLock] _______________________ lock_type = path_type = , filename = 'a' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_simple_a_Path_UnixFileLoc0') caplog = <_pytest.logging.LogCaptureFixture object at 0x7f836dfba890> @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) @pytest.mark.parametrize("path_type", [str, PurePath, Path]) @pytest.mark.parametrize("filename", ["a", "new/b", "new2/new3/c"]) def test_simple( lock_type: type[BaseFileLock], path_type: type[str | Path], filename: str, tmp_path: Path, caplog: pytest.LogCaptureFixture, ) -> None: caplog.set_level(logging.DEBUG) # test lock creation by passing a `str` lock_path = tmp_path / filename lock = lock_type(path_type(lock_path)) > with lock as locked: tests/test_filelock.py:41: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ------------------------------ Captured log call ------------------------------- DEBUG filelock:_api.py:219 Attempting to acquire lock 140202462651728 on /tmp/pytest-of-mockbuild/pytest-0/test_simple_a_Path_UnixFileLoc0/a _____________________ test_simple[new/b-str-UnixFileLock] ______________________ lock_type = , path_type = filename = 'new/b' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_simple_new_b_str_UnixFile0') caplog = <_pytest.logging.LogCaptureFixture object at 0x7f836df8c8d0> @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) @pytest.mark.parametrize("path_type", [str, PurePath, Path]) @pytest.mark.parametrize("filename", ["a", "new/b", "new2/new3/c"]) def test_simple( lock_type: type[BaseFileLock], path_type: type[str | Path], filename: str, tmp_path: Path, caplog: pytest.LogCaptureFixture, ) -> None: caplog.set_level(logging.DEBUG) # test lock creation by passing a `str` lock_path = tmp_path / filename lock = lock_type(path_type(lock_path)) > with lock as locked: tests/test_filelock.py:41: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ------------------------------ Captured log call ------------------------------- DEBUG filelock:_api.py:219 Attempting to acquire lock 140202462474640 on /tmp/pytest-of-mockbuild/pytest-0/test_simple_new_b_str_UnixFile0/new/b ___________________ test_simple[new/b-PurePath-UnixFileLock] ___________________ lock_type = path_type = , filename = 'new/b' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_simple_new_b_PurePath_Uni0') caplog = <_pytest.logging.LogCaptureFixture object at 0x7f836e24a8d0> @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) @pytest.mark.parametrize("path_type", [str, PurePath, Path]) @pytest.mark.parametrize("filename", ["a", "new/b", "new2/new3/c"]) def test_simple( lock_type: type[BaseFileLock], path_type: type[str | Path], filename: str, tmp_path: Path, caplog: pytest.LogCaptureFixture, ) -> None: caplog.set_level(logging.DEBUG) # test lock creation by passing a `str` lock_path = tmp_path / filename lock = lock_type(path_type(lock_path)) > with lock as locked: tests/test_filelock.py:41: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ------------------------------ Captured log call ------------------------------- DEBUG filelock:_api.py:219 Attempting to acquire lock 140202465336400 on /tmp/pytest-of-mockbuild/pytest-0/test_simple_new_b_PurePath_Uni0/new/b _____________________ test_simple[new/b-Path-UnixFileLock] _____________________ lock_type = path_type = , filename = 'new/b' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_simple_new_b_Path_UnixFil0') caplog = <_pytest.logging.LogCaptureFixture object at 0x7f836deae1d0> @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) @pytest.mark.parametrize("path_type", [str, PurePath, Path]) @pytest.mark.parametrize("filename", ["a", "new/b", "new2/new3/c"]) def test_simple( lock_type: type[BaseFileLock], path_type: type[str | Path], filename: str, tmp_path: Path, caplog: pytest.LogCaptureFixture, ) -> None: caplog.set_level(logging.DEBUG) # test lock creation by passing a `str` lock_path = tmp_path / filename lock = lock_type(path_type(lock_path)) > with lock as locked: tests/test_filelock.py:41: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ------------------------------ Captured log call ------------------------------- DEBUG filelock:_api.py:219 Attempting to acquire lock 140202461558992 on /tmp/pytest-of-mockbuild/pytest-0/test_simple_new_b_Path_UnixFil0/new/b __________________ test_simple[new2/new3/c-str-UnixFileLock] ___________________ lock_type = , path_type = filename = 'new2/new3/c' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_simple_new2_new3_c_str_Un0') caplog = <_pytest.logging.LogCaptureFixture object at 0x7f836de74450> @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) @pytest.mark.parametrize("path_type", [str, PurePath, Path]) @pytest.mark.parametrize("filename", ["a", "new/b", "new2/new3/c"]) def test_simple( lock_type: type[BaseFileLock], path_type: type[str | Path], filename: str, tmp_path: Path, caplog: pytest.LogCaptureFixture, ) -> None: caplog.set_level(logging.DEBUG) # test lock creation by passing a `str` lock_path = tmp_path / filename lock = lock_type(path_type(lock_path)) > with lock as locked: tests/test_filelock.py:41: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ------------------------------ Captured log call ------------------------------- DEBUG filelock:_api.py:219 Attempting to acquire lock 140202461321360 on /tmp/pytest-of-mockbuild/pytest-0/test_simple_new2_new3_c_str_Un0/new2/new3/c ________________ test_simple[new2/new3/c-PurePath-UnixFileLock] ________________ lock_type = path_type = , filename = 'new2/new3/c' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_simple_new2_new3_c_PurePa0') caplog = <_pytest.logging.LogCaptureFixture object at 0x7f836dfae510> @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) @pytest.mark.parametrize("path_type", [str, PurePath, Path]) @pytest.mark.parametrize("filename", ["a", "new/b", "new2/new3/c"]) def test_simple( lock_type: type[BaseFileLock], path_type: type[str | Path], filename: str, tmp_path: Path, caplog: pytest.LogCaptureFixture, ) -> None: caplog.set_level(logging.DEBUG) # test lock creation by passing a `str` lock_path = tmp_path / filename lock = lock_type(path_type(lock_path)) > with lock as locked: tests/test_filelock.py:41: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ------------------------------ Captured log call ------------------------------- DEBUG filelock:_api.py:219 Attempting to acquire lock 140202462599312 on /tmp/pytest-of-mockbuild/pytest-0/test_simple_new2_new3_c_PurePa0/new2/new3/c __________________ test_simple[new2/new3/c-Path-UnixFileLock] __________________ lock_type = path_type = , filename = 'new2/new3/c' tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_simple_new2_new3_c_Path_U0') caplog = <_pytest.logging.LogCaptureFixture object at 0x7f836e0b6710> @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) @pytest.mark.parametrize("path_type", [str, PurePath, Path]) @pytest.mark.parametrize("filename", ["a", "new/b", "new2/new3/c"]) def test_simple( lock_type: type[BaseFileLock], path_type: type[str | Path], filename: str, tmp_path: Path, caplog: pytest.LogCaptureFixture, ) -> None: caplog.set_level(logging.DEBUG) # test lock creation by passing a `str` lock_path = tmp_path / filename lock = lock_type(path_type(lock_path)) > with lock as locked: tests/test_filelock.py:41: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ------------------------------ Captured log call ------------------------------- DEBUG filelock:_api.py:219 Attempting to acquire lock 140202463676368 on /tmp/pytest-of-mockbuild/pytest-0/test_simple_new2_new3_c_Path_U0/new2/new3/c _________________________ test_ro_folder[UnixFileLock] _________________________ lock_type = tmp_path_ro = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_ro_folder_UnixFileLock_0') @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) @pytest.mark.skipif(sys.platform == "win32", reason="Windows does not have read only folders") @pytest.mark.skipif( sys.platform != "win32" and os.geteuid() == 0, reason="Cannot make a read only file (that the current user: root can't read)", ) def test_ro_folder(lock_type: type[BaseFileLock], tmp_path_ro: Path) -> None: lock = lock_type(str(tmp_path_ro / "a")) with pytest.raises(PermissionError, match="Permission denied"): > lock.acquire() tests/test_filelock.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError __________________________ test_ro_file[UnixFileLock] __________________________ lock_type = tmp_file_ro = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_ro_file_UnixFileLock_0/a') @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) @pytest.mark.skipif( sys.platform != "win32" and os.geteuid() == 0, reason="Cannot make a read only file (that the current user: root can't read)", ) def test_ro_file(lock_type: type[BaseFileLock], tmp_file_ro: Path) -> None: lock = lock_type(str(tmp_file_ro)) with pytest.raises(PermissionError, match="Permission denied"): > lock.acquire() tests/test_filelock.py:99: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError _______________ test_bad_lock_file[blank_filename-UnixFileLock] ________________ lock_type = expected_error = match = 'No such file or directory:', bad_lock_file = '' @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) @pytest.mark.parametrize( ("expected_error", "match", "bad_lock_file"), [ pytest.param(FileNotFoundError, "No such file or directory:", "", id="blank_filename"), pytest.param(ValueError, "embedded null (byte|character)", "\0", id="null_byte"), # Should be PermissionError on Windows pytest.param(PermissionError, "Permission denied:", ".", id="current_directory") if sys.platform == "win32" else ( # Should be IsADirectoryError on MacOS and Linux pytest.param(IsADirectoryError, "Is a directory", ".", id="current_directory") if sys.platform in ["darwin", "linux"] else # Should be some type of OSError at least on other operating systems pytest.param(OSError, None, ".", id="current_directory") ), ] + [pytest.param(OSError, "Invalid argument", i, id=f"invalid_{i}", marks=WindowsOnly) for i in '<>:"|?*\a'] + [pytest.param(PermissionError, "Permission denied:", i, id=f"permission_{i}", marks=WindowsOnly) for i in "/\\"], ) @pytest.mark.timeout(5) # timeout in case of infinite loop def test_bad_lock_file( lock_type: type[BaseFileLock], expected_error: type[Exception], match: str, bad_lock_file: str, ) -> None: lock = lock_type(bad_lock_file) with pytest.raises(expected_error, match=match): > lock.acquire() tests/test_filelock.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError __________________ test_bad_lock_file[null_byte-UnixFileLock] __________________ lock_type = expected_error = , match = 'embedded null (byte|character)' bad_lock_file = '\x00' @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) @pytest.mark.parametrize( ("expected_error", "match", "bad_lock_file"), [ pytest.param(FileNotFoundError, "No such file or directory:", "", id="blank_filename"), pytest.param(ValueError, "embedded null (byte|character)", "\0", id="null_byte"), # Should be PermissionError on Windows pytest.param(PermissionError, "Permission denied:", ".", id="current_directory") if sys.platform == "win32" else ( # Should be IsADirectoryError on MacOS and Linux pytest.param(IsADirectoryError, "Is a directory", ".", id="current_directory") if sys.platform in ["darwin", "linux"] else # Should be some type of OSError at least on other operating systems pytest.param(OSError, None, ".", id="current_directory") ), ] + [pytest.param(OSError, "Invalid argument", i, id=f"invalid_{i}", marks=WindowsOnly) for i in '<>:"|?*\a'] + [pytest.param(PermissionError, "Permission denied:", i, id=f"permission_{i}", marks=WindowsOnly) for i in "/\\"], ) @pytest.mark.timeout(5) # timeout in case of infinite loop def test_bad_lock_file( lock_type: type[BaseFileLock], expected_error: type[Exception], match: str, bad_lock_file: str, ) -> None: lock = lock_type(bad_lock_file) with pytest.raises(expected_error, match=match): > lock.acquire() tests/test_filelock.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ______________ test_bad_lock_file[current_directory-UnixFileLock] ______________ lock_type = expected_error = , match = 'Is a directory' bad_lock_file = '.' @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) @pytest.mark.parametrize( ("expected_error", "match", "bad_lock_file"), [ pytest.param(FileNotFoundError, "No such file or directory:", "", id="blank_filename"), pytest.param(ValueError, "embedded null (byte|character)", "\0", id="null_byte"), # Should be PermissionError on Windows pytest.param(PermissionError, "Permission denied:", ".", id="current_directory") if sys.platform == "win32" else ( # Should be IsADirectoryError on MacOS and Linux pytest.param(IsADirectoryError, "Is a directory", ".", id="current_directory") if sys.platform in ["darwin", "linux"] else # Should be some type of OSError at least on other operating systems pytest.param(OSError, None, ".", id="current_directory") ), ] + [pytest.param(OSError, "Invalid argument", i, id=f"invalid_{i}", marks=WindowsOnly) for i in '<>:"|?*\a'] + [pytest.param(PermissionError, "Permission denied:", i, id=f"permission_{i}", marks=WindowsOnly) for i in "/\\"], ) @pytest.mark.timeout(5) # timeout in case of infinite loop def test_bad_lock_file( lock_type: type[BaseFileLock], expected_error: type[Exception], match: str, bad_lock_file: str, ) -> None: lock = lock_type(bad_lock_file) with pytest.raises(expected_error, match=match): > lock.acquire() tests/test_filelock.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError __________________ test_nested_context_manager[UnixFileLock] ___________________ lock_type = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_nested_context_manager_Un0') @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_nested_context_manager(lock_type: type[BaseFileLock], tmp_path: Path) -> None: # lock is not released before the most outer with statement that locked the lock, is left lock_path = tmp_path / "a" lock = lock_type(str(lock_path)) > with lock as lock_1: tests/test_filelock.py:145: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ______________________ test_nested_acquire[UnixFileLock] _______________________ lock_type = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_nested_acquire_UnixFileLo0') @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_nested_acquire(lock_type: type[BaseFileLock], tmp_path: Path) -> None: # lock is not released before the most outer with statement that locked the lock, is left lock_path = tmp_path / "a" lock = lock_type(str(lock_path)) > with lock.acquire() as lock_1: tests/test_filelock.py:168: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ___________________ test_nested_forced_release[UnixFileLock] ___________________ lock_type = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_nested_forced_release_Uni0') @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_nested_forced_release(lock_type: type[BaseFileLock], tmp_path: Path) -> None: # acquires the lock using a with-statement and releases the lock before leaving the with-statement lock_path = tmp_path / "a" lock = lock_type(str(lock_path)) > with lock: tests/test_filelock.py:191: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError _________________ test_threaded_shared_lock_obj[UnixFileLock] __________________ self = def run(self) -> None: try: > super().run() tests/test_filelock.py:212: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.11/threading.py:982: in run self._target(*self._args, **self._kwargs) tests/test_filelock.py:231: in thread_work with lock: ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError The above exception was the direct cause of the following exception: lock_type = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_threaded_shared_lock_obj_0') @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_threaded_shared_lock_obj(lock_type: type[BaseFileLock], tmp_path: Path) -> None: # Runs 100 threads, which need the filelock. The lock must be acquired if at least one thread required it and # released, as soon as all threads stopped. lock_path = tmp_path / "a" lock = lock_type(str(lock_path)) def thread_work() -> None: for _ in range(100): with lock: assert lock.is_locked threads = [ExThread(target=thread_work, name=f"t{i}") for i in range(100)] for thread in threads: thread.start() for thread in threads: > thread.join() tests/test_filelock.py:238: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , timeout = None def join(self, timeout: float | None = None) -> None: super().join(timeout=timeout) if self.ex is not None: > raise RuntimeError from self.ex[1] # pragma: no cover E RuntimeError tests/test_filelock.py:219: RuntimeError _____________ test_threaded_lock_different_lock_obj[UnixFileLock] ______________ self = def run(self) -> None: try: > super().run() tests/test_filelock.py:212: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.11/threading.py:982: in run self._target(*self._args, **self._kwargs) tests/test_filelock.py:251: in t_1 with lock_1: ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError The above exception was the direct cause of the following exception: lock_type = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_threaded_lock_different_l0') @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) @pytest.mark.skipif(hasattr(sys, "pypy_version_info") and sys.platform == "win32", reason="deadlocks randomly") def test_threaded_lock_different_lock_obj(lock_type: type[BaseFileLock], tmp_path: Path) -> None: # Runs multiple threads, which acquire the same lock file with a different FileLock object. When thread group 1 # acquired the lock, thread group 2 must not hold their lock. def t_1() -> None: for _ in range(1000): with lock_1: assert lock_1.is_locked assert not lock_2.is_locked def t_2() -> None: for _ in range(1000): with lock_2: assert not lock_1.is_locked assert lock_2.is_locked lock_path = tmp_path / "a" lock_1, lock_2 = lock_type(str(lock_path)), lock_type(str(lock_path)) threads = [(ExThread(t_1, f"t1_{i}"), ExThread(t_2, f"t2_{i}")) for i in range(10)] for thread_1, thread_2 in threads: thread_1.start() thread_2.start() for thread_1, thread_2 in threads: > thread_1.join() tests/test_filelock.py:269: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , timeout = None def join(self, timeout: float | None = None) -> None: super().join(timeout=timeout) if self.ex is not None: > raise RuntimeError from self.ex[1] # pragma: no cover E RuntimeError tests/test_filelock.py:219: RuntimeError __________________________ test_timeout[UnixFileLock] __________________________ lock_type = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_timeout_UnixFileLock_0') @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_timeout(lock_type: type[BaseFileLock], tmp_path: Path) -> None: # raises Timeout error when the lock cannot be acquired lock_path = tmp_path / "a" lock_1, lock_2 = lock_type(str(lock_path)), lock_type(str(lock_path)) # acquire lock 1 > lock_1.acquire() tests/test_filelock.py:283: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError _______________________ test_non_blocking[UnixFileLock] ________________________ lock_type = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_non_blocking_UnixFileLock0') @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_non_blocking(lock_type: type[BaseFileLock], tmp_path: Path) -> None: # raises Timeout error when the lock cannot be acquired lock_path = tmp_path / "a" lock_1, lock_2 = lock_type(str(lock_path)), lock_type(str(lock_path)) # acquire lock 1 > lock_1.acquire() tests/test_filelock.py:306: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ______________________ test_default_timeout[UnixFileLock] ______________________ lock_type = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_default_timeout_UnixFileL0') @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_default_timeout(lock_type: type[BaseFileLock], tmp_path: Path) -> None: # test if the default timeout parameter works lock_path = tmp_path / "a" lock_1, lock_2 = lock_type(str(lock_path)), lock_type(str(lock_path), timeout=0.1) assert lock_2.timeout == 0.1 # acquire lock 1 > lock_1.acquire() tests/test_filelock.py:330: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError __________________ test_context_release_on_exc[UnixFileLock] ___________________ lock_type = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_context_release_on_exc_Un0') @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_context_release_on_exc(lock_type: type[BaseFileLock], tmp_path: Path) -> None: # lock is released when an exception is thrown in a with-statement lock_path = tmp_path / "a" lock = lock_type(str(lock_path)) try: > with lock as lock_1: tests/test_filelock.py:361: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError __________________ test_acquire_release_on_exc[UnixFileLock] ___________________ lock_type = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_acquire_release_on_exc_Un0') @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_acquire_release_on_exc(lock_type: type[BaseFileLock], tmp_path: Path) -> None: # lock is released when an exception is thrown in a acquire statement lock_path = tmp_path / "a" lock = lock_type(str(lock_path)) try: > with lock.acquire() as lock_1: tests/test_filelock.py:376: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ____________________________ test_del[UnixFileLock] ____________________________ lock_type = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_del_UnixFileLock_0') @pytest.mark.skipif(hasattr(sys, "pypy_version_info"), reason="del() does not trigger GC in PyPy") @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_del(lock_type: type[BaseFileLock], tmp_path: Path) -> None: # lock is released when the object is deleted lock_path = tmp_path / "a" lock_1, lock_2 = lock_type(str(lock_path)), lock_type(str(lock_path)) # acquire lock 1 > lock_1.acquire() tests/test_filelock.py:392: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError _________________ test_poll_intervall_deprecated[UnixFileLock] _________________ lock_type = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_poll_intervall_deprecated0') @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_poll_intervall_deprecated(lock_type: type[BaseFileLock], tmp_path: Path) -> None: lock_path = tmp_path / "a" lock = lock_type(str(lock_path)) with pytest.deprecated_call(match="use poll_interval instead of poll_intervall") as checker: > lock.acquire(poll_intervall=0.05) # the deprecation warning will be captured by the checker tests/test_filelock.py:424: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError _____________________ test_context_decorator[UnixFileLock] _____________________ lock_type = tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_context_decorator_UnixFil0') @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_context_decorator(lock_type: type[BaseFileLock], tmp_path: Path) -> None: lock_path = tmp_path / "a" lock = lock_type(str(lock_path)) @lock def decorated_method() -> None: assert lock.is_locked assert not lock.is_locked > decorated_method() tests/test_filelock.py:443: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.11/contextlib.py:80: in inner with self._recreate_cm(): ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ________________________________ test_lock_mode ________________________________ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_lock_mode0') def test_lock_mode(tmp_path: Path) -> None: # test file lock permissions are independent of umask lock_path = tmp_path / "a.lock" lock = FileLock(str(lock_path), mode=0o666) # set umask so permissions can be anticipated initial_umask = os.umask(0o022) try: > lock.acquire() tests/test_filelock.py:455: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError __________________________________ test_umask __________________________________ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_umask0') def test_umask(tmp_path: Path) -> None: lock_path = tmp_path / "a.lock" lock = FileLock(str(lock_path), mode=0o666) initial_umask = os.umask(0) os.umask(initial_umask) > lock.acquire() tests/test_filelock.py:495: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError _______________________ test_flock_not_implemented_unix ________________________ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_flock_not_implemented_uni0') mocker = @pytest.mark.skipif(sys.platform == "win32", reason="flock not run on windows") def test_flock_not_implemented_unix(tmp_path: Path, mocker: MockerFixture) -> None: mocker.patch("fcntl.flock", side_effect=OSError(ENOSYS, "mock error")) > with pytest.raises(NotImplementedError), FileLock(tmp_path / "a.lock"): tests/test_filelock.py:539: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError ____ test_thrashing_with_thread_pool_passing_lock_to_threads[UnixFileLock] _____ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_thrashing_with_thread_poo0') lock_type = @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_thrashing_with_thread_pool_passing_lock_to_threads(tmp_path: Path, lock_type: type[BaseFileLock]) -> None: def mess_with_file(lock_: BaseFileLock) -> None: with lock_: _check_file_read_write(txt_file) lock_file, txt_file = tmp_path / "test.txt.lock", tmp_path / "test.txt" lock = lock_type(lock_file) with ThreadPoolExecutor() as executor: results = [executor.submit(mess_with_file, lock) for _ in range(100)] > assert all(r.result() is None for r in results) tests/test_filelock.py:566: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_filelock.py:566: in assert all(r.result() is None for r in results) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib64/python3.11/concurrent/futures/thread.py:58: in run result = self.fn(*self.args, **self.kwargs) tests/test_filelock.py:559: in mess_with_file with lock_: ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError __________ test_thrashing_with_thread_pool_global_lock[UnixFileLock] ___________ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_thrashing_with_thread_poo2') lock_type = @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_thrashing_with_thread_pool_global_lock(tmp_path: Path, lock_type: type[BaseFileLock]) -> None: def mess_with_file() -> None: with lock: _check_file_read_write(txt_file) lock_file, txt_file = tmp_path / "test.txt.lock", tmp_path / "test.txt" lock = lock_type(lock_file) with ThreadPoolExecutor() as executor: results = [executor.submit(mess_with_file) for _ in range(100)] > assert all(r.result() is None for r in results) tests/test_filelock.py:580: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_filelock.py:580: in assert all(r.result() is None for r in results) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib64/python3.11/concurrent/futures/thread.py:58: in run result = self.fn(*self.args, **self.kwargs) tests/test_filelock.py:572: in mess_with_file with lock: ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError _ test_thrashing_with_thread_pool_lock_recreated_in_each_thread[UnixFileLock] __ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_thrashing_with_thread_poo4') lock_type = @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_thrashing_with_thread_pool_lock_recreated_in_each_thread( tmp_path: Path, lock_type: type[BaseFileLock], ) -> None: def mess_with_file() -> None: with lock_type(lock_file): _check_file_read_write(txt_file) lock_file, txt_file = tmp_path / "test.txt.lock", tmp_path / "test.txt" with ThreadPoolExecutor() as executor: results = [executor.submit(mess_with_file) for _ in range(100)] > assert all(r.result() is None for r in results) tests/test_filelock.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_filelock.py:596: in assert all(r.result() is None for r in results) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib64/python3.11/concurrent/futures/thread.py:58: in run result = self.fn(*self.args, **self.kwargs) tests/test_filelock.py:589: in mess_with_file with lock_type(lock_file): ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:262: in __enter__ self.acquire() ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py:220: in acquire self._acquire() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _acquire(self) -> None: ensure_directory_exists(self.lock_file) open_flags = os.O_RDWR | os.O_TRUNC | os.O_NOFOLLOW > if not Path(self.lock_file).exists(): E NameError: name 'Path' is not defined ../../BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py:39: NameError _______________ test_lock_can_be_non_thread_local[UnixFileLock] ________________ tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_lock_can_be_non_thread_lo0') lock_type = @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) def test_lock_can_be_non_thread_local( tmp_path: Path, lock_type: type[BaseFileLock], ) -> None: lock = lock_type(tmp_path / "test.lock", thread_local=False) for _ in range(2): thread = threading.Thread(target=lock.acquire, kwargs={"timeout": 2}) thread.start() thread.join() > assert lock.lock_counter == 2 E assert 0 == 2 E + where 0 = .lock_counter tests/test_filelock.py:611: AssertionError =============================== warnings summary =============================== tests/test_filelock.py::test_lock_can_be_non_thread_local[UnixFileLock] /usr/lib/python3.11/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-2 (acquire) Traceback (most recent call last): File "/usr/lib64/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() File "/usr/lib64/python3.11/threading.py", line 982, in run self._target(*self._args, **self._kwargs) File "/builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_api.py", line 220, in acquire self._acquire() File "/builddir/build/BUILDROOT/python-filelock-3.12.4-5.oc9.x86_64/usr/lib/python3.11/site-packages/filelock/_unix.py", line 39, in _acquire if not Path(self.lock_file).exists(): ^^^^ NameError: name 'Path' is not defined warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/test_filelock.py::test_simple[a-str-UnixFileLock] - NameError: n... FAILED tests/test_filelock.py::test_simple[a-PurePath-UnixFileLock] - NameErr... FAILED tests/test_filelock.py::test_simple[a-Path-UnixFileLock] - NameError: ... FAILED tests/test_filelock.py::test_simple[new/b-str-UnixFileLock] - NameErro... FAILED tests/test_filelock.py::test_simple[new/b-PurePath-UnixFileLock] - Nam... FAILED tests/test_filelock.py::test_simple[new/b-Path-UnixFileLock] - NameErr... FAILED tests/test_filelock.py::test_simple[new2/new3/c-str-UnixFileLock] - Na... FAILED tests/test_filelock.py::test_simple[new2/new3/c-PurePath-UnixFileLock] FAILED tests/test_filelock.py::test_simple[new2/new3/c-Path-UnixFileLock] - N... FAILED tests/test_filelock.py::test_ro_folder[UnixFileLock] - NameError: name... FAILED tests/test_filelock.py::test_ro_file[UnixFileLock] - NameError: name '... FAILED tests/test_filelock.py::test_bad_lock_file[blank_filename-UnixFileLock] FAILED tests/test_filelock.py::test_bad_lock_file[null_byte-UnixFileLock] - N... FAILED tests/test_filelock.py::test_bad_lock_file[current_directory-UnixFileLock] FAILED tests/test_filelock.py::test_nested_context_manager[UnixFileLock] - Na... FAILED tests/test_filelock.py::test_nested_acquire[UnixFileLock] - NameError:... FAILED tests/test_filelock.py::test_nested_forced_release[UnixFileLock] - Nam... FAILED tests/test_filelock.py::test_threaded_shared_lock_obj[UnixFileLock] - ... FAILED tests/test_filelock.py::test_threaded_lock_different_lock_obj[UnixFileLock] FAILED tests/test_filelock.py::test_timeout[UnixFileLock] - NameError: name '... FAILED tests/test_filelock.py::test_non_blocking[UnixFileLock] - NameError: n... FAILED tests/test_filelock.py::test_default_timeout[UnixFileLock] - NameError... FAILED tests/test_filelock.py::test_context_release_on_exc[UnixFileLock] - Na... FAILED tests/test_filelock.py::test_acquire_release_on_exc[UnixFileLock] - Na... FAILED tests/test_filelock.py::test_del[UnixFileLock] - NameError: name 'Path... FAILED tests/test_filelock.py::test_poll_intervall_deprecated[UnixFileLock] FAILED tests/test_filelock.py::test_context_decorator[UnixFileLock] - NameErr... FAILED tests/test_filelock.py::test_lock_mode - NameError: name 'Path' is not... FAILED tests/test_filelock.py::test_umask - NameError: name 'Path' is not def... FAILED tests/test_filelock.py::test_flock_not_implemented_unix - NameError: n... FAILED tests/test_filelock.py::test_thrashing_with_thread_pool_passing_lock_to_threads[UnixFileLock] FAILED tests/test_filelock.py::test_thrashing_with_thread_pool_global_lock[UnixFileLock] FAILED tests/test_filelock.py::test_thrashing_with_thread_pool_lock_recreated_in_each_thread[UnixFileLock] FAILED tests/test_filelock.py::test_lock_can_be_non_thread_local[UnixFileLock] ============= 34 failed, 40 passed, 20 skipped, 1 warning in 6.01s ============= error: Bad exit status from /var/tmp/rpm-tmp.72xTmM (%check) Bad exit status from /var/tmp/rpm-tmp.72xTmM (%check) RPM build errors: Child return code was: 1 EXCEPTION: [Error('Command failed: \n # bash --login -c /usr/bin/rpmbuild -ba --noprep --noclean --target x86_64 --nodeps /builddir/build/SPECS/python-filelock.spec\n', 1)] Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.6/site-packages/mockbuild/util.py", line 597, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -ba --noprep --noclean --target x86_64 --nodeps /builddir/build/SPECS/python-filelock.spec