
i
\c           @` s%  d  d l  m Z m Z m Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l	 Z	 d  d l
 m Z d d l m Z d d l m Z m Z m Z m Z m Z m Z d d l m Z m Z m Z m Z m Z e j Z d Z d	 Z d
 Z  d d d f Z! d Z" e i   Z# d e f d     YZ$ e$   Z% e% e& e' e' e& e' e& e& e& e& e& e( d  Z) d   Z* e* d d d d g  Z+ d   Z, d   Z- d   Z. d   Z/ d   Z0 d   Z1 d e f d     YZ2 e& e& e& e' e' e& e' e( e( e' e( e( e( e( d  Z3 e3 Z4 e rd    Z5 n	 d!   Z5 d"   Z6 d#   Z7 d$   Z8 d%   Z9 d& Z: d'   Z; e& d(  Z< e j=   Z> d)   Z? e& e& d*  Z@ d+   ZA d,   ZB d-   ZC d.   ZD d/   ZE d0   ZF d1   ZG d2   ZH d3 e f d4     YZI g  eI jJ D]K ZK eK d5 k r9eI d6 eK d7 e% d8 e& d9 e' d: e' d; eK d< k d= e'  ^ qZL e8 e< e@ eI d eL d eL d g  eL D] ZM eM jN r|eM ^ qgZI d> e f d?     YZO e< e@ eO   ZO e3 d@ e' d= e( d; e'  dA e f dB     Y ZP e f dC  ZQ e3 d@ e' d; e'  dD e f dE     Y ZR dF   ZS d S(G   i    (   t   absolute_importt   divisiont   print_functionN(   t
   itemgetteri   (   t   _config(   t   PY2t   isclasst	   iteritemst   metadata_proxyt   ordered_dictt   set_closure_cell(   t   DefaultAlreadySetErrort   FrozenInstanceErrort   NotAnAttrsClassErrort   PythonTooOldErrort   UnannotatedAttributeErrors   __attr_converter_{}s   __attr_factory_{}s=       {attr_name} = _attrs_property(_attrs_itemgetter({index}))s   typing.ClassVars
   t.ClassVart   ClassVart   _attrs_cached_hasht   _Nothingc           B` s&   e  Z d  Z d Z d   Z d   Z RS(   s   
    Sentinel class to indicate the lack of a value when ``None`` is ambiguous.

    ``_Nothing`` is a singleton. There is only ever one of it.
    c         C` s4   t  j d  k r- t t  |   j |   t  _ n  t  j S(   N(   R   t
   _singletont   Nonet   supert   __new__(   t   cls(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR   7   s    c         C` s   d S(   Nt   NOTHING(    (   t   self(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   __repr__<   s    N(   t   __name__t
   __module__t   __doc__R   R   R   R   (    (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR   .   s   	c         C` s"  | d k	 r3 | t k	 r3 | t k	 r3 t d   n  | d k	 ry |	 d k	 rZ t d   n  t j d t d d | }	 n  |
 d k	 r |  t k	 r t	 d   n  t
 |
  s t	 d   n  t |
  }  n  | d k r i  } n  t d |  d	 | d
 | d | d | d | d |	 d | d | d |  
S(   s  
    Create a new attribute on a class.

    ..  warning::

        Does *not* do anything unless the class is also decorated with
        :func:`attr.s`!

    :param default: A value that is used if an ``attrs``-generated ``__init__``
        is used and no value is passed while instantiating or the attribute is
        excluded using ``init=False``.

        If the value is an instance of :class:`Factory`, its callable will be
        used to construct a new value (useful for mutable data types like lists
        or dicts).

        If a default is not set (or set manually to ``attr.NOTHING``), a value
        *must* be supplied when instantiating; otherwise a :exc:`TypeError`
        will be raised.

        The default can also be set using decorator notation as shown below.

    :type default: Any value.

    :param callable factory: Syntactic sugar for
        ``default=attr.Factory(callable)``.

    :param validator: :func:`callable` that is called by ``attrs``-generated
        ``__init__`` methods after the instance has been initialized.  They
        receive the initialized instance, the :class:`Attribute`, and the
        passed value.

        The return value is *not* inspected so the validator has to throw an
        exception itself.

        If a ``list`` is passed, its items are treated as validators and must
        all pass.

        Validators can be globally disabled and re-enabled using
        :func:`get_run_validators`.

        The validator can also be set using decorator notation as shown below.

    :type validator: ``callable`` or a ``list`` of ``callable``\ s.

    :param bool repr: Include this attribute in the generated ``__repr__``
        method.
    :param bool cmp: Include this attribute in the generated comparison methods
        (``__eq__`` et al).
    :param hash: Include this attribute in the generated ``__hash__``
        method.  If ``None`` (default), mirror *cmp*'s value.  This is the
        correct behavior according the Python spec.  Setting this value to
        anything else than ``None`` is *discouraged*.
    :type hash: ``bool`` or ``None``
    :param bool init: Include this attribute in the generated ``__init__``
        method.  It is possible to set this to ``False`` and set a default
        value.  In that case this attributed is unconditionally initialized
        with the specified default value or factory.
    :param callable converter: :func:`callable` that is called by
        ``attrs``-generated ``__init__`` methods to converter attribute's value
        to the desired format.  It is given the passed-in value, and the
        returned value will be used as the new value of the attribute.  The
        value is converted before being passed to the validator, if any.
    :param metadata: An arbitrary mapping, to be used by third-party
        components.  See :ref:`extending_metadata`.
    :param type: The type of the attribute.  In Python 3.6 or greater, the
        preferred method to specify the type is using a variable annotation
        (see `PEP 526 <https://www.python.org/dev/peps/pep-0526/>`_).
        This argument is provided for backward compatibility.
        Regardless of the approach used, the type will be stored on
        ``Attribute.type``.

        Please note that ``attrs`` doesn't do anything with this metadata by
        itself. You can use it as part of your own code or for
        :doc:`static type checking <types>`.
    :param kw_only: Make this attribute keyword-only (Python 3+)
        in the generated ``__init__`` (if ``init`` is ``False``, this
        parameter is ignored).

    .. versionadded:: 15.2.0 *convert*
    .. versionadded:: 16.3.0 *metadata*
    .. versionchanged:: 17.1.0 *validator* can be a ``list`` now.
    .. versionchanged:: 17.1.0
       *hash* is ``None`` and therefore mirrors *cmp* by default.
    .. versionadded:: 17.3.0 *type*
    .. deprecated:: 17.4.0 *convert*
    .. versionadded:: 17.4.0 *converter* as a replacement for the deprecated
       *convert* to achieve consistency with other noun-based arguments.
    .. versionadded:: 18.1.0
       ``factory=f`` is syntactic sugar for ``default=attr.Factory(f)``.
    .. versionadded:: 18.2.0 *kw_only*
    s6   Invalid value for hash.  Must be True, False, or None.sH   Can't pass both `convert` and `converter`.  Please use `converter` only.s`   The `convert` argument is deprecated in favor of `converter`.  It will be removed after 2019/01.t
   stackleveli   s=   The `default` and `factory` arguments are mutually exclusive.s*   The `factory` argument must be a callable.t   defaultt	   validatort   reprt   cmpt   hasht   initt	   convertert   metadatat   typet   kw_onlyN(   R   t   Truet   Falset	   TypeErrort   RuntimeErrort   warningst   warnt   DeprecationWarningR   t
   ValueErrort   callablet   Factoryt   _CountingAttr(   R   R    R!   R"   R#   R$   t   convertR&   R'   R%   t   factoryR(   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   attribF   s@    j$		c         C` s   d j  |   } d j  |  d g } | ri xI t |  D]+ \ } } | j t j  d | d |   q7 Wn | j d  i t d 6t d 6} t t d	 j |  d
 d  |  | | S(   s   
    Create a tuple subclass to hold `Attribute`s for an `attrs` class.

    The subclass is a bare tuple with properties for names.

    class MyClassAttributes(tuple):
        __slots__ = ()
        x = property(itemgetter(0))
    s   {}Attributess   class {}(tuple):s       __slots__ = ()t   indext	   attr_names       passt   _attrs_itemgettert   _attrs_propertys   
t    t   exec(	   t   formatt	   enumeratet   appendt   _tuple_property_patR   t   propertyt   evalt   compilet   join(   t   cls_namet
   attr_namest   attr_class_namet   attr_class_templatet   iR8   t   globs(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   _make_attr_tuple_class   s    
	 "t   _Attributest   attrst
   base_attrst   base_attrs_mapc         C` s   t  |   j t  S(   s   
    Check whether *annot* is a typing.ClassVar.

    The string comparison hack is used to avoid evaluating all string
    annotations which would put attrs-based classes at a performance
    disadvantage compared to plain old classes.
    (   t   strt
   startswitht   _classvar_prefixes(   t   annot(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   _is_class_var	  s    c         C` sZ   t  |  d d  } | d k r" i  Sx1 |  j d D]" } | t  | d d  k r0 i  Sq0 W| S(   s$   
    Get annotations for *cls*.
    t   __annotations__i   N(   t   getattrR   t   __mro__(   R   t   annst   base_cls(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   _get_annotations  s    c         C` s   |  d j  S(   sQ   
    Key function for sorting to avoid re-creating a lambda for every class.
    i   (   t   counter(   t   e(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   _counter_getter$  s    c         ` sq  |  j    t |   } | d k	 rq g  t |  D] \ } } | | f ^ q. } t | t  s| j d t  qnD| t k rd     j	   D } g  } t
   }	 x | j	   D] \ }
 } t |  r q n  |	 j |
    j |
 t  } t | t  s%| t k rt   } q%t d |  } n  | j |
 | f  q W| |	 } t |  d k rt d d j t | d   f d    d   qn% t d	     j	   D d d
   } g  | D]3 \ }
 } t j d |
 d | d | j |
   ^ q} g  } i  } d   | D } x |  j d d !D] } t | d d  } | d k	 r"xY | D]N } | j | j  } | d k rM| j |  | | | j <| | | j <qMqMWq"q"Wg  | | D] } | j ^ q} t |  j |  } | r+g  | D] } | j d t  ^ q} g  | D] } | j d t  ^ q
} n  | | |  } t } t } x| D]} | t k r| t k r| j t k r| j  t k r| j! t k rt" d | f   nB | t k r| j t k	 r| j  t k	 r| j! t k rt } n  | t k r'| j! t k r't" d j# d |    n  | t k rN| j  t k rN| j! t k rNt } qNqNWt$ | | | f  S(   s   
    Transform all `_CountingAttr`s on a class into `Attribute`s.

    If *these* is passed, use that and don't look for them on the class.

    Return an `_Attributes`.
    t   keyc         S` s+   h  |  ]! \ } } t  | t  r |  q S(    (   t
   isinstanceR3   (   t   .0t   namet   attr(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <setcomp>=  s   		R   i    s1   The following `attr.ib`s lack a type annotation: s   , c         ` s     j  |   j S(   N(   t   getR[   (   t   n(   t   cd(    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   <lambda>T  s    t   .c         s` s0   |  ]& \ } } t  | t  r | | f Vq d  S(   N(   R_   R3   (   R`   Ra   Rb   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <genexpr>[  s   	c         S` s   |  d j  S(   Ni   (   R[   (   R\   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyRf   _  s    Ra   t   caR'   c         S` s   i  |  ] } | | j   q S(    (   Ra   (   R`   t   a(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys
   <dictcomp>k  s   	 i   it   __attrs_attrs__R(   sn   No mandatory attributes allowed after an attribute with a default value or factory.  Attribute in question: %rsi   Non keyword-only attributes are not allowed after a keyword-only attribute.  Attribute in question: {a!r}Ri   N(%   t   __dict__RZ   R   R   R_   R	   t   sortR]   R)   t   itemst   setRT   t   addRc   R   R3   R6   R?   t   lenR   RD   t   sortedt	   Attributet   from_counting_attrRW   RV   Ra   RK   R   t   _assocR*   R   R$   R(   R0   R=   RL   (   R   t   theset   auto_attribsR(   RX   Ra   Rh   t   ca_listt   ca_namest   annot_namesR8   R'   Ri   t   unannotatedt	   own_attrsRN   t   base_attr_mapt   taken_attr_namesRY   t	   sub_attrst   prev_aRF   t
   AttrsClassRM   t   had_defaultt   was_kw_only(    (   Re   s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   _transform_attrs+  s    	+	
5= %(		*c         C` s   t     d S(   s4   
    Attached to frozen classes as __setattr__.
    N(   R   (   R   Ra   t   value(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   _frozen_setattrs  s    c         C` s   t     d S(   s4   
    Attached to frozen classes as __delattr__.
    N(   R   (   R   Ra   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   _frozen_delattrs  s    t   _ClassBuilderc           B` s   e  Z d  Z d Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d   Z d   Z d   Z d   Z d   Z RS(   s(   
    Iteratively build *one* class.
    t   _clst	   _cls_dictt   _attrst   _base_namest   _attr_namest   _slotst   _frozent   _weakref_slott   _cache_hasht   _has_post_initt   _delete_attribst   _base_attr_mapc	         C` s  t  | | | |  \ }	 }
 } | |  _ | r< t | j  n i  |  _ |	 |  _ t d   |
 D  |  _ | |  _ t	 d   |	 D  |  _
 | |  _ | p t |  |  _ | |  _ | |  _ t t | d t   |  _ t |  |  _ |  j |  j d <| rt |  j d <t |  j d <n  d  S(   Nc         s` s   |  ] } | j  Vq d  S(   N(   Ra   (   R`   Ri   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <genexpr>  s    c         s` s   |  ] } | j  Vq d  S(   N(   Ra   (   R`   Ri   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <genexpr>  s    t   __attrs_post_init__Rj   t   __setattr__t   __delattr__(   R   R   t   dictRk   R   R   Rn   R   R   t   tupleR   R   t   _has_frozen_base_classR   R   R   t   boolRV   R*   R   R   R   R   (   R   R   Ru   t   slotst   frozent   weakref_slotRv   R(   t
   cache_hashRM   RN   t   base_map(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   __init__  s$    						c         C` s   d j  d |  j j  S(   Ns   <_ClassBuilder(cls={cls})>R   (   R=   R   R   (   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s    c         C` s'   |  j  t k r |  j   S|  j   Sd S(   s   
        Finalize class based on the accumulated configuration.

        Builder cannot be used after calling this method.
        N(   R   R)   t   _create_slots_classt   _patch_original_class(   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   build_class  s    
c         C` s   |  j  } |  j } |  j r~ x` |  j D]R } | | k r% t | | d  d k	 r% y t | |  Wqw t k
 rs qw Xq% q% Wn  x- |  j j	   D] \ } } t
 | | |  q W| S(   sA   
        Apply accumulated methods and return the class.
        N(   R   R   R   R   RV   R   t   delattrt   AttributeErrorR   Rm   t   setattr(   R   R   t
   base_namesRa   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s    			c         ` sE    j  }   f d   t   j  D } t } x=   j j d d !D]( } d t | d d  k rB t } PqB qB W  j }   j	 r d t   j d d  k r d | k r | r | d 7} n  g  | D] } | | k r | ^ q }   j
 r | j t  n  t |  | d <t   j d d  } | d k	 r7| | d <n  t d     j D    f d	   }	  f d
   }
 |	 | d <|
 | d <t   j    j j   j j |  } x | j j   D] } t | t t f  rt | j d d  } n t | d d  } | s
qn  x0 | D]( } | j   j k rt | |  qqWqW| S(   sL   
        Build and return a new class with a `__slots__` attribute.
        c         ` s8   i  |  ]. \ } } | t    j  d k r | |  q S(   Rk   t   __weakref__(   s   __dict__s   __weakref__(   R   R   (   R`   t   kt   v(   R   (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys
   <dictcomp>  s   		i   iR   Rk   t	   __slots__t   __qualname__c         s` s!   |  ] } | d  k r | Vq d S(   R   N(    (   R`   t   an(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <genexpr>@  s    c         ` s   t    f d    D  S(   s9   
            Automatically created by attrs.
            c         3` s   |  ] } t    |  Vq d  S(   N(   RV   (   R`   Ra   (   R   (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <genexpr>G  s    (   R   (   R   (   t   state_attr_names(   R   s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   slots_getstateC  s    c         ` sC   t  j |  t  } x* t   |  D] \ } } | | |  q" Wd S(   s9   
            Automatically created by attrs.
            N(   t   _obj_setattrt   __get__Rr   t   zip(   R   t   statet   _ClassBuilder__bound_setattrRa   R   (   R   (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   slots_setstateI  s    t   __getstate__t   __setstate__t   __closure__(    (    (   s   __weakref__N(   R   R   R   R*   R   RW   RV   R)   R   R   R   R?   t   _hash_cache_fieldR   R   R'   R   t	   __bases__Rk   t   valuesR_   t   classmethodt   staticmethodt   __func__t   cell_contentsR
   (   R   R   Re   t   weakref_inheritedRY   t   namesRa   t
   slot_namest   qualnameR   R   R   t   itemt   closure_cellst   cell(    (   R   R   s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     sL    			%		

'c         C` s)   |  j  t |  j d |  |  j d <|  S(   Nt   nsR   (   t   _add_method_dunderst
   _make_reprR   R   (   R   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   add_reprn  s    c         C` sP   |  j  j d  } | d  k r- t d   n  d   } |  j |  |  j  d <|  S(   NR   s3   __str__ can only be generated if a __repr__ exists.c         S` s
   |  j    S(   N(   R   (   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   __str__{  s    R   (   R   Rc   R   R0   R   (   R   R!   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   add_strt  s    	c         C` s   d  |  j d <|  S(   Nt   __hash__(   R   R   (   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   make_unhashable  s    c         C` s5   |  j  t |  j d |  j d |  j  |  j d <|  S(   NR   R   R   (   R   t
   _make_hashR   R   R   R   (   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   add_hash  s    (c         C` sA   |  j  t |  j |  j |  j |  j |  j |  j   |  j d <|  S(   NR   (	   R   t
   _make_initR   R   R   R   R   R   R   (   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   add_init  s    c         ` sV     j  }   f d   t   j  D \ | d <| d <| d <| d <| d <| d <  S(   Nc         3` s   |  ] }   j  |  Vq d  S(   N(   R   (   R`   t   meth(   R   (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <genexpr>  s    t   __eq__t   __ne__t   __lt__t   __le__t   __gt__t   __ge__(   R   t	   _make_cmpR   (   R   Re   (    (   R   s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   add_cmp  s    	Ic         C` sd   y |  j  j | _ Wn t k
 r& n Xy% d j |  j  j | j f  | _ Wn t k
 r_ n X| S(   sL   
        Add __module__ and __qualname__ to a *method* if possible.
        Rg   (   R   R   R   RD   R   R   (   R   t   method(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s    (   s   _clss	   _cls_dicts   _attrss   _base_namess   _attr_namess   _slotss   _frozens   _weakref_slots   _cache_hashs   _has_post_inits   _delete_attribss   _base_attr_map(   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   (    (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s2              	"				W							c         ` sQ   	           
   f d   } |  d k rC | S| |   Sd S(   s  
    A class decorator that adds `dunder
    <https://wiki.python.org/moin/DunderAlias>`_\ -methods according to the
    specified attributes using :func:`attr.ib` or the *these* argument.

    :param these: A dictionary of name to :func:`attr.ib` mappings.  This is
        useful to avoid the definition of your attributes within the class body
        because you can't (e.g. if you want to add ``__repr__`` methods to
        Django models) or don't want to.

        If *these* is not ``None``, ``attrs`` will *not* search the class body
        for attributes and will *not* remove any attributes from it.

        If *these* is an ordered dict (:class:`dict` on Python 3.6+,
        :class:`collections.OrderedDict` otherwise), the order is deduced from
        the order of the attributes inside *these*.  Otherwise the order
        of the definition of the attributes is used.

    :type these: :class:`dict` of :class:`str` to :func:`attr.ib`

    :param str repr_ns: When using nested classes, there's no way in Python 2
        to automatically detect that.  Therefore it's possible to set the
        namespace explicitly for a more meaningful ``repr`` output.
    :param bool repr: Create a ``__repr__`` method with a human readable
        representation of ``attrs`` attributes..
    :param bool str: Create a ``__str__`` method that is identical to
        ``__repr__``.  This is usually not necessary except for
        :class:`Exception`\ s.
    :param bool cmp: Create ``__eq__``, ``__ne__``, ``__lt__``, ``__le__``,
        ``__gt__``, and ``__ge__`` methods that compare the class as if it were
        a tuple of its ``attrs`` attributes.  But the attributes are *only*
        compared, if the types of both classes are *identical*!
    :param hash: If ``None`` (default), the ``__hash__`` method is generated
        according how *cmp* and *frozen* are set.

        1. If *both* are True, ``attrs`` will generate a ``__hash__`` for you.
        2. If *cmp* is True and *frozen* is False, ``__hash__`` will be set to
           None, marking it unhashable (which it is).
        3. If *cmp* is False, ``__hash__`` will be left untouched meaning the
           ``__hash__`` method of the base class will be used (if base class is
           ``object``, this means it will fall back to id-based hashing.).

        Although not recommended, you can decide for yourself and force
        ``attrs`` to create one (e.g. if the class is immutable even though you
        didn't freeze it programmatically) by passing ``True`` or not.  Both of
        these cases are rather special and should be used carefully.

        See the `Python documentation \
        <https://docs.python.org/3/reference/datamodel.html#object.__hash__>`_
        and the `GitHub issue that led to the default behavior \
        <https://github.com/python-attrs/attrs/issues/136>`_ for more details.
    :type hash: ``bool`` or ``None``
    :param bool init: Create a ``__init__`` method that initializes the
        ``attrs`` attributes.  Leading underscores are stripped for the
        argument name.  If a ``__attrs_post_init__`` method exists on the
        class, it will be called after the class is fully initialized.
    :param bool slots: Create a slots_-style class that's more
        memory-efficient.  See :ref:`slots` for further ramifications.
    :param bool frozen: Make instances immutable after initialization.  If
        someone attempts to modify a frozen instance,
        :exc:`attr.exceptions.FrozenInstanceError` is raised.

        Please note:

            1. This is achieved by installing a custom ``__setattr__`` method
               on your class so you can't implement an own one.

            2. True immutability is impossible in Python.

            3. This *does* have a minor a runtime performance :ref:`impact
               <how-frozen>` when initializing new instances.  In other words:
               ``__init__`` is slightly slower with ``frozen=True``.

            4. If a class is frozen, you cannot modify ``self`` in
               ``__attrs_post_init__`` or a self-written ``__init__``. You can
               circumvent that limitation by using
               ``object.__setattr__(self, "attribute_name", value)``.

        ..  _slots: https://docs.python.org/3/reference/datamodel.html#slots
    :param bool weakref_slot: Make instances weak-referenceable.  This has no
        effect unless ``slots`` is also enabled.
    :param bool auto_attribs: If True, collect `PEP 526`_-annotated attributes
        (Python 3.6 and later only) from the class body.

        In this case, you **must** annotate every field.  If ``attrs``
        encounters a field that is set to an :func:`attr.ib` but lacks a type
        annotation, an :exc:`attr.exceptions.UnannotatedAttributeError` is
        raised.  Use ``field_name: typing.Any = attr.ib(...)`` if you don't
        want to set a type.

        If you assign a value to those attributes (e.g. ``x: int = 42``), that
        value becomes the default value like if it were passed using
        ``attr.ib(default=42)``.  Passing an instance of :class:`Factory` also
        works as expected.

        Attributes annotated as :data:`typing.ClassVar` are **ignored**.

        .. _`PEP 526`: https://www.python.org/dev/peps/pep-0526/
    :param bool kw_only: Make all attributes keyword-only (Python 3+)
        in the generated ``__init__`` (if ``init`` is ``False``, this
        parameter is ignored).
    :param bool cache_hash: Ensure that the object's hash code is computed
        only once and stored on the object.  If this is set to ``True``,
        hashing must be either explicitly or implicitly enabled for this
        class.  If the hash code is cached, then no attributes of this
        class which participate in hash code computation may be mutated
        after object creation.


    .. versionadded:: 16.0.0 *slots*
    .. versionadded:: 16.1.0 *frozen*
    .. versionadded:: 16.3.0 *str*
    .. versionadded:: 16.3.0 Support for ``__attrs_post_init__``.
    .. versionchanged:: 17.1.0
       *hash* supports ``None`` as value which is also the default now.
    .. versionadded:: 17.3.0 *auto_attribs*
    .. versionchanged:: 18.1.0
       If *these* is passed, no attributes are deleted from the class body.
    .. versionchanged:: 18.1.0 If *these* is ordered, the order is retained.
    .. versionadded:: 18.2.0 *weakref_slot*
    .. deprecated:: 18.2.0
       ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` now raise a
       :class:`DeprecationWarning` if the classes compared are subclasses of
       each other. ``__eq`` and ``__ne__`` never tried to compared subclasses
       to each other.
    .. versionadded:: 18.2.0 *kw_only*
    .. versionadded:: 18.2.0 *cache_hash*
    c      	   ` s  t  |  d d   d  k r' t d   n  t |   
        }  t k rd | j   n   t k r} | j   n   t k r | j   n  	 t k	 r 	 t k	 r 	 d  k	 r t d   n 	 t k s 	 d  k r t k r rat d   qan\ 	 t k s5	 d  k rB t k rB t k rB| j	   n  rWt d   n  | j
    t k rz| j   n  rt d   n  | j   S(   Nt	   __class__s(   attrs only works with new-style classes.s6   Invalid value for hash.  Must be True, False, or None.sl   Invalid value for cache_hash.  To use hash caching, hashing must be either explicitly or implicitly enabled.sF   Invalid value for cache_hash.  To use hash caching, init must be True.(   RV   R   R+   R   R)   R   R   R   R*   R   R   R   R   (   R   t   builder(   R(   Ru   R"   R$   R   R!   R   Rv   RP   R#   R   R   t   repr_ns(    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   wrapK  sH    	$$0
N(   R   (   t	   maybe_clsRu   R   R!   R"   R#   R$   R   R   R   RP   Rv   R(   R   R   (    (   R   R$   R#   Ru   R!   R   R   Rv   RP   R(   R   R   R"   s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyRM     s    3:c         C` s1   t  |  j d d  t j k o0 |  j j t j k S(   sb   
        Check whether *cls* has a frozen ancestor by looking at its
        __setattr__.
        R   N(   RV   R   R   R   R   R   (   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s    c         C` s   |  j  t k S(   sb   
        Check whether *cls* has a frozen ancestor by looking at its
        __setattr__.
        (   R   R   (   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s    c         ` s   t    f d   | D  S(   s:   
    Create a tuple of all values of *obj*'s *attrs*.
    c         3` s!   |  ] } t    | j  Vq d  S(   N(   RV   Ra   (   R`   Ri   (   t   obj(    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <genexpr>  s    (   R   (   R   RM   (    (   R   s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   _attrs_to_tuple  s    c         ` sv  t  d     D    d } t j   } | j t    j d   d | j   f } t |   d g      f d   } | r  j | d t	  | r | d t	 | d	   j | d	 d
  n | d t	 | d	   j | d t	  n | d |  d j
   } i  } i  }	 t | | d  }
 t |
 | |	  t |  d  | j t  | f t j | <|	 d S(   Nc         s` sB   |  ]8 } | j  t k s6 | j  d  k r | j t k r | Vq d  S(   N(   R#   R)   R   R"   (   R`   Ri   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <genexpr>  s   s           s   utf-8s   <attrs generated hash %s>s   def __hash__(self):c         ` sd    j  | |  d | d   f g  x&  D] }  j | d | j  q- W j | d  d S(   s   
        Generate the code for actually computing the hash code.
        Below this will either be returned directly or used to compute
        a value which is then cached, depending on the value of cache_hash
        s   hash((s           %d,s           self.%s,s       ))N(   t   extendR?   Ra   (   t   prefixt   indentRi   (   t	   type_hashRM   t   method_lines(    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   append_hash_computation_lines  s
     s   if self.%s is None:s   object.__setattr__(self, '%s', i   t   )s
   self.%s = s   return self.%ss   return s   
R<   R   (   R   t   hashlibt   sha1t   updateR!   t   encodet	   hexdigestR#   R?   R   RD   RC   RB   Rp   R   t
   splitlinesR)   t	   linecachet   cache(   RM   R   R   t   tabR   t   unique_filenameR   t   scriptRJ   t   locst   bytecode(    (   RM   R   R   s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s<    		c         C` s   t  | d t d t |  _ |  S(   s%   
    Add a hash method to *cls*.
    R   R   (   R   R*   R   (   R   RM   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt	   _add_hash  s    c         C` s$   |  j  |  } | t k r t S| S(   s^   
    Check equality and either forward a NotImplemented or return the result
    negated.
    (   R   t   NotImplemented(   R   t   othert   result(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s    sQ   Comparision of subclasses using __%s__ is deprecated and will be removed in 2019.c         ` s  g    D] } | j  r | ^ q   t j   } | j t    j d   d | j   f } d d d g }   r | j d  d g } x<   D]4 } | j d | j f  | j d	 | j f  q W| | d
 g 7} n | j d  d j	 |  } i  } i  } t
 | | d  }	 t |	 | |  t |  d  | j t  | f t j | <| d }
 t }   f d     f d   }  f d   }  f d   }  f d   } |
 | | | | | f S(   Ns   utf-8s   <attrs generated eq %s>s   def __eq__(self, other):s-       if other.__class__ is not self.__class__:s           return NotImplementeds       return  (s
       ) == (s           self.%s,s           other.%s,s       )s       return Trues   
R<   R   c         ` s   t  |     S(   s&   
        Save us some typing.
        (   R   (   R   (   RM   (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   attrs_to_tuple6  s    c         ` sY   t  | |  j  rQ | j |  j k	 r; t j t d t  n    |     |  k  St Sd S(   s1   
        Automatically created by attrs.
        t   ltN(   s   lt(   R_   R   R-   R.   t   WARNING_CMP_ISINSTANCER/   R   (   R   R   (   R   (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR   <  s    c         ` sY   t  | |  j  rQ | j |  j k	 r; t j t d t  n    |     |  k St Sd S(   s1   
        Automatically created by attrs.
        t   leN(   s   le(   R_   R   R-   R.   R   R/   R   (   R   R   (   R   (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR   I  s    c         ` sY   t  | |  j  rQ | j |  j k	 r; t j t d t  n    |     |  k St Sd S(   s1   
        Automatically created by attrs.
        t   gtN(   s   gt(   R_   R   R-   R.   R   R/   R   (   R   R   (   R   (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR   V  s    c         ` sY   t  | |  j  rQ | j |  j k	 r; t j t d t  n    |     |  k St Sd S(   s1   
        Automatically created by attrs.
        t   geN(   s   ge(   R_   R   R-   R.   R   R/   R   (   R   R   (   R   (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR   c  s    (   R"   R   R   R   R!   R   R   R?   Ra   RD   RC   RB   Rp   R   R   R)   R   R   R   (   RM   Ri   R   R   t   linest   othersR   RJ   R   R   t   eqt   neR   R   R   R   (    (   RM   R   s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s@    "			
c         C` sL   | d k r |  j } n  t |  \ |  _ |  _ |  _ |  _ |  _ |  _ |  S(   s*   
    Add comparison methods to *cls*.
    N(	   R   Rj   R   R   R   R   R   R   R   (   R   RM   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   _add_cmps  s
    -c         ` s,   t  d   |  D      f d   } | S(   sK   
    Make a repr method for *attr_names* adding *ns* to the full name.
    c         s` s!   |  ] } | j  r | j Vq d  S(   N(   R!   Ra   (   R`   Ri   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <genexpr>  s    c      	   ` s\  y t  j } Wn# t k
 r2 t   } | t  _ n Xt |   | k rI d S|  j }  d k r t | d d  } | d k	 r | j d d  d } q | j	 } n  d | j	 } | j
 t |    z| | d g } t } xR   D]J } | r t } n | j d  | j | d	 t t |  | t   f  q Wd
 j |  d SWd | j t |    Xd S(   s1   
        Automatically created by attrs.
        s   ...R   s   >.i   iRg   t   (s   , t   =R;   R   N(   t   _already_repringt   working_setR   Rn   t   idR   R   RV   t   rsplitR   Ro   R)   R*   R?   R   R!   R   RD   t   remove(   R   R
  t   real_clsR   t
   class_nameR   t   firstRa   (   RF   R   (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s2    			,(   R   (   RM   R   R   (    (   R   RF   s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s    (c         C` s.   | d k r |  j } n  t | |  |  _ |  S(   s%   
    Add a repr method to *cls*.
    N(   R   Rj   R   R   (   R   R   RM   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt	   _add_repr  s    c         C` sC  g  |  D]$ } | j  s% | j t k	 r | ^ q }  t j   } | j t |   j d   d j | j	    } t
 |  | | | | |  \ }	 }
 } i  } t |	 | d  } t d   |  D  } |
 j i t d 6| d 6 | t k r t |
 d <n  t | |
 |  t |	  d  |	 j t  | f t j | <| d } | | _ | S(	   Ns   utf-8s   <attrs generated init {0}>R<   c         s` s   |  ] } | j  | f Vq d  S(   N(   Ra   (   R`   Ri   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <genexpr>  s    R   t	   attr_dictt   _cached_setattrR   (   R$   R   R   R   R   R   R!   R   R=   R   t   _attrs_to_init_scriptRC   R   R)   R   RB   Rp   R   R   R   R   RU   (   RM   t	   post_initR   R   R   R|   Ri   R   R   R   RJ   t   annotationsR   R   R  R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s(    1!	
	c      	   C` s=   t  |  j t |  d t  | t |   d t d i  |  _ |  S(   sR   
    Add a __init__ method to *cls*.  If *frozen* is True, make it immutable.
    R   R   R|   (   R   Rj   RV   R*   t   _is_slot_clsR   (   R   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt	   _add_init  s    c         C` sX   t  |   s t d   n  t |  d d  } | d k rT t d j d |     n  | S(   s  
    Return the tuple of ``attrs`` attributes for a class.

    The tuple also allows accessing the fields by their names (see below for
    examples).

    :param type cls: Class to introspect.

    :raise TypeError: If *cls* is not a class.
    :raise attr.exceptions.NotAnAttrsClassError: If *cls* is not an ``attrs``
        class.

    :rtype: tuple (with name accessors) of :class:`attr.Attribute`

    ..  versionchanged:: 16.2.0 Returned tuple allows accessing the fields
        by name.
    s   Passed object must be a class.Rj   s(   {cls!r} is not an attrs-decorated class.R   N(   R   R+   RV   R   R   R=   (   R   RM   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   fields  s    c         C` sh   t  |   s t d   n  t |  d d  } | d k rT t d j d |     n  t d   | D  S(   sF  
    Return an ordered dictionary of ``attrs`` attributes for a class, whose
    keys are the attribute names.

    :param type cls: Class to introspect.

    :raise TypeError: If *cls* is not a class.
    :raise attr.exceptions.NotAnAttrsClassError: If *cls* is not an ``attrs``
        class.

    :rtype: an ordered dict where keys are attribute names and values are
        :class:`attr.Attribute`\ s. This will be a :class:`dict` if it's
        naturally ordered like on Python 3.6+ or an
        :class:`~collections.OrderedDict` otherwise.

    .. versionadded:: 18.1.0
    s   Passed object must be a class.Rj   s(   {cls!r} is not an attrs-decorated class.R   c         s` s   |  ] } | j  | f Vq d  S(   N(   Ra   (   R`   Ri   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <genexpr>'  s    N(   R   R+   RV   R   R   R=   R	   (   R   RM   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   fields_dict  s    c         C` se   t  j t k r d SxK t |  j  D]: } | j } | d k	 r# | |  | t |  | j   q# q# Wd S(   s   
    Validate all attributes on *inst* that have a validator.

    Leaves all exceptions through.

    :param inst: Instance of a class with ``attrs`` attributes.
    N(	   R   t   _run_validatorsR*   R  R   R    R   RV   Ra   (   t   instRi   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   validate*  s    	c         C` s   d |  j  k S(   NR   (   Rk   (   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR  ;  s    c         C` s   |  | k o t  | |   S(   s>   
    Check if the attribute name comes from a slot class.
    (   R  (   t   a_nameR|   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   _is_slot_attr?  s    c      
   ` s  g  } t    f d   |  D  } | t k r | t k r\ | j d  d   } d   }	 q | j d  | r | j d  n    f d   }   f d   }	 n d   } d	   }	 g  }
 g  } g  } i  } i d+ d
 6} xI|  D]A} | j r | j |  n  | j } | j j d  } t | j t	  } | rE| j j
 rEd } n d } | j t k rt| rt j | j  } | j d+ k	 r| j |	 | | d j |    t j | j  } | j | | <n# | j | | | d j |    | j j | | <q| j d+ k	 rO| j |	 | d j d |    t j | j  } | j | | <q| j | | d j d |    nn| j t k	 r"| r"d j d | d |  } | j r| j |  n |
 j |  | j d+ k	 r	| j |	 | |   | j | t j | j  <q| j | | |   n| red j d |  } | j rS| j |  n |
 j |  | j d j d |   t j | j  } | j d+ k	 r| j d |	 | |   | j d  | j d |	 | | d j |    | j | t j | j  <nN | j d | | |   | j d  | j d | | | d j |    | j j | | <n} | j r~| j |  n |
 j |  | j d+ k	 r| j |	 | |   | j | t j | j  <n | j | | |   | j t k r | j d+ k r | j d+ k	 r | j | | <q q W| rt | d <| j d  xk | D]` } d j | j  } d j | j  } | j d j | | | j   | j | | <| | | <qGWn  | r| j d  n  | r| r| rd } qd } n d } | j | t d  f  n  d! j |
  }
 | rft r2t d"   n  |
 d# j d$ |
 rJd! n d d% d! j |   7}
 n  d& j d' |
 d( | rd) j |  n d*  | | f S(,   s   
    Return a script of an initializer for *attrs* and a dict of globals.

    The globals are expected by the generated script.

    If *frozen* is True, we cannot set the attributes directly so we use
    a cached ``object.__setattr__``.
    c         3` s!   |  ] } t  | j    Vq d  S(   N(   R  Ra   (   R`   Ri   (   R|   (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <genexpr>S  s    s8   _setattr = _cached_setattr.__get__(self, self.__class__)c         S` s   d i |  d 6| d 6S(   Ns(   _setattr('%(attr_name)s', %(value_var)s)R8   t	   value_var(    (   R8   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt
   fmt_setter^  s    c         S` s,   t  j |   } d i |  d 6| d 6| d 6S(   Ns2   _setattr('%(attr_name)s', %(conv)s(%(value_var)s))R8   R   t   conv(   t   _init_converter_patR=   (   R8   R   t	   conv_name(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   fmt_setter_with_converterd  s
    s   _inst_dict = self.__dict__c         ` sF   t  |     r* d i |  d 6| d 6} n d i |  d 6| d 6} | S(   Ns(   _setattr('%(attr_name)s', %(value_var)s)R8   R   s+   _inst_dict['%(attr_name)s'] = %(value_var)s(   R  (   R8   R   t   res(   R|   (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR!  y  s    c         ` sJ   t  j |   } t |     r' d } n d } | i |  d 6| d 6| d 6S(   Ns/   _setattr('%(attr_name)s', %(c)s(%(value_var)s))s2   _inst_dict['%(attr_name)s'] = %(c)s(%(value_var)s)R8   R   t   c(   R#  R=   R  (   R8   R   R$  t   tmpl(   R|   (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR%    s    	c         S` s   d i |  d 6| d 6S(   Ns   self.%(attr_name)s = %(value)sR8   R   (    (   R8   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR!    s    c         S` s,   t  j |   } d i |  d 6| d 6| d 6S(   Ns,   self.%(attr_name)s = %(conv)s(%(value_var)s)R8   R   R"  (   R#  R=   (   R8   R   R$  (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR%    s
    t   returnt   _R   R;   s   ({0})s    attr_dict['{attr_name}'].defaultR8   s+   {arg_name}=attr_dict['{attr_name}'].defaultt   arg_names   {arg_name}=NOTHINGs   if {arg_name} is not NOTHING:s       s   else:R   s#   if _config._run_validators is True:s   __attr_validator_{}s	   __attr_{}s       {}(self, {}, self.{})s   self.__attrs_post_init__()s   _setattr('%s', %s)s   _inst_dict['%s'] = %ss   self.%s = %sR   s   , s7   Keyword-only arguments only work on Python 3 and later.s    {leading_comma}*, {kw_only_args}t   leading_commat   kw_only_argss(   def __init__(self, {args}):
    {lines}
t   argsR  s   
    t   passN(   t   anyR)   R?   R   R    Ra   t   lstripR_   R   R2   t
   takes_selfR$   R*   t   _init_factory_patR=   R%   R#  R5   R   R(   R'   R   R   RD   R   R   (   RM   R   R   R  R   R|   R  t   any_slot_ancestorsR!  R%  R.  R-  t   attrs_to_validatet   names_for_globalsR  Ri   R8   R+  t   has_factoryt
   maybe_selft   init_factory_nameR$  t   argt   val_namet   init_hash_cache(    (   R|   s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR  F  s   	
											-
			!Rr   c           B` sz   e  Z d  Z d Z d d d d e d  Z d   Z e d    Z	 e
 d d   Z d   Z d   Z d   Z d   Z RS(   s   
    *Read-only* representation of an attribute.

    :attribute name: The name of the attribute.

    Plus *all* arguments of :func:`attr.ib`.

    For the version history of the fields, see :func:`attr.ib`.
    Ra   R   R    R!   R"   R#   R$   R&   R'   R%   R(   c         C` s   t  j |  t  } | d  k	 rX | d  k	 r9 t d   n  t j d t d d | } n  | d |  | d |  | d |  | d |  | d	 |  | d
 |  | d |  | d |  | d |	 r t |	  n t	  | d |
  | d |  d  S(   NsH   Can't pass both `convert` and `converter`.  Please use `converter` only.s`   The `convert` argument is deprecated in favor of `converter`.  It will be removed after 2019/01.R   i   Ra   R   R    R!   R"   R#   R$   R%   R&   R'   R(   (
   R   R   Rr   R   R,   R-   R.   R/   R   t   _empty_metadata_singleton(   R   Ra   R   R    R!   R"   R#   R$   R4   R&   R'   R%   R(   t   bound_setattr(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR   p  s0    	c         C` s   t     d  S(   N(   R   (   R   Ra   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s    c         C` s   t  j d t d d |  j S(   Nsa   The `convert` attribute is deprecated in favor of `converter`.  It will be removed after 2019/01.R   i   (   R-   R.   R/   R%   (   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR4     s
    c      
   ` sw   | d  k r   j } n   j d  k	 r6 t d   n    f d   t j D } |  d | d   j d   j d | |  S(   Ns8   Type annotation and type argument cannot both be presentc         ` s.   i  |  ]$ } | d k r t    |  |  q S(   Ra   R    R   R'   R4   (   s   names	   validators   defaults   types   convert(   RV   (   R`   R   (   Rh   (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys
   <dictcomp>  s   	    Ra   R    R   R'   (   R   R'   R0   Rr   R   t
   _validatort   _default(   R   Ra   Rh   R'   t	   inst_dict(    (   Rh   s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyRs     s    
		c         K` s&   t  j  |   } | j | j    | S(   s2   
        Copy *self* and apply *changes*.
        (   t   copyt	   _setattrsRm   (   R   t   changest   new(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyRt     s    c         ` s   t    f d     j D  S(   s(   
        Play nice with pickle.
        c         3` s9   |  ]/ } | d  k r$ t    |  n t   j  Vq d S(   R&   N(   RV   R   R&   (   R`   Ra   (   R   (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <genexpr>  s   (   R   R   (   R   (    (   R   s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s    c         C` s   |  j  t |  j |   d S(   s(   
        Play nice with pickle.
        N(   RC  R   R   (   R   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s    c         C` sh   t  j |  t  } xO | D]G \ } } | d k rA | | |  q | | | rY t |  n t  q Wd  S(   NR&   (   R   R   Rr   R   R=  (   R   t   name_values_pairsR>  Ra   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyRC    s    (   s   names   defaults	   validators   reprs   cmps   hashs   inits   metadatas   types	   converters   kw_onlyN(   R   R   R   R   R   R*   R   R   RA   R4   R   Rs   Rt   R   R   RC  (    (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyRr   W  s2   	          (	
				R4   Ra   R   R    R!   R"   R#   R&   R$   R3   c           B` s   e  Z d  Z d Z e d   d D  e d d d d d d d e d e d e d e d e  f Z	 d Z
 d   Z d   Z d   Z RS(   s  
    Intermediate representation of attributes that uses a counter to preserve
    the order in which the attributes have been defined.

    *Internal* data structure of the attrs library.  Running into is most
    likely the result of a bug like a forgotten `@attr.s` decorator.
    R[   R@  R!   R"   R#   R$   R&   R?  R%   R'   R(   c         c` sH   |  ]> } t  d  | d t d d d t d t d t d t d t  Vq d S(	   Ra   R   R    R!   R"   R#   R$   R(   N(   Rr   R   R   R)   R*   (   R`   Ra   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <genexpr>#  s   
Ra   R   R    i    c         C` s   t  j d 7_ t  j |  _ | |  _ | rQ t | t t f  rQ t |   |  _ n	 | |  _ | |  _	 | |  _
 | |  _ | |  _ | |  _ | |  _ |	 |  _ |
 |  _ d  S(   Ni   (   R3   t   cls_counterR[   R@  R_   t   listR   t   and_R?  R!   R"   R#   R$   R%   R&   R'   R(   (   R   R   R    R!   R"   R#   R$   R%   R&   R'   R(   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR   <  s    									c         C` s4   |  j  d k r | |  _  n t |  j  |  |  _  | S(   s   
        Decorator that adds *meth* to the list of validators.

        Returns *meth* unchanged.

        .. versionadded:: 17.1.0
        N(   R?  R   RI  (   R   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR    Z  s    c         C` s4   |  j  t k	 r t    n  t | d t |  _  | S(   s   
        Decorator that allows to set the default for an attribute.

        Returns *meth* unchanged.

        :raises DefaultAlreadySetError: If default has been set before.

        .. versionadded:: 17.1.0
        R2  (   R@  R   R   R2   R)   (   R   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR   h  s    
(   s   counters   _defaults   reprs   cmps   hashs   inits   metadatas
   _validators	   converters   types   kw_only(   s   counters   _defaults   reprs   cmps   hashs   initN(   R   R   R   R   R   Rr   R   R)   R*   Rj   RG  R   R    R   (    (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR3     s8             

		R   R2   c           B` s,   e  Z d  Z e   Z e   Z e d  Z RS(   s  
    Stores a factory callable.

    If passed as the default value to :func:`attr.ib`, the factory is used to
    generate a new value.

    :param callable factory: A callable that takes either none or exactly one
        mandatory positional argument depending on *takes_self*.
    :param bool takes_self: Pass the partially initialized instance that is
        being initialized as a positional argument.

    .. versionadded:: 17.1.0  *takes_self*
    c         C` s   | |  _  | |  _ d S(   s   
        `Factory` is part of the default machinery so if we want a default
        value here, we have to implement it ourselves.
        N(   R5   R2  (   R   R5   R2  (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR     s    	(   R   R   R   R6   R5   R2  R*   R   (    (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyR2   }  s   		c         K` s   t  | t  r | } n: t  | t t f  rF t d   | D  } n t d   | j d d  } t |  | | d k r i  n
 i | d 6 } y% t j	 d  j
 j d d  | _ Wn t t f k
 r n Xt d | |  |  S(	   st  
    A quick way to create a new class called *name* with *attrs*.

    :param name: The name for the new class.
    :type name: str

    :param attrs: A list of names or a dictionary of mappings of names to
        attributes.

        If *attrs* is a list or an ordered dict (:class:`dict` on Python 3.6+,
        :class:`collections.OrderedDict` otherwise), the order is deduced from
        the order of the names or attributes inside *attrs*.  Otherwise the
        order of the definition of the attributes is used.
    :type attrs: :class:`list` or :class:`dict`

    :param tuple bases: Classes that the new class will subclass.

    :param attributes_arguments: Passed unmodified to :func:`attr.s`.

    :return: A new class with *attrs*.
    :rtype: type

    .. versionadded:: 17.1.0 *bases*
    .. versionchanged:: 18.1.0 If *attrs* is ordered, the order is retained.
    c         s` s   |  ] } | t    f Vq d  S(   N(   R6   (   R`   Ri   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pys	   <genexpr>  s    s(   attrs argument must be a dict or a list.R   i   R   t   __main__Ru   N(   R_   R   RH  R   R+   t   popR   R'   t   syst	   _getframet	   f_globalsRc   R   R   R0   R   (   Ra   RM   t   basest   attributes_argumentst   cls_dictR  t   type_(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt
   make_class  s     	"t   _AndValidatorc           B` s    e  Z d  Z e   Z d   Z RS(   s2   
    Compose many validators to a single one.
    c         C` s(   x! |  j  D] } | | | |  q
 Wd  S(   N(   t   _validators(   R   R  Rb   R   R   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   __call__  s    (   R   R   R   R6   RU  RV  (    (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyRT    s   	c          G` sO   g  } x6 |  D]. } | j  t | t  r1 | j n | g  q Wt t |   S(   s   
    A validator that composes multiple validators into one.

    When called on a value, it runs all wrapped validators.

    :param validators: Arbitrary number of validators.
    :type validators: callables

    .. versionadded:: 17.1.0
    (   R   R_   RT  RU  R   (   t
   validatorst   valsR    (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyRI    s    (T   t
   __future__R    R   R   RB  R   R   RL  t	   threadingR-   t   operatorR   R;   R   t   _compatR   R   R   R   R	   R
   t
   exceptionsR   R   R   R   R   t   objectR   R   R#  R3  R@   RR   R   R=  R   R   R   R)   R*   R6   RK   RL   RT   RZ   R]   R   R   R   R   RM   R   R   R   R   R   R   R   R   R  t   localR	  R   R  R   R  R  R  R  R  R  R  Rr   R   Ra   t   _aRi   R#   R3   R2   RS  RT  RI  (    (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/attr/_make.pyt   <module>   s   .(
							~		 			A			g	1	#							 	K%n9