
    MpjJ                         S SK r S SKrS SKrS SKrS SKrS SKrS SKrS SKJr  S SKJ	r	  \R                  R                  S 5       rS rg)    N)__version__)_openmp_parallelism_enabledc                     [         R                  R                  [        R                  5      /n / n[
        R                  " U SS S9 H  u  p#nU(       d  SU;   d  SU;   d  SU;   d  SU;   a  M'  [        R                  " U5      n[        USS	5      =(       d    S	nUR                  S
5      (       d  Mk  [        R                  " U[        R                  5       H]  u  px [        R                  " U5      n	X:w  a  M#  UR                   U:w  d  M5  UR#                  U SU SUR                   < SU< 35        M_     M     U(       a   SSR%                  U5      -   5       eg! [         a     M  f = f)a  Check that Cython extension types have a correct ``__module__``.

When a subpackage containing Cython extension types has a misconfigured
``meson.build`` (e.g. missing ``__init__.py`` in its Cython tree), Cython
cannot detect the package hierarchy and sets ``__module__`` to just the
submodule name (e.g. ``'_loss'``) instead of the fully qualified
``'sklearn._loss._loss'``. This breaks downstream tools like skops that
rely on ``__module__`` for serialization.
zsklearn.c                     g )N )_s    T/var/www/html/pdf-tiff/venv/lib/python3.13/site-packages/sklearn/tests/test_build.py<lambda>,test_extension_type_module.<locals>.<lambda>   s        )pathprefixonerrorz.tests.z.externals.z._build_utils.z._cyutility__file__ )z.soz.pyd.z.__module__ == z, expected z+Extension types with incorrect __module__:

N)osr   dirnamesklearnr   pkgutilwalk_packages	importlibimport_modulegetattrendswithinspect
getmembersisclassgetfile	TypeError
__module__appendjoin)
sklearn_pathfailuresr   modnameispkgmodmod_filenameclscls_files
             r	   test_extension_type_moduler.      sa    GGOOG$4$456LH$22*nE G#'7*'%%g.3
B/52   11 ++CAID"??3/ #~~(iqocnn5G H  '{, B3T  G$))K  <x   s   E
E,+E,c                     [         R                  " S5      (       a  [        R                  " S5        [        R
                  " S5      (       a  SOSn [        R                  " S5      R                  U 5      n[        5       (       d   U5       eg )NSKLEARN_SKIP_OPENMP_TESTz2test explicitly skipped (SKLEARN_SKIP_OPENMP_TEST)z.dev0devstablea  
        This test fails because scikit-learn has been built without OpenMP.
        This is not recommended since some estimators will run in sequential
        mode instead of leveraging thread-based parallelism.

        You can find instructions to build scikit-learn with OpenMP at this
        address:

            https://scikit-learn.org/{}/developers/advanced_installation.html

        You can skip this test by setting the environment variable
        SKLEARN_SKIP_OPENMP_TEST to any value.
        )
r   getenvpytestskipr   r   textwrapdedentformatr   )base_urlerr_msgs     r	   test_openmp_parallelism_enabledr;   J   sp     
yy+,,HI#,,W55u8Hoo	 fX   '((1'1(r   )r   r   r   r   r6   r4   r   r   sklearn.utils._openmp_helpersr   markthread_unsafer.   r;   r   r   r	   <module>r?      sD      	      E 8 8v2r   