Bug 2466673 - python-einops fails to build with Python 3.15: Import check einops.layers.torch: TypeError: Signature mismatch between <built-in function pack> and <function pack at 0x7fad3a117270>: (format, /, *values) != (fmt: 'bytes | str', /, *v: 'Any') -> 'bytes'
Summary: python-einops fails to build with Python 3.15: Import check einops.layers.tor...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: python-einops
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom.Rix
QA Contact:
URL:
Whiteboard:
: 2485852 (view as bug list)
Depends On:
Blocks: PYTHON3.15 F45FTBFS F45FailsToInstall
TreeView+ depends on / blocked
 
Reported: 2026-05-05 09:13 UTC by Karolina Surma
Modified: 2026-06-26 14:07 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2026-06-26 14:07:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2026-05-05 09:13:27 UTC
python-einops fails to build with Python 3.15.0a8.

Import check fails with Python 3.15:

Check import: einops.layers.torch
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 1317, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1282, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1247, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 857, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 747, in exec_module
  File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed
  File "/builddir/build/BUILD/python-einops-0.8.1-build/BUILDROOT/usr/lib/python3.15/site-packages/einops/layers/torch.py", line 7, in <module>
    from .._torch_specific import apply_for_scriptable_torch
  File "/builddir/build/BUILD/python-einops-0.8.1-build/BUILDROOT/usr/lib/python3.15/site-packages/einops/_torch_specific.py", line 128, in <module>
    allow_ops_in_compiled_graph()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/builddir/build/BUILD/python-einops-0.8.1-build/BUILDROOT/usr/lib/python3.15/site-packages/einops/_torch_specific.py", line 107, in allow_ops_in_compiled_graph
    from torch._dynamo import allow_in_graph
  File "/usr/lib64/python3.15/site-packages/torch/_dynamo/__init__.py", line 76, in <module>
    from .polyfills import loader as _  # usort: skip # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.15/site-packages/torch/_dynamo/polyfills/loader.py", line 34, in <module>
    POLYFILLED_MODULES: tuple["ModuleType", ...] = tuple(
                                                   ^^^^^
  File "/usr/lib64/python3.15/site-packages/torch/_dynamo/polyfills/loader.py", line 35, in <genexpr>
    importlib.import_module(f".{submodule}", package=polyfills.__name__)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.15/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.15/site-packages/torch/_dynamo/polyfills/struct.py", line 20, in <module>
    @substitute_in_graph(struct.pack, can_constant_fold_through=True)  # type: ignore[arg-type]
     ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.15/site-packages/torch/_dynamo/decorators.py", line 760, in wrapper
    raise TypeError(
    ...<2 lines>...
    )
TypeError: Signature mismatch between <built-in function pack> and <function pack at 0x7fad3a117270>: (format, /, *values) != (fmt: 'bytes | str', /, *v: 'Any') -> 'bytes'

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/10398238-python-einops/

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

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.

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

Comment 2 Fedora Fails To Install 2026-06-14 08:31:48 UTC
Hello,

Please note that this comment was generated automatically by https://forge.fedoraproject.org/releng/tooling/src/branch/main/release-process/bug-filing/follow-policy/follow_policy.py
If you feel that this output has mistakes, please open an issue at https://forge.fedoraproject.org/releng/tickets/issues

This package fails to install and maintainers are advised to take one of the following actions:

 - Fix this bug and close this bugzilla once the update makes it to the repository.
   (The same script that posted this comment will eventually close this bugzilla
   when the fixed package reaches the repository, so you don't have to worry about it.)

or

 - Move this bug to ASSIGNED if you plan on fixing this, but simply haven't done so yet.

or

 - Orphan the package if you no longer plan to maintain it.


If you do not take one of these actions, the process at https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs will continue.
This package may be orphaned in 7+ weeks.
This is the first reminder (step 3) from the policy.

Don't hesitate to ask for help on https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ if you are unsure how to fix this bug.

Comment 3 Fedora Fails To Install 2026-06-26 14:07:23 UTC
Hello,

Please note that this comment was generated automatically by https://forge.fedoraproject.org/releng/tooling/src/branch/main/release-process/bug-filing/follow-policy/follow_policy.py
If you feel that this output has mistakes, please open an issue at https://forge.fedoraproject.org/releng/tickets/issues

All subpackages of a package against which this bug was filled are now installable or removed from Fedora 45.

Thanks for taking care of it!


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