File: //usr/lib/python3/dist-packages/future/backports/__pycache__/misc.cpython-310.pyc
o
,�]� � @ s� d Z ddlmZ ddlZddlmZ ddlmZ m
Z ddlZddl
ZddlmZ ddlmZmZmZ ddlmZmZmZmZ dd lmZmZm Z m!Z!m"Z" e rWdd
l#m$Z$m%Z% ndd
l&m$Z$m%Z% dd� Zdd
lm'Z' e"r�zddl(m)Z) W n' e*y� ddl+m)Z) Y nw zddl,m)Z) W n e*y� ddl-m)Z) Y nw d3dd�Z.G dd� de/�Z0G dd� de1�Z2zddlmZ ddl
m3Z3 W n e*y� Y nw dd� Z4G dd� de1�Z5dd� Z6d4dd �Z7G d!d"� d"e%�Z8dd#lm9Z9 e9dfd$d%�Z:d&d'� Z;e2Z<e5Z=e6Z>e7Z?eZ@e4ZAe.ZBe8ZCe:ZDe;ZEejFd(k�r=dd)l#m2Z2m5Z5 dd*lm7Z7 dd+lGm;Z; zdd,lm6Z6 W n
e*�y6 Y nw dd-lm:Z: ejFd.k�rOddlmZ dd/l#m4Z4 ejFd0k�rcdd1lHm.Z. dd2l#m8Z8 dS dS )5a�
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 �7/usr/lib/python3/dist-packages/future/backports/misc.pyr # s r )�islice)� 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 sJ t | �t� f}|�v r
� S ��|� z�| �}W ��|� |S ��|� w �N)�idr �add�discard)�self�key�result)� fillvalue�repr_running�
user_functionr r �wrapperC s
�z<recursive_repr.<locals>.decorating_function.<locals>.wrapper�
__module__�__doc__�__name__�__annotations__)�set�getattrr( r) r* r+ )r&