Skip to content

Commit e0798f4

Browse files
author
Mohammed Ehab
committed
Fix lazy load: remove broken RuntimeClient reconstruction in run()
The previous change referenced undefined names (lambda_runtime_api_addr, use_thread_for_polling_next) inside run(), causing a NameError at init and failing all runtime tests. run() already receives a fully constructed lambda_runtime_client argument, so reconstruction is unnecessary and would also clobber the LambdaMultiConcurrentRuntimeClient in the multi-concurrent path. Removing those lines achieves the lazy-load goal (no module-level LambdaRuntimeClient import) and fixes the black formatting failure.
1 parent 2a7012c commit e0798f4

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

awslambdaric/bootstrap.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,6 @@ def run(handler, lambda_runtime_client):
503503
_log_preview_runtime_warning()
504504

505505
request_handler = _get_handler(handler)
506-
from .lambda_runtime_client import LambdaRuntimeClient
507-
lambda_runtime_client = LambdaRuntimeClient(lambda_runtime_api_addr, use_thread_for_polling_next)
508506
except FaultException as e:
509507
error_result = make_error(
510508
e.msg,

0 commit comments

Comments
 (0)