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
marky1991 has joined #pypy
CrazyPython has quit [Remote host closed the connection]
CrazyPython has joined #pypy
marky1991 has quit [Ping timeout: 268 seconds]
CrazyPython has quit [Read error: Connection reset by peer]
jcea has quit [Quit: jcea]
ronan has quit [Ping timeout: 245 seconds]
ionelmc has quit [Quit: Connection closed for inactivity]
tsaka__ has quit [Ping timeout: 244 seconds]
speeder39_ has joined #pypy
dddddd has quit [Remote host closed the connection]
mattip has quit [Remote host closed the connection]
ajlawrence has joined #pypy
<ajlawrence> How do I trigger the module __init__ method from a test? I have an app level test where a module is imported but it does not seem to be initialized.
ajlawrence has quit [Remote host closed the connection]
speeder39_ has quit [Quit: Connection closed for inactivity]
ajlawrence has joined #pypy
kenaan has quit [Ping timeout: 245 seconds]
speeder39_ has joined #pypy
antocuni has joined #pypy
<arigato> cfbolz: re having at look at c0b2526268ab: seems fine to me. You managed to make the special-casing quite small
<cfbolz> arigato: cool
<cfbolz> arigato: do you have a clue what we do about the recent issues about other threads that access frames?
<arigato> yes
<arigato> accessing frames from a different thread is a known problem with our jit, I think
<arigato> it's also why sys._current_frames() returns sometimes "fake" frames
<cfbolz> arigato: hm, ok
<cfbolz> arigato: but other threads enabling trace hooks not working is really a bit annoying
<arigato> hum, maybe I'm wrong somewhere
<arigato> ...no, at least issue #3068 Error setting frame tracing from a different thread
<arigato> is about sys._current_frames()
<arigato> see docstring of sys._current_frames
<cfbolz> arigato: ah, I see
<cfbolz> Right, it's an undocumented API
<arigato> seems we should at least write-protect the fake_frame instances
<cfbolz> arigato: to not give the wrong impression? Yes
<arigato> I'm unsure how we can help fix the issue described in #3068, though
<cfbolz> arigato: you mean how to debug other threads?
<arigato> maybe add a boolean argument to _current_frames, and issue a warning when called without argument?
<arigato> yes
<arigato> is it really possible to force all frames from a different thread?
<arigato> probably... then maybe add a new function like __pypy__.force_frame(thread_id) => real forced top-level frame?
<arigato> to let the user force the frames of only one thread at a time
<cfbolz> arigato: yes, an API like that sounds like a good idea
<arigato> I'm not even sure that our sys._current_frames fills in f_code in all cases
<arigato> ...no, it doesn't, that's why there is class fake_code
<cfbolz> Right
<arigato> unclear how we should warn the users of sys._current_frames()
<arigato> maybe issue a warning for *any* call to it?
<arigato> and if you read the warning you know you can instead call __pypy__.current_frames(force=flag)
<arigato> or sys._current_frames(force=flag)
BPL has joined #pypy
xorAxAx has joined #pypy
<cfbolz> arigato: or 'just' a blog post and an updated docstring
agronholm has quit [Ping timeout: 250 seconds]
<arigato> well the docstring already explains the issue, it wasn't read
mattip has joined #pypy
agronholm has joined #pypy
<cfbolz> arigato: right :-(
<arigato> ah, found a nicer solution
<arigato> rename "fake frames" -> "wrapper frames", and they have property getters/setters and they really force the underlying frame on demand
<arigato> in a way it's how we should have designed the whole frames, as interp-only objects and with some wrappers for app-level
<arigato> in this case, I *think* the wrappers can hold on the virtual frame refs
<mattip> ajlawrence: (for the logs) can you show the code that doesn't work?
<cfbolz> arigato: ah, interesting
<ajlawrence> in pypy\module\signal\__init__.py there is the method def __init__(self, space, *args): "NOT_RPYTHON" from pypy.module.signal import interp_signal MixedModule.__init__(self, space, *args) # add the signal-checking callback as an action on the space space.check_signal_action = interp_signal.CheckSignalAction(sp
<ajlawrence> ace) space.actionflag.register_periodic_action(space.check_signal_action, use_bytecode_counter=False) if space.reverse_debugging: from pypy.interpreter.reverse_debugging import RDBSignalActionFlag space.actionflag.__class__ = RDBSignalActionFlag else:
<ajlawrence> space.actionflag.__class__ = interp_signal.SignalActionFlag # xxx yes I know the previous line is a hack print "loading module" if os.name == "nt": print "creating sigint event" interp_signal.create_sigint_event(
<ajlawrence> oh dear
<ajlawrence> That doesn't look very readable.
<mattip> no, use a pastebin or a github git
<mattip> what test are you running?
<ajlawrence> I have written the test myself
<ajlawrence> in pypy\module\signal\test_signal.py
<ajlawrence> I would like to check that the method create_sigint_event gets called during initialization of the module.
<ajlawrence> It is at the bottom of that paste
<mattip> this is from pypy/module/signal/moduledef.py, not pypy/module/signal/__init__.py, right?
antocuni has quit [Ping timeout: 245 seconds]
tsaka__ has joined #pypy
<mattip> that code is run as part of the pre-test setup, when translating the module and setting up the space object
<mattip> so it is not run in the actual test itself
<mattip> you can replace your new code with a pdb.pdb.set_trace() to see where it is called
<mattip> ajlawrence ^^^
<mattip> ajlawrence: I am thinking of starting a release cycle, is winconsoleio getting close?
<ajlawrence> No. I wouldn't put it in a release if you were planning on doing on soon. I am sure it could be done reasonably quickly but there is a steep learning curve on my part.
<mattip> if there is anything we can do to help please reach out
<mattip> s/we/I/
ekaologik has joined #pypy
<mattip> I would also like to take a look at the packaging branch again ...
mattip has quit [Ping timeout: 244 seconds]
<ajlawrence> There is no pypy/module/signal/moduledef.py only pypy/module/signal/__init__.py it could be that I am trying to make that call to create the module-scoped signal event from the wrong place.
<ajlawrence> mattip: I intend to come to the next public sprint if there is one. We can try and get the msi packaging to work then.
speeder39_ has quit [Quit: Connection closed for inactivity]
<arigato> ajlawrence: you are looking at an older repo or older branch
<arigato> moduledef.py was added instead of __init__.py one month ago I think
<arigato> (mostly just a rename, no rewrite of the content)
kenaan_ has joined #pypy
jcea has joined #pypy
<ajlawrence> arigato: I need to merge those changes into my branch
mattip has joined #pypy
mattip has quit [Ping timeout: 245 seconds]
antocuni has joined #pypy
<arigato> cfbolz: trying to go with the plain implementation that just returns a dict of the frames---again. It was made more complicated in 2011, but at that point in time our JIT did not have JITFRAMEs at all and so we had to be quite careful. I think that the simple implementation should at least work fine now
<cfbolz> arigato: ok, that would be really cool
<arigato> I'll try to test, of course, if I manage
<cfbolz> arigato: seems we repeatly forget what the current restrictions of virtualizables are
<arigato> yes
<arigato> I'm very unsure when I say I *think* it should work
<cfbolz> arigato: right
<cfbolz> But I have this memory too that since jitframes they became a lot more foolproof to use
<arigato> https://pastebin.com/Y8979WFG really prints some very truncated result with pypy right now
<cfbolz> arigato: right
tsaka__ has quit [Ping timeout: 245 seconds]
<arigato> seems to work
mattip has joined #pypy
Dejan has joined #pypy
dddddd has joined #pypy
<cfbolz> arigato: to just return the real frames?
<arigato> yes
<cfbolz> very cool
<arigato> it prints the right thing, also if I allow the threads to proceed and only print stuff later
<cfbolz> excellent
<arigato> pushed
speeder39_ has joined #pypy
Rhy0lite has joined #pypy
<cfbolz> arigato: looks like a great simplification
<cfbolz> arigato: can we somehow test it as a test_pypy_c test? not really usefully, right?
mattip has quit [Ping timeout: 244 seconds]
ajlawrence has quit [Remote host closed the connection]
<arigato> maaaybe
<arigato> I can at least paste in a test the example I just wrote
<cfbolz> yes
ionelmc has joined #pypy
CrazyPython has joined #pypy
marky1991 has joined #pypy
CrazyPython has quit [Client Quit]
CrazyPython has joined #pypy
tsaka__ has joined #pypy
mattip has joined #pypy
mattip has quit [Ping timeout: 268 seconds]
antocuni has quit [Ping timeout: 258 seconds]
marky1991 has quit [Ping timeout: 268 seconds]
mattip has joined #pypy
mattip has quit [Quit: Leaving]
CrazyPython has quit []
speeder39_ has quit [Quit: Connection closed for inactivity]
marky1991 has joined #pypy
antocuni has joined #pypy
marky1991 has quit [Ping timeout: 268 seconds]
commandoline has quit [Quit: Bye!]
CrazyPython has joined #pypy
marky1991 has joined #pypy
antocuni has quit [Ping timeout: 268 seconds]
commandoline has joined #pypy
CrazyPython has quit [Remote host closed the connection]
igitoor has quit [Ping timeout: 250 seconds]
igitoor has joined #pypy
CrazyPython has joined #pypy
igitoor has quit [Changing host]
igitoor has joined #pypy
CrazyPython has quit [Ping timeout: 258 seconds]
marky1991 has quit [Ping timeout: 268 seconds]
marky1991 has joined #pypy
CrazyPython has joined #pypy
marky1991 has quit [Quit: Saliendo]
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
Rhy0lite has quit [Quit: Leaving]
ekaologik has quit [Quit: https://quassel-irc.org - Komfortabler Chat. Überall.]
asmeurer has joined #pypy
CrazyPython has quit []
<fijal> should we mail them?
<fijal> also we should probably see how good it is
<arigato> fijal: it's actually already mentioned in our document https://etherpad.net/p/Alternatives_to_hosting_PyPy_on_BitBucket
<arigato> sorry, I didn't realize it was already there
<arigato> I wrote an answer to the guy who, for some reason, gave me a private mail about sourcehut, asking if he knows more about the points we discuss here
<arigato> cfbolz: that looks like a bit of a waste of electricity, unless they have a good plan to make these multiple runs actually differ from each other
antocuni has joined #pypy
speeder39_ has joined #pypy
tsaka__ has quit [Ping timeout: 258 seconds]
antocuni has quit [Ping timeout: 245 seconds]
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
CrazyPython has joined #pypy
jcea has quit [Remote host closed the connection]
asmeurer has quit [Quit: asmeurer]
jcea has joined #pypy
BPL has quit [Quit: Leaving]