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
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/4820 [mattip: force build, winconsoleio]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/4821 [Andy Lawrence: force build, winconsoleio]
<kenaan> Yannick_Jadoul py3.7 5972be85ad6d /pypy/objspace/std/: Making sure __class_getitem__ is a classmethod, even when not annotated with @classmethod
jcea has quit [Quit: jcea]
agates[m] has quit [Remote host closed the connection]
bendlas has quit [Write error: Connection reset by peer]
edd[m] has quit [Read error: Connection reset by peer]
adamholmberg has joined #pypy
bendlas has joined #pypy
adamholmberg has quit [Ping timeout: 240 seconds]
<astronavt> out of curiosity, what's the obstacle to having windows binaries for pypy?
<astronavt> meaning the usual exe/msi installer type of thing
<astronavt> developer time? nobody owns a windows machine? etc
abrown has quit [Remote host closed the connection]
<simpson> astronavt: Besides the ones at https://www.pypy.org/download.html ?
<simpson> I imagine that all the usual excuses apply; Windows isn't exactly an easy-to-target platform for Free Software.
<astronavt> "What is missing for a full 64-bit translation
<astronavt> " presumably
thenewandy_ has joined #pypy
thenewandy_ has left #pypy [#pypy]
<simpson> Yeah, Win64 has quite the ABI. Somehow even crazier than Win32.
igitoor has quit [*.net *.split]
nedbat has quit [*.net *.split]
awygle has quit [*.net *.split]
thenewandy has joined #pypy
<Alex_Gaynor> I mean, the only thing that's crazy about it from pypy's perspective is that `sizeof(long) != sizeof(void *)`
<thenewandy> hi. If I run: "import ctypes; ctypes.CDLL(None)" in pypy (7.1.1 windows 32-bit binary downloaded today)
<thenewandy> then the interpreter exits without any messages
<thenewandy> I was expecting an exception to be thrown. can anyone else reproduce this?
<thenewandy> (I'm on a corporate machine which has some garbage software running on it which can make things behave stupidly - so this may not be a pypy bug)
agates[m] has joined #pypy
edd[m] has joined #pypy
nedbat has joined #pypy
awygle has joined #pypy
igitoor has joined #pypy
<mattip> thenewandy: which binary - python 2.7 or 3.6? What version of windows?
<thenewandy> 2.7. windows 10
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/4821 [Andy Lawrence: force build, winconsoleio]
<mattip> astronavt: there is a branch, but not a high priority, see the windowsinstaller branch (last touched in Feb 2019)
<astronavt> mattip thanks. i wont pretend like i have the expertise to contribute though :(
<mattip> thenewandy: I get OSError: Cannot load library <None>: The parameter is incorrect
<mattip> windows 10, 2.7
<thenewandy> ok great, thanks. I'll pester my IT department and see if they can take off the crud
<mattip> what do you get on CPython? or if you just try to open a non-existant file 'open("doesnotexist.txt")' ?
<thenewandy> TypeError: expected string or Unicode object, NoneType found
<thenewandy> trying to open a non-existant file in pypy gives: "IOError: [Errno 2] No such file or directory: 'asdfaSD'"
<mattip> so something is off with that particular pypy. It doesn't print anything (try it in a DOS window)?
<thenewandy> correct
<mattip> weird
<thenewandy> the same thing happened with a colleague, who also has the corporate garbage
<thenewandy> if it does turn out to be the corporate garbage, then I would consider this to be a feature, as I will use this as a reason to have said garbage removed
<mattip> does it work correctly on an actual dll?
<thenewandy> yes
<thenewandy> >>>> ctypes.CDLL("c:\pypy\pypy2.7-v7.1.1-win32\libpypy-c.dll")
<thenewandy> <CDLL 'c:\pypy\pypy2.7-v7.1.1-win32\libpypy-c.dll', handle 10000000 at 4f63ed0>
<thenewandy> and it also fails gracefully on a non-existent dll
<mattip> underneath it is calling the windows api function LoadLibrary
<mattip> None should be translated to NULL so it is as if in C you tried LoadLibrary(NULL)
<thenewandy> ok. let me try a stupid C program that does that
<mattip> it should return NULL on failure
<thenewandy> printf("%p\n", (void*)LoadLibrary(NULL));
<thenewandy> just prints 0x00000...
<thenewandy> I guess I might be able to build pypy myself and see if I can watch it in a debugger
<mattip> ok, thanks for checking. Something is strange. Let me check on another machine (I was checking on the machine that builds the package)
<thenewandy> ok - and please don't invest too much in this, in case it is the corporate garbage - it is software that hooks into all system calls from everythig
<thenewandy> and has been known to have really stupid bugs (on macOS it was making global initialization functions in shared libraries run multiple times)
<mattip> yeah, works fine on another machine. Strange. It would be nice to have a simple reproducer in C.
<mattip> cuz running a debugger on pypy is probably not going to fly
<thenewandy> well, I've just done it on the binary
<thenewandy> and the stack trace is promising
<thenewandy> the crash is in "ctiuser.dll"
<thenewandy> which apparently is part of "Carbon Black" which is the corporate AV
<thenewandy> not the garbage I was expecting, but a different piece of corporate garbage
<mattip> ahh, nice. Can you use some strace equivalent to see how we are calling it differently than when you call it from the simple C program?
<thenewandy> I'll try... I don't typically use windows much, so I'll have to do a bit of digging to find it
<thenewandy> Exception thrown at 0x70872DB3 (ctiuser.dll) in pypy.exe: 0xC0000005: Access violation reading location 0x00000000.
<thenewandy> that is the exception in case you are interested...
<mattip> I wonder how the C program gets around that
<thenewandy> my two best guesses are:
<thenewandy> 1) AV heuristics decided different checks were needed in the two cases
<thenewandy> 2) My program was whitelisted because the AV is super slow and people complained, so somehow it could tell that this was a program I built
<mattip> hard for us to fix either of those cases from our end
<mattip> let us know if there is something we can do
<mattip> maybe we should detect NULL and not even try on windows ...
<thenewandy> I don't think you should do anything - the bug seems to be in someone else's software
<bbot2> Started: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/7686 [ronan: force build, py3.7]
tsaka_ has quit [Ping timeout: 240 seconds]
<thenewandy> mattip: I get the same problem with my C version when I run it from the command line, rather than in visual studio
thenewandy has quit [Ping timeout: 245 seconds]
asmeurer has joined #pypy
asmeurer has quit [Quit: asmeurer]
andy__ has joined #pypy
andy__ has quit [Ping timeout: 265 seconds]
andy__ has joined #pypy
tsaka_ has joined #pypy
andy__ has quit [Read error: Connection reset by peer]
andy__ has joined #pypy
dddddd has quit [Remote host closed the connection]
andy__ has quit [Read error: Connection reset by peer]
speeder39_ has quit [Quit: Connection closed for inactivity]
<mattip> thenewandy: (for the logs) it is both a bug in whatever you said and a bug in PyPy
<mattip> CPython ends up in _ctypes/callproc.c:load_library in windows, _ctypes/callproc.c:py_dl_open otherwise
adamholmberg has joined #pypy
<mattip> the first disallows None, the second allows it
adamholmberg has quit [Ping timeout: 276 seconds]
dansan_ has joined #pypy
dansan has quit [Ping timeout: 265 seconds]
<bbot2> Failure: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/7686 [ronan: force build, py3.7]
ronan__ has quit [Ping timeout: 265 seconds]
antocuni has joined #pypy
<kenaan> mattip default 5605eba9586b /pypy/module/_rawffi/: test, fix CDLL(None) on win32 should raise TypeError
tsaka_ has quit [Ping timeout: 265 seconds]
ronan__ has joined #pypy
ronan__ has quit [Client Quit]
ronan__ has joined #pypy
ajlawrence has joined #pypy
zeth has joined #pypy
mental has joined #pypy
antocuni has quit [Read error: Connection reset by peer]
antocuni has joined #pypy
<zeth> Greetings I am at a sprint being run by ronan__
<kenaan> cfbolz py3.6 535b4f6bdd4d /pypy/: somewhat messy code to be able to give the function name in TypeErrors produced by argument parsing more consistentl...
ronan__ has quit [Quit: Ex-Chat]
ronan__ has joined #pypy
tsaka_ has joined #pypy
<zeth> This is the page that I read just now: http://doc.pypy.org/en/latest/contributing.html
ronan__ has quit [Client Quit]
ronan has joined #pypy
<zeth> So getting the 3.7 branch is hg update py3.7
<cfbolz> yes
<marmoute> mattip: good news, I got pypy through the core heptapod machinery
<cfbolz> marmoute: nice!
<kenaan> cfbolz py3.6 b636aa7e226b /pypy/module/__builtin__/functional.py: fix test_functools (!)
<kenaan> cfbolz py3.6 3ead6447613b /lib-python/3/unittest/test/testmock/testhelpers.py: we don't have this restriction of cpython
<mattip> marmoute: cool
<marmoute> Also: congratulation for your branch name with space in them ;-)
<cfbolz> marmoute: haha, we *are* good at finding limitations everywhere
<cfbolz> what's the branch?
<kenaan> cfbolz py3.6 c2f6ba3490b8 /lib-python/3/test/test_timeit.py: fix difference caused by our hacks in the timeit module
<marmoute> cfbolz: I forgot, I just patched the exported and it passed
lritter_ has joined #pypy
<cfbolz> marmoute: not important, I was just curious
<marmoute> cfbolz: backlog says: numpy NDimArray
<cfbolz> heh
antocuni has quit [Ping timeout: 276 seconds]
adamholmberg has joined #pypy
BPL has joined #pypy
BPL has quit [Remote host closed the connection]
adamholmberg has quit [Ping timeout: 265 seconds]
<mattip> there is something wrong with the use of unwrap_spec(filename='fsencode'...) on win32,
<mattip> since fsencode uses 'strict' error handling on win32
<mattip> on linux it uses 'surrogateescape'
<mattip> this causes all kinds of errors when testing strange filenames
<mattip> for instance, in test_compiler.py test_surrogate_filename we have compile("'dr cannon'", '\udcff', 'exec')
<mattip> since __builtin__/compiling.py has def compile(space, w_source, filename, ...) with unwrap_spec(filename='fsencode',...
<kenaan> andrewjlawrence winconsoleio 5b5a1bf2f5af /pypy/module/_io/: Fixed a few more things and implemented another test.
<mattip> it crashes on windows
<mattip> this makes own tests kind of useless
<mattip> also, sys.getfilesystemencodeerrors() should return 'strict' on windows, not 'surrogateescape'
<kenaan> mattip py3.6 6e101bbc9993 /pypy/module/sys/interp_encoding.py: change sys.getfilesystemcodeerors() to 'strict' on win32
<kenaan> mattip py3.6 d9092e9cba63 /pypy/: merge default into py3.6
<kenaan> mattip winconsoleio 9d954abe5763 /: merge py3.6 into branch
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/4824 [mattip: force build, winconsoleio]
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/4824 [mattip: force build, winconsoleio]
<ajlawrence> mattip: There are still lots of bugs on that branch. I am in the process of adding some tests.
ajlawrence has quit [Remote host closed the connection]
ajlawrence has joined #pypy
<mattip> just wanted to check 6e101bbc9993, but i guess the nightly will test it
mental has quit [Ping timeout: 265 seconds]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/4825 [mattip: force build, py3.6]
<kenaan> mattip py3.6 023a3e349a63 /pypy/module/sys/interp_encoding.py: must build the strings at import
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/4825 [mattip: force build, py3.6]
ajlawrence has quit [Ping timeout: 260 seconds]
dddddd has joined #pypy
antocuni has joined #pypy
Rhy0lite has joined #pypy
jcea has joined #pypy
ajlawrence has joined #pypy
<ajlawrence> I tried to do space.unicode_w but it does not work. Is there something like this in pypy?
<cfbolz> ajlawrence: is this a py3.6 branch?
<cfbolz> space.utf8_w
ajlawrence has quit [Ping timeout: 260 seconds]
antocuni has quit [Ping timeout: 276 seconds]
Taggnostr has quit [Remote host closed the connection]
Taggnostr has joined #pypy
adamholmberg has joined #pypy
lritter_ has quit [Remote host closed the connection]
<mattip> cfbolz: did you see my comment on 535b4f6bdd4d ?
ajlawrence has joined #pypy
<kenaan> andrewjlawrence winconsoleio 6257428ac55f /pypy/module/_io/interp_win32consoleio.py: Switched fsdecode call to fspath following other pypy io modules
<kenaan> andrewjlawrence winconsoleio 4d02b4bab2af /: merged heads
ajlawrence has quit [Ping timeout: 260 seconds]
<cfbolz> mattip: ouch sorry will fix in a bit
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
lritter has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
speeder39_ has joined #pypy
<kenaan> daka...@gmail.com py3.7 838c4df236cd /lib-python/3/test/test_dict.py: Skip CPython specific test
antocuni has joined #pypy
abrown has joined #pypy
ronan has quit [Quit: Ex-Chat]
ronan has joined #pypy
ronan has quit [Ping timeout: 264 seconds]
<antocuni> cfbolz: what is the name of your json branch?
dmalcolm has joined #pypy
<cfbolz> antocuni: json-decoder-maps
<antocuni> ok
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
<kenaan> cfbolz py3.6 060a31354521 /pypy/interpreter/argument.py: fix translation, I think
<cfbolz> antocuni: should I open a pull request so you can add comments there? Or just commit questions if you want
<antocuni> cfbolz: I'm looking at the commits on my machine
<antocuni> if you prefer comments on the PR, feel free to open it, for me it's the same
<cfbolz> antocuni: whatever is easiest for you
<mattip> cfbolz: thanks, looks good
<antocuni> cfbolz: I'll do the old way then :)
<cfbolz> antocuni: +1
ajlawrence has joined #pypy
<antocuni> cfbolz: general comment: smaller commits would be easier to review :-/
<ajlawrence> cfbolz: I had to do space.realunicode_w. space.utf8 produced a str object.
jcea has quit [Remote host closed the connection]
<cfbolz> antocuni: yes, sorry. It was actually a very very experimental fork that did entirely different things
<cfbolz> So those smaller commits would have been completely useless
<antocuni> sure, not a real problem anyway, just a random comment :)
<cfbolz> No, I understand it's not totally fun to review, and somewhat overengineered
<cfbolz> The results are really good though
dansan_ is now known as dansan
<antocuni> I'm looking at simd.py right now, can't say that I fully understand it
<antocuni> so consider it as not-really-reviewed
<antocuni> how much speedup does it bring?
<cfbolz> 20%
<antocuni> just simd.py?
<cfbolz> Yes
<antocuni> impressive
<cfbolz> antocuni: ok, maybe armin could look at just simd
<cfbolz> antocuni: the mean of the speedup of the whole branch over the old decoder is something like 2.7x faster, and 2.8x faster than ujson. also, memory usage of the deserialized data structure is 4x smaller than before, 6x smaller than cpython
<antocuni> definitely worth a blog post when it's merged
<cfbolz> yes, on it
<cfbolz> node is still faster though, and smaller ;-)
<antocuni> what does it do?
<cfbolz> antocuni: I think all its VM data structures are smaller, and saving allocation means saving quite a bit of time too, for cache and other reasons
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
ajlawrence has quit [Remote host closed the connection]
<kenaan> antocuni json-decoder-maps 557bf35c498d /pypy/module/_pypyjson/interp_decoder.py: some review comments; more to follow
<antocuni> cfbolz: I need to go now; I think I reviewed all the logic which is "not maps"
<antocuni> I'll continue tomorrow, but in the meantime I pushed some comments
<cfbolz> antocuni: awesome, thanks!
<cfbolz> (there's no rush)
<antocuni> bye!
marky1991 has quit [Ping timeout: 276 seconds]
tsaka_ has quit [Quit: Konversation terminated!]
antocuni has quit [Ping timeout: 268 seconds]
speeder39_ has quit [Quit: Connection closed for inactivity]
marky1991 has joined #pypy
jcea has joined #pypy
marky1991 has quit [Ping timeout: 258 seconds]
xorAxAx has quit [Quit: Idle timeout reached: 172800s]
<mattip> ajlawrence (for the logs): space.realunicode_w should be removed. See if you can use utf82wcharp/scoped_utf82wcharp instead
<mattip> under the covers it does utf8.decode('utf8') which we want to avoid, we really would like to avoid unicode str anywhere
xorAxAx has joined #pypy
ajlawrence has joined #pypy
Rhy0lite has quit [Quit: Leaving]
<ajlawrence> mattip: How do I use rpython.rlib._os_support._preferred_traits to get the unicode traits without a unicode path? Is that even a sensible thing to do?
<ajlawrence> mattip: rwin32file requires the unicode traits to provide an api to the unicode file functions.
<mattip> yeah, that sucks. But until we refactor that I guess you have no choice.
ajlawrence has quit [Remote host closed the connection]
<mattip> someday we should do that whole dance differently, maybe using wcharp and ccharp as keys to make the choice
ajlawrence has joined #pypy
<mattip> someday we should do that whole dance differently, maybe using wcharp and ccharp as keys to make the choice
marky1991 has joined #pypy
<mattip> then you could use utf82wcharp or str2charp at a point where you know what you want
<kenaan> andrewjlawrence winconsoleio 63fa74a8e4b7 /: Fixed construction
CrazyPython has joined #pypy
ajlawrence has quit [Remote host closed the connection]
CrazyPython has quit []
BPL has joined #pypy
adamholmberg has quit [Remote host closed the connection]
marky1991 has quit [Ping timeout: 268 seconds]
marky1991 has joined #pypy
BPL has quit [Quit: Leaving]
rubdos has quit [Ping timeout: 264 seconds]