cpython/Doc/whatsnew
Victor Stinner 96c8475362
[3.8] bpo-38234: Backport init path config changes from master (GH-16423)
* bpo-38234: Py_SetPath() uses the program full path (GH-16357)

Py_SetPath() now sets sys.executable to the program full path
(Py_GetProgramFullPath()), rather than to the program name
(Py_GetProgramName()).

Fix also memory leaks in pathconfig_set_from_config().

(cherry picked from commit 1ce152a42e)

* bpo-38234: Add tests for Python init path config (GH-16358)


(cherry picked from commit bb6bf7d342)

* bpo-38234: test_embed: test pyvenv.cfg and pybuilddir.txt (GH-16366)

Add test_init_pybuilddir() and test_init_pyvenv_cfg() to test_embed
to test pyvenv.cfg and pybuilddir.txt configuration files.

Fix sysconfig._generate_posix_vars(): pybuilddir.txt uses UTF-8
encoding, not ASCII.

(cherry picked from commit 52ad33abbf)

* bpo-38234: Cleanup getpath.c (GH-16367)

* search_for_prefix() directly calls reduce() if found is greater
  than 0.
* Add calculate_pybuilddir() subfunction.
* search_for_prefix(): add path string buffer for readability.
* Fix some error handling code paths: release resources on error.
* calculate_read_pyenv(): rename tmpbuffer to filename.
* test.pythoninfo now also logs windows.dll_path

(cherry picked from commit 221fd84703)

* bpo-38234: Fix test_embed pathconfig tests (GH-16390)

bpo-38234: On macOS and FreeBSD, the temporary directory can be
symbolic link. For example, /tmp can be a symbolic link to /var/tmp.
Call realpath() to resolve all symbolic links.

(cherry picked from commit 00508a7407)

* bpo-38234: Add test_init_setpath_config() to test_embed (GH-16402)

* Add test_embed.test_init_setpath_config(): test Py_SetPath()
  with PyConfig.
* test_init_setpath() and test_init_setpythonhome() no longer call
  Py_SetProgramName(), but use the default program name.
* _PyPathConfig: isolated, site_import  and base_executable
  fields are now only available on Windows.
* If executable is set explicitly in the configuration, ignore
  calculated base_executable: _PyConfig_InitPathConfig() copies
  executable to base_executable.
* Complete path config documentation.

(cherry picked from commit 8bf39b606e)

* bpo-38234: Complete init config documentation (GH-16404)


(cherry picked from commit 88feaecd46)

* bpo-38234: Fix test_embed.test_init_setpath_config() on FreeBSD (GH-16406)

Explicitly preinitializes with a Python preconfiguration to avoid
Py_SetPath() implicit preinitialization with a compat
preconfiguration.

Fix also test_init_setpath() and test_init_setpythonhome() on macOS:
use self.test_exe as the executable (and base_executable), rather
than shutil.which('python3').

(cherry picked from commit 49d99f01e6)

* bpo-38234: Py_Initialize() sets global path configuration (GH-16421)

* Py_InitializeFromConfig() now writes PyConfig path configuration to
  the global path configuration (_Py_path_config).
* Add test_embed.test_get_pathconfig().
* Fix typo in _PyWideStringList_Join().

(cherry picked from commit 12f2f177fc)
2019-09-26 16:17:34 +02:00
..
2.0.rst bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
2.1.rst bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
2.2.rst bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
2.3.rst bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
2.4.rst bpo-33641: Convert RFC references into links. (GH-7103) 2018-05-31 07:39:00 +03:00
2.5.rst bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
2.6.rst Docs: FIX broken links. (GH-13491) 2019-05-25 20:02:24 +02:00
2.7.rst bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
3.0.rst bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
3.1.rst Fix miscellaneous typos (#4275) 2017-11-05 15:37:50 +02:00
3.2.rst Docs: FIX broken links. (GH-13491) 2019-05-25 20:02:24 +02:00
3.3.rst bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895) (GH-15961) 2019-09-11 19:50:29 -07:00
3.4.rst bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895) (GH-15961) 2019-09-11 19:50:29 -07:00
3.5.rst bpo-35044, doc: Use the :exc: role for the exceptions (GH-10037) 2018-10-26 12:52:11 +02:00
3.6.rst bpo-35486: Note Py3.6 import system API requirement change (GH-11540) 2019-01-17 02:41:29 -08:00
3.7.rst bpo-33821: Update IDLE section of What's New 3.7 (GH-15036) 2019-07-30 22:23:05 -07:00
3.8.rst [3.8] bpo-38234: Backport init path config changes from master (GH-16423) 2019-09-26 16:17:34 +02:00
changelog.rst Include additional changes to support blurbified NEWS (#3340) 2017-09-05 00:46:18 -07:00
index.rst Update Doc build to 3.8 2018-01-31 18:12:38 -05:00