Ë
    PU hI  ã                  ó„   — d Z ddlmZ ddlZddlZddlmZmZ ddlm	Z	 ddl
mZ ddlmZ  G d„ d	e«      Zd
„ Zdd„Zdd„Zy)zJira utils used internally.é    )ÚannotationsN)ÚAnyÚcast)ÚResponse)ÚCaseInsensitiveDict)Úraise_on_errorc                  ó$   ‡ — e Zd ZdZdˆ fd„Zˆ xZS )r   a  A case-insensitive ``dict``-like object.

    DEPRECATED: use requests.structures.CaseInsensitiveDict directly.

    Implements all methods and operations of
    ``collections.MutableMapping`` as well as dict's ``copy``. Also
    provides ``lower_items``.

    All keys are expected to be strings. The structure remembers the
    case of the last key to be set, and ``iter(instance)``,
    ``keys()``, ``items()``, ``iterkeys()``
    will contain case-sensitive keys. However, querying and contains
    testing is case insensitive::

        cid = CaseInsensitiveDict()
        cid['Accept'] = 'application/json'
        cid['accept'] == 'application/json'  # True
        list(cid) == ['Accept']  # True

    For example, ``headers['content-encoding']`` will return the
    value of a ``'Content-Encoding'`` response header, regardless
    of how the header name was originally stored.

    If the constructor, ``.update``, or equality comparison
    operations are given keys that have equal ``.lower()`` s, the
    behavior is undefined.

    c                óX   •— t        j                  dt        «       t        ‰| �  |i |¤Ž y )Nz4Use requests.structures.CaseInsensitiveDict directly)ÚwarningsÚwarnÚDeprecationWarningÚsuperÚ__init__)ÚselfÚargsÚkwargsÚ	__class__s      €úK/var/www/timesheet/venv/lib/python3.12/site-packages/jira/utils/__init__.pyr   zCaseInsensitiveDict.__init__-   s)   ø€ Ü�‰ØBÔDVô	
ô 	‰Ñ˜$Ð) &Ó)ó    )ÚreturnÚNone)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú__classcell__)r   s   @r   r   r      s   ø„ ñ÷:*ñ *r   r   c                óø   — | D ]0  \  }}}t        j                  ||f||¬«      }|j                  «        Œ2 t        j                  «       D ].  }|j                  j                  d«      sŒ|j                  «        Œ0 y )N)Útargetr   r   ÚnameÚhttp)Ú	threadingÚThreadÚstartÚ	enumerater   Ú
startswithÚjoin)ÚrequestsÚfnÚurlÚrequest_argsÚths        r   Úthreaded_requestsr,   4   so   € Ø!)ò ÑˆˆC�Ü×Ñ R¨s¨f¸\ÐPSÔTˆØ
�‰�
ðô ×!Ñ!Ó#ò ˆØ�7‰7×Ñ˜fÕ%Ø�G‰G�Iñr   c                ó–   — t        | «       t        t        | «      } 	 | j                  «       S # t        $ r | j
                  si cY S ‚ w xY w)a  Attempts to load json the result of a response.

    Args:
        resp (Optional[Response]): The Response object

    Raises:
        JIRAError: via :py:func:`jira.resilientsession.raise_on_error`

    Returns:
        Union[List[Dict[str, Any]], Dict[str, Any]]: the json
    )r   r   r   ÚjsonÚ
ValueErrorÚtext)Úresps    r   Ú
json_loadsr2   >   sG   € ô �4ÔÜ”˜$Ó€DðØ�y‰y‹{ÐøÜò à�yŠyØŠIØð	ús   �- ­AÁAc                ó\   — | j                  «       D ��ci c]  \  }}|€Œ	||“Œ c}}S c c}}w )zÄA convenience function to remove key/value pairs with `None` for a value.

    Args:
      data: A dictionary.

    Returns:
      Dict[str, Any]: A dictionary with no `None` key/value pairs.
    )Úitems)ÚdataÚkeyÚvals      r   Úremove_empty_attributesr8   U   s*   € ð &*§Z¡Z£\×E™˜˜c°S±_ˆC�‰HÓEÐEùÓEs   ”
(Ÿ()r1   zResponse | Noner   r   )r5   údict[str, Any]r   r9   )r   Ú
__future__r   r!   r   Útypingr   r   r'   r   Úrequests.structuresr   Ú_CaseInsensitiveDictÚjira.resilientsessionr   r,   r2   r8   © r   r   ú<module>r@      s;   ðÙ !å "ã Û ß å Ý Kå 0ô"*Ð.ô "*òJóô.	Fr   