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) *  |
Date: 2018-05-12 15:42 |
Is it a release blocker? |
|
|
msg316428 - (view) |
Author: STINNER Victor (vstinner) *  |
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) *  |
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) *  |
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) *  |
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) *  |
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) *  |
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. |
|
|