Blender Git Commit Log

Git Commits -> Revision cafd6b5

Revision cafd6b5 by Campbell Barton (master)
February 11, 2021, 21:10 (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: cafd6b519c5f5c4b67d0dfe3d453cd4223b38716
Parent Commit: aa43e2e
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)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021