This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients belopolsky, emilyemorehouse, eric.snow, hroncok, mcepl, ncoghlan, vstinner
Date 2018-07-20.13:38:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1532093893.6.0.56676864532.issue34008@psf.upfronthosting.co.za>
In-reply-to
Content
I looked one more time at Python 3.6, code before my huge Py_Main()/Py_Initialize() refactoring, before _PyCoreConfig/_PyMainInterpreterConfig have been added. In short, calling Py_Main() after Py_Initialize() "works" in Python 3.6 but only sys.argv is set: almost all other options are lost/ignored. For example, if you call Py_Initialize() you get a sys.path from the current environment, but if Py_Main() gets a new module search path: sys.path is not updated.

I modified PR 8043 to write the minimum patch just to fix fontforge. When Py_Main() is called Py_Initialize(): just set sys.argv, that's all.

If someone wants to fix this use case, apply properly the new Py_Main() configuration carefully, I would suggest to only work in the master branch: that's out of the scope of this specific regression.

IMHO it would be nice to enhance this use case. For example, it would be "nice" to update at least "sys.path" (and other related variables) in such case.
History
Date User Action Args
2018-07-20 13:38:13vstinnersetrecipients: + vstinner, ncoghlan, belopolsky, mcepl, eric.snow, emilyemorehouse, hroncok
2018-07-20 13:38:13vstinnersetmessageid: <1532093893.6.0.56676864532.issue34008@psf.upfronthosting.co.za>
2018-07-20 13:38:13vstinnerlinkissue34008 messages
2018-07-20 13:38:13vstinnercreate