bpo-46417: _testembed.c avoids Py_SetProgramName() (GH-30732)

* _testembed_Py_Initialize() now uses the PyConfig API, rather than
  deprecated Py_SetProgramName().
* Reduce INIT_LOOPS from 16 to 4: test_embed now takes 8.7 seconds
  rather than 14.7 seconds.
This commit is contained in:
Victor Stinner 2022-01-21 02:12:18 +01:00 committed by GitHub
parent e9e3eab0b8
commit 6415e2ee49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 31 deletions

View file

@ -32,7 +32,7 @@ API_PYTHON = 2
# _PyCoreConfig_InitIsolatedConfig()
API_ISOLATED = 3
INIT_LOOPS = 16
INIT_LOOPS = 4
MAX_HASH_SEED = 4294967295