numba / llvmlite

A lightweight LLVM python binding for writing JIT compilers
https://llvmlite.pydata.org/
BSD 2-Clause "Simplified" License
1.94k stars 322 forks source link

Replace importlib-resources legacy API use #906

Closed sklam closed 1 year ago

sklam commented 1 year ago

Suppress deprecation warnings due to use of legacy API in importlib-resources

The replacement implementation follows advice from https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy and adapts code from https://github.com/python/importlib_resources/blob/66ea2dc7eb12b1be2322b7ad002cefb12d364dff/importlib_resources/_legacy.py#L72-L84.

The DeprecationWarning was first noticed in numba test numba.tests.test_import.TestNumbaImport.test_no_accidental_warnings