
    Kh                        S r / SQrSSKrSSKrSSKJr  SSKr SSKr\
r\
4r\r\r\rS rS rS rS rSS	 jrS
 rSrS rS rS rS r " S S5      rSS jr\R<                  r\R@                  r!g! \	 a    SSKr Naf = f)a  
Python 3.X compatibility tools.

While this file was originally intended for Python 2 -> 3 transition,
it is now used to create a compatibility layer between different
minor versions of Python 3.

While the active version of numpy may not support a given version of python, we
allow downstream libraries to continue to use these shims for forward
compatibility with numpy while they transition their code to newer versions of
Python.
)bytesasbytes	isfileobjgetexceptionstrcharunicode	asunicodeasbytes_nestedasunicode_nestedasstropen_latin1long
basestringsixuinteger_typesis_pathlib_pathnpy_load_modulePathpicklecontextlib_nullcontext	os_fspathos_PathLike    N)r   c                 d    [        U [        5      (       a  U R                  S5      $ [        U 5      $ Nlatin1
isinstancer   decodestrss    C/var/www/html/env/lib/python3.13/site-packages/numpy/compat/py3k.pyr   r   "   '    !Uxx!!q6M    c                 d    [        U [        5      (       a  U $ [        U 5      R                  S5      $ r   )r   r   r   encoder    s    r"   r   r   '   s'    !Uq6==""r$   c                 d    [        U [        5      (       a  U R                  S5      $ [        U 5      $ r   r   r    s    r"   r   r   ,   r#   r$   c                     [        U [        R                  [        R                  [        R                  45      (       d  g U R                  5         g! [         a     gf = f)NFT)r   ioFileIOBufferedReaderBufferedWriterfilenoOSError)fs    r"   r   r   1   sN    a"))R%6%68I8IJKK 	

 s   A 
AAc                     [        XSS9$ )Nz
iso-8859-1)modeencoding)open)filenamer1   s     r"   r   r   <   s    l;;r$   c                     U $ N r    s    r"   r   r   ?   s    Hr$   Uc                  2    [         R                  " 5       S   $ )N   )sysexc_infor7   r$   r"   r   r   D   s    <<>!r$   c                     [        U S5      (       a7  [        U [        [        45      (       d  U  Vs/ s H  n[	        U5      PM     sn$ [        U 5      $ s  snf N__iter__)hasattrr   r   r   r	   r   xys     r"   r	   r	   G   sI    q*jUG4D&E&E+,-1aq!1--qz .   Ac                     [        U S5      (       a7  [        U [        [        45      (       d  U  Vs/ s H  n[	        U5      PM     sn$ [        U 5      $ s  snf r>   )r@   r   r   r   r
   r   rA   s     r"   r
   r
   M   sJ    q*jUG4D&E&E-./Q #Q//| 0rD   c                 "    [        U [        5      $ )zx
Check whether obj is a `pathlib.Path` object.

Prefer using ``isinstance(obj, os.PathLike)`` instead of this function.
)r   r   )objs    r"   r   r   S   s     c4  r$   c                   .    \ rS rSrSrSS jrS rS rSrg)	r   \   a  Context manager that does no additional processing.

Used as a stand-in for a normal context manager, when a particular
block of code is only sometimes used with a normal context manager:

cm = optional_cm if condition else nullcontext()
with cm:
    # Perform operation, using optional_cm if condition is True

.. note::
    Prefer using `contextlib.nullcontext` instead of this context manager.
Nc                     Xl         g r6   enter_result)selfrL   s     r"   __init__contextlib_nullcontext.__init__j   s    (r$   c                     U R                   $ r6   rK   )rM   s    r"   	__enter__ contextlib_nullcontext.__enter__m   s       r$   c                     g r6   r7   )rM   excinfos     r"   __exit__contextlib_nullcontext.__exit__p   s    r$   rK   r6   )	__name__
__module____qualname____firstlineno____doc__rN   rQ   rU   __static_attributes__r7   r$   r"   r   r   \   s    )!r$   r   c                 :    SSK Jn  U" X5      R                  5       $ )ax  
Load a module. Uses ``load_module`` which will be deprecated in python
3.12. An alternative that uses ``exec_module`` is in
numpy.distutils.misc_util.exec_mod_from_location

Parameters
----------
name : str
    Full module name.
fn : str
    Path to module file.
info : tuple, optional
    Only here for backward compatibility with Python 2.*.

Returns
-------
mod : module

r   )SourceFileLoader)importlib.machineryr^   load_module)namefninfor^   s       r"   r   r   t   s    , 5D%1133r$   )rr6   )"r[   __all__r;   ospathlibr   r)   pickle5r   ImportErrorintr   r   r   r   r   r   r   r   r   r   r   r   r   r   r	   r
   r   r   r   fspathr   PathLiker   r7   r$   r"   <module>rm      s   K  	  	 


#

	< ! 044 II	kkm  s   A3 3
B ?B 