Apparently this was fixed by setting python to 3.9
For a dataclass type this is still a problem in 3.10
@dataclass
class IOConf:
sb_source: str
container: str
def get_servicebus_receiver(client: ServiceBusClient, stage_config: IOConf, dlq: bool = False) -> ServiceBusReceiver:
...
with ServiceBusClient.from_connection_string(stage.servicebus_conn_str) as client:
receiver = get_servicebus_receiver(client, stage, dlq=True)
mod_stage = replace(stage)
mod_stage.batch_size = 500
mod_stage.max_wait = 5
with ServiceBusClient.from_connection_string(stage.servicebus_conn_str) as client:
receiver = get_servicebus_receiver(client, mod_stage, dlq=True) # python:S5655