Bug 2339519 - python-joblib fails to build with Python 3.14: TypeError: Hasher._batch_setitems() takes 2 positional arguments but 3 were given
Summary: python-joblib fails to build with Python 3.14: TypeError: Hasher._batch_setit...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-joblib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sergio Pascual
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2025-01-22 15:49 UTC by Karolina Surma
Modified: 2025-05-29 10:22 UTC (History)
7 users (show)

Fixed In Version: python-joblib-1.4.2-6.fc43
Clone Of:
Environment:
Last Closed: 2025-05-29 10:22:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources python-joblib pull-request 6 0 None None None 2025-03-11 10:41:27 UTC
Github joblib joblib issues 1658 0 None open Python 3.14.0a5: `TypeError: Hasher._batch_setitems() takes 2 positional arguments but 3 were given` in 375 tests 2025-02-19 15:18:21 UTC

Description Karolina Surma 2025-01-22 15:49:00 UTC
python-joblib fails to build with Python 3.14.0a4.

An example test failure:
_________________ TestMemorizedFunc.test_call_method_memorized _________________

self = <joblib.test.test_memory.TestMemorizedFunc object at 0x7f9eff52b610>
memory = Memory(location=/tmp/pytest-of-mockbuild/pytest-0/test_call_method_memorized0)

    def test_call_method_memorized(self, memory):
        "Test calling the function"
    
        f = memory.cache(self.f, ignore=['counter'])
    
        counter = {}
>       assert f(2, counter) == 1

joblib/test/test_memory.py:1504: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
joblib/memory.py:577: in __call__
    return self._cached_call(args, kwargs, shelving=False)[0]
joblib/memory.py:483: in _cached_call
    args_id = self._get_args_id(*args, **kwargs)
joblib/memory.py:616: in _get_args_id
    return hashing.hash(filter_args(self.func, self.ignore, args, kwargs),
joblib/hashing.py:265: in hash
    return hasher.hash(obj)
joblib/hashing.py:63: in hash
    self.dump(obj)
/usr/lib64/python3.14/pickle.py:498: in dump
    self.save(obj)
joblib/hashing.py:241: in save
    Hasher.save(self, obj)
joblib/hashing.py:89: in save
    Pickler.save(self, obj)
/usr/lib64/python3.14/pickle.py:572: in save
    f(self, obj)  # Call unbound method with explicit self
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <joblib.hashing.NumpyHasher object at 0x7f9efc5029c0>, obj = {'x': 2}

    def save_dict(self, obj):
        if self.bin:
            self.write(EMPTY_DICT)
        else:   # proto 0 -- can't use EMPTY_DICT
            self.write(MARK + DICT)
    
        self.memoize(obj)
>       self._batch_setitems(obj.items(), obj)
E       TypeError: Hasher._batch_setitems() takes 2 positional arguments but 3 were given

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

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

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

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 Aoife Moloney 2025-02-26 13:25:23 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.


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