00:30
deesix has quit [Read error: Connection reset by peer]
00:31
deesix has joined #pypy
01:23
jvesely has quit [Remote host closed the connection]
01:26
jvesely has joined #pypy
01:46
BPL has quit [Read error: Connection reset by peer]
02:48
adamholmberg has joined #pypy
02:53
adamholm_ has joined #pypy
02:56
adamholmberg has quit [Ping timeout: 260 seconds]
03:03
jcea has quit [Quit: jcea]
04:12
XorSwap has quit [Ping timeout: 240 seconds]
05:28
dddddd has quit [Remote host closed the connection]
08:01
mattip has joined #pypy
08:08
_whitelogger has joined #pypy
08:12
mattip has quit [Ping timeout: 256 seconds]
08:17
mattip has joined #pypy
08:19
adamholm_ has quit [Remote host closed the connection]
08:24
<
mattip >
nimaje: thanks, the whole idea there is hacky so yours is no worse than what is there
08:24
<
mattip >
added in 6796c2ea5276
08:55
dnshane has joined #pypy
09:03
pepesza has quit [Ping timeout: 258 seconds]
10:18
Dejan has joined #pypy
10:18
Dejan has joined #pypy
10:18
Dejan has quit [Changing host]
10:21
rubdos has quit [Read error: Connection reset by peer]
10:21
rubdos has joined #pypy
10:26
mdash has joined #pypy
11:02
marky1991 has quit [Read error: Connection reset by peer]
11:02
marky1991 has joined #pypy
11:12
YannickJadoul has joined #pypy
11:30
mattip has quit [Ping timeout: 256 seconds]
11:45
mattip has joined #pypy
12:16
dddddd has joined #pypy
12:17
lritter has joined #pypy
12:19
gracinet has joined #pypy
12:31
adamholmberg has joined #pypy
13:06
FullTiltProspect has joined #pypy
13:42
marky1991 has quit [Ping timeout: 264 seconds]
13:52
adamholmberg has quit [Remote host closed the connection]
13:54
adamholmberg has joined #pypy
13:54
jcea has joined #pypy
14:01
<
rjarry >
arigo: I may have misunderstood what you advised about using `with` constructs along with `ffi.gc`
14:01
<
rjarry >
with ffi.gc(lib.lypy_node_fullname(self._node), lib.free) as s:
14:01
<
rjarry >
AttributeError:
__enter__
14:02
<
rjarry >
wrong nick :D
14:07
<
rjarry >
mattip: I did but I did not understand what I should do
14:07
* mattip
not really up to speed
14:08
<
mattip >
you seem to be continuing a conversation that I only slightly remember seeing go by
14:09
<
rjarry >
yes that was a few days ago
14:09
<
rjarry >
basically, it was about ffi.gc(cdata, destructor) not calling destructor immediately upon the last reference disappearing
14:10
<
rjarry >
and being able to make this more deterministic by using `with xxx`
14:10
<
rjarry >
or try: finally:
14:10
<
mattip >
on pypy, right?
14:10
<
rjarry >
yes maybe only on pypy
14:11
<
rjarry >
but I wanted to make things right for cpython and pypy along the way
14:11
<
rjarry >
ffi.release() does not seem to make what I want
14:11
<
mattip >
so I don't think you need the "with ffi.gc", does "with lib.lypy_node_fullname(self._node), lib.free) as p:" work?
14:12
<
rjarry >
how could it work without ffi.gc ?
14:12
<
mattip >
"with lib.lypy_node_fullname(self._node) as s:" work?
14:12
<
mattip >
when s goes out of scope it is clear it needs to be released
14:12
<
rjarry >
I don't think so, the returned pointer is allocated insinde the C library
14:14
<
rjarry >
if I understand correctly, ffi.gc(cdata, destructor) adds a destructor to the first argument and returns it
14:14
<
rjarry >
but with cdata: does not work since cdata does not have
__enter__ nor
__exit__ methods
14:15
<
rjarry >
it appears I have to explicitly do
14:15
<
rjarry >
cdata = lib.allocate_something()
14:15
<
rjarry >
return xxx(cdata)
14:15
<
rjarry >
lib.free(cdata)
14:15
<
rjarry >
but arigo was telling me about using `with` constructs
14:15
alexge50 has quit [Read error: Connection reset by peer]
14:17
<
mattip >
this works as advertised "cdata = ffi.new('int[10]'); with cdata: print(cdata[0])"
14:17
alexge50 has joined #pypy
14:17
<
rjarry >
not arigo, arigato...
14:18
<
rjarry >
2020-03-20.log:[14:39:08] <arigato> with lib.gc(lib.lys_path(), lib.free) as p:
14:18
<
rjarry >
this does not work
14:18
XorSwap has joined #pypy
14:19
<
mattip >
ok, will have to wait for him to show up
14:19
<
rjarry >
yep, in the meantime, I'll fall back to try: finally:
14:26
gracinet has left #pypy [#pypy]
14:28
<
mattip >
rjarry: jsut to be clear: "with ffi.gc() as s:" fails? It works for me with cffi 1.14
14:28
<
mattip >
and I think it is even calling the free function in a toy example
14:29
LarstiQ has quit [Ping timeout: 240 seconds]
14:29
luizirber has quit [Ping timeout: 240 seconds]
14:29
bogner has quit [Ping timeout: 240 seconds]
14:29
<
rjarry >
hmm, I use 1.11.5
14:29
<
rjarry >
this may explain :)
14:29
LarstiQ has joined #pypy
14:29
luizirber has joined #pypy
14:29
bogner has joined #pypy
14:29
<
mattip >
yes, the documentation states 1.12+
14:30
<
rjarry >
I'll stick with try:finally:
14:30
<
mattip >
+1: it is equivalent after all
14:43
XorSwap has quit [Remote host closed the connection]
14:43
mattip has quit [Ping timeout: 240 seconds]
14:43
XorSwap has joined #pypy
14:51
mattip has joined #pypy
14:53
BPL has joined #pypy
15:02
xcm has quit [Ping timeout: 264 seconds]
15:10
epony has quit [Quit: reconfig]
15:11
xcm has joined #pypy
15:42
marky1991 has joined #pypy
15:59
xcm has quit [Remote host closed the connection]
16:01
xcm has joined #pypy
16:05
dddddd has quit [Remote host closed the connection]
16:17
XorSwap has quit [Ping timeout: 250 seconds]
16:25
XorSwap has joined #pypy
16:30
XorSwap has quit [Ping timeout: 256 seconds]
17:01
asmeurer has joined #pypy
17:15
rubdos has quit [Quit: WeeChat 2.7.1]
17:15
jacob22 has quit [Remote host closed the connection]
17:16
jacob22 has joined #pypy
17:20
dnshane has joined #pypy
17:29
<
mattip >
OK, I figured out what is going on with the extra test failures in cffi0/test_zintegration, which tries to create a virtualenv
17:30
<
mattip >
we are already in a virtualenv, so the sys.real_prefix points to the old location "build/pypy"
17:31
<
mattip >
sorry, not build/pypy, just build
17:32
rubdos has joined #pypy
17:33
<
mattip >
but before we set up the first virtualenv, we call -m ensurepip which creates a bin directory to store pip, easy_install
17:34
<
mattip >
so now when we go to create the virtualenv-from-a-virtualenv, it sees the orinal location from real_prefix, sees it has a bin directory, but cannot find the executable there and borks
17:38
epony has joined #pypy
17:49
<
cfbolz >
mattip: ouch :-(
18:07
<
mattip >
easy enough to solve, assuming my analysis is correct
18:09
jacob22 has quit [Quit: Konversation terminated!]
18:09
bbot2 has quit [Quit: buildmaster reconfigured: bot disconnecting]
18:10
jacob22 has joined #pypy
18:33
marky1991 has quit [Ping timeout: 240 seconds]
18:39
marky1991 has joined #pypy
19:03
CrazyPython has joined #pypy
19:18
asmeurer has quit [Quit: asmeurer]
19:23
FullTiltProspect has quit [Ping timeout: 250 seconds]
19:24
CrazyPython has quit [Read error: Connection reset by peer]
19:27
Dejan has quit [Quit: Leaving]
19:31
deesix_ has joined #pypy
19:33
deesix has quit [Ping timeout: 256 seconds]
19:58
msjyoo has quit [Quit: Connection closed for inactivity]
19:59
dddddd has joined #pypy
20:03
deesix_ has quit [Quit: leaving]
20:51
bbot2 has joined #pypy
20:54
marky1991 has quit [Ping timeout: 265 seconds]
21:14
YannickJadoul has quit [Quit: Leaving]
21:18
_whitelogger has joined #pypy
21:21
marky1991 has joined #pypy
21:24
_whitelogger has joined #pypy
21:30
_whitelogger has joined #pypy
21:33
lritter has quit [Quit: Leaving]
23:22
dmalcolm has quit [Ping timeout: 264 seconds]
23:38
marky1991 has quit [Ping timeout: 260 seconds]