Staging
v0.8.1
https://github.com/python/cpython
Revision 96c8475362acb41decd1d7db9243f328973e5de7 authored by Victor Stinner on 26 September 2019, 14:17:34 UTC, committed by GitHub on 26 September 2019, 14:17:34 UTC
* 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 1ce152a42eaa917d7763bce93f1e1ca72530d7ca)

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


(cherry picked from commit bb6bf7d342b4503a6227fd209fac934905b6a1aa)

* 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 52ad33abbfb6637d74932617c7013bae0ccf6e32)

* 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 221fd84703c545408bbb4a6e0b58459651331f5c)

* 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 00508a7407d7d300b487532e2271534b20e378a7)

* 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 8bf39b606ef7b02c0279a80789f3c4824b0da5e9)

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


(cherry picked from commit 88feaecd46a8f427e30ef7ad8cfcddfe392a2402)

* 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 49d99f01e6e51acec5ca57a02e857f0796bc418b)

* 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 12f2f177fc483723406d7917194e7f655a20631b)
1 parent 68040ed
History
Tip revision: 96c8475362acb41decd1d7db9243f328973e5de7 authored by Victor Stinner on 26 September 2019, 14:17:34 UTC
[3.8] bpo-38234: Backport init path config changes from master (GH-16423)
Tip revision: 96c8475
File Mode Size
asyncio
collections
concurrent
ctypes
curses
dbm
distutils
email
encodings
ensurepip
html
http
idlelib
importlib
json
lib2to3
logging
msilib
multiprocessing
pydoc_data
site-packages
sqlite3
test
tkinter
turtledemo
unittest
urllib
venv
wsgiref
xml
xmlrpc
__future__.py -rw-r--r-- 5.0 KB
__phello__.foo.py -rw-r--r-- 64 bytes
_bootlocale.py -rw-r--r-- 1.8 KB
_collections_abc.py -rw-r--r-- 25.5 KB
_compat_pickle.py -rw-r--r-- 8.5 KB
_compression.py -rw-r--r-- 5.2 KB
_dummy_thread.py -rw-r--r-- 5.9 KB
_markupbase.py -rw-r--r-- 14.3 KB
_osx_support.py -rw-r--r-- 18.7 KB
_py_abc.py -rw-r--r-- 6.0 KB
_pydecimal.py -rw-r--r-- 223.2 KB
_pyio.py -rw-r--r-- 90.9 KB
_sitebuiltins.py -rw-r--r-- 3.0 KB
_strptime.py -rw-r--r-- 24.7 KB
_threading_local.py -rw-r--r-- 7.1 KB
_weakrefset.py -rw-r--r-- 5.6 KB
abc.py -rw-r--r-- 4.4 KB
aifc.py -rw-r--r-- 32.0 KB
antigravity.py -rw-r--r-- 477 bytes
argparse.py -rw-r--r-- 93.8 KB
ast.py -rw-r--r-- 18.0 KB
asynchat.py -rw-r--r-- 11.1 KB
asyncore.py -rw-r--r-- 19.6 KB
base64.py -rwxr-xr-x 19.9 KB
bdb.py -rw-r--r-- 31.5 KB
binhex.py -rw-r--r-- 13.6 KB
bisect.py -rw-r--r-- 2.2 KB
bz2.py -rw-r--r-- 12.3 KB
cProfile.py -rwxr-xr-x 6.4 KB
calendar.py -rw-r--r-- 24.2 KB
cgi.py -rwxr-xr-x 32.8 KB
cgitb.py -rw-r--r-- 11.8 KB
chunk.py -rw-r--r-- 5.3 KB
cmd.py -rw-r--r-- 14.5 KB
code.py -rw-r--r-- 10.4 KB
codecs.py -rw-r--r-- 35.7 KB
codeop.py -rw-r--r-- 5.9 KB
colorsys.py -rw-r--r-- 4.0 KB
compileall.py -rw-r--r-- 13.2 KB
configparser.py -rw-r--r-- 53.1 KB
contextlib.py -rw-r--r-- 24.4 KB
contextvars.py -rw-r--r-- 129 bytes
copy.py -rw-r--r-- 8.4 KB
copyreg.py -rw-r--r-- 7.0 KB
crypt.py -rw-r--r-- 3.5 KB
csv.py -rw-r--r-- 15.8 KB
dataclasses.py -rw-r--r-- 47.9 KB
datetime.py -rw-r--r-- 86.0 KB
decimal.py -rw-r--r-- 320 bytes
difflib.py -rw-r--r-- 82.1 KB
dis.py -rw-r--r-- 19.9 KB
doctest.py -rw-r--r-- 101.8 KB
dummy_threading.py -rw-r--r-- 2.7 KB
enum.py -rw-r--r-- 33.8 KB
filecmp.py -rw-r--r-- 9.6 KB
fileinput.py -rw-r--r-- 14.4 KB
fnmatch.py -rw-r--r-- 4.0 KB
formatter.py -rw-r--r-- 14.8 KB
fractions.py -rw-r--r-- 23.6 KB
ftplib.py -rw-r--r-- 34.0 KB
functools.py -rw-r--r-- 36.5 KB
genericpath.py -rw-r--r-- 4.8 KB
getopt.py -rw-r--r-- 7.3 KB
getpass.py -rw-r--r-- 5.9 KB
gettext.py -rw-r--r-- 26.5 KB
glob.py -rw-r--r-- 5.6 KB
gzip.py -rw-r--r-- 20.7 KB
hashlib.py -rw-r--r-- 9.5 KB
heapq.py -rw-r--r-- 22.3 KB
hmac.py -rw-r--r-- 6.0 KB
imaplib.py -rw-r--r-- 52.3 KB
imghdr.py -rw-r--r-- 3.7 KB
imp.py -rw-r--r-- 10.3 KB
inspect.py -rw-r--r-- 115.2 KB
io.py -rw-r--r-- 3.5 KB
ipaddress.py -rw-r--r-- 69.5 KB
keyword.py -rw-r--r-- 945 bytes
linecache.py -rw-r--r-- 5.2 KB
locale.py -rw-r--r-- 76.4 KB
lzma.py -rw-r--r-- 12.7 KB
mailbox.py -rw-r--r-- 76.8 KB
mailcap.py -rw-r--r-- 7.9 KB
mimetypes.py -rw-r--r-- 21.1 KB
modulefinder.py -rw-r--r-- 23.9 KB
netrc.py -rw-r--r-- 5.4 KB
nntplib.py -rw-r--r-- 42.2 KB
ntpath.py -rw-r--r-- 25.6 KB
nturl2path.py -rw-r--r-- 2.5 KB
numbers.py -rw-r--r-- 10.0 KB
opcode.py -rw-r--r-- 5.7 KB
operator.py -rw-r--r-- 10.5 KB
optparse.py -rw-r--r-- 59.0 KB
os.py -rw-r--r-- 38.0 KB
pathlib.py -rw-r--r-- 49.9 KB
pdb.py -rwxr-xr-x 61.2 KB
pickle.py -rw-r--r-- 62.9 KB
pickletools.py -rw-r--r-- 91.3 KB
pipes.py -rw-r--r-- 8.7 KB
pkgutil.py -rw-r--r-- 21.0 KB
platform.py -rwxr-xr-x 39.4 KB
plistlib.py -rw-r--r-- 30.5 KB
poplib.py -rw-r--r-- 14.7 KB
posixpath.py -rw-r--r-- 15.3 KB
pprint.py -rw-r--r-- 21.0 KB
profile.py -rwxr-xr-x 22.6 KB
pstats.py -rw-r--r-- 26.7 KB
pty.py -rw-r--r-- 4.7 KB
py_compile.py -rw-r--r-- 8.1 KB
pyclbr.py -rw-r--r-- 14.9 KB
pydoc.py -rw-r--r-- 104.9 KB
queue.py -rw-r--r-- 11.1 KB
quopri.py -rwxr-xr-x 7.1 KB
random.py -rw-r--r-- 28.1 KB
re.py -rw-r--r-- 15.4 KB
reprlib.py -rw-r--r-- 5.1 KB
rlcompleter.py -rw-r--r-- 6.9 KB
runpy.py -rw-r--r-- 11.7 KB
sched.py -rw-r--r-- 6.3 KB
secrets.py -rw-r--r-- 2.0 KB
selectors.py -rw-r--r-- 18.1 KB
shelve.py -rw-r--r-- 8.3 KB
shlex.py -rw-r--r-- 13.0 KB
shutil.py -rw-r--r-- 49.1 KB
signal.py -rw-r--r-- 2.2 KB
site.py -rw-r--r-- 20.8 KB
smtpd.py -rwxr-xr-x 33.9 KB
smtplib.py -rwxr-xr-x 43.3 KB
sndhdr.py -rw-r--r-- 6.9 KB
socket.py -rw-r--r-- 34.2 KB
socketserver.py -rw-r--r-- 26.3 KB
sre_compile.py -rw-r--r-- 26.1 KB
sre_constants.py -rw-r--r-- 7.0 KB
sre_parse.py -rw-r--r-- 39.3 KB
ssl.py -rw-r--r-- 49.6 KB
stat.py -rw-r--r-- 5.0 KB
statistics.py -rw-r--r-- 38.7 KB
string.py -rw-r--r-- 10.3 KB
stringprep.py -rw-r--r-- 12.6 KB
struct.py -rw-r--r-- 257 bytes
subprocess.py -rw-r--r-- 75.4 KB
sunau.py -rw-r--r-- 17.9 KB
symbol.py -rw-r--r-- 2.1 KB
symtable.py -rw-r--r-- 7.4 KB
sysconfig.py -rw-r--r-- 23.9 KB
tabnanny.py -rwxr-xr-x 11.1 KB
tarfile.py -rwxr-xr-x 91.4 KB
telnetlib.py -rw-r--r-- 22.7 KB
tempfile.py -rw-r--r-- 26.9 KB
textwrap.py -rw-r--r-- 19.0 KB
this.py -rw-r--r-- 1003 bytes
threading.py -rw-r--r-- 49.4 KB
timeit.py -rwxr-xr-x 13.1 KB
token.py -rw-r--r-- 2.3 KB
tokenize.py -rw-r--r-- 25.2 KB
trace.py -rwxr-xr-x 29.2 KB
traceback.py -rw-r--r-- 22.9 KB
tracemalloc.py -rw-r--r-- 16.7 KB
tty.py -rw-r--r-- 879 bytes
turtle.py -rw-r--r-- 140.2 KB
types.py -rw-r--r-- 9.5 KB
typing.py -rw-r--r-- 66.1 KB
uu.py -rwxr-xr-x 6.7 KB
uuid.py -rw-r--r-- 29.7 KB
warnings.py -rw-r--r-- 19.4 KB
wave.py -rw-r--r-- 17.8 KB
weakref.py -rw-r--r-- 20.9 KB
webbrowser.py -rwxr-xr-x 22.9 KB
xdrlib.py -rw-r--r-- 5.8 KB
zipapp.py -rw-r--r-- 7.4 KB
zipfile.py -rw-r--r-- 83.9 KB
zipimport.py -rw-r--r-- 30.0 KB

back to top