Bug 2440564 - python-pyproject-hooks fails to build with Python 3.15: DeprecationWarning: os.path.commonprefix() is deprecated. Use os.path.commonpath() for longest path prefix.
Summary: python-pyproject-hooks fails to build with Python 3.15: DeprecationWarning: o...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pyproject-hooks
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lumír Balhar
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.15
TreeView+ depends on / blocked
 
Reported: 2026-02-18 11:25 UTC by Karolina Surma
Modified: 2026-03-09 12:08 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2026-03-09 12:08:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2026-02-18 11:25:11 UTC
python-pyproject-hooks fails to build with Python 3.15.0a6.

____________ test_intree_backend_importlib_metadata_interoperation _____________

    def test_intree_backend_importlib_metadata_interoperation():
        pytest.importorskip("importlib.metadata")
    
>       hooks = get_hooks("pkg_intree_metadata", backend="intree_backend")
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_inplace_hooks.py:95: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_inplace_hooks.py:26: in get_hooks
    return BuildBackendHookCaller(source_dir, backend, path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../BUILDROOT/usr/lib/python3.15/site-packages/pyproject_hooks/_impl.py:151: in __init__
    backend_path = [norm_and_check(self.source_dir, p) for p in backend_path]
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../BUILDROOT/usr/lib/python3.15/site-packages/pyproject_hooks/_impl.py:120: in norm_and_check
    if os.path.commonprefix([norm_source, norm_requested]) != norm_source:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

m = ['/builddir/build/BUILD/python-pyproject-hooks-1.2.0-build/pyproject_hooks-1.2.0/tests/samples/pkg_intree_metadata', '/builddir/build/BUILD/python-pyproject-hooks-1.2.0-build/pyproject_hooks-1.2.0/tests/samples/pkg_intree_metadata/backend']

>   ???
E   DeprecationWarning: os.path.commonprefix() is deprecated. Use os.path.commonpath() for longest path prefix.

<frozen genericpath>:109: DeprecationWarning
=========================== short test summary info ============================
FAILED tests/test_inplace_hooks.py::test_backend_path_within_tree[backend_path0]
FAILED tests/test_inplace_hooks.py::test_backend_path_within_tree[backend_path1]
FAILED tests/test_inplace_hooks.py::test_intree_backend[pkg_intree] - Depreca...
FAILED tests/test_inplace_hooks.py::test_intree_backend[pkg_nested_intree] - ...
FAILED tests/test_inplace_hooks.py::test_intree_backend_not_in_path[buildsys]
FAILED tests/test_inplace_hooks.py::test_intree_backend_not_in_path[nested.buildsys]
FAILED tests/test_inplace_hooks.py::test_intree_backend_loaded_from_correct_backend_path
FAILED tests/test_inplace_hooks.py::test_intree_backend_importlib_metadata_interoperation

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10144772-python-pyproject-hooks/

For all our attempts to build python-pyproject-hooks with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/python-pyproject-hooks/

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

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
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.


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