Fixed in:

https://github.com/GrahamDumpleton/mod_wsgi/commit/f635d7f76380e9826b35d9d3ef09c2176a3e14d8
 
<https://github.com/GrahamDumpleton/mod_wsgi/commit/f635d7f76380e9826b35d9d3ef09c2176a3e14d8>

Graham

> On 7 Feb 2018, at 3:35 pm, Graham Dumpleton <graham.dumple...@gmail.com> 
> wrote:
> 
> I could be naughty as not using:
> 
>    https://docs.python.org/3/c-api/reflection.html#c.PyFrame_GetLineNumber 
> <https://docs.python.org/3/c-api/reflection.html#c.PyFrame_GetLineNumber>
> 
>     int f_lasti;                /* Last instruction if called */
>     /* Call PyFrame_GetLineNumber() instead of reading this field
>        directly.  As of 2.3 f_lineno is only valid when tracing is
>        active (i.e. when f_trace is set).  At other times we use
>        PyCode_Addr2Line to calculate the line from the current
>        bytecode index. */
>     int f_lineno;               /* Current line number */
>     int f_iblock;               /* index in f_blockstack */
>     char f_executing;           /* whether the frame is still executing */
>     PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */
>     PyObject *f_localsplus[1];  /* locals+stack, dynamically sized */
> 
> In other words, I am accessing f_lineno directly which may not work correctly 
> now.
> 
> Have to remember some of this code was written a very very long time ago. :-)
> 
> Graham
> 
>> On 7 Feb 2018, at 3:32 pm, Jesus Cea <j...@jcea.es <mailto:j...@jcea.es>> 
>> wrote:
>> 
>> On 07/02/18 05:22, Graham Dumpleton wrote:
>>> I'll look into. Python stack traces are a bit of a pain as they don't
>>> give a separate stack frame for when you call a function which is
>>> actually implemented in C code. Usually though one can at least work
>>> out the line in calling code where C function was called though. At
>>> least that is the case if using profile hooks. Don't remember what
>>> happens with stack frame dumping.
>> 
>> I am hitting this issue myself in other project. Look like a bug of
>> "feature missing" of Python interpreter. Maybe something to work for
>> Python 3.8, two years away.
>> 
>> What I am experiencing now is something different. I just send an email
>> about it.
>> 
>> 5:30 AM in Spain, time for some sleep!.
>> 
>> -- 
>> Jesús Cea Avión                         _/_/      _/_/_/        _/_/_/
>> j...@jcea.es <mailto:j...@jcea.es> - http://www.jcea.es/ 
>> <http://www.jcea.es/>     _/_/    _/_/  _/_/    _/_/  _/_/
>> Twitter: @jcea                        _/_/    _/_/          _/_/_/_/_/
>> jabber / xmpp:j...@jabber.org <xmpp:j...@jabber.org>  _/_/  _/_/    _/_/     
>>      _/_/  _/_/
>> "Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
>> "My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
>> "El amor es poner tu felicidad en la felicidad de otro" - Leibniz
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "modwsgi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to modwsgi+unsubscr...@googlegroups.com 
>> <mailto:modwsgi+unsubscr...@googlegroups.com>.
>> To post to this group, send email to modwsgi@googlegroups.com 
>> <mailto:modwsgi@googlegroups.com>.
>> Visit this group at https://groups.google.com/group/modwsgi 
>> <https://groups.google.com/group/modwsgi>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to