We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Reminder to remove the `numba.jitclass` shim
This is a reminder to remove the `numba.jitclass` shim for 0.5x, at the moment x=1. Perhaps x should be 2, so that users have a bit more time. xref schedule: http://numba.pydata.org/numba-doc/latest/reference/deprecation.html#id7

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `numba/experimental/jitclass/decorators.py`
Content:
```
1 import warnings
2 
3 from numba.core import types, config, errors
4 from numba.experimental.jitclass.base import register_class_type, ClassBuilder
5 
6 
7 def jitclass(spec):
8     """
9     A decorator for creating a jitclass.
10 
11     **arguments**:
12 
13     - spec:
14         Specifies the types of each field on this class.
15         Must be a dictionary or a sequence.
16         With a dictionary, use collections.OrderedDict for stable ordering.
17         With a sequence, it must contain 2-tuples of (fieldname, fieldtype).
18 
19     **returns**:
20 
21     A callable that takes a class object, which will be compiled.
22     """
23 
24     def wrap(cls):
25         if config.DISABLE_JIT:
26             return cls
27         else:
28             return register_class_type(cls, spec, types.ClassType, ClassBuilder)
29 
30     return wrap
31 
32 
33 def _warning_jitclass(spec):
34     """
35     Re-export of numba.experimental.jitclass with a warning.
36     To be used in numba/__init__.py.
37     This endpoint is deprecated.
38     """
39     url = ("https://numba.pydata.org/numba-doc/latest/reference/"
40            "deprecation.html#change-of-jitclass-location")
41 
42     msg = ("The 'numba.jitclass' decorator has moved to "
43            "'numba.experimental.jitclass' to better reflect the experimental "
44            "nature of the functionality. Please update your imports to "
45            "accommodate this change and see {} for the time frame.".format(url))
46 
47     warnings.warn(msg, category=errors.NumbaDeprecationWarning,
48                   stacklevel=2)
49 
50     return jitclass(spec)
51
```

Path: `numba/__init__.py`
Content:
```
1 """
2 Expose top-level symbols that are safe for import *
3 """
4 
5 import platform
6 import re
7 import sys
8 import warnings
9 
10 from ._version import get_versions
11 from numba.misc.init_utils import generate_version_info
12 
13 __version__ = get_versions()['version']
14 version_info = generate_version_info(__version__)
15 del get_versions
16 del generate_version_info
17 
18 
19 from numba.core import config
20 from numba.testing import _runtests as runtests
21 from numba.core import types, errors
22 
23 # Re-export typeof
24 from numba.misc.special import (
25     typeof, prange, pndindex, gdb, gdb_breakpoint, gdb_init,
26     literally, literal_unroll
27 )
28 
29 # Re-export error classes
30 from numba.core.errors import *
31 
32 # Re-export types itself
33 import numba.core.types as types
34 
35 # Re-export all type names
36 from numba.core.types import *
37 
38 # Re-export decorators
39 from numba.core.decorators import (cfunc, generated_jit, jit, njit, stencil,
40                                    jit_module)
41 
42 # Re-export vectorize decorators and the thread layer querying function
43 from numba.np.ufunc import (vectorize, guvectorize, threading_layer,
44                             get_num_threads, set_num_threads)
45 
46 # Re-export Numpy helpers
47 from numba.np.numpy_support import carray, farray, from_dtype
48 
49 # Re-export experimental
50 from numba import experimental
51 
52 # Re-export experimental.jitclass as jitclass, this is deprecated
53 from numba.experimental.jitclass.decorators import _warning_jitclass as jitclass
54 
55 # Initialize withcontexts
56 import numba.core.withcontexts
57 from numba.core.withcontexts import objmode_context as objmode
58 
59 # Keep this for backward compatibility.
60 test = runtests.main
61 
62 
63 __all__ = """
64     cfunc
65     from_dtype
66     guvectorize
67     jit
68     experimental
69     njit
70     stencil
71     jit_module
72     jitclass
73     typeof
74     prange
75     gdb
76     gdb_breakpoint
77     gdb_init
78     vectorize
79     objmode
80     literal_unroll
81     get_num_threads
82     set_num_threads
83     """.split() + types.__all__ + errors.__all__
84 
85 
86 _min_llvmlite_version = (0, 33, 0)
87 _min_llvm_version = (9, 0, 0)
88 
89 def _ensure_llvm():
90     """
91     Make sure llvmlite is operational.
92     """
93     import warnings
94     import llvmlite
95 
96     # Only look at the the major, minor and bugfix version numbers.
97     # Ignore other stuffs
98     regex = re.compile(r'(\d+)\.(\d+).(\d+)')
99     m = regex.match(llvmlite.__version__)
100     if m:
101         ver = tuple(map(int, m.groups()))
102         if ver < _min_llvmlite_version:
103             msg = ("Numba requires at least version %d.%d.%d of llvmlite.\n"
104                    "Installed version is %s.\n"
105                    "Please update llvmlite." %
106                    (_min_llvmlite_version + (llvmlite.__version__,)))
107             raise ImportError(msg)
108     else:
109         # Not matching?
110         warnings.warn("llvmlite version format not recognized!")
111 
112     from llvmlite.binding import llvm_version_info, check_jit_execution
113 
114     if llvm_version_info < _min_llvm_version:
115         msg = ("Numba requires at least version %d.%d.%d of LLVM.\n"
116                "Installed llvmlite is built against version %d.%d.%d.\n"
117                "Please update llvmlite." %
118                (_min_llvm_version + llvm_version_info))
119         raise ImportError(msg)
120 
121     check_jit_execution()
122 
123 def _ensure_critical_deps():
124     """
125     Make sure Python, NumPy and SciPy have supported versions.
126     """
127     from numba.np.numpy_support import numpy_version
128     from numba.core.utils import PYVERSION
129 
130     if PYVERSION < (3, 6):
131         raise ImportError("Numba needs Python 3.6 or greater")
132 
133     if numpy_version < (1, 15):
134         raise ImportError("Numba needs NumPy 1.15 or greater")
135 
136     try:
137         import scipy
138     except ImportError:
139         pass
140     else:
141         sp_version = tuple(map(int, scipy.__version__.split('.')[:2]))
142         if sp_version < (1, 0):
143             raise ImportError("Numba requires SciPy version 1.0 or greater")
144 
145 
146 def _try_enable_svml():
147     """
148     Tries to enable SVML if configuration permits use and the library is found.
149     """
150     if not config.DISABLE_INTEL_SVML:
151         try:
152             if sys.platform.startswith('linux'):
153                 llvmlite.binding.load_library_permanently("libsvml.so")
154             elif sys.platform.startswith('darwin'):
155                 llvmlite.binding.load_library_permanently("libsvml.dylib")
156             elif sys.platform.startswith('win'):
157                 llvmlite.binding.load_library_permanently("svml_dispmd")
158             else:
159                 return False
160             # The SVML library is loaded, therefore SVML *could* be supported.
161             # Now see if LLVM has been compiled with the SVML support patch.
162             # If llvmlite has the checking function `has_svml` and it returns
163             # True, then LLVM was compiled with SVML support and the the setup
164             # for SVML can proceed. We err on the side of caution and if the
165             # checking function is missing, regardless of that being fine for
166             # most 0.23.{0,1} llvmlite instances (i.e. conda or pip installed),
167             # we assume that SVML was not compiled in. llvmlite 0.23.2 is a
168             # bugfix release with the checking function present that will always
169             # produce correct behaviour. For context see: #3006.
170             try:
171                 if not getattr(llvmlite.binding.targets, "has_svml")():
172                     # has detection function, but no svml compiled in, therefore
173                     # disable SVML
174                     return False
175             except AttributeError:
176                 if platform.machine() == 'x86_64' and config.DEBUG:
177                     msg = ("SVML was found but llvmlite >= 0.23.2 is "
178                            "needed to support it.")
179                     warnings.warn(msg)
180                 # does not have detection function, cannot detect reliably,
181                 # disable SVML.
182                 return False
183 
184             # All is well, detection function present and reports SVML is
185             # compiled in, set the vector library to SVML.
186             llvmlite.binding.set_option('SVML', '-vector-library=SVML')
187             return True
188         except:
189             if platform.machine() == 'x86_64' and config.DEBUG:
190                 warnings.warn("SVML was not found/could not be loaded.")
191     return False
192 
193 _ensure_llvm()
194 _ensure_critical_deps()
195 
196 # we know llvmlite is working as the above tests passed, import it now as SVML
197 # needs to mutate runtime options (sets the `-vector-library`).
198 import llvmlite
199 
200 """
201 Is set to True if Intel SVML is in use.
202 """
203 config.USING_SVML = _try_enable_svml()
204 
205 
206 # ---------------------- WARNING WARNING WARNING ----------------------------
207 # The following imports occur below here (SVML init) because somewhere in their
208 # import sequence they have a `@njit` wrapped function. This triggers too early
209 # a bind to the underlying LLVM libraries which then irretrievably sets the LLVM
210 # SVML state to "no SVML". See https://github.com/numba/numba/issues/4689 for
211 # context.
212 # ---------------------- WARNING WARNING WARNING ----------------------------
213 
214 # Initialize typed containers
215 import numba.typed
216
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/numba/__init__.py b/numba/__init__.py
--- a/numba/__init__.py
+++ b/numba/__init__.py
@@ -49,9 +49,6 @@
 # Re-export experimental
 from numba import experimental
 
-# Re-export experimental.jitclass as jitclass, this is deprecated
-from numba.experimental.jitclass.decorators import _warning_jitclass as jitclass
-
 # Initialize withcontexts
 import numba.core.withcontexts
 from numba.core.withcontexts import objmode_context as objmode
diff --git a/numba/experimental/jitclass/decorators.py b/numba/experimental/jitclass/decorators.py
--- a/numba/experimental/jitclass/decorators.py
+++ b/numba/experimental/jitclass/decorators.py
@@ -1,6 +1,4 @@
-import warnings
-
-from numba.core import types, config, errors
+from numba.core import types, config
 from numba.experimental.jitclass.base import register_class_type, ClassBuilder
 
 
@@ -28,23 +26,3 @@
             return register_class_type(cls, spec, types.ClassType, ClassBuilder)
 
     return wrap
-
-
-def _warning_jitclass(spec):
-    """
-    Re-export of numba.experimental.jitclass with a warning.
-    To be used in numba/__init__.py.
-    This endpoint is deprecated.
-    """
-    url = ("https://numba.pydata.org/numba-doc/latest/reference/"
-           "deprecation.html#change-of-jitclass-location")
-
-    msg = ("The 'numba.jitclass' decorator has moved to "
-           "'numba.experimental.jitclass' to better reflect the experimental "
-           "nature of the functionality. Please update your imports to "
-           "accommodate this change and see {} for the time frame.".format(url))
-
-    warnings.warn(msg, category=errors.NumbaDeprecationWarning,
-                  stacklevel=2)
-
-    return jitclass(spec)

{"golden_diff": "diff --git a/numba/__init__.py b/numba/__init__.py\n--- a/numba/__init__.py\n+++ b/numba/__init__.py\n@@ -49,9 +49,6 @@\n # Re-export experimental\n from numba import experimental\n \n-# Re-export experimental.jitclass as jitclass, this is deprecated\n-from numba.experimental.jitclass.decorators import _warning_jitclass as jitclass\n-\n # Initialize withcontexts\n import numba.core.withcontexts\n from numba.core.withcontexts import objmode_context as objmode\ndiff --git a/numba/experimental/jitclass/decorators.py b/numba/experimental/jitclass/decorators.py\n--- a/numba/experimental/jitclass/decorators.py\n+++ b/numba/experimental/jitclass/decorators.py\n@@ -1,6 +1,4 @@\n-import warnings\n-\n-from numba.core import types, config, errors\n+from numba.core import types, config\n from numba.experimental.jitclass.base import register_class_type, ClassBuilder\n \n \n@@ -28,23 +26,3 @@\n             return register_class_type(cls, spec, types.ClassType, ClassBuilder)\n \n     return wrap\n-\n-\n-def _warning_jitclass(spec):\n-    \"\"\"\n-    Re-export of numba.experimental.jitclass with a warning.\n-    To be used in numba/__init__.py.\n-    This endpoint is deprecated.\n-    \"\"\"\n-    url = (\"https://numba.pydata.org/numba-doc/latest/reference/\"\n-           \"deprecation.html#change-of-jitclass-location\")\n-\n-    msg = (\"The 'numba.jitclass' decorator has moved to \"\n-           \"'numba.experimental.jitclass' to better reflect the experimental \"\n-           \"nature of the functionality. Please update your imports to \"\n-           \"accommodate this change and see {} for the time frame.\".format(url))\n-\n-    warnings.warn(msg, category=errors.NumbaDeprecationWarning,\n-                  stacklevel=2)\n-\n-    return jitclass(spec)\n", "issue": "Reminder to remove the `numba.jitclass` shim\nThis is a reminder to remove the `numba.jitclass` shim for 0.5x, at the moment x=1. Perhaps x should be 2, so that users have a bit more time. xref schedule: http://numba.pydata.org/numba-doc/latest/reference/deprecation.html#id7\n", "before_files": [{"content": "import warnings\n\nfrom numba.core import types, config, errors\nfrom numba.experimental.jitclass.base import register_class_type, ClassBuilder\n\n\ndef jitclass(spec):\n    \"\"\"\n    A decorator for creating a jitclass.\n\n    **arguments**:\n\n    - spec:\n        Specifies the types of each field on this class.\n        Must be a dictionary or a sequence.\n        With a dictionary, use collections.OrderedDict for stable ordering.\n        With a sequence, it must contain 2-tuples of (fieldname, fieldtype).\n\n    **returns**:\n\n    A callable that takes a class object, which will be compiled.\n    \"\"\"\n\n    def wrap(cls):\n        if config.DISABLE_JIT:\n            return cls\n        else:\n            return register_class_type(cls, spec, types.ClassType, ClassBuilder)\n\n    return wrap\n\n\ndef _warning_jitclass(spec):\n    \"\"\"\n    Re-export of numba.experimental.jitclass with a warning.\n    To be used in numba/__init__.py.\n    This endpoint is deprecated.\n    \"\"\"\n    url = (\"https://numba.pydata.org/numba-doc/latest/reference/\"\n           \"deprecation.html#change-of-jitclass-location\")\n\n    msg = (\"The 'numba.jitclass' decorator has moved to \"\n           \"'numba.experimental.jitclass' to better reflect the experimental \"\n           \"nature of the functionality. Please update your imports to \"\n           \"accommodate this change and see {} for the time frame.\".format(url))\n\n    warnings.warn(msg, category=errors.NumbaDeprecationWarning,\n                  stacklevel=2)\n\n    return jitclass(spec)\n", "path": "numba/experimental/jitclass/decorators.py"}, {"content": "\"\"\"\nExpose top-level symbols that are safe for import *\n\"\"\"\n\nimport platform\nimport re\nimport sys\nimport warnings\n\nfrom ._version import get_versions\nfrom numba.misc.init_utils import generate_version_info\n\n__version__ = get_versions()['version']\nversion_info = generate_version_info(__version__)\ndel get_versions\ndel generate_version_info\n\n\nfrom numba.core import config\nfrom numba.testing import _runtests as runtests\nfrom numba.core import types, errors\n\n# Re-export typeof\nfrom numba.misc.special import (\n    typeof, prange, pndindex, gdb, gdb_breakpoint, gdb_init,\n    literally, literal_unroll\n)\n\n# Re-export error classes\nfrom numba.core.errors import *\n\n# Re-export types itself\nimport numba.core.types as types\n\n# Re-export all type names\nfrom numba.core.types import *\n\n# Re-export decorators\nfrom numba.core.decorators import (cfunc, generated_jit, jit, njit, stencil,\n                                   jit_module)\n\n# Re-export vectorize decorators and the thread layer querying function\nfrom numba.np.ufunc import (vectorize, guvectorize, threading_layer,\n                            get_num_threads, set_num_threads)\n\n# Re-export Numpy helpers\nfrom numba.np.numpy_support import carray, farray, from_dtype\n\n# Re-export experimental\nfrom numba import experimental\n\n# Re-export experimental.jitclass as jitclass, this is deprecated\nfrom numba.experimental.jitclass.decorators import _warning_jitclass as jitclass\n\n# Initialize withcontexts\nimport numba.core.withcontexts\nfrom numba.core.withcontexts import objmode_context as objmode\n\n# Keep this for backward compatibility.\ntest = runtests.main\n\n\n__all__ = \"\"\"\n    cfunc\n    from_dtype\n    guvectorize\n    jit\n    experimental\n    njit\n    stencil\n    jit_module\n    jitclass\n    typeof\n    prange\n    gdb\n    gdb_breakpoint\n    gdb_init\n    vectorize\n    objmode\n    literal_unroll\n    get_num_threads\n    set_num_threads\n    \"\"\".split() + types.__all__ + errors.__all__\n\n\n_min_llvmlite_version = (0, 33, 0)\n_min_llvm_version = (9, 0, 0)\n\ndef _ensure_llvm():\n    \"\"\"\n    Make sure llvmlite is operational.\n    \"\"\"\n    import warnings\n    import llvmlite\n\n    # Only look at the the major, minor and bugfix version numbers.\n    # Ignore other stuffs\n    regex = re.compile(r'(\\d+)\\.(\\d+).(\\d+)')\n    m = regex.match(llvmlite.__version__)\n    if m:\n        ver = tuple(map(int, m.groups()))\n        if ver < _min_llvmlite_version:\n            msg = (\"Numba requires at least version %d.%d.%d of llvmlite.\\n\"\n                   \"Installed version is %s.\\n\"\n                   \"Please update llvmlite.\" %\n                   (_min_llvmlite_version + (llvmlite.__version__,)))\n            raise ImportError(msg)\n    else:\n        # Not matching?\n        warnings.warn(\"llvmlite version format not recognized!\")\n\n    from llvmlite.binding import llvm_version_info, check_jit_execution\n\n    if llvm_version_info < _min_llvm_version:\n        msg = (\"Numba requires at least version %d.%d.%d of LLVM.\\n\"\n               \"Installed llvmlite is built against version %d.%d.%d.\\n\"\n               \"Please update llvmlite.\" %\n               (_min_llvm_version + llvm_version_info))\n        raise ImportError(msg)\n\n    check_jit_execution()\n\ndef _ensure_critical_deps():\n    \"\"\"\n    Make sure Python, NumPy and SciPy have supported versions.\n    \"\"\"\n    from numba.np.numpy_support import numpy_version\n    from numba.core.utils import PYVERSION\n\n    if PYVERSION < (3, 6):\n        raise ImportError(\"Numba needs Python 3.6 or greater\")\n\n    if numpy_version < (1, 15):\n        raise ImportError(\"Numba needs NumPy 1.15 or greater\")\n\n    try:\n        import scipy\n    except ImportError:\n        pass\n    else:\n        sp_version = tuple(map(int, scipy.__version__.split('.')[:2]))\n        if sp_version < (1, 0):\n            raise ImportError(\"Numba requires SciPy version 1.0 or greater\")\n\n\ndef _try_enable_svml():\n    \"\"\"\n    Tries to enable SVML if configuration permits use and the library is found.\n    \"\"\"\n    if not config.DISABLE_INTEL_SVML:\n        try:\n            if sys.platform.startswith('linux'):\n                llvmlite.binding.load_library_permanently(\"libsvml.so\")\n            elif sys.platform.startswith('darwin'):\n                llvmlite.binding.load_library_permanently(\"libsvml.dylib\")\n            elif sys.platform.startswith('win'):\n                llvmlite.binding.load_library_permanently(\"svml_dispmd\")\n            else:\n                return False\n            # The SVML library is loaded, therefore SVML *could* be supported.\n            # Now see if LLVM has been compiled with the SVML support patch.\n            # If llvmlite has the checking function `has_svml` and it returns\n            # True, then LLVM was compiled with SVML support and the the setup\n            # for SVML can proceed. We err on the side of caution and if the\n            # checking function is missing, regardless of that being fine for\n            # most 0.23.{0,1} llvmlite instances (i.e. conda or pip installed),\n            # we assume that SVML was not compiled in. llvmlite 0.23.2 is a\n            # bugfix release with the checking function present that will always\n            # produce correct behaviour. For context see: #3006.\n            try:\n                if not getattr(llvmlite.binding.targets, \"has_svml\")():\n                    # has detection function, but no svml compiled in, therefore\n                    # disable SVML\n                    return False\n            except AttributeError:\n                if platform.machine() == 'x86_64' and config.DEBUG:\n                    msg = (\"SVML was found but llvmlite >= 0.23.2 is \"\n                           \"needed to support it.\")\n                    warnings.warn(msg)\n                # does not have detection function, cannot detect reliably,\n                # disable SVML.\n                return False\n\n            # All is well, detection function present and reports SVML is\n            # compiled in, set the vector library to SVML.\n            llvmlite.binding.set_option('SVML', '-vector-library=SVML')\n            return True\n        except:\n            if platform.machine() == 'x86_64' and config.DEBUG:\n                warnings.warn(\"SVML was not found/could not be loaded.\")\n    return False\n\n_ensure_llvm()\n_ensure_critical_deps()\n\n# we know llvmlite is working as the above tests passed, import it now as SVML\n# needs to mutate runtime options (sets the `-vector-library`).\nimport llvmlite\n\n\"\"\"\nIs set to True if Intel SVML is in use.\n\"\"\"\nconfig.USING_SVML = _try_enable_svml()\n\n\n# ---------------------- WARNING WARNING WARNING ----------------------------\n# The following imports occur below here (SVML init) because somewhere in their\n# import sequence they have a `@njit` wrapped function. This triggers too early\n# a bind to the underlying LLVM libraries which then irretrievably sets the LLVM\n# SVML state to \"no SVML\". See https://github.com/numba/numba/issues/4689 for\n# context.\n# ---------------------- WARNING WARNING WARNING ----------------------------\n\n# Initialize typed containers\nimport numba.typed\n", "path": "numba/__init__.py"}], "after_files": [{"content": "from numba.core import types, config\nfrom numba.experimental.jitclass.base import register_class_type, ClassBuilder\n\n\ndef jitclass(spec):\n    \"\"\"\n    A decorator for creating a jitclass.\n\n    **arguments**:\n\n    - spec:\n        Specifies the types of each field on this class.\n        Must be a dictionary or a sequence.\n        With a dictionary, use collections.OrderedDict for stable ordering.\n        With a sequence, it must contain 2-tuples of (fieldname, fieldtype).\n\n    **returns**:\n\n    A callable that takes a class object, which will be compiled.\n    \"\"\"\n\n    def wrap(cls):\n        if config.DISABLE_JIT:\n            return cls\n        else:\n            return register_class_type(cls, spec, types.ClassType, ClassBuilder)\n\n    return wrap\n", "path": "numba/experimental/jitclass/decorators.py"}, {"content": "\"\"\"\nExpose top-level symbols that are safe for import *\n\"\"\"\n\nimport platform\nimport re\nimport sys\nimport warnings\n\nfrom ._version import get_versions\nfrom numba.misc.init_utils import generate_version_info\n\n__version__ = get_versions()['version']\nversion_info = generate_version_info(__version__)\ndel get_versions\ndel generate_version_info\n\n\nfrom numba.core import config\nfrom numba.testing import _runtests as runtests\nfrom numba.core import types, errors\n\n# Re-export typeof\nfrom numba.misc.special import (\n    typeof, prange, pndindex, gdb, gdb_breakpoint, gdb_init,\n    literally, literal_unroll\n)\n\n# Re-export error classes\nfrom numba.core.errors import *\n\n# Re-export types itself\nimport numba.core.types as types\n\n# Re-export all type names\nfrom numba.core.types import *\n\n# Re-export decorators\nfrom numba.core.decorators import (cfunc, generated_jit, jit, njit, stencil,\n                                   jit_module)\n\n# Re-export vectorize decorators and the thread layer querying function\nfrom numba.np.ufunc import (vectorize, guvectorize, threading_layer,\n                            get_num_threads, set_num_threads)\n\n# Re-export Numpy helpers\nfrom numba.np.numpy_support import carray, farray, from_dtype\n\n# Re-export experimental\nfrom numba import experimental\n\n# Initialize withcontexts\nimport numba.core.withcontexts\nfrom numba.core.withcontexts import objmode_context as objmode\n\n# Keep this for backward compatibility.\ntest = runtests.main\n\n\n__all__ = \"\"\"\n    cfunc\n    from_dtype\n    guvectorize\n    jit\n    experimental\n    njit\n    stencil\n    jit_module\n    jitclass\n    typeof\n    prange\n    gdb\n    gdb_breakpoint\n    gdb_init\n    vectorize\n    objmode\n    literal_unroll\n    get_num_threads\n    set_num_threads\n    \"\"\".split() + types.__all__ + errors.__all__\n\n\n_min_llvmlite_version = (0, 33, 0)\n_min_llvm_version = (9, 0, 0)\n\ndef _ensure_llvm():\n    \"\"\"\n    Make sure llvmlite is operational.\n    \"\"\"\n    import warnings\n    import llvmlite\n\n    # Only look at the the major, minor and bugfix version numbers.\n    # Ignore other stuffs\n    regex = re.compile(r'(\\d+)\\.(\\d+).(\\d+)')\n    m = regex.match(llvmlite.__version__)\n    if m:\n        ver = tuple(map(int, m.groups()))\n        if ver < _min_llvmlite_version:\n            msg = (\"Numba requires at least version %d.%d.%d of llvmlite.\\n\"\n                   \"Installed version is %s.\\n\"\n                   \"Please update llvmlite.\" %\n                   (_min_llvmlite_version + (llvmlite.__version__,)))\n            raise ImportError(msg)\n    else:\n        # Not matching?\n        warnings.warn(\"llvmlite version format not recognized!\")\n\n    from llvmlite.binding import llvm_version_info, check_jit_execution\n\n    if llvm_version_info < _min_llvm_version:\n        msg = (\"Numba requires at least version %d.%d.%d of LLVM.\\n\"\n               \"Installed llvmlite is built against version %d.%d.%d.\\n\"\n               \"Please update llvmlite.\" %\n               (_min_llvm_version + llvm_version_info))\n        raise ImportError(msg)\n\n    check_jit_execution()\n\ndef _ensure_critical_deps():\n    \"\"\"\n    Make sure Python, NumPy and SciPy have supported versions.\n    \"\"\"\n    from numba.np.numpy_support import numpy_version\n    from numba.core.utils import PYVERSION\n\n    if PYVERSION < (3, 6):\n        raise ImportError(\"Numba needs Python 3.6 or greater\")\n\n    if numpy_version < (1, 15):\n        raise ImportError(\"Numba needs NumPy 1.15 or greater\")\n\n    try:\n        import scipy\n    except ImportError:\n        pass\n    else:\n        sp_version = tuple(map(int, scipy.__version__.split('.')[:2]))\n        if sp_version < (1, 0):\n            raise ImportError(\"Numba requires SciPy version 1.0 or greater\")\n\n\ndef _try_enable_svml():\n    \"\"\"\n    Tries to enable SVML if configuration permits use and the library is found.\n    \"\"\"\n    if not config.DISABLE_INTEL_SVML:\n        try:\n            if sys.platform.startswith('linux'):\n                llvmlite.binding.load_library_permanently(\"libsvml.so\")\n            elif sys.platform.startswith('darwin'):\n                llvmlite.binding.load_library_permanently(\"libsvml.dylib\")\n            elif sys.platform.startswith('win'):\n                llvmlite.binding.load_library_permanently(\"svml_dispmd\")\n            else:\n                return False\n            # The SVML library is loaded, therefore SVML *could* be supported.\n            # Now see if LLVM has been compiled with the SVML support patch.\n            # If llvmlite has the checking function `has_svml` and it returns\n            # True, then LLVM was compiled with SVML support and the the setup\n            # for SVML can proceed. We err on the side of caution and if the\n            # checking function is missing, regardless of that being fine for\n            # most 0.23.{0,1} llvmlite instances (i.e. conda or pip installed),\n            # we assume that SVML was not compiled in. llvmlite 0.23.2 is a\n            # bugfix release with the checking function present that will always\n            # produce correct behaviour. For context see: #3006.\n            try:\n                if not getattr(llvmlite.binding.targets, \"has_svml\")():\n                    # has detection function, but no svml compiled in, therefore\n                    # disable SVML\n                    return False\n            except AttributeError:\n                if platform.machine() == 'x86_64' and config.DEBUG:\n                    msg = (\"SVML was found but llvmlite >= 0.23.2 is \"\n                           \"needed to support it.\")\n                    warnings.warn(msg)\n                # does not have detection function, cannot detect reliably,\n                # disable SVML.\n                return False\n\n            # All is well, detection function present and reports SVML is\n            # compiled in, set the vector library to SVML.\n            llvmlite.binding.set_option('SVML', '-vector-library=SVML')\n            return True\n        except:\n            if platform.machine() == 'x86_64' and config.DEBUG:\n                warnings.warn(\"SVML was not found/could not be loaded.\")\n    return False\n\n_ensure_llvm()\n_ensure_critical_deps()\n\n# we know llvmlite is working as the above tests passed, import it now as SVML\n# needs to mutate runtime options (sets the `-vector-library`).\nimport llvmlite\n\n\"\"\"\nIs set to True if Intel SVML is in use.\n\"\"\"\nconfig.USING_SVML = _try_enable_svml()\n\n\n# ---------------------- WARNING WARNING WARNING ----------------------------\n# The following imports occur below here (SVML init) because somewhere in their\n# import sequence they have a `@njit` wrapped function. This triggers too early\n# a bind to the underlying LLVM libraries which then irretrievably sets the LLVM\n# SVML state to \"no SVML\". See https://github.com/numba/numba/issues/4689 for\n# context.\n# ---------------------- WARNING WARNING WARNING ----------------------------\n\n# Initialize typed containers\nimport numba.typed\n", "path": "numba/__init__.py"}]}