Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/psycopg2/__pycache__/ |
Upload File : |
o ��aj � @ sZ d Z ddlmZmZmZmZmZ dadaddd�Z dd� Z ddd �Zdd d�Zdd � Z dS )z>Implementation of the ipaddres-based network types adaptation � )�new_type�new_array_type� register_type�register_adapter�QuotedStringNc C sR ddl a tdu rt� atD ]}t|| � q t jt jt jt jfD ]}t|t � qdS )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 � IPv4Interface� IPv6Interface�IPv4Network�IPv6Networkr �adapt_ipaddress)�conn_or_curs�c�t� r �5/usr/lib/python3/dist-packages/psycopg2/_ipaddress.py�register_ipaddress% s ��r c C s<