| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/site-packages/mysql/connector/__pycache__/ |
Upload File : |
�
��f�
� �� � d Z ddlmZ ddlZddlZddlmZ ej d dk( Zere e
eeefZe efZ
efZeefZefZne e
eefZe fZ
efZefZeefZdd�Zd� Zd � Zerd
� Zd� Zyej2 Zd� Zy)
z Python v2 to v3 migration module� )�DecimalN� )�
HexLiteral� c � � t | t � r| S t rt | � S t | t � rt | � S t | t � s t | j |�� � S t | � S # t $ r t d� �w xY w)z(Initializes a bytearray from the payload)�encodingzpayload must be a str or bytes)�
isinstance� bytearray�PY2�int�bytes�encode�AttributeError�
ValueError)�payloadr s �9C:\Python312\Lib\site-packages\mysql/connector/catch23.py�init_bytearrayr 2 s� � ��'�9�%���
���!�!��'�3����!�!�
���
'� ?��W�^�^�X�^�>�?�?�
�W���� � ?��=�>�>� ?�s �A6 �6Bc �N � t rt | t � S t | t � S )z&Returns whether a variable is a string)r r �
basestring�str��objs r �isstrr F s � �
��#�z�*�*��#�s�#�#� c �N � t rt | t � S t | t � S )z/Returns whether a variable is a of unicode type)r r �unicoder r s r � isunicoder M s � �
��#�w�'�'��#�s�#�#r c � � t |t t f� rt j | t |� � S t j | |� S )zAWrapper around struct.unpack handling buffer as bytes and strings)r r
r
�struct�unpack_from�buffer)�fmt�bufs r �
struct_unpackr$ V s; � ��c�I�u�-�.��%�%�c�6�#�;�7�7��!�!�#�s�+�+r c � � � � fd�}|S )z�Decorator used to create a abstract base class
We use this decorator to create abstract base classes instead of
using the abc-module. The decorator makes it possible to do the
same in both Python v2 and v3 code.
c �� �� | j j � }dD ] }|j |d� � | j }t r| |d<