cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end ) | use cffi for calling C | if a pep adds a mere 25-30 [C-API] functions or so, it's a drop in the ocean (cough) - Armin
<arigo>
rjarry: "import pdb; pdb.set_trace()" works fine for me when put in a @ffi.def_extern function
<arigo>
you will have to be more precise
<rjarry>
arigo: yes but when debugging a program from the start, a breakpoint set into a @ffi.def_extern function will never be reached
<rjarry>
as if the set_trace function inserted by pdb is "removed" when the ffi_backend module calls the python callback
<rjarry>
"removed" or "ignored"
<rjarry>
I suspect this because test code coverage does not report anything in @ffi.def_extern functions although I am 100% certain the tests are using this code
<arigo>
sys.settrace() works fine too on a simple example. Can you come up with a complete example?
tsaka__ has joined #pypy
<rjarry>
I'll see if I did not dreamed this
<arigo>
maybe there is multithreading fun, like the settrace() of the wrong thread is used
<rjarry>
ah yes
<rjarry>
there is
<rjarry>
note that the threads in questions are created by the C library
<rjarry>
question*
<arigo>
the C library creates a thread and calls a ffi.def_extern in that new thread? then of course there is no sys.settrace() running in that thread
<rjarry>
sad
<arigo>
I'm not sure how pdb is supposed to work
<arigo>
maybe it just doesn't work at all with threads
<arigo>
if you make a new thread in Python and call a function in that thread, does a previously set breakpoint gets triggered?
<rjarry>
let me check
ronan has quit [Ping timeout: 272 seconds]
<rjarry>
arigo: no it does not work :)
forgottenone has quit [Ping timeout: 264 seconds]
otisolsen70 has quit [Quit: Leaving]
tsaka__ has quit [Ping timeout: 240 seconds]
andi- has quit [Ping timeout: 246 seconds]
andi- has joined #pypy
tsaka__ has joined #pypy
todda7 has joined #pypy
tsaka__ has quit [Read error: Connection reset by peer]
todda7 has quit [Client Quit]
todda7 has joined #pypy
rjarry has quit [Remote host closed the connection]
rjarry has joined #pypy
<atomizer>
in a similar situation i used the remote_pdb module to abstract away from the whole process/thread context
dje_ has joined #pypy
<atomizer>
oh it wasn't from inside of def_extern, nevermind
<arigo>
blame python's core devs for working on adding an infinite list of language features every release but not caring about the tooling around it, I guess
<rjarry>
hehe
<rjarry>
time to switch to rust
<rjarry>
(lol)
<simpson>
If Rust's compiler gets stable and fast enough, then yeah, I'm ready to give it a serious try. OCaml has been nice recently, too.
jacob22_ has joined #pypy
jacob22 has quit [Remote host closed the connection]