[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread Nick Coghlan
Nick Coghlan added the comment: Ah, I always forget that frameobject.h isn't included from python.h because none of the names have underscore prefixes. In that case, together with the new note in the porting section, I agree this is fine. -- ___ Pytho

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread Stefan Behnel
Stefan Behnel added the comment: > frameobject.h is not included in Python.h, so the > classic #include "Python.h" doesn't give you access to PyFrameObject > structure. You have to add a second #include "frameobject.h". Ah, right. I keep misremembering that, because in order to do anything non-

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread STINNER Victor
STINNER Victor added the comment: > Depends on how you use it, I guess. In many cases (at least for Cython and > likely some other low-level tools), it could be as simple as > > #if PY_VERSION_HEX < 0x030400B2 > // set "f_tstate" here > #endif Why would you set f_tstate field? Frame constru

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > All > definitions in this header are also surrounded by #ifndef > Py_LIMITED_API ... #endif, so the fields are not part of the stable > API. "Stable ABI", not API. That said, I agree the field should have been private anyway. --

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread Stefan Behnel
Stefan Behnel added the comment: > what's the migration path for C API users that were relying on that struct > field? Depends on how you use it, I guess. In many cases (at least for Cython and likely some other low-level tools), it could be as simple as #if PY_VERSION_HEX < 0x030400B2 //

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 278dd7eb2f2b by Victor Stinner in branch 'default': Issue #14432: Document the removal of the PyFrameObject.f_tstate field http://hg.python.org/cpython/rev/278dd7eb2f2b -- ___ Python tracker

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread STINNER Victor
STINNER Victor added the comment: 2013/12/13 Victor Stinner : > The header is not public, it is private. Hum, I'm not clear. frameobject.h is not included in Python.h, so the classic #include "Python.h" doesn't give you access to PyFrameObject structure. You have to add a second #include "frameo

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread STINNER Victor
STINNER Victor added the comment: > I agree that this is an improvement, but isn't it a bit late for removing a > public field from a public header file in 3.4, without any preceding > deprecation? The header is not public, it is private. The structure in not documented (in Doc/c-api/*.rst). T

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread Nick Coghlan
Nick Coghlan added the comment: Unfortunately Stefan has a point - what's the migration path for C API users that were relying on that struct field? -- ___ Python tracker ___ ___

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread Stefan Behnel
Stefan Behnel added the comment: I agree that this is an improvement, but isn't it a bit late for removing a public field from a public header file in 3.4, without any preceding deprecation? -- nosy: +scoder ___ Python tracker

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-12 Thread STINNER Victor
STINNER Victor added the comment: Thanks Mark Shannon for your patch. Sorry, I forgot to mention your name if the changesets :-/ I didn't remember the whole story of this issue. It should now be fixed. -- resolution: -> fixed status: open -> closed ___

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset aa324af42c0e by Victor Stinner in branch '2.7': Issue #14432: Generator now clears the borrowed reference to the thread state http://hg.python.org/cpython/rev/aa324af42c0e -- ___ Python tracker

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2f975036cf39 by Victor Stinner in branch '3.3': Issue #14432: Fix compilation when thread support is disabled http://hg.python.org/cpython/rev/2f975036cf39 New changeset 9852637f05c3 by Victor Stinner in branch 'default': (Merge 3.3) Issue #14432: F

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0875e5bbe5f0 by Victor Stinner in branch '3.3': Issue #14432: Generator now clears the borrowed reference to the thread state http://hg.python.org/cpython/rev/0875e5bbe5f0 New changeset 55dd094a2b01 by Victor Stinner in branch 'default': Issue #1443

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset d2560fd8a008 by Victor Stinner in branch 'default': Issue #14432: Remove the thread state field from the frame structure. Fix a http://hg.python.org/cpython/rev/d2560fd8a008 -- nosy: +python-dev ___ Pytho

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-11-14 Thread STINNER Victor
STINNER Victor added the comment: > versions: +Python 3.4 -Python 2.6, Python 3.2 It would be interesting to fix the issue in Python 2.7 and 3.3: generator.patch should fix it and the patch is simple (update frame->f_tstate before each execution of a generator). --

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-11-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 3.4 -Python 2.6, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-11-14 Thread STINNER Victor
Changes by STINNER Victor : -- title: Bug in generator if the generator in created in a C thread -> Bug in generator if the generator in created in a temporary C thread ___ Python tracker