From 7f80a4d5aa3e4e1c8435c9441bebbb062ede5581 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 20 Mar 2026 16:11:26 -0400 Subject: [PATCH] Port enhancements from sync client to async --- confluent_client/confluent/asynclient.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/confluent_client/confluent/asynclient.py b/confluent_client/confluent/asynclient.py index 7e641eee..31c41215 100644 --- a/confluent_client/confluent/asynclient.py +++ b/confluent_client/confluent/asynclient.py @@ -80,7 +80,7 @@ def stringify(instr): # Normalize unicode and bytes to 'str', correcting for # current python version if isinstance(instr, bytes) and not isinstance(instr, str): - return instr.decode('utf-8') + return instr.decode('utf-8', errors='replace') elif not isinstance(instr, bytes) and not isinstance(instr, str): return instr.encode('utf-8') return instr @@ -519,8 +519,8 @@ async def printattributes(session, requestargs, showtype, nodetype, noderange, o def _sort_attrib(k): if isinstance(k[1], dict) and k[1].get('sortid', None) is not None: - return k[1]['sortid'] - return k[0] + return sortutil.naturalize_string('{}'.format(k[1]['sortid'])) + return sortutil.naturalize_string(k[0]) async def print_attrib_path(path, session, requestargs, options, rename=None, attrprefix=None): exitcode = 0