Georg Brandl added the comment:
A more complete patch that also fixes up pyexpat's frame trickery is tracked in
#22462.
--
nosy: +georg.brandl
resolution: - duplicate
status: open - closed
superseder: - Modules/pyexpat.c violates PEP 384
___
Ned Batchelder added the comment:
Attached a patch which simply removes the code that invokes the trace function.
--
keywords: +patch
Added file: http://bugs.python.org/file29951/6539.patch
___
Python tracker rep...@bugs.python.org
Ezio Melotti added the comment:
The relevant changesets are 1c26eb768293 and e43126c470a7. See also #534864.
--
nosy: +Jeremy.Hylton, fdrake
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6359
Ezio Melotti added the comment:
Can you provide a patch?
--
nosy: +ezio.melotti
versions: +Python 3.3, Python 3.4 -Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6359
___
Ned Batchelder added the comment:
I have no idea why pyexpat.c invokes the trace function in the first place.
Unless someone can explain why it does that when no other C extension does, my
inclination would be to make it stop calling the trace function at all, not to
fix how it calls it.
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: +loewis
stage: - unit test needed
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6359
New submission from Ned Batchelder ned...@users.sourceforge.net:
Pyexpat.c calls the tracing function explicitly (not sure why). When it
intercepts an exception, it calls the function with PyTrace_EXCEPTION,
but then leaves the scope without calling PyTrace_RETURN. This is
incorrect. There