o
    ۭh                     @   s&   d dl Z d dlmZ defddZdS )    N)partial
group_namec                 c   s    t jdkr0zddlm} W n	 ty   Y nw || d}t|ts0|D ]	}|j|jfV  q$dS zddl	m
} W n
 tyB   Y dS w || D ]}|jt|jddfV  qHdS )	z
    Find entrypoints of a given group using either `importlib.metadata` or the
    older `pkg_resources` mechanism.

    Yields tuples of the entrypoint name and a callable function that will
    load the actual entrypoint.
    )   
   r   )entry_points)groupN)working_setT)require)sysversion_infoimportlib.metadatar   ImportError
isinstancedictnameloadpkg_resourcesr   iter_entry_pointsr   )r   r   epsentry_pointr    r   [/var/www/html/stock_analysis/be/venv/lib/python3.10/site-packages/babel/messages/_compat.pyfind_entrypoints   s(   


r   )r
   	functoolsr   strr   r   r   r   r   <module>   s    