File: //usr/local/lib/python3.9/site-packages/future/backports/__pycache__/misc.cpython-39.pyc
a
q�dg'� � @ s� d Z ddlmZ ddlZddlmZ ddlmZ m
Z ddlZddl
ZddlmZ ddlmZmZmZ ddlmZmZmZmZ dd lmZmZm Z m!Z!m"Z" e r�dd
l#m$Z$m%Z% ndd
l&m$Z$m%Z% dd� Zdd
lm'Z' e!r�d4dd�Z(nddlm(Z( e"�r(zddl)m*Z* W n e+�y$ ddl,m*Z* Y n0 n2zddl-m*Z* W n e+�yX ddl.m*Z* Y n0 d5dd�Z/G dd� de0�Z1G dd� de2�Z3zddlmZ ddl
m4Z4 W n e+�y� Y n0 dd� Z5G dd� de2�Z6d d!� Z7d6d"d�Z(G d#d$� d$e%�Z8dd%lm9Z9 e9dfd&d'�Z:d(d)� Z;e3Z<e6Z=e7Z>e(Z?eZ@e5ZAe/ZBe8ZCe:ZDe;ZEejFd*k�r�dd+l#m3Z3m6Z6 ddlm(Z( dd,lGm;Z; zdd-lm7Z7 W n e+�y� Y n0 dd.lm:Z: ejFd/k�r�ddlmZ dd0l#m5Z5 ejFd1k�r�dd2lHm/Z/ dd3l#m8Z8 dS )7a�
Miscellaneous function (re)definitions from the Py3.4+ standard library
for Python 2.6/2.7.
- math.ceil (for Python 2.7)
- collections.OrderedDict (for Python 2.6)
- collections.Counter (for Python 2.6)
- collections.ChainMap (for all versions prior to Python 3.3)
- itertools.count (for Python 2.6, with step parameter)
- subprocess.check_output (for Python 2.6)
- reprlib.recursive_repr (for Python 2.6+)
- functools.cmp_to_key (for Python 2.6)
� )�absolute_importN)�ceil)�
itemgetter�eq)�proxy)�repeat�chain�starmap)�getaddrinfo�SOCK_STREAM�error�socket)� iteritems�
itervalues�PY2�PY26�PY3)�Mapping�MutableMappingc C s t t| ��S )zZ
Return the ceiling of x as an int.
This is the smallest integral value >= x.
)�int�oldceil)�x� r �?/usr/local/lib/python3.9/site-packages/future/backports/misc.pyr # s r )�islice� c c s | V | |7 } q d S �Nr ��start�stepr r r �count3 s r )r )� get_ident�...c s � fdd�}|S )zGDecorator to make a repr function return fillvalue for a recursive callc sL t � � �� �fdd�}t�d�|_t�d�|_t�d�|_t�di �|_|S )Nc sL t | �t� f}|�v r� S ��|� z�| �}W ��|� n��|� 0 |S r )�idr! �add�discard)�self�key�result)� fillvalue�repr_running�
user_functionr r �wrapperM s
z<recursive_repr.<locals>.decorating_function.<locals>.wrapper�
__module__�__doc__�__name__�__annotations__)�set�getattrr- r. r/ r0 )r+ r, �r) )r* r+ r �decorating_functionJ s z+recursive_repr.<locals>.decorating_functionr )r) r4 r r3 r �recursive_reprG s r5 c @ s e Zd ZdZdS )�_Link)�prev�nextr'