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
<antocuni>
arigato: I am running ultrajson-hpy tests on top of pypy: at the current state, ultrajson is implemented partly with hpy and partly with the old API, so when running on pypy it runs partly under cpyext
<antocuni>
now I am getting an RPython AssertionError, which I *think* it comes from cpyext.state.ccall
<antocuni>
assert cpyext_glob_tid_ptr[0] == 0
<antocuni>
from gdb, the value of pypy_g_array_532[0] (which I think it corresponds to cpyext_glob_tid_ptr) is 140737306183104
<antocuni>
so, two questions: 1. is 140737306183104 a special value or just random?
<antocuni>
2. any hint/pointer to what I should look for?
<antocuni>
ah, some more details I got from gdb; the error comes when I try to to "ujson.loads(f)", where f is an instance of a custom class (see test_loadFileLikeObject in ultrajson/tests/tests.py)
<antocuni>
ujson.loads is an HPy method, so in C I get a handle
<antocuni>
then I call HPy_AsPyObject(h), which in turns call cpyext.make_ref, which in turns triggers the machinery with CPyTypedescr.type_attach&co.
<antocuni>
and eventually, this calls tuple_alloc(), which wants to do a state.ccall("PyTuple_New"), which complains about the cpyext_glob_tid_ptr
<antocuni>
so, I *suppose* that the problem is that I am indirectly doing this state.ccall from C and cpyext didn't expect it
<antocuni>
probably I need to mark somehow HPy_AsPyObject as "this function goes to RPython and then possibly back in C land", but I'm not really sure what is the correct black magic :)
Ai9zO5AP has quit [Ping timeout: 272 seconds]
Ai9zO5AP has joined #pypy
dddddd has joined #pypy
Ai9zO5AP has quit [Ping timeout: 265 seconds]
Ai9zO5AP has joined #pypy
Ai9zO5AP has quit [Ping timeout: 272 seconds]
oberstet_ has quit [Read error: Connection reset by peer]
Ai9zO5AP has joined #pypy
speeder39_ has joined #pypy
avakdh has quit []
avakdh has joined #pypy
stillinbeta has quit []
stillinbeta has joined #pypy
<cfbolz>
from the "did you know" department: in which order are the numbers printed: f(print(1), b=print(2), *(print(3), print(4)))
<cfbolz>
(different in py2 and py3!)
<simpson>
Huh, Python doesn't have a left-to-right rule?
<cfbolz>
simpson: it does, but keyword args and *args mess it up
<Dejan>
args are going to be evaluated in different order
<Dejan>
not sure, but I think it depends on the f()'s signature too
<simpson>
Surprising. I would have anticipated that they all execute left-to-right, and *then* the tuple is built, and finally the call is made.
<cfbolz>
Dejan: no, thankfully f doesn't matter
<cfbolz>
simpson: that's how it used to work, yes
<Dejan>
well, if f does not have the named parameter b it is not going to work
jvesely has quit [Quit: jvesely]
<cfbolz>
Dejan: yes, but the prints happen before that is determined
<cfbolz>
although the *expression syntax may appear after explicit keyword arguments, it is processed before the keyword arguments
starlord has quit []
starlord has joined #pypy
Smigwell has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
jvesely has joined #pypy
krono has quit []
krono has joined #pypy
<phlebas>
cfbolz: I especially like "It is unusual for both keyword arguments and the *expression syntax to be used in the same call, so in practice this confusion does not arise."
<antocuni>
"it's not a bug, it's a feature" :)
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
<cfbolz>
phlebas: way too late to change, I fear
<cfbolz>
And I suppose we shouldn't add to the confusion by being incompatible
rubdos has quit [Quit: WeeChat 2.4]
kenaan_ has quit [Ping timeout: 260 seconds]
Rhy0lite has joined #pypy
rubdos has joined #pypy
phlebas has quit [Ping timeout: 260 seconds]
jeroud has quit [Ping timeout: 260 seconds]
kcr has quit [Ping timeout: 248 seconds]
wallet42 has quit [Ping timeout: 250 seconds]
DRMacIver has quit [Read error: Connection reset by peer]
michelp has quit [Ping timeout: 246 seconds]
petronny has quit [Ping timeout: 260 seconds]
altendky has quit [Ping timeout: 252 seconds]
krono has quit [Ping timeout: 272 seconds]
speeder39_ has quit [Ping timeout: 272 seconds]
phlebas has joined #pypy
petronny has joined #pypy
michelp has joined #pypy
wallet42 has joined #pypy
rguillebert has quit [Read error: Connection reset by peer]
lauren has quit [Read error: Connection reset by peer]
graingert has quit [Read error: Connection reset by peer]
jeroud has joined #pypy
altendky has joined #pypy
speeder39_ has joined #pypy
rguillebert has joined #pypy
lauren has joined #pypy
krono has joined #pypy
graingert has joined #pypy
graingert has quit [Excess Flood]
DRMacIver has joined #pypy
michelp has quit [Read error: Connection reset by peer]
DRMacIver has quit [Ping timeout: 260 seconds]
xcm has quit [Read error: Connection reset by peer]
Ai9zO5AP has quit [Ping timeout: 260 seconds]
i9zO5AP has joined #pypy
xcm has joined #pypy
i9zO5AP has quit [Read error: Connection reset by peer]
i9zO5AP has joined #pypy
xcm has quit [Ping timeout: 272 seconds]
xcm has joined #pypy
i9zO5AP has quit [Quit: WeeChat 2.5]
DRMacIver has joined #pypy
Ai9zO5AP has joined #pypy
speeder39_ has quit [Remote host closed the connection]
DRMacIver has quit [Ping timeout: 260 seconds]
DRMacIver has joined #pypy
xcm has quit [Remote host closed the connection]
Ai9zO5AP has quit [Ping timeout: 258 seconds]
xcm has joined #pypy
bbot2 has quit [Quit: buildmaster reconfigured: bot disconnecting]
bbot2 has quit [Quit: buildmaster reconfigured: bot disconnecting]
hotpot33 has joined #pypy
bbot2 has joined #pypy
hotpot33 has quit [Client Quit]
hotpot33 has joined #pypy
lritter has quit [Ping timeout: 268 seconds]
petronny has quit [Remote host closed the connection]
Ai9zO5AP has joined #pypy
Rhy0lite has quit [Quit: Leaving]
kipras has joined #pypy
altendky has quit [Quit: Connection closed for inactivity]
kipras has quit [Ping timeout: 258 seconds]
CrazyPython has joined #pypy
<kenaan>
hodgestar extradoc e2ec4ef28249 /sprintinfo/leysin-winter-2020/people.txt: Add Simon to the list of attendees.
<Dejan>
guys, does psycopg2-binary work for you with PyPy 3.6 7.3.0 ?
<Dejan>
I am getting ImportError: /home/dejan/py/jobserve_pypy/site-packages/psycopg2/_psycopg.pypy36-pp73-x86_64-linux-gnu.so: undefined symbol: PyCodec_Encoder
<Dejan>
Blah, just when I thought I removed the final obstacle that prevented me to run my project on PyPy a new thing comes up :)
CrazyPython has quit [Read error: Connection reset by peer]
CrazyPython has joined #pypy
CrazyPython has quit [Read error: Connection reset by peer]
xcm has quit [Read error: Connection reset by peer]
xcm has joined #pypy
CrazyPython has joined #pypy
CrazyPython has quit [Read error: Connection reset by peer]
Ai9zO5AP has quit [Ping timeout: 240 seconds]
CrazyPython has joined #pypy
CrazyPython has quit [Read error: Connection reset by peer]