File tree Expand file tree Collapse file tree 3 files changed +1
-33
lines changed Expand file tree Collapse file tree 3 files changed +1
-33
lines changed Original file line number Diff line number Diff line change 46
46
PYTHON_ISOLATE_WORKER_DEPENDENCIES_DEFAULT_310 = False
47
47
PYTHON_ENABLE_WORKER_EXTENSIONS_DEFAULT = False
48
48
PYTHON_ENABLE_WORKER_EXTENSIONS_DEFAULT_39 = True
49
- PYTHON_EXTENSIONS_RELOAD_FUNCTIONS = "PYTHON_EXTENSIONS_RELOAD_FUNCTIONS"
50
49
51
50
# new programming model default script file name
52
51
PYTHON_SCRIPT_FILE_NAME = "PYTHON_SCRIPT_FILE_NAME"
Original file line number Diff line number Diff line change 8
8
from typing import Callable , Optional
9
9
10
10
from azure_functions_worker .constants import (
11
- CUSTOMER_PACKAGES_PATH ,
12
- PYTHON_EXTENSIONS_RELOAD_FUNCTIONS ,
13
- )
11
+ CUSTOMER_PACKAGES_PATH )
14
12
15
13
16
14
def is_true_like (setting : str ) -> bool :
@@ -116,25 +114,6 @@ def get_sdk_from_sys_path() -> ModuleType:
116
114
ModuleType
117
115
The azure.functions that is loaded from the first sys.path entry
118
116
"""
119
-
120
- if is_envvar_true (PYTHON_EXTENSIONS_RELOAD_FUNCTIONS ):
121
- backup_azure_functions = None
122
- backup_azure = None
123
-
124
- if 'azure.functions' in sys .modules :
125
- backup_azure_functions = sys .modules .pop ('azure.functions' )
126
- if 'azure' in sys .modules :
127
- backup_azure = sys .modules .pop ('azure' )
128
-
129
- module = importlib .import_module ('azure.functions' )
130
-
131
- if backup_azure :
132
- sys .modules ['azure' ] = backup_azure
133
- if backup_azure_functions :
134
- sys .modules ['azure.functions' ] = backup_azure_functions
135
-
136
- return module
137
-
138
117
if CUSTOMER_PACKAGES_PATH not in sys .path :
139
118
sys .path .insert (0 , CUSTOMER_PACKAGES_PATH )
140
119
Original file line number Diff line number Diff line change 7
7
import unittest
8
8
from unittest .mock import patch
9
9
10
- from azure_functions_worker .constants import PYTHON_EXTENSIONS_RELOAD_FUNCTIONS
11
10
from azure_functions_worker .utils import common , wrappers
12
11
13
12
TEST_APP_SETTING_NAME = "TEST_APP_SETTING_NAME"
@@ -365,15 +364,6 @@ def test_get_sdk_dummy_version(self):
365
364
sdk_version = common .get_sdk_version (module )
366
365
self .assertNotEqual (sdk_version , 'dummy' )
367
366
368
- def test_get_sdk_dummy_version_with_flag_enabled (self ):
369
- """Test if sdk version can get dummy sdk version
370
- """
371
- os .environ [PYTHON_EXTENSIONS_RELOAD_FUNCTIONS ] = '1'
372
- sys .path .insert (0 , self ._dummy_sdk_sys_path )
373
- module = common .get_sdk_from_sys_path ()
374
- sdk_version = common .get_sdk_version (module )
375
- self .assertEqual (sdk_version , 'dummy' )
376
-
377
367
def test_valid_script_file_name (self ):
378
368
file_name = 'test.py'
379
369
common .validate_script_file_name (file_name )
You can’t perform that action at this time.
0 commit comments