Bug 2481411 - python-huggingface-hub fails to build with Python 3.15: ImportError: cannot import name '_MISSING_TYPE' from 'dataclasses' (/usr/lib64/python3.15/dataclasses.py)
Summary: python-huggingface-hub fails to build with Python 3.15: ImportError: cannot i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-huggingface-hub
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact:
URL:
Whiteboard:
: 2485876 (view as bug list)
Depends On:
Blocks: PYTHON3.15 F45FTBFS, RAWHIDEFTBFS F45FailsToInstall, RAWHIDEFailsToInstall 2460068 2485843 2485889 2485890 2485970
TreeView+ depends on / blocked
 
Reported: 2026-05-26 09:42 UTC by Karolina Surma
Modified: 2026-06-08 10:04 UTC (History)
5 users (show)

Fixed In Version: python-huggingface-hub-1.16.1-3.fc45
Clone Of:
Environment:
Last Closed: 2026-06-08 10:04:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2026-05-26 09:42:27 UTC
python-huggingface-hub fails to build with Python 3.15.0b1.

Check import: huggingface_hub.dataclasses
Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/import_all_modules.py", line 106, in import_modules
    importlib.import_module(module)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/usr/lib64/python3.15/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1346, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1305, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 915, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 747, in exec_module
  File "<frozen importlib._bootstrap>", line 549, in _call_with_frames_removed
  File "/builddir/build/BUILD/python-huggingface-hub-1.16.1-build/BUILDROOT/usr/lib/python3.15/site-packages/huggingface_hub/dataclasses.py", line 5, in <module>
    from dataclasses import _MISSING_TYPE, MISSING, Field, field, fields, make_dataclass
ImportError: cannot import name '_MISSING_TYPE' from 'dataclasses' (/usr/lib64/python3.15/dataclasses.py)

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-b1/fedora-rawhide-x86_64/10503739-python-huggingface-hub/

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

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-b1/

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.

Comment 1 Karolina Surma 2026-06-06 18:22:55 UTC
*** Bug 2485876 has been marked as a duplicate of this bug. ***

Comment 2 Fedora Update System 2026-06-08 09:59:24 UTC
FEDORA-2026-a02218e64b (python-huggingface-hub-1.16.1-3.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-a02218e64b

Comment 3 Fedora Update System 2026-06-08 10:04:13 UTC
FEDORA-2026-a02218e64b (python-huggingface-hub-1.16.1-3.fc45) has been pushed to the Fedora 45 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.