Bug#863501: numba: RuntimeError: cannot cache function 'simple_usecase' [amd64, i386, arm64]

Daniel Stender debian at danielstender.com
Sat May 27 20:36:48 UTC 2017


Source: numba
Version: 0.33.0-1
Severity: serious

https://buildd.debian.org/status/fetch.php?pkg=numba&arch=i386&ver=0.33.0-1&stamp=1495914429&raw=0
https://buildd.debian.org/status/fetch.php?pkg=numba&arch=arm64&ver=0.33.0-1&stamp=1495916190&raw=0

This failure appeared in the tests:

<cut>
_____________________ TestCache.test_non_creatable_pycache _____________________

self = <numba.tests.test_dispatcher.TestCache testMethod=test_non_creatable_pycache>

    @unittest.skipIf(os.name == "nt",
                     "cannot easily make a directory read-only on Windows")
    def test_non_creatable_pycache(self):
        # Make it impossible to create the __pycache__ directory
        old_perms = os.stat(self.tempdir).st_mode
        os.chmod(self.tempdir, 0o500)
        self.addCleanup(os.chmod, self.tempdir, old_perms)
    
>       self._test_pycache_fallback()

numba/tests/test_dispatcher.py:954: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
numba/tests/test_dispatcher.py:926: in _test_pycache_fallback
    mod = self.import_module()
numba/tests/test_dispatcher.py:623: in import_module
    mod = import_dynamic(self.modname)
numba/tests/support.py:527: in import_dynamic
    __import__(modname)
/tmp/numba-tests.1000/test_cache-jXZpdc/dispatcher_caching_test_fodder.py:19: in <module>
    @jit(cache=True, nopython=True)
numba/decorators.py:175: in wrapper
    disp.enable_caching()
numba/dispatcher.py:490: in enable_caching
    self._cache = FunctionCache(self.py_func)
numba/caching.py:594: in __init__
    self._impl = self._impl_class(py_func)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <numba.caching.CompileResultCacheImpl object at 0x7feadcfd57d0>
py_func = <function simple_usecase at 0x7feadc384050>

    def __init__(self, py_func):
        self._is_closure = bool(py_func.__closure__)
        self._lineno = py_func.__code__.co_firstlineno
        # Get qualname
        try:
            qualname = py_func.__qualname__
        except AttributeError:
            qualname = py_func.__name__
        # Find a locator
        source_path = inspect.getfile(py_func)
        for cls in self._locator_classes:
            locator = cls.from_function(py_func, source_path)
            if locator is not None:
                break
        else:
            raise RuntimeError("cannot cache function %r: no locator available "
>                              "for file %r" % (qualname, source_path))
E           RuntimeError: cannot cache function 'simple_usecase': no locator available for file '/tmp/numba-tests.1000/test_cache-jXZpdc/dispatcher_caching_test_fodder.py'

numba/caching.py:330: RuntimeError
</cut>

-- 
4096R/DF5182C8
Debian Developer (stender at debian.org)
http://www.danielstender.com/



More information about the debian-science-maintainers mailing list