Blender Git Loki

Git Commits -> Revision 3459969

Revision 3459969 by Campbell Barton (pygpu_extensions)
February 12, 2021, 15:13 (GMT)
PyAPI: Use PyPreConfig & PyConfig for Python initialization

Use Python 3.8's API for setting the initial configuration.

This replaces a mix of our logic and direct calls to the Python API
and has no user visible changes.

Using the Python API makes the logic easier to follow and provides
utilities such as `PyConfig_SetBytesArgv`
that wasn't available in previous releases.

Note that this uses Python's utf8/wchar_t conversions,
which used to cause problems (see T31506).

Since `Py_UTF8Mode` was set, the systems locale isn't used for decoding,
allowing us to use Python's utility functions that call
`Py_DecodeLocale` internally.

Ref D10382

Commit Details:

Full Hash: 3459969d8c502471531c0b183face9b61119217a
Parent Commit: 1b86da9
Committed By: Germano Cavalcante
Lines Changed: +131, -116

3 Modified Paths:

/source/blender/python/generic/py_capi_utils.c (+0, -34) (Diff)
/source/blender/python/generic/py_capi_utils.h (+0, -2) (Diff)
/source/blender/python/intern/bpy_interface.c (+131, -80) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021