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