
    Ng                     n   d Z ddlmZ ddlZddlmZ 	 ddlmZ ddlmZ 	 ddlm	Z	 ddlm
Z
 dd	lmZ ddlmZ ddlmZ ddlmZ ddlmZ ej*                  dd dk\  Zej*                  dd dk\  ZefdfdZg dZ G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d d e      Z G d! d"e      Z  G d# d$e ee      Z! G d% d&ee!      Z" G d' d(e"      Z# G d) d*e"      Z$ G d+ d,e!      Z% G d- d.e%      Z& G d/ d0e!      Z' G d1 d2e'      Z( G d3 d4e       Z) G d5 d6e)e%      Z* G d7 d8e)e%      Z+ G d9 d:e)e!      Z, G d; d<e      Z- G d= d>e-      Z. G d? d@e      Z/ G dA dBe/      Z0 G dC dDe0      Z1y# e$ r ddlZY {w xY w# e$ r ddl	m	Z	 dd
l
mZ
 dd	lmZ Y w xY w)Ea  
Interface definitions paralleling the abstract base classes defined in
:mod:`collections.abc`.

After this module is imported, the standard library types will declare
that they implement the appropriate interface. While most standard
library types will properly implement that interface (that
is, ``verifyObject(ISequence, list()))`` will pass, for example), a few might not:

    - `memoryview` doesn't feature all the defined methods of
      ``ISequence`` such as ``count``; it is still declared to provide
      ``ISequence`` though.

    - `collections.deque.pop` doesn't accept the ``index`` argument of
      `collections.abc.MutableSequence.pop`

    - `range.index` does not accept the ``start`` and ``stop`` arguments.

.. versionadded:: 5.0.0
    )absolute_importN)ABCMeta)abc)OrderedDict)UserList)UserDict)
UserString)IterableUserDict)PYTHON2)PYTHON3)ABCInterface)optional   )      )r       c                 ~    |rt        t        |       S t        | |dd| z  i      }|D ]  }|j                  |        |S )N__doc__z4The ABC %s is not defined in this version of Python.)getattrr   r   register)nameverbases_if_missingregister_if_missingmissingcs         \/var/www/djangounited/venv/lib/python3.12/site-packages/zope/interface/common/collections.py_new_in_verr   J   s^     sD!! d,I
/ G !  N    )IAsyncGeneratorIAsyncIterableIAsyncIterator
IAwaitableICollection
IContainer
ICoroutine
IGenerator	IHashable
IItemsView	IIterable	IIterator	IKeysViewIMappingIMappingViewIMutableMappingIMutableSequenceIMutableSetIReversible	ISequenceISetISizedIValuesViewc                   4    e Zd Zej                  Zed        Zy)r&   c                      y)z
        Optional method. If not provided, the interpreter will use
        ``__iter__`` or the old ``__getitem__`` protocol
        to implement ``in``.
        Nr   others    r   __contains__zIContainer.__contains__z       r    N)__name__
__module____qualname__r   	Containerr   r<   r   r    r   r&   r&   w   s    
--C r    r&   c                   $    e Zd Zej                  Zy)r)   N)r>   r?   r@   r   Hashabler   r    r   r)   r)          
,,Cr    r)   c                   4    e Zd Zej                  Zed        Zy)r+   c                       yz
        Optional method. If not provided, the interpreter will
        implement `iter` using the old ``__getitem__`` protocol.
        Nr   r   r    r   __iter__zIIterable.__iter__   r=   r    N)r>   r?   r@   r   Iterabler   rH   r   r    r   r+   r+      s    
,,C r    r+   c                   $    e Zd Zej                  Zy)r,   N)r>   r?   r@   r   Iteratorr   r    r   r,   r,      rD   r    r,   c                   N    e Zd Z edeej                         f      Zed        Z	y)r3   
Reversiblec                       yz
        Optional method. If this isn't present, the interpreter
        will use ``__len__`` and ``__getitem__`` to implement the
        `reversed` builtin.
        Nr   r   r    r   __reversed__zIReversible.__reversed__   r=   r    N)
r>   r?   r@   r   PY36r+   getABCr   r   rP   r   r    r   r3   r3      s.    
lD9+;+;+=*?
@C r    r3   c                   >    e Zd Z edeej                         f      Zy)r(   	GeneratorN)r>   r?   r@   r   PY35r,   rR   r   r   r    r   r(   r(      s    
k4)*:*:*<)>
?Cr    r(   c                   $    e Zd Zej                  Zy)r6   N)r>   r?   r@   r   Sizedr   r    r   r6   r6      s    
))Cr    r6   c                   z    e Zd Z edeej                         ej                         ej                         f      Z	y)r%   
CollectionN)
r>   r?   r@   r   rQ   r6   rR   r+   r&   r   r   r    r   r%   r%      s5     lD}}	(8(8(:J<M<M<OPRCr    r%   c                   \    e Zd Zej                  ZefZeeu re	fndZ
ed        Zed        Zy)r4   r   c                       yrO   r   r   r    r   rP   zISequence.__reversed__   r=   r    c                       yrG   r   r   r    r   rH   zISequence.__iter__   r=   r    N)r>   r?   r@   r   Sequencer	   extra_classesstrbytes
basestringignored_classesr   rP   rH   r   r    r   r4   r4      sI    
,,CMM (+e|zmO   r    r4   c                   *    e Zd Zej                  ZefZy)r1   N)r>   r?   r@   r   MutableSequencer   r^   r   r    r   r1   r1      s    


CKMr    r1   c                   H    e Zd ZdZ edeej                         fee	f      Z
y)IByteStringz/
    This unifies `bytes` and `bytearray`.
    
ByteStringN)r>   r?   r@   r   r   PY3r4   rR   r`   	bytearrayr   r   r    r   rf   rf      s.     lC '')+i(*Cr    rf   c                   $    e Zd Zej                  Zy)r5   N)r>   r?   r@   r   Setr   r    r   r5   r5      s    
''Cr    r5   c                   $    e Zd Zej                  Zy)r2   N)r>   r?   r@   r   
MutableSetr   r    r   r2   r2      s    
..Cr    r2   c                   J    e Zd Zej                  ZefZefZe	re
d        ZeZyy)r.   c                      y)z:
            The interpreter will supply one.
            Nr   r:   s    r   __eq__zIMapping.__eq__   r=   r    N)r>   r?   r@   r   Mappingdictr^   r   rb   PY2r   rp   __ne__r   r    r   r.   r.      s<    
++CGM
 #nO
		 
	
  r    r.   c                   2    e Zd Zej                  ZeefZefZ	y)r0   N)
r>   r?   r@   r   MutableMappingrr   r   r^   r   rb   r   r    r   r0   r0      s    


C8%M"nOr    r0   c                   $    e Zd Zej                  Zy)r/   N)r>   r?   r@   r   MappingViewr   r    r   r/   r/      s    
//Cr    r/   c                   $    e Zd Zej                  Zy)r*   N)r>   r?   r@   r   	ItemsViewr   r    r   r*   r*      s    
--Cr    r*   c                   $    e Zd Zej                  Zy)r-   N)r>   r?   r@   r   KeysViewr   r    r   r-   r-      rD   r    r-   c                   4    e Zd Zej                  Zed        Zy)r7   c                      y)z
        Optional method. If not provided, the interpreter will use
        ``__iter__`` or the old ``__len__`` and ``__getitem__`` protocol
        to implement ``in``.
        Nr   r:   s    r   r<   zIValuesView.__contains__  r=   r    N)r>   r?   r@   r   
ValuesViewr   r<   r   r    r   r7   r7      s    
..C r    r7   c                       e Zd Z ede      Zy)r$   	AwaitableNr>   r?   r@   r   rU   r   r   r    r   r$   r$         
k4
(Cr    r$   c                       e Zd Z ede      Zy)r'   	CoroutineNr   r   r    r   r'   r'     r   r    r'   c                       e Zd Z ede      Zy)r"   AsyncIterableNr   r   r    r   r"   r"         
ot
,Cr    r"   c                       e Zd Z ede      Zy)r#   AsyncIteratorNr   r   r    r   r#   r#     r   r    r#   c                       e Zd Z ede      Zy)r!   AsyncGeneratorN)r>   r?   r@   r   rQ   r   r   r    r   r!   r!     s    
&
-Cr    r!   )2r   
__future__r   sysr   r   collectionsImportErrorr   r   r   r	   r
   zope.interface._compatr   rs   r   rh   zope.interface.commonr   r   version_inforU   rQ   r   __all__r&   r)   r+   r,   r3   r(   r6   r%   r4   r1   rf   r5   r2   r.   r0   r/   r*   r-   r7   r$   r'   r"   r#   r!   r   r    r   <module>r      s  ( ' 
  $& %$& 2 1 . * v%
v% #*$&&4	 	  	 	) 	@ @
\ R&R0 y  
*) *; $ { $%h %
6 t d 	, 	) )) )-\ --^ -.n .c    &!5%%	&s"   F	 F 		FFF43F4