summaryrefslogtreecommitdiffstats
path: root/PC/getpathp.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-07-24 11:55:48 (GMT)
committerGitHub <noreply@github.com>2018-07-24 11:55:48 (GMT)
commitd19d8d5279f156bc8f6736b5f16f069879b9519b (patch)
treedc3c2561371a0be4410172fe4270a37ab7c76ba6 /PC/getpathp.c
parentac0b3c2f4d86fc056b833a4e6b9a380741244a63 (diff)
downloadcpython-d19d8d5279f156bc8f6736b5f16f069879b9519b.zip
cpython-d19d8d5279f156bc8f6736b5f16f069879b9519b.tar.gz
cpython-d19d8d5279f156bc8f6736b5f16f069879b9519b.tar.bz2
bpo-34170: Add _PyCoreConfig.isolated (GH-8417)
* _PyCoreConfig: add isolated and site_import attributes * Replace Py_IgnoreEnvironment with config->ignore_environment when reading the current configuration * _PyCoreConfig_Read() now sets ignore_environment, utf8_mode, isolated and site_import from Py_IgnoreEnvironment, Py_UTF8Mode, Py_IsolatedFlag and Py_NoSiteFlag * _Py_InitializeCore() now sets Py_xxx flags from the configuration * pymain_read_conf() now uses _PyCoreConfig_Copy() to save/restore the configuration. * Rename _disable_importlib of _PyCoreConfig to _install_importlib * _PyCoreConfig_SetGlobalConfig() now also set Py_HashRandomizationFlag * Replace !Py_NoSiteFlag with core_config->site_import
Diffstat (limited to 'PC/getpathp.c')
-rw-r--r--PC/getpathp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/PC/getpathp.c b/PC/getpathp.c
index df4cb0a..e57893d 100644
--- a/PC/getpathp.c
+++ b/PC/getpathp.c
@@ -563,7 +563,7 @@ read_pth_file(_PyPathConfig *config, wchar_t *prefix, const wchar_t *path)
wcscpy_s(prefix, MAXPATHLEN+1, path);
reduce(prefix);
config->isolated = 1;
- config->no_site_import = 1;
+ config->site_import = 0;
size_t bufsiz = MAXPATHLEN;
size_t prefixlen = wcslen(prefix);
@@ -588,7 +588,7 @@ read_pth_file(_PyPathConfig *config, wchar_t *prefix, const wchar_t *path)
}
if (strcmp(line, "import site") == 0) {
- config->no_site_import = 0;
+ config->site_import = 1;
continue;
}
else if (strncmp(line, "import ", 7) == 0) {