cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | the secret reason for us trying to get PyPy users: to test the JIT well enough that we're somewhat confident about it
Guest39454 has joined #pypy
Guest39454 has quit [Remote host closed the connection]
alexband has joined #pypy
Peng5 has joined #pypy
Peng5 has quit [Read error: Connection reset by peer]
trobotham8 has joined #pypy
trobotham8 has quit [Remote host closed the connection]
dddddd has quit [Remote host closed the connection]
demonimin has quit [Ping timeout: 252 seconds]
speeder39 has joined #pypy
alexband has quit [Remote host closed the connection]
alexband has joined #pypy
mindjuju26 has joined #pypy
alexband has quit [Ping timeout: 252 seconds]
lritter has quit [Ping timeout: 240 seconds]
alexband has joined #pypy
mindjuju26 has quit [Remote host closed the connection]
jcea has quit [Quit: jcea]
_whitelogger has joined #pypy
Garen has joined #pypy
Garen_ has quit [Ping timeout: 244 seconds]
Guest16880 has joined #pypy
Guest16880 has quit [Remote host closed the connection]
speeder39 has quit [Quit: Connection closed for inactivity]
speeder39 has joined #pypy
Garen has quit [Read error: Connection reset by peer]
Garen has joined #pypy
lolmac has joined #pypy
lolmac has quit [Remote host closed the connection]
arigato has joined #pypy
alexband has quit [Remote host closed the connection]
alexband has joined #pypy
alexband has quit [Ping timeout: 245 seconds]
alexband has joined #pypy
alexband has quit [Ping timeout: 240 seconds]
<cfbolz> arigato: hey?
<arigato> hi
alexband has joined #pypy
Masklinn has quit []
alexband has quit [Remote host closed the connection]
alexband has joined #pypy
alexband has quit [Remote host closed the connection]
alexband has joined #pypy
speeder39 has quit [Quit: Connection closed for inactivity]
Thargoid has joined #pypy
Thargoid is now known as Guest53911
<mattip> on cpython 2, this succeeds b'\xed\xa0\xbc\xed\xb2\xb1'.decode('utf8')
<mattip> but on cpython3 it raises 'utf-8' codec can't decode byte 0xed in position 0: invalid continuation byte
<arigato> yes
<arigato> that's surrogates
<mattip> is this a difference beyond surrogates in python2 vs 3?
<arigato> yes
<arigato> er no
<arigato> the difference is surrogates
<mattip> ahh, ok, so I need to actually add handling for allow_surrogates to unicodehelper.str_decode_utf8
Guest53911 has quit [Remote host closed the connection]
<mattip> maybe easy, just pass it to rutf8._invalid_byte_2_of_3 ...
<arigato> I forgot the details, but it's called "utf8sp" in runicode.py
<mattip> thanks
<arigato> this "utf8sp" encoding is what is really used to store W_UnicodeObject as bytes
<arigato> this must not be confused with the "utf8" encoding, which is slightly different, and also different on python 2 vs 3
<mattip> right, that part works fine (I think), it was the actual call to decode -> stringmethods.descr_decode -> bad call to unicodehelper
<arigato> ok
<mattip> in objspace/std/test/test_typeobject.py, there is a test_type_construct_unicode_surrogate_issue, which does
<mattip> raises(ValueError, type, 'A\udcdcb', (), {})
<mattip> on the unicode-utf8-py3 branch it fails to raise. Is it supposed to?
<arigato> does it on cpython 3.5?
<arigato> yes
<mattip> type('A\udcdcb') does not raise. The "(), {}" are just empty args to 'type', right?
<arigato> well it gives UnicodeEncodeError, not ValueError, on 3.5
<arigato> no
<arigato> this means "make a class"
<mattip> or is it supposed to be type('A\udcdcb', *(), **{})
alexband has quit [Remote host closed the connection]
<arigato> it's type(name, bases, dict)
alexband has joined #pypy
<mattip> got it, on cpython3 it raises "'utf-8' codec can't encode character '\udcdc' in position 1: surrogates not allowed"
<arigato> yes, I think that's the intention. I don't know why we expect ValueError
alexband has quit [Ping timeout: 245 seconds]
<mattip> here's a harder one - a = b'abcabc'; id(a) == id(str(a, 'latin1'))
<mattip> on the branch, the ids are equal
<mattip> even though a is bytes, and str(a, 'latin1') is a str
<arigato> what? that shouldn't be possible
<arigato> (what is this test?)
<mattip> commit efa8c0bedfc6
<mattip> it took me and ronan a while to find the problem
<arigato> I imagine
<arigato> "is" still says no, correct?
* mattip checking
oberstet has joined #pypy
<mattip> correct, 'is' still says no
<arigato> ah, immutable_unique_id() says why
<mattip> in bytesobject.py ?
<arigato> for more-than-one-character bytes and unicodes, it returns the id of the underlying bytes
<arigato> both in bytesobject.py and unicodeobject.py
<arigato> so in the above example, the underlying bytes is the same
<mattip> an idea for a fix?
<arigato> add "+2" in one of the space.newint(uid)
<arigato> the magic value 2 can be explained but maybe it should be made a constant in objspace/std/util.py
<arigato> mm, the rest of the function is also broken I think
<arigato> e.g. id("x") == id("x\x00") I think?
<mattip> ok. I guess this should be fixed in py3.5 as well, but the first issue only shows up on the unicode-utf8 branches
<arigato> on the other hand it only guarantees that id('SINGLE-CHAR') is unique for single-char lower than \u0800 or something
<arigato> which doesn't really make sense as far as I can tell
<arigato> also, id('') == id('\x01\x01') if I read correctly
<mattip> id("x") == id("x\x00") is True on the branch, id('') == id('\x01\x01') is False
<mattip> 4123 vs. -4117
<arigato> ah right
<arigato> anyway, it should change to logic like W_UnicodeObject.ord()
<arigato> if there is a single character (possibly encoded as more than one byte), then use the special case with the value of that character
<mattip> I could try to fix it, but maybe you will have some time to do it instead?
<arigato> ok
<mattip> it seems the code is unchanged from the default branch
antocuni has joined #pypy
<arigato> ?
<arigato> it's definitely unique to the unicode-utf8-py3 branch
<arigato> I'm trying to understand now why "if len(s) > 1" was replaced with "if len(s) > 2"
<arigato> in particular, in 'def is_w' in W_UnicodeObject
<arigato> ah, I see, of course it's to be consistent with immutable_unique_id()
<kenaan> arigo unicode-utf8-py3 f9566e8f8110 /pypy/objspace/std/: Fix for id(unicode)
<kenaan> arigo default 88a9f1bbf1c8 /pypy/module/select/: Issue #2876 Add select.PIPE_BUF.
<kenaan> arigo default 942ad6c1866e /rpython/rlib/: merge heads
<mattip> arigato: thanks
Matrixiumn has joined #pypy
Matrixiumn has quit [Remote host closed the connection]
moei has quit [Quit: Leaving...]
alexband has joined #pypy
alexband has quit [Ping timeout: 246 seconds]
<kenaan> mattip unicode-utf8-py3 99ad3d85cb7a /pypy/objspace/std/: fix tests
<kenaan> mattip unicode-utf8-py3 b040f44dc71b /pypy/: use encode_utf8, str_decode_utf8, and maybe handle surrogates in the latter
<kenaan> mattip unicode-utf8-py3 34c6d0d3499f /pypy/objspace/std/test/test_bytesobject.py: expand test
<kenaan> mattip unicode-utf8-py3 f7c1e87b6a3c /pypy/objspace/std/typeobject.py: check class name for valid utf8
<kenaan> mattip unicode-utf8-py3 cc3f3f3b7285 /rpython/rlib/rutf8.py: revert 58568f219c61
mattip has left #pypy ["Leaving"]
alexband has joined #pypy
antocuni has quit [Ping timeout: 252 seconds]
demonimin has joined #pypy
moei has joined #pypy
jcea has joined #pypy
_whitelogger has joined #pypy
dddddd has joined #pypy
ronan has joined #pypy
ronan has quit [Ping timeout: 246 seconds]
ronan has joined #pypy
ronan_ has joined #pypy
ronan_ has quit [Read error: Connection reset by peer]
ronan has quit [Ping timeout: 246 seconds]
ronan has joined #pypy
arigato has quit [Quit: Leaving]
alexband has quit [Remote host closed the connection]
alexband has joined #pypy
alexband has quit [Ping timeout: 252 seconds]
exezin3 has joined #pypy
exezin3 has quit [Remote host closed the connection]
forgottenone has quit [Ping timeout: 252 seconds]
alexband has joined #pypy
antocuni has joined #pypy
Khayman has joined #pypy
TheAdversary has quit [Disconnected by services]
ronan has quit [Ping timeout: 240 seconds]
TheAdversary has joined #pypy
lritter has joined #pypy
Hasimir has quit [Ping timeout: 246 seconds]
Khayman is now known as Hasimir
lcollini has joined #pypy
alexband has quit [Remote host closed the connection]
alexband has joined #pypy
alexband has quit [Remote host closed the connection]
alexband has joined #pypy
alexband has quit [Remote host closed the connection]
alexband has joined #pypy
alexband has quit [Read error: Connection reset by peer]
alexband has joined #pypy
oberstet has quit [Ping timeout: 246 seconds]
<kenaan> antocuni extradoc 01e42155cfe8 /blog/draft/2018-09-cpyext/cpyext.rst: start a blog post draft about cpyext
<antocuni> FWIW, I just got this issue when pushing to bitbucket: https://bitbucket.org/tortoisehg/thg/issues/5166/i-sometimes-get-an-abort-missing-support
<antocuni> "abort: missing support for check:phases"
<antocuni> I don't know exactly how to work around it; I tried hg push a couple of times, always the same error; I tried to rollback the commit, commit again, wait for few seconds, same error
<antocuni> then I tried "hg push -b ." and it worked; not sure whether the "-b ." did the trick or it's just a coincidence
supercool27 has joined #pypy
supercool27 has quit [Remote host closed the connection]
Khayman has joined #pypy
TheAdversary has quit [Disconnected by services]
the_rat has quit [Ping timeout: 250 seconds]
TheAdversary has joined #pypy
ulope has quit [Ping timeout: 272 seconds]
ulope has joined #pypy
Hasimir has quit [Ping timeout: 246 seconds]
Khayman is now known as Hasimir
ctismer has quit [Ping timeout: 252 seconds]
il_ratto has joined #pypy
ThomasWaldmann has quit [Ping timeout: 272 seconds]
ThomasWaldmann has joined #pypy
ThomasWaldmann has joined #pypy
ThomasWaldmann has quit [Changing host]
ctismer has joined #pypy
alexband has quit [Remote host closed the connection]
alexband has joined #pypy
alexband has quit [Ping timeout: 252 seconds]
<LarstiQ> antocuni: ask in #bitbucket?
antocuni has quit [Ping timeout: 272 seconds]
lcollini has quit [Remote host closed the connection]
demonimin has quit [Ping timeout: 272 seconds]
demonimin has joined #pypy
demonimin has joined #pypy
demonimin has quit [Changing host]
amz3 has joined #pypy
<amz3> hello
<amz3> is it ok if there is differences between ffi.buffer and a 'bytes' object?
<amz3> I am using cffi
<amz3> because ffi.buffer(0xdecafbad)[0] returns a bytes object, wheresas b'\x05'[0] returns 5
<amz3> i log the issue and move on
<amz3> what is the difference between bytes(buffer) and buffer[:]
Gonsor has joined #pypy
oberstet has joined #pypy
TheAdversary has quit [Ping timeout: 246 seconds]
Hasimir has quit [Ping timeout: 246 seconds]
agronholm has quit [Ping timeout: 260 seconds]
agronholm has joined #pypy
speeder39 has joined #pypy
tsglove6 has joined #pypy
tsglove6 has quit [Remote host closed the connection]
sujeet8 has joined #pypy
sujeet8 has quit [Remote host closed the connection]
oberstet has quit [Ping timeout: 246 seconds]
jeggott2 has joined #pypy
bbot2 has joined #pypy
jeggott2 has quit [Remote host closed the connection]
<marmoute> if antocuni comes back, ask him which version of Mercurial he is using and tell him it is probably a Bitbucket side issue (maybe they are playing with version upgrade)
speeder39 has quit [Quit: Connection closed for inactivity]
danieljabailey has quit [Quit: ZNC 1.6.5+deb2build2 - http://znc.in]
danieljabailey has joined #pypy
Gonsor has quit [Read error: Connection reset by peer]
waldhar_ has joined #pypy
waldhar has quit [Ping timeout: 260 seconds]