Bug 2246279 - python-xattr fails to build in Copr: xattr/lib.py:35: OSError: [Errno 95] Operation not supported
Summary: python-xattr fails to build in Copr: xattr/lib.py:35: OSError: [Errno 95] Ope...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-xattr
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Otto Liljalaakso
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2023-10-26 07:21 UTC by Karolina Surma
Modified: 2023-10-27 06:36 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-10-27 06:36:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2023-10-26 07:21:25 UTC
python-xattr fails to build with Python 3.13.0a1.

This report is automated and not very verbose, but we'll try to get back here with details.

______________________ TestFileWithSurrogates.test_update ______________________

self = <xattr.tests.test_xattr.TestFileWithSurrogates testMethod=test_update>

    def test_update(self):
        x = xattr.xattr(self.tempfile)
        attrs = {
            'user.test.key1': b'test_value1',
            'user.test.key2': b'test_value2'
        }
>       x.update(attrs)

xattr/tests/test_xattr.py:37: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
xattr/__init__.py:143: in update
    self[k] = v
xattr/__init__.py:112: in __setitem__
    self.set(item, value)
xattr/__init__.py:78: in set
    return self._call(_setxattr, _fsetxattr, name, value, 0, options | self.options)
xattr/__init__.py:58: in _call
    return fd_func(self.value, *args)
xattr/lib.py:93: in _fsetxattr
    raise error()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

path = None

    def error(path=None):
        errno = ffi.errno
        strerror = os.strerror(ffi.errno)
        if path:
            raise IOError(errno, strerror, path)
        else:
>           raise IOError(errno, strerror)
E           OSError: [Errno 95] Operation not supported

xattr/lib.py:35: OSError
=========================== short test summary info ============================
FAILED xattr/tests/test_xattr.py::TestFile::test_attr_fs_encoding_ascii - OSE...
FAILED xattr/tests/test_xattr.py::TestFile::test_attr_fs_encoding_unicode - O...
FAILED xattr/tests/test_xattr.py::TestFile::test_update - OSError: [Errno 95]...
FAILED xattr/tests/test_xattr.py::TestDir::test_attr_fs_encoding_ascii - OSEr...
FAILED xattr/tests/test_xattr.py::TestDir::test_attr_fs_encoding_unicode - OS...
FAILED xattr/tests/test_xattr.py::TestDir::test_update - OSError: [Errno 95] ...
FAILED xattr/tests/test_xattr.py::TestFileWithSurrogates::test_attr_fs_encoding_ascii
FAILED xattr/tests/test_xattr.py::TestFileWithSurrogates::test_attr_fs_encoding_unicode
FAILED xattr/tests/test_xattr.py::TestFileWithSurrogates::test_update - OSErr...
==================== 9 failed, 3 passed, 6 skipped in 0.57s ====================

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06560852-python-xattr/

For all our attempts to build python-xattr with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-xattr/

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.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
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 Miro Hrončok 2023-10-26 09:44:05 UTC
"OSError: [Errno 95] Operation not supported" is not a problem with Python 3.13. It is a problem with all Copr builds of this package.

See https://src.fedoraproject.org/rpms/pyxattr/c/918e8e4b6389ca12303c357c0aa538853de57303?branch=rawhide for an inspiration that could be used to work around that.

In the meantime, a test-less copr build can be done to unblock the single dependent package.

Comment 2 Otto Liljalaakso 2023-10-26 18:38:38 UTC
Thank you, the proposed fix works.

Comment 3 Otto Liljalaakso 2023-10-27 06:36:15 UTC
The fix went stable yesterday:
https://bodhi.fedoraproject.org/updates/FEDORA-2023-0ced337e46

(Grumbling about how [skip changelog] also skips automatic Bugzilla updates.)


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