File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/cheroot/__pycache__/_compat.cpython-310.pyc
Back
o ;j} � @ s� d Z ddlZddlZzddlZejdkZejdkZ[W n ey( dZdZY nw ee� d��Z ee� d��Ze�� dkZ e�� ZedkZed kZed kZedkZe�� Ze�d�Zddd�Zddd�Zddd�Zdd� Zdd� ZdS )zECompatibility code for using Cheroot with various versions of Python.� N)� � )r r ZCIZGITHUB_WORKFLOW�PyPy�Windows�Linux�Darwin�SunOS�ppc� ISO-8859-1c C s t | � | �|�S )z8Return the native string as bytes in the given encoding.)� assert_native�encode��n�encoding� r �C/opt/saltstack/salt/lib/python3.10/site-packages/cheroot/_compat.py�ntob$ s r c C s t | � | S )z<Return the native string as Unicode with the given encoding.)r r r r r �ntou+ s r c C s | � |�S )z>Return the byte string as native string in the given encoding.)�decode)�br r r r �bton2 s r c C s t | t�stdt| �j ��dS )zxCheck whether the input is of native :py:class:`str` type. Raises: TypeError: in case of failed check zn must be a native str (got %s)N)� isinstance�str� TypeError�type�__name__)r r r r r 7 s �r c C s( t | t�r | �� S t | t�r| S td��)aR Retrieve bytes out of the given input buffer. :param mv: input :py:func:`buffer` :type mv: memoryview or bytes :return: unwrapped bytes :rtype: bytes :raises ValueError: if the input is not one of \ :py:class:`memoryview`/:py:func:`buffer` \ or :py:class:`bytes` z8extract_bytes() only accepts bytes and memoryview/buffer)r � memoryview�tobytes�bytes� ValueError)�mvr r r � extract_bytesB s �r! )r )�__doc__�os�platform�ssl�OPENSSL_VERSION_INFOZIS_ABOVE_OPENSSL31ZIS_ABOVE_OPENSSL10�ImportError�bool�getenvZIS_CIZIS_GITHUB_ACTIONS_WORKFLOW�python_implementationZIS_PYPY�systemZSYS_PLATFORMZ IS_WINDOWSZIS_LINUXZIS_MACOSZ IS_SOLARIS�machineZ PLATFORM_ARCH� startswithZIS_PPCr r r r r! r r r r �<module> s6 �
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings