[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-09-10 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fc153d127901361d7fe5f60caa6f41d2b8db0eb0 by Serhiy Storchaka in branch '2.7': [2.7] bpo-34068: iobase_close could call PyObject_SetAttrString with an exception set (GH-8282). (GH-8312) (GH-8314)

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > The assertion failure is a little bit "far" from the bug: would it make sense > to add "assert(!PyErr_Occurred());" to the entry point of: This looks like a part of larger issue, and I think it deserves a separate issue on the tracker. See also

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +7849 stage: resolved -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-17 Thread STINNER Victor
Change by STINNER Victor : -- resolution: fixed -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-17 Thread STINNER Victor
STINNER Victor added the comment: Python 2.7 also has the io module: it may be good to backport the change to Python 2.7 as well, no? I see the same bug in 2.7: res = PyObject_CallMethodObjArgs(self, _PyIO_str_flush, NULL); PyObject_SetAttrString(self, "__IOBase_closed", Py_True);

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-17 Thread STINNER Victor
STINNER Victor added the comment: > The assertion failure is a little bit "far" from the bug: would it make sense > to add "assert(!PyErr_Occurred());" to the entry point of: Stefan, Serhiy: any opinion on my idea? For example, PyObject_HasAttr() can replace and clear the current exception

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset cc13016658a9ed86d0b702ab6c251ad5952a952f by Serhiy Storchaka in branch '3.6': bpo-34068: _io__IOBase_close_impl could call _PyObject_SetAttrId with an exception set (GH-8282). (GH-8312)

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-17 Thread miss-islington
miss-islington added the comment: New changeset 6020d98beaf6b9945beb7560f9a1df361e0ba4dd by Miss Islington (bot) in branch '3.7': bpo-34068: _io__IOBase_close_impl could call _PyObject_SetAttrId with an exception set (GH-8282)

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +7847 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +7845 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 28f07364f066792ceee93231dbb80ae8ad98b2bb by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-34068: _io__IOBase_close_impl could call _PyObject_SetAttrId with an exception set (GH-8282)

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-14 Thread Zackery Spytz
Change by Zackery Spytz : -- nosy: +ZackerySpytz versions: +Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-14 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +7816 stage: -> patch review ___ Python tracker ___ ___

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: _PyType_Lookup doesn't set an exception. But if an exception was raised inside, it will be cleared, and this will clear an exception if it was raised before _PyType_Lookup. assert() is needed for guaranteeing that no exception will be lost. I'm +1 for

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-11 Thread STINNER Victor
STINNER Victor added the comment: > res = PyObject_CallMethodObjArgs(self, _PyIO_str_flush, NULL); > assert(!PyErr_Occurred()); /* < THIS ASSERTION FAILS */ Using this additional assertion, test_io also fails on test_flush_error_on_close(). --

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-11 Thread STINNER Victor
STINNER Victor added the comment: Stefan Behnel: "I added this assertion exactly for the purpose of finding this kind of bug. It means that some code tried to look up an attribute with a live exception set, which previously could swallow the exception in certain situations, and even if not,

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-11 Thread STINNER Victor
STINNER Victor added the comment: I'm able to reproduce the bug on my Fedora using: vstinner@apu$ gdb -args ENV/bin/python -m coverage run --pylib -m test --fail-env-changed -uall,-cpu test_urllib -F (gdb) run python: Objects/typeobject.c:3086: _PyType_Lookup: Assertion

[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-11 Thread STINNER Victor
Change by STINNER Victor : -- title: Assertion failure in _PyType_Lookup -> traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. ___ Python tracker