Bug 2325197 - python-commoncode fails to build with Python 3.14: tarfile.SpecialFileError: '6-FIFOTYPE' is a special file
Summary: python-commoncode fails to build with Python 3.14: tarfile.SpecialFileError: ...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-commoncode
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact:
URL:
Whiteboard:
Depends On: 2372144 2372189
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2024-11-11 14:11 UTC by Karolina Surma
Modified: 2025-06-11 16:34 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github aboutcode-org commoncode issues 88 0 None open Test failure on Python 3.14 2025-06-11 01:48:32 UTC

Description Karolina Surma 2024-11-11 14:11:22 UTC
python-commoncode fails to build with Python 3.14.0a1.

=================================== FAILURES ===================================
____________________________ TypeTest.test_get_type ____________________________

self = <test_filetype.TypeTest testMethod=test_get_type>

    def test_get_type(self):
>       test_dir = self.extract_test_tar('filetype/types.tar', verbatim=True)

tests/test_filetype.py:38: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/commoncode/testcase.py:216: in extract_test_tar
    return self.__extract(test_path, extract_tar, verbatim)
src/commoncode/testcase.py:206: in __extract
    extract_func(original_archive, target_dir, verbatim=verbatim)
src/commoncode/archive.py:61: in extract_tar
    tar.extractall(target_dir, members=to_extract)
/usr/lib64/python3.14/tarfile.py:2319: in extractall
    tarinfo = self._get_extract_tarinfo(member, filter_function, path)
/usr/lib64/python3.14/tarfile.py:2373: in _get_extract_tarinfo
    self._handle_fatal_error(e)
/usr/lib64/python3.14/tarfile.py:2371: in _get_extract_tarinfo
    tarinfo = filter_function(tarinfo, path)
/usr/lib64/python3.14/tarfile.py:830: in data_filter
    new_attrs = _get_filtered_attrs(member, dest_path, True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

member = <TarInfo '6-FIFOTYPE' at 0x7ff6c5cd16c0>
dest_path = '/tmp/scancode-tk-tests -iao0iuss/cb0wz6jy/types.tar'
for_data = True

    def _get_filtered_attrs(member, dest_path, for_data=True):
        new_attrs = {}
        name = member.name
        dest_path = os.path.realpath(dest_path)
        # Strip leading / (tar's directory separator) from filenames.
        # Include os.sep (target OS directory separator) as well.
        if name.startswith(('/', os.sep)):
            name = new_attrs['name'] = member.path.lstrip('/' + os.sep)
        if os.path.isabs(name):
            # Path is absolute even after stripping.
            # For example, 'C:/foo' on Windows.
            raise AbsolutePathError(member)
        # Ensure we stay in the destination
        target_path = os.path.realpath(os.path.join(dest_path, name))
        if os.path.commonpath([target_path, dest_path]) != dest_path:
            raise OutsideDestinationError(member, target_path)
        # Limit permissions (no high bits, and go-w)
        mode = member.mode
        if mode is not None:
            # Strip high bits & group/other write bits
            mode = mode & 0o755
            if for_data:
                # For data, handle permissions & file types
                if member.isreg() or member.islnk():
                    if not mode & 0o100:
                        # Clear executable bits if not executable by user
                        mode &= ~0o111
                    # Ensure owner can read & write
                    mode |= 0o600
                elif member.isdir() or member.issym():
                    # Ignore mode for directories & symlinks
                    mode = None
                else:
                    # Reject special files
>                   raise SpecialFileError(member)
E                   tarfile.SpecialFileError: '6-FIFOTYPE' is a special file

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/fedora-rawhide-x86_64/08189196-python-commoncode/

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

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/

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 Aoife Moloney 2025-02-26 13:15:45 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 2 Maxwell G 2025-06-11 01:48:33 UTC
Filed https://github.com/aboutcode-org/commoncode/issues/88. I'll disable the test downstream for now.


Note You need to log in before you can comment on or make changes to this bug.