| Server IP : 93.115.150.27 / Your IP : 216.73.216.221 Web Server : LiteSpeed System : Linux host2.azar.host 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64 User : dorfakkh ( 1797) PHP Version : 8.1.34 Disable Function : show_source, system, passthru, exec, popen, proc_open, mail MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python37/lib64/python3.7/site-packages/psycopg2/__pycache__/ |
Upload File : |
B
*��]q � @ sf d Z ddlmZmZmZmZmZ ddlmZ da da
ddd�Zdd� Zdd d
�Z
ddd�Zd
d� ZdS )z>Implementation of the ipaddres-based network types adaptation
� )�new_type�new_array_type�
register_type�register_adapter�QuotedString)� text_typeNc C sZ ddl a tdkrt� axtD ]}t|| � qW x&t jt jt jt jgD ]}t|t � qDW dS )a
Register conversion support between `ipaddress` objects and `network types`__.
:param conn_or_curs: the scope where to register the type casters.
If `!None` register them globally.
After the function is called, PostgreSQL :sql:`inet` values will be
converted into `~ipaddress.IPv4Interface` or `~ipaddress.IPv6Interface`
objects, :sql:`cidr` values into into `~ipaddress.IPv4Network` or
`~ipaddress.IPv6Network`.
.. __: https://www.postgresql.org/docs/current/static/datatype-net-types.html
r N)
� ipaddress�_casters�
_make_castersr Z
IPv4InterfaceZ
IPv6InterfaceZIPv4NetworkZIPv6Networkr �adapt_ipaddress)Zconn_or_curs�c�t� r �F/opt/alt/python37/lib64/python3.7/site-packages/psycopg2/_ipaddress.py�register_ipaddress% s
r c C s<