
    Ih)                    <    d Z ddlmZ ddlZddlZddlmZ 	 	 ddZy)zImport related utilities.    )annotationsN)reraisec           
        |si n|}|t         j                  }t        | t              s| S |j	                  |       xs | } d| v rdn|}| j                  |      \  }}}	|sd|r|n|	}}		 	  ||fd|i|}
|	rt        
|	      S 
S # t        $ r?}t        t        t        d| d|       t        j                         d          Y d}~Sd}~ww xY w# t        t        f$ r | Y |S w xY w)a  Get symbol by qualified name.

    The name should be the full dot-separated path to the class::

        modulename.ClassName

    Example::

        celery.concurrency.processes.TaskPool
                                    ^- class name

    or using ':' to separate module and symbol::

        celery.concurrency.processes:TaskPool

    If `aliases` is provided, a dict containing short name/long name
    mappings, the name is looked up in the aliases first.

    Examples
    --------
        >>> symbol_by_name('celery.concurrency.processes.TaskPool')
        <class 'celery.concurrency.processes.TaskPool'>

        >>> symbol_by_name('default', {
        ...     'default': 'celery.concurrency.processes.TaskPool'})
        <class 'celery.concurrency.processes.TaskPool'>

        # Does not try to look up non-string names.
        >>> from celery.concurrency.processes import TaskPool
        >>> symbol_by_name(TaskPool) is TaskPool
        True
    N:packagezCouldn't import z:    )	importlibimport_module
isinstancestrget
rpartition
ValueErrorr   sysexc_infogetattrImportErrorAttributeError)namealiasesimpr   sepdefaultkwargsmodule_name_cls_namemoduleexcs               L/var/www/html/planif/env/lib/python3.12/site-packages/kombu/utils/imports.pysymbol_by_namer!      s   D  bWG
{%%dC ;;t$D##C#s3KH $gh+
	'@g@@F
 -5wvx(@&@	  	'J!1$C5ABLLN1%' '	'
 ( ? Ns<   )B 4C C 	C5CC CC C%$C%)NNN.N)__doc__
__future__r   r	   r   kombu.exceptionsr   r!        r    <module>r(      s!     "  
 $ :>$(9r'   