04:20
shlomif has joined #pypy
04:27
Corbin has quit [Quit: zzz]
06:18
greedom has joined #pypy
06:21
greedom has quit [Remote host closed the connection]
07:22
graingert has joined #pypy
07:24
graingert[m] has joined #pypy
07:25
<
graingert[m] >
hello, is there a process for backporting stdlib fixes to older pypy releases?
08:20
<
cfbolz >
graingert[m]: is that in some cpython 3.8.x?
08:21
<
graingert[m] >
but the bug exists in pypy 3.6+
08:21
<
graingert[m] >
cfbolz: it's only backported as far as 3.9
08:22
<
cfbolz >
graingert[m]: then we usually don't fix it. But if you were to open a pull request, we would probably merge it
08:22
<
graingert[m] >
awesome
08:23
<
graingert[m] >
cfbolz: do I just manually apply the patch or is there some magic to maintain history across git/hg I need to do?
08:24
<
cfbolz >
graingert[m]: manually, and you reference the bpo
08:24
<
graingert[m] >
cool
08:24
<
graingert[m] >
thanks
08:25
<
cfbolz >
Hodgestar: I looked into more advanced algorithms too, but they were slower and indeed we have some custom heuristics
08:25
<
cfbolz >
It does not matter anyway, cycle finding went from five min or so to a few seconds
08:27
<
graingert[m] >
<cfbolz> "graingert: then we usually don't..." <- I only mention because it seems to present worse on pypy due to differences in the GC
08:28
<
graingert[m] >
And pypy 3.9 seems way off
08:29
<
cfbolz >
Right, thanks for pointing that out
08:34
<
graingert[m] >
Oh I didn't mean to cast shade on 3.9 being way off! I'm very excited for 3.8!
08:36
jacob22 has quit [Quit: Konversation terminated!]
08:50
<
Dejan >
Same here - looks good so far
08:52
Atque has joined #pypy
08:55
Atque has quit [Remote host closed the connection]
08:56
Atque has joined #pypy
09:31
<
cfbolz >
graingert[m]: thanks, no worries
09:48
xcm has quit [Remote host closed the connection]
09:48
xcm has joined #pypy
10:23
amauryfa has quit [Ping timeout: 268 seconds]
10:54
amauryfa has joined #pypy
11:58
Atque has quit [Quit: ...]
12:05
amaury has joined #pypy
12:06
amauryfa has quit [Ping timeout: 268 seconds]
12:27
amaury has quit [Ping timeout: 252 seconds]
12:38
otisolsen70 has joined #pypy
12:40
amaury has joined #pypy
12:44
Atque has joined #pypy
12:44
amaury has quit [Ping timeout: 240 seconds]
13:16
<
ctismer >
ronan: Howdy! I got an annoying effect:
13:19
<
ctismer >
ronan: I have re-written the whole type creation in a way that PyType_Ready is called at the very last. What happened? Nothing, same errors! How can that be? The error must be still somewhere else.
13:25
<
Dejan >
buy faster computer
13:26
<
Dejan >
that should fix it
13:26
<
Dejan >
(bad joke... i know)
13:29
amaury has joined #pypy
13:29
<
ctismer >
ronan: tr("Da steh ich nun, ich armer Tor, und bin so schlau als wie zuvor") 🤪
14:15
otisolsen70 has quit [Quit: Leaving]
15:34
<
ronan >
ctismer: I'm actually not sure there's any way to set a metaclass on a C-defined heaptype in pypy ATM
15:35
<
ronan >
ctismer: where is your new code?
15:35
<
ctismer >
I will show you. Do you want it plain, or should I instrument it?
15:38
<
ctismer >
ronan: it's a hackish implementation, but seems to be quite correct.
15:38
<
ronan >
plain is fine
15:38
<
ctismer >
ronan: Actually, it would be great if you are right.
15:45
<
ctismer >
ronan: Here is the gerrit link to open in a browser:
15:47
<
ctismer >
Here is the direct http link:
15:49
<
ctismer >
I have taken the Python 3.7 implementation and stripped it down so it matches our needs.
15:53
<
ronan >
ctismer: that might work actually
16:01
<
ronan >
ctismer: how does it fail on pypy now? Your code should at least ensure `type(Shiboken.Object) is Shiboken.ObjectType`
16:03
stkrdknmibalz has joined #pypy
16:04
<
graingert[m] >
Is editing files via the heptapod UI disabled?
16:05
<
marmoute >
graingert[m]: for now, yes
16:06
<
ctismer >
ronan: exactly the same problem
16:06
<
ctismer >
>>>> type(Obj.__mro__[2])
16:06
<
ctismer >
<class 'type'>
16:06
<
ctismer >
<class 'Shiboken.Object'>
16:06
<
ctismer >
>>>> Obj.__mro__[2]
16:06
<
ctismer >
>>> Obj.__mro__[2]
16:06
<
ctismer >
<class 'Shiboken.Object'>
16:06
<
ctismer >
>>> type(Obj.__mro__[2])
16:06
<
ctismer >
<class 'Shiboken.ObjectType'>
16:12
<
ronan >
ctismer: that's weird, are you sure that the pypy-specific code actually runs?
16:13
<
ronan >
also, check that PyType_Ready() is actually called late
16:16
<
ctismer >
ronan: pypy3rc1 is running in a shell. How should I check PyType_Ready? Then I need to patch pypy?
16:18
jacob22 has joined #pypy
16:18
<
ronan >
you could add `assert(type->tp_flags & Py_TP_FLAGS_READY == 0);` just before the call
16:19
<
ctismer >
ronan: Ah, sure :)
16:20
<
ctismer >
>>>> def hugo():
16:20
<
ctismer >
>>>> Shiboken.getAllValidWrappers()
16:20
<
ctismer >
.... return Shiboken.getAllValidWrappers()
16:20
<
ctismer >
ronan: basic shiboken things work:
16:20
<
ctismer >
>>>> hugo()
16:20
<
ctismer >
>>>> type(Shiboken.getAllValidWrappers)
16:20
<
ctismer >
<class 'builtin_function_or_method'>
16:20
<
ctismer >
>>>> type(hugo)
16:20
<
ctismer >
<class 'function'>
16:24
<
ctismer >
ronan: assertion fails!
16:26
<
ctismer >
ronan: Who could possibly set this?
16:27
<
ronan >
ctismer: I don't know, but some API functions call it implicitly
16:27
<
ctismer >
ronan: argh
16:27
<
ctismer >
ok will seek it
16:33
<
ronan >
ctismer: actually, there are a lot more functions that can do it on pypy
16:34
<
ronan >
(technically, they call type_realize() which creates the pypy object from the C struct)
16:35
<
ronan >
so I bet that PyObject_SetAttr does it
16:36
<
ctismer >
type->tp_name = spec->name;
16:36
<
ctismer >
ronan: even in my function, the flag is set at line 272, see here:
16:36
<
ctismer >
assert(type->tp_flags & Py_TPFLAGS_READY == 0);
16:36
<
ctismer >
/* Adjust for empty tuple bases */
16:36
<
ctismer >
if (!bases) {
16:37
<
ctismer >
ronan: Should I fiddle with that flag?
16:44
<
ronan >
ctismer: no, that would mess with cpyext
16:45
<
ctismer >
ronan: cannot use that flag. Even if I clear if, the assertion kicks in
16:47
<
ctismer >
ronan: that seems to be unsupported
16:57
<
ctismer >
ronan: Maybe I need to directly call PyType_Type.tp_new and prepare everything before?
16:58
<
ctismer >
ronan: unfortunately I don't know how to read the source
16:58
<
ronan >
ctismer: I don't understand how the flag can be set so early, it's not supposed to be
17:00
<
ctismer >
ronan: me neither, I just created the type and it is there. some cheating, methinks
17:03
Dejan has quit [Quit: Leaving]
17:08
<
ctismer >
ronan: what other extensions have been used with inheritance? Is there a working example? I'm quite lost after a lot of effort.
17:11
<
ronan >
ctismer: I'm not sure there any doing what you want to do. Maybe pybind11?
17:13
<
ctismer >
ronan: Ah?
17:13
<
ctismer >
ronan: is that used with PyPy? Then I'll have a look
17:14
<
ronan >
yes, they try to be compatible with pypy. Not sure what the current status is
17:15
<
ctismer >
ronan: Thank you! I will investigate that tomorrow
17:28
greedom has joined #pypy
17:28
greedom has quit [Remote host closed the connection]
17:28
greedom has joined #pypy
17:30
greedom has quit [Client Quit]
17:31
greedom has joined #pypy
17:40
shlomif has quit [Ping timeout: 265 seconds]
18:33
Atque has quit [Quit: ...]
18:35
amaury has quit [Ping timeout: 252 seconds]
18:40
greedom has quit [Remote host closed the connection]
19:06
Julian has joined #pypy
19:50
<
antocuni >
ronan, ctismer: re "I don't understand how the flag can be set so early". It looks like the perfect job for a gdb whatchpoint
20:08
amaury has joined #pypy
20:42
yizawa has quit [Quit: Connection closed for inactivity]
20:47
<
ctismer >
antocuni: I still don‘t understand how to debug a thing without source. 11 years out of the project have their impact 🤔
21:01
<
antocuni >
ctismer: I suggest to do an lldebug translation
21:01
<
antocuni >
maybe without JIT to save compilation time
21:02
<
antocuni >
it will be slow but I suppose you don't care at this point
21:03
<
antocuni >
./rpython/bin/rpython -O2 --lldebug pypy/goal/targetpypystandalone.py
21:04
<
antocuni >
if you have already a translation lying around, you can just cd to the testing_1 directory and do "make clean && make lldebug"
21:07
<
ctismer >
antocuni: that is exactly what I need. Thank you so much!
21:07
<
antocuni >
you're welcome!
21:09
<
ctismer >
PySide inheritance is so crippled that it surely can be that PyPy cannot cope with it. Exactly that I must find out.
21:18
Julian has quit [Quit: leaving]