[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-30 Thread Nick Coghlan
Nick Coghlan added the comment: Answering Eric's question about the flag variables though: * pymain_get_global_config copies the global variable flags to their respective struct entries * pymain_set_global_config copies the various struct entries to their respective global variable flags On

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-30 Thread Nick Coghlan
Nick Coghlan added the comment: I filed https://bugs.python.org/issue34008 to cover the fact that "Py_Initialize(); Py_Main();" doesn't work in 3.7.0 whereas it used to sort of work (by only partially applying the settings read from the CLI and environment by the Py_Main() call). Since "Py_

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-29 Thread Nick Coghlan
Nick Coghlan added the comment: Victor, could you file a separate issue for Py_Main(). It's a different problem, since Py_Main() is an entry point for an *application that embeds Python*. It's not a CPython API in the tradition sense. -- ___ Pytho

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-29 Thread Eric Snow
Eric Snow added the comment: > I looked quickly at _Py_InitializeCore() and I'm not sure > that it's designed to replace an existing configuration. > ... > So maybe for this specific case, _Py_InitializeCore() should > always set Py_HashRandomizationFlag. +1 At the same time, the use of Py_*F

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-28 Thread Miro Hrončok
Change by Miro Hrončok : -- nosy: +hroncok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-28 Thread STINNER Victor
STINNER Victor added the comment: Ok, now with my regression hat. In Python 3.6, Py_Main() calls Py_Initialize(). If Py_Initialize() is called twice, the second call does nothing. So it's fine to call Py_Main() after Py_Initialize() in Python 3.6. -- ___

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-28 Thread STINNER Victor
STINNER Victor added the comment: I looked quickly at _Py_InitializeCore() and I'm not sure that it's designed to replace an existing configuration. Example: int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */ (...) if (!core_config->use_hash_seed || core_config->hash_see

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-28 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue because fontforge still fails on Python 3.7.0 final. fontforge calls Py_Initialize() and then calls Py_Main() which fails with an assertion: https://bugzilla.redhat.com/show_bug.cgi?id=1595421 The same code works well on Python 3.6, so sho

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-27 Thread Ned Deily
Ned Deily added the comment: Fixed in 3.7.0. Thanks, everyone! -- priority: release blocker -> resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-27 Thread Ned Deily
Ned Deily added the comment: New changeset b940921a67fa33e8c8812aa3b7746161c2552c1d by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-33932: Calling Py_Initialize() twice does nothing (GH-7845) https://github.com/python/cpython/commit/b940921a67fa33e8c8812aa3b7746161c2552c1d

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-27 Thread STINNER Victor
STINNER Victor added the comment: Please keep it open until 3.7.0 is released. -- resolution: fixed -> status: closed -> open ___ Python tracker ___ _

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-27 Thread Nick Coghlan
Nick Coghlan added the comment: I went ahead and closed my PR, as I'm now happy that keeping this behaviour isn't going to block anything we want to do for PEP 432. If we change our minds and decide we want to deprecate the current behaviour after all, then we can start that deprecation proc

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-27 Thread Nick Coghlan
Nick Coghlan added the comment: https://github.com/python/cpython/pull/7967 amends the docs and adds the deprecation notices, but after taking another look at the way Victor's patch works, I'm thinking we may not need them: the *new* initialization API remains strict about the required state

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-27 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +7574 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-27 Thread STINNER Victor
STINNER Victor added the comment: Another example of project affected by this regression: fontforge https://bugzilla.redhat.com/show_bug.cgi?id=1595421 -- ___ Python tracker _

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread Ned Deily
Ned Deily added the comment: Since the undocumented change in behavior from 3.6 to 3.7 appears to be causing some downstream regressions at this late stage, I think Victor's change should be cherry-picked for 3.7.0 final. Nick or Eric, if you merge a 3.7 doc change, I'll cherry-pick that as

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread miss-islington
miss-islington added the comment: New changeset 3747dd16d5d2af3499f586386e49740a0454cf44 by Miss Islington (bot) in branch '3.7': bpo-33932: Calling Py_Initialize() twice does nothing (GH-7845) https://github.com/python/cpython/commit/3747dd16d5d2af3499f586386e49740a0454cf44 -- nosy

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +7469 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 209abf746985526bce255e2fba97d3246924885d by Victor Stinner in branch 'master': bpo-33932: Calling Py_Initialize() twice does nothing (GH-7845) https://github.com/python/cpython/commit/209abf746985526bce255e2fba97d3246924885d -- __

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread Nick Coghlan
Nick Coghlan added the comment: Aye, I'm fine with deferring the programmatic deprecation for now - it's mainly the docs I'd like to see changed at the same time as the regression is fixed. -- ___ Python tracker

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread STINNER Victor
STINNER Victor added the comment: > While I agree the documentation issue means that this should be made to work > again for Python 3.7.1, I'd like for Python 3.7 to at least deprecate calling > Py_Initialize twice without an intervening Py_Finalize. In term of timeline, I would prefer to fi

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread Nick Coghlan
Nick Coghlan added the comment: While I agree the documentation issue means that this should be made to work again for Python 3.7.1, I'd like for Python 3.7 to at least deprecate calling Py_Initialize twice without an intervening Py_Finalize. Otherwise the public multi-phase interpreter init

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread STINNER Victor
STINNER Victor added the comment: "no-op means it could be called twice" oops right :-) So it's a regression. Would you mind to review my PR 7845, Xiang? -- ___ Python tracker __

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread Xiang Zhang
Xiang Zhang added the comment: > Note: the doc doesn't say that the function must only be called once, nor > document the (current) new Python 3.7 restriction (must only be called once): But the doc says: This is a no-op when called for a second time (without calling Py_FinalizeEx() first

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-21 Thread STINNER Victor
STINNER Victor added the comment: Note: the doc doesn't say that the function must only be called once, nor document the (current) new Python 3.7 restriction (must only be called once): https://docs.python.org/dev/c-api/init.html#c.Py_Initialize -- ___

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-21 Thread STINNER Victor
STINNER Victor added the comment: Attached PR 7845 restores the Python 3.6 behaviour: calling Py_Initialize() twice does nothing. -- ___ Python tracker ___ __

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-21 Thread STINNER Victor
STINNER Victor added the comment: The behaviour changed has been introduced by bpo-22257: commit 1abcf6700b4da6207fe859de40c6c1bada6b4fec Author: Eric Snow Date: Tue May 23 21:46:51 2017 -0700 bpo-22257: Private C-API for core runtime initialization (PEP 432). (#1772) (patch b

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-21 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +7455 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-21 Thread STINNER Victor
STINNER Victor added the comment: I set the priority to release blocker to make sure that someone looks at this issue, even if I'm not sure that it's a huge regression. -- priority: normal -> release blocker ___ Python tracker

[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-21 Thread STINNER Victor
New submission from STINNER Victor : It would help to document that calling Py_Initialize() twice in Python 3.7 now triggers a fatal error, whereas previous the second call did nothing. Document it at: https://docs.python.org/dev/whatsnew/3.7.html#changes-in-the-c-api ... Or should it be consi