관리-도구
편집 파일: pooling.cpython-38.pyc
U )�e]0 � @ s� d Z ddlZddlmZ zddlZW n ek r@ ddlZY nX ddlZddlm Z ddl mZ e�� Z dZdZe�d �Zd d� ZG dd � d e�ZG dd� de�ZdS )z6Implementing pooling of connections to MySQL servers. � N)�uuid4� )�errors)�MySQLConnection� �@ z[^a-zA-Z0-9._:\-*$#]c K sR g }dD ]0}z|� t| | �� W q tk r6 Y qX q|sHt�d��d�|�S )z�Generate a pool name This function takes keyword arguments, usually the connection arguments for MySQLConnection, and tries to generate a name for a pool. Raises PoolError when no name can be generated. Returns a string. )�host�port�userZdatabasez.Failed generating pool name; specify pool_name�_)�append�str�KeyErrorr � PoolError�join)�kwargs�parts�key� r �l/opt/hc_python/lib64/python3.8/site-packages/../../../lib/python3.8/site-packages/mysql/connector/pooling.py�generate_pool_name/ s �r c @ s<