-
-
Notifications
You must be signed in to change notification settings - Fork 34k
bpo-34008: Allow to call Py_Main() after Py_Initialize() #8043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I will test this with fontforge to see if it fixes its problem. |
|
The abort is gone, however now I get: |
|
D'oh, that's what I was afraid of: fontforge is relying on the fact that While I suspect it will leak a bit of memory (but hopefully not segfault on shutdown), it's likely worth trying a variant of Victor's patch that calls |
|
Can you please point me to Victor's patch? I'm a bit lost in multiple places this is being discussed 😄 |
|
I just meant this PR :) |
|
It looks like VTK is also affected by the bug this is fixing. If I rebuild Python 3.7 with this PR, then that error goes away. |
Py_Main() can again be called after Py_Initialize(), as in Python 3.6. The new configuration is ignored, except of _PyMainInterpreterConfig.argv which is used to update sys.argv.
|
this fixes the fontforge issue |
ncoghlan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
Py_Main() can again be called after Py_Initialize(), as in Python 3.6. The new configuration is ignored, except of _PyMainInterpreterConfig.argv which is used to update sys.argv. (cherry picked from commit fb47bca) Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
GH-8352 is a backport of this pull request to the 3.7 branch. |
|
Thanks for the review @ncoghlan! I merged my PR to master and will backport it to 3.7. |
Py_Main() can again be called after Py_Initialize(), as in Python 3.6. The new configuration is ignored, except of _PyMainInterpreterConfig.argv which is used to update sys.argv.
https://bugs.python.org/issue34008