
    >qj                     h   d 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 ej                  d      d   d   d   Zej                  j                  Zej                  e_        ej                  ge_        d Zej"                  j%                  d	      j'                  d
      Zej"                  j+                  e      5 Z ej.                  ej1                               Zddd       ej4                  j7                  ed      d        Zej4                  j7                  ed      d        Zy# 1 sw Y   PxY w)a  
Regression test for the cython_blas / cython_lapack binary interface.

The __pyx_capi__ dict of each module contains PyCapsule objects whose
*name* string encodes the C-level function signature that Cython checks
at import time when another module does ``cimport``.  Any change to
those strings is a binary incompatibility that breaks every downstream
package (e.g., scikit-learn, statsmodels) compiled against the previous release,
without any compile-time warning.

The expected signatures are stored in cython_abi_signatures.json.
The test fails if:
  * an existing name disappears, or
  * an existing name's signature string changes.
Adding new names is explicitly allowed (it is not a break).
    Ndicts)modezBuild Dependenciesblaszcython blas ilp64c                     i }| j                   j                         D ]'  \  }}t        |      }||j                  d      ||<   ) |S )z@Return {name: signature} for every entry in module.__pyx_capi__.zutf-8)__pyx_capi__items_get_capsule_namedecode)moduleresultnamecapsuleraws        a/opt/rentech/trading_bot/.venv/lib/python3.12/site-packages/scipy/linalg/tests/test_cython_abi.py_extract_capir   0   sQ    F,,224 /g(?::g.F4L/ M    zscipy.linalg.testszcython_abi_signatures.jsonz3cython_blas/cython_lapack ABI depends on ILP64 BLAS)reasonc            
         t         d   } t        j                  d      }t        |      }g }| j	                         D ]H  \  }}||vr|j                  d|d|d       #||   |k7  s,|j                  d|d|d||          J |r6dj                  |      }t        j                  d	t        |       d
|        yy)z:No existing cython_blas signature may change or disappear.zscipy.linalg.cython_blas	REMOVED   (was )	CHANGED  
  expected: 
  actual:   
z*scipy.linalg.cython_blas.__pyx_capi__ has  ABI breakage(s):
N
	_EXPECTED	importlibimport_moduler   r   appendjoinpytestfaillenexpectedmodactualerrorsr   expected_sigjoineds          r   test_cython_blas_abi_stabilityr-   A   s     34H

!
!"<
=C3FF&nn. 
lvMMD86,)9; D\\)MMD8 $+. /%d|.0
 6"8V F!!'*	
 r   c            
         t         d   } t        j                  d      }t        |      }g }| j	                         D ]H  \  }}||vr|j                  d|d|d       #||   |k7  s,|j                  d|d|d||          J |r6dj                  |      }t        j                  d	t        |       d
|        yy)z<No existing cython_lapack signature may change or disappear.zscipy.linalg.cython_lapackr   r   r   r   r   r   r   z,scipy.linalg.cython_lapack.__pyx_capi__ has r   Nr   r&   s          r    test_cython_lapack_abi_stabilityr/   ^   s     56H

!
!">
?C3FF&nn. 
lvMMD86,)9; D\\)MMD8 $+. /%d|.0
 6":3v;- H!!'*	
 r   )__doc__ctypesr   importlib.resourcesjsonr#   scipyshow_configCYTHON_BLAS_ILP64	pythonapiPyCapsule_GetNamer	   c_char_prestype	py_objectargtypesr   	resourcesfilesjoinpath	_sig_fileas_file_floads	read_textr   markskipifr-   r/    r   r   <module>rH      sE  "       E7#$89&ABUV  $$66 "OO  $../   %%&:;DD 	   + +r

2<<>*I+ @  
	
2 @  
	
K+ +s   8!D((D1