o
    ih                     @   s   d Z ddlmZmZ ddlZddlZddlZddlZddlZddl	Z	ddl
mZ ddlZddlZddlZddlZddlZddlZddlmZ ddlZddlmZ ddlZddlmZ ddlmZ dd	lmZ dd
lmZ ddl m!Z!m"Z" ddl#m$Z$ dd Z%G dd dedZ&G dd de&Z'G dd dedZ(G dd de)Z*G dd de*e(Z+G dd de*e(Z,G dd de,Z-G dd de*e(Z.G d d! d!e(Z/G d"d# d#e*e(Z0G d$d% d%edZ1G d&d' d'e1Z2G d(d) d)e1Z3G d*d+ d+e)Z4G d,d- d-e&Z5G d.d/ d/e5Z6e7d0gZ8d1d2 Z9dS )3z+
Caching mechanism for compiled functions.
    )ABCMetaabstractmethodN)floor)AppDirs)Path)NumbaWarning)BaseContext)CodeLibrary)CompileResult)configcompilerdumpsc                 G   s   t jr| | } t|  d S d S N)r   DEBUG_CACHEprint)msgargs r   P/home/ubuntu/transcripts/venv/lib/python3.10/site-packages/numba/core/caching.py
_cache_log"   s   r   c                   @   sX   e Zd Zeedd Zedd Zedd Zedd Zed	d
 Z	edd Z
dS )_Cachec                 C      dS )zW
        The base filesystem path of this cache (for example its root folder).
        Nr   selfr   r   r   
cache_path*       z_Cache.cache_pathc                 C   r   )z
        Load an overload for the given signature using the target context.
        The saved object must be returned if successful, None if not found
        in the cache.
        Nr   r   sigtarget_contextr   r   r   load_overload1   r   z_Cache.load_overloadc                 C   r   )z<
        Save the overload for the given signature.
        Nr   r   r   datar   r   r   save_overload9   r   z_Cache.save_overloadc                 C   r   )z#
        Enable the cache.
        Nr   r   r   r   r   enable?   r   z_Cache.enablec                 C   r   )z$
        Disable the cache.
        Nr   r   r   r   r   disableE   r   z_Cache.disablec                 C   r   )z"
        Flush the cache.
        Nr   r   r   r   r   flushK   r   z_Cache.flushN)__name__
__module____qualname__propertyr   r   r    r#   r$   r%   r&   r   r   r   r   r   (   s    



r   )	metaclassc                   @   s@   e Zd Zedd Zdd Zdd Zdd Zd	d
 Zdd Z	dS )	NullCachec                 C      d S r   r   r   r   r   r   r   S   s   zNullCache.cache_pathc                 C   r-   r   r   r   r   r   r   r    W      zNullCache.load_overloadc                 C   r-   r   r   )r   r   cresr   r   r   r#   Z   r.   zNullCache.save_overloadc                 C   r-   r   r   r   r   r   r   r$   ]   r.   zNullCache.enablec                 C   r-   r   r   r   r   r   r   r%   `   r.   zNullCache.disablec                 C   r-   r   r   r   r   r   r   r&   c   r.   zNullCache.flushN)
r'   r(   r)   r*   r   r    r#   r$   r%   r&   r   r   r   r   r,   R   s    
r,   c                   @   sT   e Zd ZdZdd Zedd Zedd Zedd	 Ze	d
d Z
e	dd ZdS )_CacheLocatorz<
    A filesystem locator for caching a given function.
    c                 C   s*   |   }tj|dd tj|d  d S )NT)exist_ok)dir)get_cache_pathosmakedirstempfileTemporaryFileclose)r   pathr   r   r   ensure_cache_pathl   s   z_CacheLocator.ensure_cache_pathc                 C   r   )zA
        Return the directory the function is cached in.
        Nr   r   r   r   r   r3   r   r   z_CacheLocator.get_cache_pathc                 C   r   )z{
        Get a timestamp representing the source code's freshness.
        Can return any picklable Python object.
        Nr   r   r   r   r   get_source_stampx   r   z_CacheLocator.get_source_stampc                 C   r   )z
        Get a string disambiguator for this locator's function.
        It should allow disambiguating different but similarly-named functions.
        Nr   r   r   r   r   get_disambiguator   r   z_CacheLocator.get_disambiguatorc                 C   s   t )ze
        Create a locator instance for the given function located in the
        given file.
        )NotImplementedErrorclspy_funcpy_filer   r   r   from_function   s   z_CacheLocator.from_functionc                 C   sH   t j|}t j|}t j|d }t|  }d	||gS )zGiven the Python file path, compute a suitable path inside the
        cache directory.

        This will reduce a file path that is too long, which can be a problem
        on some operating system (i.e. Windows 7).
        _)
r4   r9   abspathdirnamesplithashlibsha1encode	hexdigestjoin)r?   rA   r9   subpath	parentdirhashedr   r   r   get_suitable_cache_subpath   s
   z(_CacheLocator.get_suitable_cache_subpathN)r'   r(   r)   __doc__r:   r   r3   r;   r<   classmethodrB   rP   r   r   r   r   r0   g   s    



r0   c                   @   ,   e Zd ZdZdd Zdd Zedd ZdS )	_SourceFileBackedLocatorMixinzf
    A cache locator mixin for functions which are backed by a well-known
    Python source file.
    c                 C   s2   t tddrttj}nt| j}|j|jfS NfrozenF)getattrsysr4   stat
executable_py_filest_mtimest_sizer   str   r   r   r;      s   z._SourceFileBackedLocatorMixin.get_source_stampc                 C   s
   t | jS r   )str_linenor   r   r   r   r<         
z/_SourceFileBackedLocatorMixin.get_disambiguatorc                 C   s>   t j|sd S | ||}z|  W |S  ty   Y d S w r   )r4   r9   existsr:   OSErrorr?   r@   rA   r   r   r   r   rB      s   

z+_SourceFileBackedLocatorMixin.from_functionN)r'   r(   r)   rQ   r;   r<   rR   rB   r   r   r   r   rT      s    	rT   c                       s4   e Zd ZdZdd Zdd Ze fddZ  ZS )UserProvidedCacheLocatorzd
    A locator that always point to the user provided directory in
    `numba.config.CACHE_DIR`
    c                 C   s0   || _ |jj| _| |}tjtj	|| _
d S r   )r[   __code__co_firstlinenora   rP   r4   r9   rL   r   	CACHE_DIR_cache_path)r   r@   rA   cache_subpathr   r   r   __init__   s   

z!UserProvidedCacheLocator.__init__c                 C      | j S r   rj   r   r   r   r   r3         z'UserProvidedCacheLocator.get_cache_pathc                    s    t jsd S tt| }|||S r   )r   ri   superrf   rB   )r?   r@   rA   parent	__class__r   r   rB      s   
z&UserProvidedCacheLocator.from_function)	r'   r(   r)   rQ   rl   r3   rR   rB   __classcell__r   r   rr   r   rf      s    rf   c                   @   s    e Zd ZdZdd Zdd ZdS )InTreeCacheLocatorzn
    A locator for functions backed by a regular Python module with a
    writable __pycache__ directory.
    c                 C   s.   || _ |jj| _tjtj| j d| _d S )N__pycache__)	r[   rg   rh   ra   r4   r9   rL   rF   rj   )r   r@   rA   r   r   r   rl      s   
zInTreeCacheLocator.__init__c                 C   rm   r   rn   r   r   r   r   r3      ro   z!InTreeCacheLocator.get_cache_pathN)r'   r(   r)   rQ   rl   r3   r   r   r   r   ru      s    ru   c                       s    e Zd ZdZ fddZ  ZS )InTreeCacheLocatorFsAgnosticz
    A locator for functions backed by a regular Python module with a
    writable __pycache__ directory. This version is agnostic to filesystem differences,
    e.g. timestamp precision with milliseconds.
    c                    s   t   }t|d |d fS )Nr      )rp   r;   r   r^   rr   r   r   r;      s   
z-InTreeCacheLocatorFsAgnostic.get_source_stamp)r'   r(   r)   rQ   r;   rt   r   r   rr   r   rw      s    rw   c                   @   rS   )	UserWideCacheLocatorz
    A locator for functions backed by a regular Python module or a
    frozen executable, cached into a user-wide cache directory.
    c                 C   s@   || _ |jj| _tddd}|j}| |}tj	||| _
d S NnumbaF)appname	appauthor)r[   rg   rh   ra   r   user_cache_dirrP   r4   r9   rL   rj   r   r@   rA   appdirs	cache_dirrk   r   r   r   rl      s   

zUserWideCacheLocator.__init__c                 C   rm   r   rn   r   r   r   r   r3      ro   z#UserWideCacheLocator.get_cache_pathc                 C   sJ   t j|sttddsd S | ||}z|  W |S  ty$   Y d S w rU   )r4   r9   rc   rW   rX   r:   rd   re   r   r   r   rB     s   

z"UserWideCacheLocator.from_functionN)r'   r(   r)   rQ   rl   r3   rR   rB   r   r   r   r   ry      s    ry   c                   @   s<   e Zd ZdZdd Zdd Zdd Zdd	 Zed
d Z	dS )IPythonCacheLocatorzT
    A locator for functions entered at the IPython prompt (notebook or other).
    c                 C   s4   || _ t|}t|tr|| _d S |d| _d S )Nzutf-8)r[   inspect	getsource
isinstancebytes_bytes_sourcerJ   )r   r@   rA   sourcer   r   r   rl     s
   


zIPythonCacheLocator.__init__c                 C   s@   zddl m} W n ty   ddlm} Y nw tj| dS )Nr   )get_ipython_cache_dirnumba_cache)IPython.pathsr   ImportErrorIPython.utils.pathr4   r9   rL   )r   r   r   r   r   r3      s   z"IPythonCacheLocator.get_cache_pathc                 C   s   t | j S r   )rH   sha256r   rK   r   r   r   r   r;   ,     z$IPythonCacheLocator.get_source_stampc                 C   s0   d | jdd d }t| d d S )N    T   
   )rL   r   
splitlinesrH   r   rK   )r   
firstlinesr   r   r   r<   /  s   z%IPythonCacheLocator.get_disambiguatorc                 C   sV   | dstjtj| dsd S | ||}z|  W |S  ty*   Y d S w )Nz	<ipython-
ipykernel_)
startswithr4   r9   basenamerF   r:   rd   re   r   r   r   rB   8  s   

z!IPythonCacheLocator.from_functionN)
r'   r(   r)   rQ   rl   r3   r;   r<   rR   rB   r   r   r   r   r     s    
	r   c                   @   s@   e Zd ZdZdd Zedd Zdd Zdd	 Ze	d
d Z
dS )ZipCacheLocatorzP
    A locator for functions backed by Python modules within a zip archive.
    c                 C   sR   || _ |jj| _| |\| _| _tddd}|j}| 	|}t
j||| _d S rz   )r[   rg   rh   ra   _split_zip_path	_zip_path_internal_pathr   r~   rP   r4   r9   rL   rj   r   r   r   r   rl   M  s   

zZipCacheLocator.__init__c                 C   sn   t | }t|jD ])\}}|dr2tt |jd |d   }tt |j|d d   }||f  S q	td)N.ziprx   zNo zip file found in path)r   	enumeratepartsendswithr`   
ValueError)rA   r9   ipartzip_pathinternal_pathr   r   r   r   Y  s   
zZipCacheLocator._split_zip_pathc                 C   rm   r   rn   r   r   r   r   r3   c  ro   zZipCacheLocator.get_cache_pathc                 C   s   t | j}|j|jfS r   )r4   rY   r   r\   r]   r^   r   r   r   r;   f  s   z ZipCacheLocator.get_source_stampc                 C   s   d|vrd S | ||S )Nr   r   r>   r   r   r   rB   j  s   
zZipCacheLocator.from_functionN)r'   r(   r)   rQ   rl   staticmethodr   r3   r;   rR   rB   r   r   r   r   r   H  s    
	r   c                   @   sj   e Zd ZdZeeeeegZ	dd Z
dd Zedd Zedd	 Zed
d Zedd Zedd ZdS )	CacheImplz
    Provides the core machinery for caching.
    - implement how to serialize and deserialize the data in the cache.
    - control the filename of the cache.
    - provide the cache locator
    c                 C   sv  |j j| _z|j}W n ty   |j}Y nw tjrqg }tjdD ]M}|	 }d|v rX|
dd\}}zt|}t||}W n) ttfyW }	 z	td| d|	d }	~	ww t |}|d u rjtd| d|| q"n| j}t|}
|D ]}|||
}|d ur n	q{td||
f || _t|}tjtj|d }d	||f }ttd
d}| ||| _d S )N,.rx   zFailed to import 'z8' specified via NUMBA_CACHE_LOCATOR_CLASSES env variablezUnknown cache locator class: 'z:cannot cache function %r: no locator available for file %rr   z%s.%sabiflags )rg   rh   ra   r)   AttributeErrorr'   r   CACHE_LOCATOR_CLASSESrG   striprsplit	importlibimport_modulerW   r   RuntimeErrorglobalsgetappend_locator_classesr   getfilerB   _locatorr4   r9   splitextr   rX   get_filename_base_filename_base)r   r@   qualnamelocator_classeslocator_class_pathmodule_path
class_namemoduler?   esource_pathlocatorfilenamemodnamefullnamer   r   r   r   rl     sT   





zCacheImpl.__init__c                 C   s<   | dd dd}d}||| j tjd tjd |f S )N<r   >z%s-%s.py%d%d%sr   rx   )replacer   r<   rX   version_info)r   r   r   fixed_fullnamefmtr   r   r   r     s
   zCacheImpl.get_filename_basec                 C   rm   r   )r   r   r   r   r   filename_base     zCacheImpl.filename_basec                 C   rm   r   )r   r   r   r   r   r     r   zCacheImpl.locatorc                 C   r   )z$Returns the serialized form the dataNr   r   r"   r   r   r   reduce     zCacheImpl.reducec                 C   r   )z4Returns the de-serialized form of the *reduced_data*Nr   )r   r   reduced_datar   r   r   rebuild  r   zCacheImpl.rebuildc                 C   r   )zEReturns True if the given data is cachable; otherwise, returns False.Nr   r   r   r   r   check_cachable  r   zCacheImpl.check_cachableN)r'   r(   r)   rQ   rf   ru   ry   r   r   r   rl   r   r*   r   r   r   r   r   r   r   r   r   r   r   p  s(    2



r   c                   @   s(   e Zd ZdZdd Zdd Zdd ZdS )	CompileResultCacheImplz>
    Implements the logic to cache CompileResult objects.
    c                 C      |  S )z4
        Returns a serialized CompileResult
        )_reduce)r   r/   r   r   r   r        zCompileResultCacheImpl.reducec                 C   s   t jj|g|R  S )z8
        Returns the unserialized CompileResult
        )r   r
   _rebuildr   r   payloadr   r   r   r     s   zCompileResultCacheImpl.rebuildc                 C   sf   d}t dd |jD rd}n|jjrd}|r1d|jjdd |f }t|t	| j
j| j d	S d
S )z@
        Check cachability of the given compile result.
        Nc                 s   s    | ]}|j  V  qd S r   )	can_cache.0xr   r   r   	<genexpr>  s    z8CompileResultCacheImpl.check_cachable.<locals>.<genexpr>zas it uses lifted codezLas it uses dynamic globals (such as ctypes pointers and large global arrays)z&Cannot cache compiled function "%s" %sr   rC   FT)anyliftedlibraryhas_dynamic_globalsfndescr   rG   warningswarn_explicitr   r   r[   ra   )r   r/   cannot_cacher   r   r   r   r     s   
z%CompileResultCacheImpl.check_cachableN)r'   r(   r)   rQ   r   r   r   r   r   r   r   r     s
    r   c                       s<   e Zd ZdZdZdd Zdd Zdd Z fd	d
Z  Z	S )CodeLibraryCacheImplz<
    Implements the logic to cache CodeLibrary objects.
    Nc                 C   r   )z2
        Returns a serialized CodeLibrary
        )serialize_using_object_coder   codelibr   r   r   r     r   zCodeLibraryCacheImpl.reducec                 C   s   |  |S )z6
        Returns the unserialized CodeLibrary
        )codegenunserialize_libraryr   r   r   r   r     s   zCodeLibraryCacheImpl.rebuildc                 C   s   |j  S )z=
        Check cachability of the given CodeLibrary.
        )r   r   r   r   r   r   	  r   z#CodeLibraryCacheImpl.check_cachablec                    s&   t t| }|||}d| j|gS )N-)rp   r   r   rL   _filename_prefix)r   r   r   rq   resrr   r   r   r     s   
z&CodeLibraryCacheImpl.get_filename_base)
r'   r(   r)   rQ   r   r   r   r   r   rt   r   r   rr   r   r     s    r   c                   @   sv   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d Zdd Z	dd Z
dd Zdd Zdd Zdd Zejdd ZdS )IndexDataCacheFilezP
    Implements the logic for the index file and data file used by a cache.
    c                 C   sD   || _ d|f | _tj| j | j| _d|f | _|| _tj	| _
d S )Nz%s.nbiz%s.{number:d}.nbc)rj   _index_namer4   r9   rL   _index_path_data_name_pattern_source_stampr{   __version___version)r   r   r   source_stampr   r   r   rl     s   zIndexDataCacheFile.__init__c                 C   s   |  i  d S r   )_save_indexr   r   r   r   r&   !     zIndexDataCacheFile.flushc                 C   s|   |   }z|| }W n+ ty5   t| }tdD ]}| |}||vr) nq|||< | | Y nw | || dS )z?
        Save a new cache entry with *key* and *data*.
        rx   N)	_load_indexKeyErrorsetvalues	itertoolscount
_data_namer   
_save_data)r   keyr"   	overloads	data_nameexistingr   r   r   r   save$  s   
	zIndexDataCacheFile.savec                 C   s@   |   }||}|du rdS z| |W S  ty   Y dS w )z0
        Load a cache entry with *key*.
        N)r   r   
_load_datard   )r   r  r  r  r   r   r   load7  s   
zIndexDataCacheFile.loadc                 C   s   z!t | jd}t|}| }W d   n1 sw   Y  W n ty,   i  Y S w || jkr4i S t|\}}td| j || j	krHi S |S )z|
        Load the cache index and return it as a dictionary (possibly
        empty if cache is empty or obsolete).
        rbNz[cache] index loaded from %r)
openr   pickler
  readFileNotFoundErrorr   loadsr   r   )r   fversionr"   stampr  r   r   r   r   E  s    



zIndexDataCacheFile._load_indexc                 C   sl   | j |f}| |}| | j}tj| j|dd || W d    n1 s)w   Y  td| j d S )NrC   )protocolz[cache] index saved to %r)	r   _dump_open_for_writer   r  dumpr   writer   )r   r  r"   r  r   r   r   r   ^  s   

zIndexDataCacheFile._save_indexc                 C   sT   |  |}t|d}| }W d    n1 sw   Y  t|}td| |S )Nr  z[cache] data loaded from %r)
_data_pathr  r  r  r  r   )r   namer9   r  r"   tupr   r   r   r	  f  s   



zIndexDataCacheFile._load_datac                 C   sV   |  |}| |}| |}|| W d    n1 sw   Y  td| d S )Nz[cache] data saved to %r)r  r  r  r  r   )r   r  r"   r9   r  r   r   r   r  n  s   

zIndexDataCacheFile._save_datac                 C   s   | j j|dS )N)number)r   format)r   r  r   r   r   r  u  r   zIndexDataCacheFile._data_namec                 C   s   t j| j|S r   )r4   r9   rL   rj   )r   r  r   r   r   r  x  r   zIndexDataCacheFile._data_pathc                 C   s   t |S r   r   )r   objr   r   r   r  {  s   zIndexDataCacheFile._dumpc                 c   s    t  jdd }d||f }z!t|d}|V  W d   n1 s$w   Y  t|| W dS  tyI   zt| W   tyH   Y  w w )z
        Open *filepath* for writing in a race condition-free way (hopefully).
        uuid4 is used to try and avoid name collisions on a shared filesystem.
        N   z	%s.tmp.%swb)	uuiduuid4hexr  r4   r   	Exceptionunlinkrd   )r   filepathuidtmpnamer  r   r   r   r  ~  s"   z"IndexDataCacheFile._open_for_writeN)r'   r(   r)   rQ   rl   r&   r  r
  r   r   r	  r  r  r  r  
contextlibcontextmanagerr  r   r   r   r   r     s    r   c                   @   s~   e Zd ZdZdZdd Zdd Zedd Zd	d
 Z	dd Z
dd Zdd Zdd Zdd Zdd Zejdd Zdd ZdS )Cachea<  
    A per-function compilation cache.  The cache saves data in separate
    data files and maintains information in an index file.

    There is one index file per function and Python version
    ("function_name-<lineno>.pyXY.nbi") which contains a mapping of
    signatures and architectures to data files.
    It is prefixed by a versioning key and a timestamp of the Python source
    file containing the function.

    There is one data file ("function_name-<lineno>.pyXY.<number>.nbc")
    per function, function signature, target architecture and Python version.

    Separate index and data files per Python version avoid pickle
    compatibility problems.

    Note:
    This contains the driver logic only.  The core logic is provided
    by a subclass of ``CacheImpl`` specified as *_impl_class* in the subclass.
    Nc                 C   s\   t || _|| _| || _| jj | _| jj }| jj	}t
| j||d| _|   d S )N)r   r   r   )repr_name_py_func_impl_class_implr   r3   rj   r;   r   r   _cache_filer$   )r   r@   r   r   r   r   r   rl     s   
zCache.__init__c                 C   s   d| j j| jf S )Nz<%s py_func=%r>)rs   r'   r-  r   r   r   r   __repr__  s   zCache.__repr__c                 C   rm   r   rn   r   r   r   r   r     r   zCache.cache_pathc                 C   
   d| _ d S )NT_enabledr   r   r   r   r$     rb   zCache.enablec                 C   r3  )NFr4  r   r   r   r   r%     rb   zCache.disablec                 C   s   | j   d S r   )r1  r&   r   r   r   r   r&     r   zCache.flushc                 C   s@   |   |   | ||W  d   S 1 sw   Y  dS )zr
        Load and recreate the cached object for the given signature,
        using the *target_context*.
        N)refresh!_guard_against_spurious_io_errors_load_overloadr   r   r   r   r      s   

$zCache.load_overloadc                 C   s@   | j sd S | || }| j|}|d ur| j||}|S r   )r5  
_index_keyr   r1  r
  r0  r   )r   r   r   r  r"   r   r   r   r8    s   zCache._load_overloadc                 C   s:   |    | || W d   dS 1 sw   Y  dS )zE
        Save the data for the given signature in the cache.
        N)r7  _save_overloadr!   r   r   r   r#     s   
"zCache.save_overloadc                 C   sR   | j sd S | j|sd S | jj  | ||j}| j|}| j	|| d S r   )
r5  r0  r   r   r:   r9  r   r   r1  r  )r   r   r"   r  r   r   r   r:    s   zCache._save_overloadc              
   c   sX    t jdkr'zd V  W d S  ty& } z|jtjkr W Y d }~d S d }~ww d V  d S )Nnt)r4   r  rd   errnoEACCES)r   r   r   r   r   r7    s   

z'Cache._guard_against_spurious_io_errorsc                 C   s\   | j jj}| j jdurtdd | j jD }t|}nd}dd }|| ||||ffS )a
  
        Compute index key for the given signature and codegen.
        It includes a description of the OS, target architecture and hashes of
        the bytecode for the function and, if the function has a __closure__,
        a hash of the cell_contents.
        Nc                 S   s   g | ]}|j qS r   )cell_contentsr   r   r   r   
<listcomp>  s    z$Cache._index_key.<locals>.<listcomp>r   c                 S   s   t |  S r   )rH   r   rK   )r   r   r   r   <lambda>  s    z"Cache._index_key.<locals>.<lambda>)r.  rg   co_code__closure__tupler   magic_tuple)r   r   r   	codebytescvars	cvarbyteshasherr   r   r   r9    s   

zCache._index_key)r'   r(   r)   rQ   r/  rl   r2  r*   r   r$   r%   r&   r    r8  r#   r:  r)  r*  r7  r9  r   r   r   r   r+    s"    
	

r+  c                   @   s   e Zd ZdZeZdS )FunctionCachezF
    Implements Cache that saves and loads CompileResult objects.
    N)r'   r(   r)   rQ   r   r/  r   r   r   r   rI    s    rI  r   c                    sB   t vsJ t  G fdddt G  fdddt}|S )z
    Create a Cache class for additional compilation features to cache their
    result for reuse.  The cache is saved in filename pattern like
    in ``FunctionCache`` but with additional *prefix* as specified.
    c                       s   e Zd Z ZdS )z6make_library_cache.<locals>.CustomCodeLibraryCacheImplN)r'   r(   r)   r   r   )prefixr   r   CustomCodeLibraryCacheImpl&  s    rK  c                       s   e Zd ZdZ ZdS )z(make_library_cache.<locals>.LibraryCachez
        Implements Cache that saves and loads CodeLibrary objects for additional
        feature for the specified python function.
        N)r'   r(   r)   rQ   r/  r   )rK  r   r   LibraryCache)  s    rL  )_lib_cache_prefixesaddr   r+  )rJ  rL  r   )rK  rJ  r   make_library_cache  s
   
rO  ):rQ   abcr   r   r)  r<  rH   r   r   r   mathr   r4   r  rX   r6   r!  r   numba.misc.appdirsr   zipfilepathlibr   r{   numba.core.errorsr   numba.core.baser   numba.core.codegenr	   numba.core.compilerr
   
numba.corer   r   numba.core.serializer   r   r   r,   r0   objectrT   rf   ru   rw   ry   r   r   r   r   r   r   r+  rI  r   rM  rO  r   r   r   r   <module>   sX    *9  7(b$~~
