11"""
22aurora-data-api - A Python DB-API 2.0 client for the AWS Aurora Serverless Data API
33"""
4- import os , datetime , ipaddress , time , random , string , logging , itertools , reprlib , json , re , threading
5- from uuid import UUID
4+ import os , datetime , ipaddress , uuid , time , random , string , logging , itertools , reprlib , json , re , threading
65from decimal import Decimal
76from collections import namedtuple
87from collections .abc import Mapping
@@ -125,7 +124,7 @@ class AuroraDataAPICursor:
125124 "text" : str ,
126125 "time" : datetime .time ,
127126 "timestamp" : datetime .datetime ,
128- "uuid" : UUID ,
127+ "uuid" : uuid . uuid4 ,
129128 "numeric" : Decimal ,
130129 "decimal" : Decimal
131130 }
@@ -143,7 +142,6 @@ class AuroraDataAPICursor:
143142 datetime .time : "TIME" ,
144143 datetime .datetime : "TIMESTAMP" ,
145144 Decimal : "DECIMAL" ,
146- UUID : "UUID"
147145 }
148146
149147 def __init__ (self , client = None , dbname = None , aurora_cluster_arn = None , secret_arn = None , transaction_id = None ,
@@ -311,8 +309,6 @@ def _render_value(self, value, col_desc=None):
311309 if col_desc and col_desc .type_code in self ._data_api_type_hint_map :
312310 if col_desc .type_code == Decimal :
313311 scalar_value = Decimal (scalar_value )
314- elif col_desc .type_code == UUID :
315- scalar_value = UUID (scalar_value )
316312 else :
317313 try :
318314 scalar_value = col_desc .type_code .fromisoformat (scalar_value )
0 commit comments