Bug 2366470

Summary: patool fails to build with Python 3.14: Codec Load Error: /usr/bin/7z.so : errno=25 : Inappropriate ioctl for device
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: patoolAssignee: Robert-André Mauchin 🐧 <eclipseo>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: eclipseo, fti-bugs, ksurma, mhroncok
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2322407, 2339432, 2339435, 2371854, 2372004    

Description Karolina Surma 2025-05-15 10:54:04 UTC
patool fails to build with Python 3.14.0b1.

Example failure:

____________________ TestPyzipPasswordfile.test_py_zipfile _____________________

self = <tests.archives.test_pyzipfile.TestPyzipPasswordfile testMethod=test_py_zipfile>

    def test_py_zipfile(self):
        """Run archive commands with ZIP and CBZ archive."""
>       self.archive_commands(self.filename + '.zip')

tests/archives/test_pyzipfile.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/archives/__init__.py:69: in archive_commands
    self.archive_create(filename, **kwargs)
tests/archives/__init__.py:184: in archive_create
    self._archive_create(
tests/archives/__init__.py:203: in _archive_create
    patoolib.create_archive(
patoolib/__init__.py:1295: in create_archive
    res = _create_archive(
patoolib/__init__.py:917: in _create_archive
    run_archive_cmdlist(cmdlist, verbosity=verbosity)
patoolib/__init__.py:785: in run_archive_cmdlist
    return util.run_checked(cmdlist, verbosity=verbosity, **runkwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cmd = ['/usr/bin/7z', 'a', '-y', '-pthereisnotry', '-tzip', '--', ...]
ret_ok = (0,), kwargs = {'verbosity': 2}, retcode = 2
msg = "Command `['/usr/bin/7z', 'a', '-y', '-pthereisnotry', '-tzip', '--', '/builddir/build/BUILD/patool-4.0.0-build/patool-4.0.0/tests/Unpack_v4q_sgj5/p.zip', 't']' returned non-zero exit status 2"

    def run_checked(cmd: Sequence[str], ret_ok: Sequence[int] = (0,), **kwargs) -> int:
        """Run command and raise PatoolError on error."""
        retcode = run(cmd, **kwargs)
        if retcode not in ret_ok:
            msg = f"Command `{cmd}' returned non-zero exit status {retcode}"
>           raise PatoolError(msg)
E           patoolib.util.PatoolError: Command `['/usr/bin/7z', 'a', '-y', '-pthereisnotry', '-tzip', '--', '/builddir/build/BUILD/patool-4.0.0-build/patool-4.0.0/tests/Unpack_v4q_sgj5/p.zip', 't']' returned non-zero exit status 2

patoolib/util.py:88: PatoolError
----------------------------- Captured stdout call -----------------------------
t/
t/t.txt
t/
t/t.txt
t/
t/t.txt
t/
t/t.txt
t/
t/t.txt
t/
t/t.txt

7-Zip 24.09 (x64) : Copyright (c) 1999-2024 Igor Pavlov : 2024-11-29
 64-bit locale=C.UTF-8 Threads:2 OPEN_MAX:10240


Codec Load Error: /usr/bin/7z.so : errno=25 : Inappropriate ioctl for device

FAILED tests/archives/test_7z.py::Test7z::test_7z - patoolib.util.PatoolError...
FAILED tests/archives/test_7z.py::Test7z::test_7z_file - patoolib.util.Patool...
FAILED tests/archives/test_7z.py::Test7zPassword::test_7z - patoolib.util.Pat...
FAILED tests/archives/test_7z.py::Test7zPassword::test_7z_file - patoolib.uti...
FAILED tests/archives/test_genisoimage.py::TestGenisoimage::test_genisoimage
FAILED tests/archives/test_pyzipfile.py::TestPyzipPasswordfile::test_py_zipfile

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14-b1/fedora-rawhide-x86_64/09024356-patool/

For all our attempts to build patool with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14-b1/package/patool/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14-b1/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Karolina Surma 2025-06-11 15:54:58 UTC
*** Bug 2371768 has been marked as a duplicate of this bug. ***