yuyichao has quit [Ping timeout: 240 seconds]
yuyichao has joined #pypy
senyai has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 246 seconds]
ronan has quit [Remote host closed the connection]
jcea has quit [Quit: jcea]
ronan has joined #pypy
altendky has quit [Quit: Connection closed for inactivity]
ArneBab has joined #pypy
ArneBab_ has quit [Ping timeout: 268 seconds]
pilne has quit [Quit: Quitting!]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 246 seconds]
tilgovi has joined #pypy
tilgovi has quit [Ping timeout: 240 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 268 seconds]
jamadden has quit [Quit: Leaving.]
inad922 has joined #pypy
DragonSA has joined #pypy
DragonSA has joined #pypy
DragonSA has quit [Changing host]
DragonSA has quit [Quit: Konversation terminated!]
marky1991 has quit [Ping timeout: 246 seconds]
zware has quit [Remote host closed the connection]
zware has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 272 seconds]
oberstet has joined #pypy
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
realitix has joined #pypy
tbodt has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arigato has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 255 seconds]
girish946 has joined #pypy
girish946 has quit [Max SendQ exceeded]
girish946 has joined #pypy
girish946 has quit [Max SendQ exceeded]
marr has joined #pypy
antocuni has joined #pypy
<antocuni> hi
<antocuni> arigato: ping?
<arigato> pong
<arigato> hi
cstratak has joined #pypy
<antocuni> i.e., I tried to write a single "typed_{read,write}" which can be used by all the GCBuffer subclasses, which need to implement only _get_gc_data and _get_gc_data_offset
<antocuni> the problem is that in this way base_ofs is no longer a constant, and thus the codewriter complains
<antocuni> do you know if there is a way to say "write typed_read once in the base class, but produce a separate specialized version for each subclass"?
<arigato> with a mixin, liekly
<arigato> likely
<arigato> you'd put the methods you want replicated on a different class, and use import_from_mixin() in all subclasses
<antocuni> yeah, I though of that. But then it means that I have to import_from_mixin() explicitly in each subclass
<antocuni> I wondered if there was some rpython magic which I didn't know about :)
<nimaje> wasn't for that the extendable meta type?
<arigato> you can play around with meta types, yes
<arigato> I'd not warmly recommend it
<antocuni> nimaje: the extendable metaclass works the other way around: you can inject methods in the base class from what it looks like a subclass
<antocuni> arigato: yeah, I prefer to avoid metaclasses as well
<antocuni> ok, I'll do a mixin then
<antocuni> thanks :)
<nimaje> antocuni: iirc it can inject into multiple classes
<antocuni> not that I know, but in any case it's now what I want. The semantics I need is the standard inheritance rule: write once in the superclass and get it in each subclass
<antocuni> the problem is only because of RPython rules, for which I need something which looks like a manual copy&paste
<antocuni> but without writing manually the same code multiple times, of course :)
<antocuni> yes but it's the other way around
<nimaje> ok, here you need to know all subclasses :(
james has joined #pypy
james is now known as jamescampbell
jamescampbell has quit [Client Quit]
amaury has joined #pypy
<kenaan> antocuni faster-rstruct-2 3e7adaec029c /rpython/rlib/buffer.py: rpython fix, else the types returned by _get_gc_data conflict
<kenaan> antocuni faster-rstruct-2 f23167f0f132 /: bah, the base_ofs needs to be proven constant at translation time. Try to help the rtyper
<kenaan> antocuni faster-rstruct-2 67ba2f0639a7 /: rewrite buffer.GCBuffer as a class decorator instead of a base class, because we need to provide differ...
<antocuni> arigato: at the end, I solved by turning GCBuffer into a class decorator, because with import_from_mixin the various _get_gc_data_offset were demoted to the base class, and thus made non-constant again
<antocuni> (see 67ba2f0639a7)
<kenaan> antocuni faster-rstruct-2 58756fc27659 /rpython/rlib/test/test_mutbuffer.py: fix tests
<kenaan> antocuni faster-rstruct-2 967e8af6bfb8 /rpython/rlib/mutbuffer.py: use @GCBuffer to implement MutableStringBuffer
<kenaan> antocuni faster-rstruct-2 eace635b2834 /pypy/objspace/std/bytearrayobject.py: bah
girish946 has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 240 seconds]
amaury has quit [Ping timeout: 255 seconds]
antocuni has quit [Ping timeout: 240 seconds]
pedronis has quit [Quit: Coyote finally caught me]
pedronis has joined #pypy
oberstet2 has joined #pypy
oberstet has quit [Ping timeout: 240 seconds]
arigato has quit [Read error: Connection reset by peer]
senyai has quit [Read error: Connection reset by peer]
<kenaan> mattip default ad45faa583f4 /pypy/module/cpyext/test/test_dictobject.py: add test that passes with -A
<kenaan> mattip default fbcdfc92a521 /pypy/module/cpyext/: add slot definitions for __len__, __setitem__, __delitem__, avoid crash in PyDict_Next
<kenaan> mattip default e45afbe0ded7 /pypy/module/cpyext/test/test_dictobject.py: fix test
Tiberium has joined #pypy
girish946 has quit [Quit: Leaving]
altendky has joined #pypy
jcea has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 246 seconds]
antocuni has joined #pypy
Rhy0lite has joined #pypy
inad922 has quit [Ping timeout: 240 seconds]
jaffachief has quit [Quit: Connection closed for inactivity]
jamadden has joined #pypy
adamholmberg has joined #pypy
yuyichao has quit [Ping timeout: 246 seconds]
yuyichao has joined #pypy
marky1991 has joined #pypy
<danchr> I just noticed that pypy3 uses the wrong argument name for datetime.datetime.strftime(), breaking keyword argument invocation
<danchr> the fix is trivial; just substitute ‘format’ for ‘fmt’
<danchr> is it okay to commit this as-is, or do I need to add a test, or something similar?
<fijal> anyone feels like having an opinion?
<fijal> mattip, ronan
<fijal> danchr: test would be nice, even if trivial
arigato has joined #pypy
<mattip> fijal: it seems like a SWIG fail, in the last comment there is a SWIG_ConvertPtr call that seems to raise that exception
mattip has quit [Ping timeout: 260 seconds]
mattip has joined #pypy
<kenaan> danchr py3.5 4e110113b03d /lib-python/3/: Use correct keyword argument for strftime() routines in datetime The argument is specified as 'format' on docs.pyth...
marky1991 has quit [Ping timeout: 246 seconds]
<mattip> a week ago numpy committed a partial fix for their issue #8306 about infinite recursion,
<mattip> by adding a call to Py_EnterRecursiveCall, Py_LeaveRecursiveCall
<mattip> .. and we still have that in our to-implement stubs.py list
<mattip> so now numpy HEAD is broken for PyPy 5.7.1
marky1991 has joined #pypy
<fijal> oh nice
<fijal> should we do 5.7.2 with just that?
<fijal> I mean even if it expands to nothing
Tiberium_ has joined #pypy
Tiberium has quit [Read error: Connection reset by peer]
tbodt has joined #pypy
<fijal> ?
<fijal> if not, I'll start with "KeyError in compute_vars_longevity prints scary warning and raises InvalidLoop"?
tbodt has quit [Client Quit]
<mattip> It would seem to be pretty easy to copy cpython behaviour by adding a "recursion_depth" field to PyThreadState in pystate.py,
<mattip> and then just copying cpython c code to handle the checks
<arigato> mattip: no, either do nothing or plug into our own system
<arigato> fijal: no, didn't look
<fijal> arigato: ok, so I'll start with what I just said, bit unlikely to fix the actual problem
<arigato> it was a problem with unrolling, if I remember correctly
<fijal> yes
<fijal> Maybe we just give up
<fijal> And if unrolling produces invalid loop we raise onvalidloop
<fijal> we already have a few cases like that
<arigato> yes, might be good enough
tbodt has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mattip> arigato: so correct me if I'm wrong, it seems to me the best we have for checking recursion_depth is "rstack.stack_almost_full()"
<mattip> ?
tbodt has joined #pypy
<arigato> yes, that's a good place
tbodt has quit [Client Quit]
<arigato> rstack.stack_check() is more natural actually
<arigato> but it raises an RPython _StackOverflow
tbodt has joined #pypy
<mattip> I need some help seeing the full picture, when cpyext calls Py_EnterRecursiveCall() we
<mattip> would call stack_almost_full(), and when cpyext calls Py_LeaveRecursiveCall() that is a NOP ?
<arigato> yes
tbodt has quit [Client Quit]
<mattip> cool, now to write a test :)
tbodt has joined #pypy
tbodt has quit [Client Quit]
tbodt has joined #pypy
tbodt has quit [Client Quit]
<idnar> fijal: did you manage to reproduce it with my script?
<fijal> idnar: I didn't try
<idnar> ah okay
<fijal> but I don't think it's relevant, in a sense
lapinot has quit [Remote host closed the connection]
tormoz has quit [Remote host closed the connection]
tormoz has joined #pypy
tbodt has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
realitix has quit [Quit: Leaving]
cstratak has quit [Ping timeout: 240 seconds]
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholm_ has joined #pypy
adamholmberg has quit [Ping timeout: 260 seconds]
yuyichao has quit [Ping timeout: 268 seconds]
<mattip> arigato: how did you mock stack_almost_full for untranslated tests?
<arigato> as I said, stack_almost_full() is a hack, stack_check() should be used
<mattip> ok, thanks
<arigato> but neither is really tested untranslated
<mattip> hmm
<arigato> stack_check() is not really meant to be called directly (but it can)
<arigato> calls to that are normally inserted during translation
tbodt has joined #pypy
<mattip> it will not work untranslated
<mattip> stack_check
<arigato> neither does stack_almost_full
tbodt has quit [Client Quit]
mvantellingen has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
<mattip> the need to do this is questionable from the start, they should just check if they are going to recurse
<arigato> unsure what you mean
mvantellingen has joined #pypy
<arigato> how?
<mattip> how does python (not numpy) deal with "a = []; a.append(a); a in a"
<arigato> you can hack around for the simple cases, but you can't detect all cases
yuyichao has joined #pypy
<o11c|vacation> always check id() before == ?
<arigato> mattip: I think in this case it gives True by chance
<arigato> yes
cstratak has joined #pypy
<arigato> mattip: ah, note:
<arigato> stack_check() raises a _StackOverflow, which is supposed to be caught like interpreter/pyframe.py
<arigato> sorry, interpreter/error.py
<arigato> "except rstackovf.StackOverflow:"
<mattip> ok
<arigato> stack_check() together with such a catch works untranslated too
* mattip trying
<arigato> i.e. you get the pure Python RuntimError()
<arigato> but the "except" like that would catch it
<mattip> +1
<arigato> a bit unclear if it works in the cpyext cae though
<arigato> case
<arigato> the RuntimeError might be raised by intermediate levels
<arigato> just outside the "except StackOverflow"
<arigato> and then produce this output that says a cpyext function raised an exception
<arigato> looks simpler to monkey-patch rstack.stack_check()
<mattip> I can monky-patch the Py_EnterRecursiveCall() implementation if not we_are_translated,
<mattip> set a global counter and trigger an exception when it goes over 10 or something, just for tests
<arigato> or directly rstack.stack_check() to raise RuntimeError
* arigato off
<mattip> thanks
arigato has quit [Ping timeout: 240 seconds]
adamholm_ has quit [Remote host closed the connection]
antocuni has quit [Ping timeout: 246 seconds]
<kenaan> mattip cpyext-recursionlimit 9fa4ac53f85d /pypy/module/cpyext/: add test, implement recursion limit functions with ugly hack for untranslated test
oberstet2 has quit [Ping timeout: 272 seconds]
tbodt has joined #pypy
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/4615 [mattip: force build, cpyext-recursionlimit]
adamholmberg has joined #pypy
pilne has joined #pypy
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/4615 [mattip: force build, cpyext-recursionlimit]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
DRMacIver has quit [Ping timeout: 246 seconds]
graingert has quit [Ping timeout: 240 seconds]
black_ant has joined #pypy
graingert has joined #pypy
DRMacIver has joined #pypy
black_ant has quit [Excess Flood]
black_ant has joined #pypy
<kenaan> rlamy py3.5 94add67df5b3 /pypy/interpreter/app_main.py: Call sys.__interactivehook__ (issue #2558)
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
arigato has joined #pypy
black_ant has quit [Ping timeout: 240 seconds]
Tiberium_ has quit [Remote host closed the connection]
adamholmberg has quit []
arigato has quit [Quit: Leaving]
DragonSA has joined #pypy
DragonSA has joined #pypy
DragonSA has quit [Changing host]
arigato has joined #pypy
DragonSA has quit [Quit: Konversation terminated!]
black_ant has joined #pypy
<kenaan> rlamy py3.5 0ab207b3359d /pypy/doc/whatsnew-pypy3-head.rst: Document PyBuffer
WGH has quit [Remote host closed the connection]
arigo has joined #pypy
<kenaan> rlamy py3.5 a0e3281f3874 /pypy/interpreter/test/test_error.py: fix test
Rhy0lite has quit [Quit: Leaving]
arigo has quit [Quit: Leaving]
<kenaan> rlamy py3.5 f74c6e0f3dd2 /pypy/module/cpyext/test/test_object.py: fix test
<kenaan> mattip cpyext-recursionlimit 7b9dd48c2572 /pypy/module/cpyext/eval.py: fix translation
mattip has left #pypy ["bye"]
nimaje1 has joined #pypy
nimaje1 is now known as nimaje
nimaje has quit [Killed (adams.freenode.net (Nickname regained by services))]
arigato has quit [Quit: Leaving]
jamesaxl has quit [Quit: WeeChat 1.7.1]
amaury has joined #pypy
antocuni has joined #pypy
nimaje has joined #pypy
antocuni has quit [Ping timeout: 268 seconds]
kipras is now known as kipras`away
ArchDebian has joined #pypy
ArchDebian has quit [Quit: Konversation terminated!]
marr has quit [Ping timeout: 246 seconds]
yuyichao has quit [Ping timeout: 260 seconds]
yuyichao has joined #pypy
rubdos has quit [Ping timeout: 240 seconds]
rubdos has joined #pypy