Bug 2328014 - dlib fails to build with Python 3.14: AttributeError: module 'pkgutil' has no attribute 'find_loader'
Summary: dlib fails to build with Python 3.14: AttributeError: module 'pkgutil' has no...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dlib
Version: 42
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Onuralp SEZER
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2024-11-22 11:20 UTC by Karolina Surma
Modified: 2025-03-28 15:05 UTC (History)
7 users (show)

Fixed In Version: dlib-19.24.8-3.fc42 dlib-19.24.8-3.fc40 dlib-19.24.8-3.fc41
Clone Of:
Environment:
Last Closed: 2025-03-24 01:32:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources dlib pull-request 17 0 None None None 2025-01-11 11:38:00 UTC

Description Karolina Surma 2024-11-22 11:20:05 UTC
dlib fails to build with Python 3.14.0a2.

==================================== ERRORS ====================================
___________ ERROR collecting tools/python/test/test_numpy_returns.py ___________
tools/python/test/test_numpy_returns.py:32: in <module>
    @pytest.mark.skipif(not utils.is_numpy_installed(), reason="requires numpy")
tools/python/test/utils.py:39: in is_numpy_installed
    if pkgutil.find_loader("numpy"):
E   AttributeError: module 'pkgutil' has no attribute 'find_loader'
=========================== short test summary info ============================
ERROR tools/python/test/test_numpy_returns.py - AttributeError: module 'pkgut...
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 1.15s ===============================

According to https://docs.python.org/dev/whatsnew/3.14.html#pkgutil
Remove deprecated pkgutil.get_loader() and pkgutil.find_loader(). These had previously raised a DeprecationWarning since Python 3.12. (Contributed by Bénédikt Tran in gh-97850.)

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

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

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 Sandro 2025-01-11 11:38:00 UTC
The fix for the deprecated `pkgutil.find_loader()` is trivial. However, the package currently fails to build on Koji aarch64 builders. In Copr the package appears to be building just fine. I've got no idea how to troubleshoot that issue.

Comment 2 Ben Beasley 2025-01-11 12:17:06 UTC
(In reply to Sandro from comment #1)
> The fix for the deprecated `pkgutil.find_loader()` is trivial. However, the
> package currently fails to build on Koji aarch64 builders. In Copr the
> package appears to be building just fine. I've got no idea how to
> troubleshoot that issue.

I filed bug 2337089 to track this. I can also reproduce the crash in qemu-user-static emulation, but as I noted in the bug, I can’t seem to run dtest under gdb in emulation.

Comment 3 Aoife Moloney 2025-02-26 13:17:53 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 4 Fedora Update System 2025-03-19 09:38:36 UTC
FEDORA-2025-118d5710f8 (dlib-19.24.8-3.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-118d5710f8

Comment 5 Fedora Update System 2025-03-19 09:38:37 UTC
FEDORA-2025-3ac216fc54 (dlib-19.24.8-3.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-3ac216fc54

Comment 6 Fedora Update System 2025-03-19 09:38:37 UTC
FEDORA-2025-f045e7d0ee (dlib-19.24.8-3.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-f045e7d0ee

Comment 7 Fedora Update System 2025-03-20 06:12:34 UTC
FEDORA-2025-f045e7d0ee has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-f045e7d0ee`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-f045e7d0ee

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2025-03-20 06:31:39 UTC
FEDORA-2025-118d5710f8 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-118d5710f8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-118d5710f8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2025-03-20 06:50:15 UTC
FEDORA-2025-3ac216fc54 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-3ac216fc54`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-3ac216fc54

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2025-03-24 01:32:43 UTC
FEDORA-2025-f045e7d0ee (dlib-19.24.8-3.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2025-03-28 14:48:27 UTC
FEDORA-2025-3ac216fc54 (dlib-19.24.8-3.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2025-03-28 15:05:08 UTC
FEDORA-2025-118d5710f8 (dlib-19.24.8-3.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


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