Skip to content

Commit 97cd159

Browse files
committed
fix endpointscfg path setup
* Use dev_appserver.fix_sys_path() instead of wrapper_util, which is considered a private interface * Use the vendor package to import the lib directory, rather than just adding it to the path
1 parent 881198b commit 97cd159

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎endpoints/_endpointscfg_setup.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,18 @@ def _SetupPaths():
8181
if sdk_path:
8282
sys.path.append(sdk_path)
8383
try:
84-
import wrapper_util # pylint: disable=g-import-not-at-top
85-
paths = wrapper_util.Paths(sdk_path)
86-
additional_paths = paths.v1_extra_paths + paths.endpointscfg_extra_paths
87-
sys.path = additional_paths + sys.path
84+
import dev_appserver # pylint: disable=g-import-not-at-top
85+
dev_appserver.fix_sys_path()
8886
except ImportError:
8987
logging.warning(_IMPORT_ERROR_WARNING)
9088
else:
9189
logging.warning(_NOT_FOUND_WARNING)
9290

9391
# Add the path above this directory, so we can import the endpoints package
9492
# from the user's app code (rather than from another, possibly outdated SDK).
95-
sys.path = [os.path.dirname(os.path.dirname(__file__))] + sys.path
93+
# pylint: disable=g-import-not-at-top
94+
from google.appengine.ext import vendor
95+
vendor.add(os.path.dirname(os.path.dirname(__file__)))
9696

9797

9898
_SetupPaths()

0 commit comments

Comments
 (0)