<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/113475>113475</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[lldb] [NFC] Fix deprecation warning because of Py_SetPythonHome
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
R-Goc
</td>
</tr>
</table>
<pre>
Currently building lldb with python support causes a deprecation warning in the build. This is caused by the use of Py_SetPythonHome() in [ScriptInterpreterPython.cpp:166. ](https://github.com/llvm/llvm-project/blob/a4ace3de1b390451ce5e41bce74b90dcd992ab61/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp#L145) Python is moving to using a different init mechanism, using the PyConfig struct instead, and relying on setting a config string within the struct.
Relevant info:
[https://docs.python.org/3/c-api/init.html#c.Py_SetPythonHome](url)
[https://docs.python.org/3/c-api/init_config.html#init-config](url)
[https://docs.python.org/3/c-api/init_config.html#c.PyConfig](url)
This is a good first issue.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VE2PozgQ_TXmYgVBGUI4cEgnYnel1Srq3nvLHwV45WDkj_Tm368M6Z0Zdc9hRpoTplz1XK-en7n3epwRO1I_kfqc8Rgm67rn3W9WZsKqe3eKzuEczJ2KqI3S80iNUYK-6TDR5R4mO1Mfl8W6QCWPHj3lVOHiUPKg7UzfuJtTlZ5pmHBDyenfk_ZU-61EUXFfN6NHagd6ub--YLis4L_bKxI4EGgTAqmfXqTTS_hjDugWhwHdlpfLZSHsWO73OSX1mcBhCmHxhB0J9AT6UYcpilzaK4HemNv7Z7c4-w_KQKAXxgoCPa-4RKawFKwtqrqUWGNVColNJdpCSdW2wMW-XAFUqvA2OokE-ouJo549gf5Dl2l3bfSzza8oAPuzrOpEdwumIV3tLU0wWBp9WnCq9DBg0oXqWQd6RTnxWfsrgdMjJ43zcj_ZedAj9cFFmXJ9QK5SEp8VdWjuKTUpiCFsyPL_ivSfVH4It2HklBRnUhyf0eCNr-cPlrDjI0zqp2_Hrqz0-XZNcutGAj0j0MsdXzSBPjWfT-FqCDCZf5B9lTE6Q6D9afjXjdD7KSm020K_Aj6ROH0H_f3Kczpaq-ignQ9Uex8xp5nqmGpZyzPsygbapmBQHbKpK6uqGAapmOBlIThrmWxKLvdYFrg_NFWmOyigKgtgZVM0cMixgbZmdSNqkGyoBKkKvHJt8nTbE4tsPbMrS1Y1dWa4QONX_wPM-LZ1RADSc-C61SIijp5UhdE--C8wQQezPhyrC-pzMudf_Smtev3vp2-AwNXvn3k8i850P2zZtdnktwebWwf_BQAA__9rSZde">