|
26 | 26 | PYTHON_THREADPOOL_THREAD_COUNT_MAX_37,
|
27 | 27 | PYTHON_THREADPOOL_THREAD_COUNT_MIN,
|
28 | 28 | PYTHON_ENABLE_DEBUG_LOGGING, SCRIPT_FILE_NAME,
|
29 |
| - PYTHON_LANGUAGE_RUNTIME, PYTHON_LOAD_FUNCTIONS_INIT) |
| 29 | + PYTHON_LANGUAGE_RUNTIME) |
30 | 30 | from .extension import ExtensionManager
|
31 | 31 | from .logging import disable_console_logging, enable_console_logging
|
32 | 32 | from .logging import enable_debug_logging_recommendation
|
@@ -288,10 +288,9 @@ async def _handle__worker_init_request(self, request):
|
288 | 288 | if not DependencyManager.is_in_linux_consumption():
|
289 | 289 | DependencyManager.prioritize_customer_dependencies()
|
290 | 290 |
|
291 |
| - if DependencyManager.is_in_linux_consumption() \ |
292 |
| - and is_envvar_true(PYTHON_LOAD_FUNCTIONS_INIT): |
| 291 | + if DependencyManager.is_in_linux_consumption(): |
293 | 292 | logger.info(
|
294 |
| - "PYTHON_LOAD_FUNCTIONS_INIT enabled. Importing azure functions") |
| 293 | + "Importing azure functions in WorkerInitRequest") |
295 | 294 | import azure.functions # NoQA
|
296 | 295 |
|
297 | 296 | # loading bindings registry and saving results to a static
|
@@ -539,12 +538,6 @@ async def _handle__function_environment_reload_request(self, request):
|
539 | 538 | func_env_reload_request = \
|
540 | 539 | request.function_environment_reload_request
|
541 | 540 |
|
542 |
| - if not is_envvar_true(PYTHON_LOAD_FUNCTIONS_INIT): |
543 |
| - # Import before clearing path cache so that the default |
544 |
| - # azure.functions modules is available in sys.modules for |
545 |
| - # customer use |
546 |
| - import azure.functions # NoQA |
547 |
| - |
548 | 541 | # Append function project root to module finding sys.path
|
549 | 542 | if func_env_reload_request.function_app_directory:
|
550 | 543 | sys.path.append(func_env_reload_request.function_app_directory)
|
|
0 commit comments