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.

classification
Title: Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7
Type: Stage: resolved
Components: Documentation Versions: Python 3.8
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.snow, hroncok, pkoning, vstinner
Priority: Keywords:

Created on 2018-05-12 08:40 by hroncok, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (11)
msg316421 - (view) Author: Miro Hrončok (hroncok) * Date: 2018-05-12 08:40
Background: gdb fails to build with Python 3.7 as described in https://bugzilla.redhat.com/show_bug.cgi?id=1577396

This is due to _PyImport_FixupBuiltin changing it's API. I feel that _underscored functions are probably not guaranteed to not change, however I miss anything about the following changes:

https://github.com/python/cpython/pull/1638
https://github.com/python/cpython/pull/3565
https://github.com/python/cpython/pull/3575

In here:

https://docs.python.org/3.7/whatsnew/3.7.html#porting-to-python-37
(or that page generally)

That page doesn't mention PyInterpreterState at all, so even if you decide that _PyImport_FixupBuiltin doesn't deserve a mention, maybe the general change does.

Thanks
msg316427 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-05-12 15:42
Is it a release blocker?
msg316428 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-05-12 15:42
Miro: do you want to work on a pull request?
msg316443 - (view) Author: Miro Hrončok (hroncok) * Date: 2018-05-13 02:09
The change is a bit beyond my understanding ATM. I might be able to study it and stitch something up, but I'd rather leave it to the author of the change.
msg316675 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2018-05-15 15:54
Yeah, I added an extra parameter.  Since it's an internal API I didn't think anything of it.
msg316679 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-05-15 16:21
Oh, I'm sorry, I misunderstood the issue. Changes in the *private* API must not be documented. In short, you must not use the private API :-)

If you really have to use the private API, be prepared for incompatible changes in new Python releases. For the gdb issue, gdb should use an #ifdef using PY_VERSION_HEX. Depending on the Python version, the number of parameters changes.

Miro: Let's move the discussion to https://bugzilla.redhat.com/show_bug.cgi?id=1577396 to see how to fix gdb ;-)
msg316686 - (view) Author: Miro Hrončok (hroncok) * Date: 2018-05-15 17:39
Sorry for mixing two things here, but I meant that I found out about this because of the private API use in gdb, however nothing from the change is documented on whatsnew at all. This bug was a reaction for https://github.com/python/cpython/pull/1638#issuecomment-388497381
msg317078 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-05-19 00:25
> Sorry for mixing two things here, but I meant that I found out about this because of the private API use in gdb, however nothing from the change is documented on whatsnew at all.

It seems like there is at least one change in the public API: the removal of the PyInterpreterState.modules field. Are the members of the PyInterpreterState structure part of the public API?

@Eric: do you consider that it should be documented?
msg317256 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2018-05-21 23:36
Under Py_LIMITED_API:

    typedef struct _is PyInterpreterState;

Also, the actual removal of the "modules" field was reverted.  The field is still there until I get back to fixing https://github.com/python/cpython/pull/3606.
msg317287 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-05-22 13:52
> Also, the actual removal of the "modules" field was reverted.

Oh... I didn't understand that part :-) Ok. In this case it's fine to close this documentation issue. Nothing should be documented for 3.7 ;-)
msg318341 - (view) Author: Paul Koning (pkoning) * Date: 2018-05-31 20:43
FYI, I'm the one who created this problem back in 2012.  I just submitted a GDB patch for this, using PyImport_AppendInittab to define the built-in module at startup.  I'm not sure how I missed this originally; perhaps the documentation was not as clear back then or maybe I just overlooked the information.  The patch eliminates the call to _PyImport_FixBuiltins.
History
Date User Action Args
2022-04-11 14:59:00adminsetgithub: 77651
2018-05-31 20:50:32ned.deilysetpriority: release blocker ->
nosy: - ned.deily

versions: - Python 3.7
2018-05-31 20:43:02pkoningsetnosy: + pkoning
messages: + msg318341
2018-05-22 13:52:10vstinnersetmessages: + msg317287
2018-05-21 23:36:31eric.snowsetmessages: + msg317256
2018-05-19 00:25:40vstinnersetmessages: + msg317078
2018-05-15 17:39:29hroncoksetmessages: + msg316686
2018-05-15 16:21:58vstinnersetstatus: open -> closed
resolution: not a bug
messages: + msg316679

stage: resolved
2018-05-15 15:54:40eric.snowsetmessages: + msg316675
2018-05-13 02:09:59hroncoksetmessages: + msg316443
2018-05-12 15:42:59vstinnersetmessages: + msg316428
2018-05-12 15:42:36vstinnersetpriority: normal -> release blocker
nosy: + ned.deily
messages: + msg316427

2018-05-12 08:40:06hroncokcreate