Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1927646 - python-joblib fails to build with Python 3.10: NameError: name 'open' is not defined
Summary: python-joblib fails to build with Python 3.10: NameError: name 'open' is not ...
Alias: None
Product: Fedora
Classification: Fedora
Component: python-joblib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Sergio Pascual
QA Contact: Fedora Extras Quality Assurance
: 1969007 (view as bug list)
Depends On: 1959006
Blocks: PYTHON3.10 F35FTBFS, RAWHIDEFTBFS F35FailsToInstall, RAWHIDEFailsToInstall 1968939 1968991 1969024 1969127
TreeView+ depends on / blocked
Reported: 2021-02-11 08:59 UTC by Tomáš Hrnčiar
Modified: 2021-06-17 07:59 UTC (History)
5 users (show)

Fixed In Version: python-joblib-1.0.1-5.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-06-17 07:59:02 UTC
Type: Bug

Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-02-11 08:59:56 UTC
python-joblib fails to build with Python 3.10.0a5.

=================================== FAILURES ===================================
_______________________________ test_direct_mmap _______________________________
Traceback (most recent call last):
  File "/builddir/build/BUILD/joblib-1.0.1/joblib/externals/loky/", line 431, in _process_worker
    r = call_item()
  File "/builddir/build/BUILD/joblib-1.0.1/joblib/externals/loky/", line 285, in __call__
    return self.fn(*self.args, **self.kwargs)
  File "/builddir/build/BUILD/joblib-1.0.1/joblib/", line 595, in __call__
    return self.func(*args, **kwargs)
  File "/builddir/build/BUILD/joblib-1.0.1/joblib/", line 262, in __call__
    return [func(*args, **kwargs)
  File "/builddir/build/BUILD/joblib-1.0.1/joblib/", line 262, in <listcomp>
    return [func(*args, **kwargs)
  File "/builddir/build/BUILD/joblib-1.0.1/joblib/test/", line 1314, in worker
  File "/builddir/build/BUILD/joblib-1.0.1/joblib/test/", line 1142, in _read_array
    mm = mmap.mmap(fd.fileno(), 0, access=mmap.ACCESS_READ, offset=0)
NameError: name 'open' is not defined

The above exception was the direct cause of the following exception:

tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_direct_mmap0')

    def test_direct_mmap(tmpdir):
        testfile = str(tmpdir.join('arr.dat'))
        a = np.arange(10, dtype='uint8')
        def _read_array():
            with open(testfile) as fd:
                mm = mmap.mmap(fd.fileno(), 0, access=mmap.ACCESS_READ, offset=0)
            return np.ndarray((10,), dtype=np.uint8, buffer=mm, offset=0)
        def func(x):
            return x**2
        arr = _read_array()
        # this is expected to work and gives the reference
        ref = Parallel(n_jobs=2)(delayed(func)(x) for x in [a])
        # now test that it work with the mmap array
        results = Parallel(n_jobs=2)(delayed(func)(x) for x in [arr])
        np.testing.assert_array_equal(results, ref)
        # also test with a mmap array read in the subprocess
        def worker():
            return _read_array()
>       results = Parallel(n_jobs=2)(delayed(worker)() for _ in range(1))

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
joblib/ in __call__
joblib/ in retrieve
joblib/ in wrap_future_result
    return future.result(timeout=timeout)
/usr/lib64/python3.10/concurrent/futures/ in result
    return self.__get_result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Future at 0x7f489963b5e0 state=finished raised NameError>

    def __get_result(self):
        if self._exception:
>           raise self._exception
E           NameError: name 'open' is not defined

For the build logs, see:

For all our attempts to build python-joblib with Python 3.10, see:

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.10:

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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 Miro Hrončok 2021-06-04 20:15:00 UTC
This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla.

The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide.

You can either build the package in the side tag, with:

    $ fedpkg build --target=f35-python

Or you can the build and we will eventually build it for you.

Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away.


See also

If you have general questions about the rebuild, please use this mailing list thread:

Comment 2 Miro Hrončok 2021-06-07 22:59:31 UTC
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.

Comment 3 Miro Hrončok 2021-06-08 11:26:21 UTC
*** Bug 1969007 has been marked as a duplicate of this bug. ***

Comment 4 Zbigniew Jędrzejewski-Szmek 2021-06-17 07:59:02 UTC
Built in rawhide.

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