00:05
tbodt has joined #pypy
00:14
amaury has quit [Ping timeout: 240 seconds]
00:14
nimaje has joined #pypy
00:34
marky1991 has joined #pypy
01:18
kipras is now known as kipras`away
01:42
tilgovi has joined #pypy
02:14
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
02:31
tilgovi has quit [Ping timeout: 258 seconds]
02:44
pilne has quit [Quit: Quitting!]
02:53
ArneBab_ has joined #pypy
02:58
ArneBab has quit [Ping timeout: 260 seconds]
02:58
lritter has joined #pypy
03:00
lritter_ has joined #pypy
03:00
lritter has quit [Read error: Connection reset by peer]
03:58
mattip has joined #pypy
04:02
altendky has joined #pypy
04:18
forgottenone has joined #pypy
04:32
<
kenaan >
mattip cpyext-obj-stealing 104e7d49fd08 /pypy/module/cpyext/test/: fix tests for PyList_SetItem reference stealing
04:33
<
mattip >
cpython has a Py_REF_DEBUG macro to check when refcount < 0, but it requires recompiling cpython
04:34
<
mattip >
using that might have saved me some time fixing these tests
04:36
<
kenaan >
mattip cpyext-obj-stealing 168652ad5d5c /: merge default into branch
05:12
glyph has quit [Quit: End of line.]
05:13
glyph has joined #pypy
05:17
jacob22_ has quit [Quit: Konversation terminated!]
05:23
<
njs >
huh, that's odd. on pypy, you can realloc a bytearray that has a memoryview pointing at it?
05:25
<
njs >
is that expected? (I noticed because I'm trying to be careful to make sure that I explicitly call .release() on my memoryviews to avoid issues with pypy's gc, and now I'm confused because the test I wrote for this isn't failing after all...)
05:25
<
mattip >
njs: "which version of pypy", and "might be a bug"
05:25
<
njs >
mattip: this is pypy3 5.7.0
05:28
<
njs >
mattip: test case is just 'b = bytearray(10); m = memoryview(b); b += bytes(100)' -- on cpython this raises BufferError, on that pypy it succeeds
05:28
Garen_ has joined #pypy
05:29
<
mattip >
jsut a wild guess, from my refcheck branch on pandas, perhaps cpython uses refcount semantics
05:29
<
mattip >
to track other references to the bytearray, and if ob_refcnt > 1 it raises
05:29
<
mattip >
let's see if I can verify that
05:29
<
njs >
on cpython, I believe mutable buffer exporting objects like bytearray have a special number-of-buffer-exports count
05:30
<
njs >
it's not ob_refcnt, you can have two variables pointing to the same bytearray object and still mutate it
05:30
Garen has quit [Ping timeout: 252 seconds]
05:32
* mattip
cloning cpython from github, which feels wrong somehow
05:37
<
njs >
huh, it looks like the memoryview is actually following the bytearray's internal buffer around when it gets reallocated, at least if I'm correctly interpreting this ._pypy_raw_address method I found
05:43
<
mattip >
AFAICT we are missing cpython _canresize() function from Objects/bytearrayobject.c, we don't bother to track-and-check anythin like ob_exports
05:45
<
njs >
but... what about this code, which also fails in bytearray _canresize()?
05:45
<
njs >
b = bytearray(10); a = np.asarray(b); b += bytes(100)
05:46
<
njs >
(I mean, it fails on cpython)
05:48
<
mattip >
my cursory glance at pypy.objspace.std.bytearrayobject.py, like in descr_add,
05:48
<
njs >
of course np.ndarray doesn't have anything like the memoryview.release method, so once you start doing this thing you're kind of screwed in any case without a refcounting gc
05:48
<
mattip >
seems to me we don't bother checking anything, we just reallocate
05:49
<
njs >
but yeah, it sounds like that leaves you with an ndarray pointing into the middle of nowhere?
05:50
<
mattip >
can you check that in your original example, m and b have different buffers, or do they overlap?
05:50
<
njs >
what do you mean by "have different buffers"?
05:50
<
mattip >
i.e. if you assign to m, the values in b do not change
05:50
<
mattip >
(b after the appending operation)
05:51
<
njs >
ah, no, in pypy3 it seems to be very clever – when I change the length of b, then m._pypy_raw_address() changes, and writes to either b or m are still visible in the other
05:52
DragonSA has joined #pypy
05:52
DragonSA has joined #pypy
05:52
DragonSA has quit [Changing host]
05:52
<
njs >
I assume this is do with the mechanism
05:53
<
njs >
I assume this is related to the mechanism the gc uses to keep pointers correct when moving objects
05:54
<
mattip >
so I guess everything is OK and we should simply document that difference,
05:55
<
mattip >
unless there is an explicit place in python documentation where cpython behaviour is required
05:57
<
njs >
heh, and if I shrink the size of the bytearray to be smaller than the memoryview, the memoryview starts raising IndexError!
05:59
<
njs >
"Many objects take special actions when a view is held on them (for example, a bytearray would temporarily forbid resizing)"
06:00
<
njs >
but I dunno that anyone cares about this. I only care because I wanted to make sure it wasn't happening :-)
06:00
<
mattip >
ok, so 3.2+ seems to need that
06:01
<
njs >
I guess you may run into trouble with cpyext stuff eventually though
06:02
<
mattip >
cpyext uses a "clever" PyBuffer to expose the buffer as a c-pointer
06:03
<
mattip >
and you are correct, there are probably still issues with it
06:03
<
njs >
mattip: so what does that np.asarray line I pasted above do on pypy?
06:07
<
mattip >
it seems to be messed up
06:07
<
mattip >
b = bytearray(10); a = np.asarray(b); b += bytes(100); print a; print a[0]; print a
06:08
<
mattip >
prints two different values for contents of a
06:10
<
njs >
well, uh, you're welcome I guess :-)
06:11
<
mattip >
very strange
06:27
altendky has quit [Quit: Connection closed for inactivity]
06:53
amaury has joined #pypy
07:37
arigato has joined #pypy
07:42
amaury has quit [Ping timeout: 240 seconds]
08:06
Tiberium has joined #pypy
08:07
ielectric has joined #pypy
08:08
ielectric is now known as domenkozar
08:19
arigato has quit [Read error: Connection reset by peer]
08:25
amaury has joined #pypy
08:33
oberstet has joined #pypy
08:43
Taggnostr has joined #pypy
08:56
antocuni has joined #pypy
08:57
FASDFSF has joined #pypy
09:05
Taggnostr has quit [Ping timeout: 260 seconds]
09:15
asmeurer_ has quit [Quit: asmeurer_]
09:18
Taggnostr has joined #pypy
09:26
arigato has joined #pypy
10:03
ramonvg has joined #pypy
10:09
antocuni has quit [Ping timeout: 255 seconds]
10:26
_whitelogger has joined #pypy
10:27
forgottenone has quit [Ping timeout: 260 seconds]
10:47
arigato has quit [Read error: Connection reset by peer]
10:52
mattip has left #pypy ["bye"]
11:16
amaury has quit [Ping timeout: 240 seconds]
11:23
jamesaxl has quit [Read error: Connection reset by peer]
11:25
jamesaxl has joined #pypy
11:27
kipras`away is now known as kipras
11:38
kipras is now known as kipras`away
11:46
antocuni has joined #pypy
12:10
forgottenone has joined #pypy
12:15
kipras`away is now known as kipras
12:24
amaury has joined #pypy
12:36
jacob22_ has joined #pypy
12:45
Rhy0lite has joined #pypy
13:05
marky1991 has quit [Remote host closed the connection]
13:05
marky1991 has joined #pypy
13:23
amaury has quit [Ping timeout: 260 seconds]
13:44
rmesta has joined #pypy
13:44
rmesta1 has joined #pypy
13:45
antocuni has quit [Ping timeout: 255 seconds]
13:48
rmesta has quit [Ping timeout: 240 seconds]
13:50
<
kenaan >
arigo default fa2b7ecca667 /lib_pypy/_ctypes/structure.py: Issue #1213: in ctypes, complain instead of silently ignoring
_swappedbytes_
13:57
oberstet2 has joined #pypy
14:00
oberstet has quit [Ping timeout: 240 seconds]
14:07
FASDFSF has quit [Ping timeout: 255 seconds]
14:13
Tiberium has quit [Ping timeout: 240 seconds]
14:15
Tiberium has joined #pypy
14:15
ronny has joined #pypy
14:22
<
tos9 >
^ arigo: thanks!
14:31
yuyichao has quit [Ping timeout: 260 seconds]
14:34
lritter_ has quit [Ping timeout: 260 seconds]
14:46
tbodt has joined #pypy
14:47
yuyichao has joined #pypy
14:47
tbodt has quit [Client Quit]
14:51
tbodt has joined #pypy
15:19
oberstet2 is now known as oberstet
15:25
Taggnostr has quit [Ping timeout: 268 seconds]
15:25
Taggnostr has joined #pypy
15:40
ramonvg has quit [Remote host closed the connection]
15:49
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
15:55
tbodt has joined #pypy
16:35
nimaje1 has joined #pypy
16:35
nimaje1 is now known as nimaje
16:35
nimaje has quit [Killed (card.freenode.net (Nickname regained by services))]
16:37
pilne has joined #pypy
16:39
shodan45_ has joined #pypy
16:39
plan_rich_ has joined #pypy
16:40
chris|_ has joined #pypy
16:40
shodan45_ has quit [Remote host closed the connection]
16:40
shodan45_ has joined #pypy
16:41
ronny has quit [*.net *.split]
16:41
kanaka has quit [*.net *.split]
16:41
ionelmc has quit [*.net *.split]
16:41
DanC has quit [*.net *.split]
16:41
chris| has quit [*.net *.split]
16:41
igitoor has quit [*.net *.split]
16:41
shodan45 has quit [*.net *.split]
16:41
plan_rich has quit [*.net *.split]
16:41
chris|_ is now known as chris|
16:43
ionelmc has joined #pypy
16:44
arigato has joined #pypy
16:46
shodan45_ has quit [Remote host closed the connection]
16:47
ronny has joined #pypy
16:48
kanaka has joined #pypy
16:48
DanC has joined #pypy
16:48
kanaka has quit [Changing host]
16:48
kanaka has joined #pypy
16:53
amaury has joined #pypy
17:00
asmeurer_ has joined #pypy
17:02
forgottenone has quit [Quit: Konversation terminated!]
17:03
altendky has joined #pypy
17:13
shodan45 has joined #pypy
17:59
oberstet has quit [Ping timeout: 240 seconds]
18:05
asmeurer_ has quit [Quit: asmeurer_]
18:07
igitoor has joined #pypy
18:15
igitoor has quit [Changing host]
18:15
igitoor has joined #pypy
18:18
oberstet has joined #pypy
18:32
DragonSA has quit [Quit: Konversation terminated!]
18:47
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
19:03
tbodt has joined #pypy
19:06
tbodt has quit [Read error: Connection reset by peer]
19:25
tormoz has joined #pypy
19:29
tormoz has quit [Remote host closed the connection]
19:34
rmesta1 has quit [Quit: Leaving.]
19:38
Rhy0lite has quit [Quit: Leaving]
19:45
tbodt has joined #pypy
20:06
Tiberium has quit [Read error: Connection reset by peer]
20:10
arigato has quit [Ping timeout: 240 seconds]
20:19
kenny has left #pypy [#pypy]
20:20
lapinot has joined #pypy
20:20
lapinot has quit [Client Quit]
20:28
ceridwen has quit [Read error: Connection reset by peer]
20:29
ceridwen has joined #pypy
21:03
tormoz has joined #pypy
21:04
rmesta has joined #pypy
21:18
nimaje1 has joined #pypy
21:18
nimaje1 is now known as nimaje
21:18
nimaje is now known as Guest94994
21:34
kushal has quit [Ping timeout: 260 seconds]
21:36
kushal has joined #pypy
21:37
kushal is now known as Guest62443
21:48
marky1991 has quit [Ping timeout: 246 seconds]
21:51
gsnedders has quit [Ping timeout: 260 seconds]
22:06
jamesaxl has quit [Quit: WeeChat 1.7]
22:20
vkirilichev has joined #pypy
22:25
gsnedders has joined #pypy
22:32
<
kenaan >
amauryfa@gmail.com default e69e22840104 /lib_pypy/: Expose win32's SetErrorMode, which is mandatory for the 3.5 test suite.
22:40
<
kenaan >
amauryfa@gmail.com default aa98455c75dc /lib_pypy/: Backport _pypy_winbase_build.py from the 3.5 branch, to reduce merge conflicts.
22:48
<
kenaan >
amauryfa py3.5 7e5247599a57 /lib_pypy/: hg merge default
22:49
marky1991 has joined #pypy
23:00
rmesta has quit [Quit: Leaving.]
23:01
kipras is now known as kipras`away
23:06
kipras`away is now known as kipras
23:53
amaury has quit [Ping timeout: 260 seconds]