antocuni changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | "PyPy: the Gradual Reduction of Magic (tm)"
danieljabailey has quit [Quit: ZNC 1.6.5+deb2build2 - http://znc.in]
danieljabailey has joined #pypy
raynold has joined #pypy
simpson has quit [K-Lined]
dcrosta has joined #pypy
simpson has joined #pypy
tbodt has quit [Quit: Textual IRC Client: www.textualapp.com]
dddddd has quit [Read error: Connection reset by peer]
mentalita has left #pypy ["Leaving"]
<njs> amaury: huh? random.seed() shouldn't use the time, it should use urandom
marr has quit [Ping timeout: 264 seconds]
tbodt has joined #pypy
jcea has quit [Quit: jcea]
astronavt has quit [Remote host closed the connection]
astronavt has joined #pypy
astronavt has quit [Remote host closed the connection]
astronavt has joined #pypy
astronavt has quit [Remote host closed the connection]
ArneBab has joined #pypy
ArneBab_ has quit [Ping timeout: 264 seconds]
Hotpot33 has quit [Ping timeout: 240 seconds]
pilne has quit [Quit: Quitting!]
amaury has quit [Ping timeout: 260 seconds]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_main_ has joined #pypy
__main__ has quit [Ping timeout: 255 seconds]
_main_ is now known as __main__
Hotpot33 has joined #pypy
Hotpot33 has quit [Ping timeout: 248 seconds]
Hotpot33 has joined #pypy
TheAdversary has quit [Remote host closed the connection]
tayfun26 has joined #pypy
mentalita has joined #pypy
<arigato> ronan: great! a green buildbot on py3.5
<arigato> (and, guess what, it's snowing even more here)
mentalita has quit [K-Lined]
amaury has joined #pypy
mentalita has joined #pypy
realitix has joined #pypy
<kenaan> amauryfa py3.6 bea2e807c6dc /pypy/objspace/std/floatobject.py: CPython Issue #25971: Unify error messages in float.as_integer_ratio(), Decimal.as_integer_ratio(), and Fraction c...
<kenaan> amauryfa py3.6 f83d3719aebd /lib-python/3/sqlite3/test/userfunctions.py: Correctly port pypy modifications to sqlite tests
<kenaan> amauryfa py3.6 b9413da29d91 /lib_pypy/_sqlite3.py: CPython Issue #16864: Cursor.lastrowid now supports REPLACE statement
<kenaan> amauryfa py3.6 dda99c39353f /pypy/module/_sre/interp_sre.py: CPython Issue #29444: Add array bound check in group(), because the underlying buffer is mutable. Difficult to tes...
<kenaan> amauryfa py3.6 5e9a2c6daf17 /pypy/module/_sre/: re.Match.group() now accepts index-like objects.
<kenaan> amauryfa py3.6 0e57c6df8538 /pypy/module/_sre/: CPython Issue #24454: Regular expression match object groups are now accessible using __getitem__. "mo[x]" is equ...
<kenaan> amauryfa py3.6 77d216c5b248 /pypy/module/_sre/: CPython Issue #28727: re.Pattern objects created by re.compile() become comparable (only x==y and x!=y operators)
<kenaan> amauryfa py3.6 3f28eff2fcfc /pypy/module/_random/: Since Python3.6, the seed() call to urandom() has been moved to the _random module.
marr has joined #pypy
<fijal> ronan: wee!
realitix has quit [Read error: Connection reset by peer]
realitix_ has joined #pypy
<arigato> on my windows, downloading and running pypy3.exe just crashes:
<arigato> debug: OperationError:
<arigato> debug: operror-type: UnicodeDecodeError
<arigato> debug: operror-value: ('utf8', b'Europe de l\x92Ouest', 11, 12, 'invalid start byte')
<arigato> indeed, this bytestring is not valid utf8
<arigato> time to grab a complete repo
Jellyg00se has joined #pypy
<arigato> raiseWindowsError() assumes the message is in utf-8, when it is not
<arigato> "Europe de l'Ouest" is another similar problem elsewhere
<arigato> I'd say that the current status of pypy3.exe is: it works only if you're running it on an english windows
<fijal> pfff
<fijal> that's not great
<fijal> should we maybe do "3.5 final, beta on windows"?
<arigato> well, in particular, I can't help with the virtualenv issue because my windows is in french...
<fijal> yeah
<fijal> but maybe it's worth fixing as an issue on its own...
<arigato> of course
<arigato> I don't exactly expect it to be done for the end of the year, though
<fijal> yeah
<arigato> it looks like a lot of places to fix
<fijal> so do we call windows "beta"?
<arigato> I personally wouldn't call it even "alpha", but now we're in the reverse situation than what we just discussed on pypy-vr :-)
<arigato> it's not just "it doesn't work if you feed it large amounts of data", it's "you download an executable which always fails to start"
<arigato> I'd be fine if the download link has a big warning about only using it on english-language windows
<fijal> yeah something like that
<arigato> anyway, the hack I had in mind for virtualenv:
<arigato> see lib-python/3/subprocess.py
<arigato> search for "pypy"
<fijal> ugh
<fijal> well the new one "works"
<arigato> the new virtualenv works?
<fijal> yeah, with enough quotes
<fijal> (on linux at least)
<fijal> the thing is if you do anything wrong, it explodes in a myriad of ways
<fijal> none of which suggests what's the problem
<arigato> ok, then no more problem?
<fijal> i don't know
<fijal> if I were not a pypy dev I would dismiss pypy as not working
<fijal> why does pypy windows build comes with Qt?
<arigato> maybe try to download the latest pypy3.exe and run virtualenv on your english-language windows? :-)
<fijal> I'm trying
<fijal> but even on linux/OS X I would dismiss it completely
<fijal> because it took me like 6 tries to get a working virtualenv
marvin_ has quit [Ping timeout: 256 seconds]
antocuni has joined #pypy
amaury has quit [Ping timeout: 240 seconds]
marvin_ has joined #pypy
<kenaan> antocuni fix-vmprof-stacklet-switch-2 0a82f7762c72 /pypy/module/_continuation/test/test_stacklet.py: fix
<antocuni> ouch: am I wrong or rpython tests are NOT run nightly nowadays?
<fijal> arigato: the windows pypy3 does not work at all
<fijal> it starts, but does not import ssl
<kenaan> antocuni fix-vmprof-stacklet-switch-2 339c7996dc19 /: close merged branch
<kenaan> antocuni default c30916ebe15f /: merge the fix-vmprof-stacklet-switch-2 branch, which fixes vmprof+greenlet: before, vmprof did not take any samp...
amaury has joined #pypy
dddddd has joined #pypy
<arigato> antocuni: er, yes
<antocuni> in particular, rvmprof/test/test_file.py is failing (because vmprof was changed on github), but nobody noticed :(
<antocuni> plan_rich_: ^^^
<arigato> maybe it's onlyIfChanged?
<arigato> it can give confusing output on the summary page
<arigato> if we don't change rpython for a while but continue to work on pypy
<arigato> then the rpython failures disappear
<antocuni> yes, I think it's something like that
antocuni has quit [Ping timeout: 268 seconds]
amaury has quit [Ping timeout: 240 seconds]
mentalita has quit [Quit: Leaving]
* arigato tries to open pypy in Visual Studio 2015 with the Python support, and it crashes Visual Studio after a while
<fijal> arigato: you sure it's hard to get pypy to start on your locale?
<fijal> Pypy3 on windows
<fijal> It's kinda hard to test, I guess I can try vm?
<arigato> that's what I'm trying now, but failing so far to use VS
<arigato> ah, eventually managed to open just a .py file
<arigato> VS is definitely superior to gvim-with-hacked-key-bindings-for-windows
<bremner> VS or vs-code? vs-code has a pretty nice python extension (and debugger, although I haven't tested that with pypy)
<arigato> how do I know?
jcea has joined #pypy
<bremner> hmm. apparently I screwed up some fonts. oh well.
<arigato> no, I'm talking about the standard visual studio
<bremner> ok. no experience with that.
<arigato> yay, I got 'Europe de l\x92Ouest' in a test now
<arigato> ah, _init_timezone() of course
<Rotonen> visual studio code does not really have most of the static analysis tools from the ms ecosystem integrated all too well into it, so visual studio proper is still the way to go for something like pypy
<Rotonen> nor the debugger for that matter either
<arigato> thanks. I'll try again later to open pypy in visual studio, maybe this time it won't crash
<arigato> for now just opening files instead of the whole project seems to work well enouogh
<arigato> (I guess I'm loosing cross-file references)
<Rotonen> i'm planning on taking a stab at the windows stuff over the holidays
<arigato> cool
<arigato> I'm "only" fighting py3.5 in windows
<Rotonen> if youcpython windows builds have
<Rotonen> pff
<LarstiQ> Rotonen: 24-26, or till 2018? :)
<Rotonen> if you're having trouble symbolicating your stack traces, you'll have probably bumped into the fact that cpython on windows hardcoded the paths for where it looks for the source code
<arigato> well, as I said, I stopped trying because VS crashed on me
<fijal> the windows buildbot is in a bit of disarray
raynold has quit [Quit: Connection closed for inactivity]
<Rotonen> arigato: it could be you do not have the correct cpython source extracted out to c:\build\cpython\cpython35 and intellisense trips up on itself due to that
<Rotonen> hmm apparently just c:\build\cpython35
amaury has joined #pypy
<kenaan> arigo default d5ba3ff15b4c /rpython/: Add FormatMessageW() to get the errors in unicode
<kenaan> arigo py3.5 a04f367d45a5 /rpython/: hg merge default
<kenaan> arigo py3.5 72a8c93b5914 /pypy/: Use FormatErrorW() instead of the bogus space.newtext(FormatError()), because FormatError() does not return utf8 at all
<kenaan> arigo py3.5 b0e0af09b762 /rpython/rlib/: More Windows compatibility to return unicode error messages
<kenaan> arigo py3.5 20fdafb25341 /pypy/: Fixes for unicode error messages
<kenaan> arigo default ed98419ad5e6 /rpython/rlib/: backport b0e0af09b762
<kenaan> arigo default 13a87780bd5a /: merge heads
<fijal> arigato: so the buildbot-built names have AMD64 in them
<fijal> is it right?
<arigato> Rotonen: I have no CPython source code, I'm trying to open pypy
<arigato> fijal: sorry?
<fijal> arigato: the ssl library comes as _pypy_openssl.pypy3-510-AMD64-win32.pyd
<fijal> would that load?
<fijal> what is AMD64 for?
<Rotonen> arigato: iirc it was 'smart' and picked up on 'python' and assumed such, but that's something i last fought with in march, so ymmv
<arigato> fijal: that looks wrong
<kenaan> arigo py3.5 b1f2250e284c /pypy/interpreter/unicodehelper.py: oops
<fijal> so the naming is one thing, but right now I fail to build anything because "vcvarsall.bat" is not found
<fijal> how do I set that up?
<arigato> follow the mess at pypy.org/windows.html I think
<fijal> 404 Not found?
<Rotonen> you need to add your visual studio stuff to your PATH
<Rotonen> vcvarsall is just a wrapper which runs in environment variables for you
<arigato> sorry, that's in pypy docs
<fijal> that's pypy 2.7
<fijal> pypy 3.5 is different, no?
<arigato> I don't actually know
<arigato> my guess is that we didn't care about it, and so the buildbot builds pypy3.exe with the same old Visual Studio version
<LarstiQ> has at least some pypy3 stuff
<fijal> ok, but that's a bit wrong
<arigato> "Setting up VS for building ssl on python 3"
<fijal> ah, python3, not python 3
<fijal> this is all nonsense and it also does not work, because I don't have a very old version of VS
<arigato> you usually need the same version of VS, yes
<arigato> if we want to update the VS we use for pypy3 specifically (which would probably be a good idea), then we need to do that, which is involved
<arigato> e.g. on the buildslaves we need to make sure to have the correct version installed
<fijal> ok
<fijal> maybe we should do that
<arigato> we can't pick a random version of VS
<arigato> otherwise windows people will be unhappy because it's not the same version as CPython 3.N
<fijal> no, but maybe using the same version as cpython will be ok
amaury has quit [Quit: Konversation terminated!]
<arigato> I suggest that we pick exactly the same version as cpython uses, for exactly the same release number
amaury has joined #pypy
<fijal> arigato: do you know how to find out what should be the name of the .pyd file btw?
<Rotonen> cpython 3.5 is officially vs 15, but all that stuff works without issues in vs 17 as well
<fijal> (like how is it constructed)
<arigato> additional messes may come from a possible difference between the version for 3.5 and 3.6 and 3.7
<fijal> let's pick the same one as 3.5
<arigato> Rotonen: I've heard about it, but it is the case that they are now fully cross-compatible? like run a VS17 .pyd in a VS15 cpython or vice-versa
<Rotonen> 15 -> 17 works, never tried the other way
<arigato> how the filename is constructed: look in distutils/, I suppose?
<Rotonen> what's the target audience of that project file - mostly ~5 people from this channel?
<fijal> arigato: ok, so importlib.machinery.EXTENSION_SUFFIXES agree
<fijal> but the module still does not import (none of the cffi modules), I wonder why
<fijal> how do I open a .pyd file directly with cffi?
<arigato> ffi.dlopen(), if you just want to see if it works
<arigato> it's unlikely to be usable
<fijal> right
<fijal> well, I want to see if "ImportError" is something deeper or not
<fijal> ok, I can dlopen it but it has no exported symbols
antocuni has joined #pypy
<fijal> dir(ffi.dlopen(...)) should give me something more than [] right?
<arigato> no
<fijal> ok?
<fijal> so how do I list the symbols?
<arigato> unless you said ffi.cdef("") first
<arigato> I don't know how you can list the symbols
<arigato> there are some non-portable ways to do that, I think
<arigato> certainly nothing built into cffi
<fijal> ok, I got it from VS
<fijal> so it has PyInit__lzma_cffi
<arigato> and that's it I guess
<fijal> and _cffi_pypyinit__lzma_cffi
<arigato> as expected
<fijal> arigato: do you have any clue where is the code loading that?
<arigato> $you mean
<fijal> (code that's supposed to call cffi and do stuff when I type "import _pypy_openssl")
<arigato> pypy/module/_cffi_backend?
<fijal> no, the importing part
<antocuni> fijal: if you want the symbols inside an ELF, I suggest to pip install lief
<antocuni> I have been playing with it lately, and it seems to be powerful and working good
<fijal> antocuni: it's a windows thing
<arigato> fijal: cpyext.api.create_extension_module()
<antocuni> I think it parses also PE files
<fijal> arigato: so cpyext also loads our own things?
<arigato> well the code is in cpyext, yes
<arigato> I think it's just one function that is included in the pypy even if translated without cpyext
<arigato> but yes
<fijal> ok
<fijal> that's going to be hard to debug without working visual studio/python combo....
<arigato> yay, pypy3-c.exe starts on my machine now
<fijal> arigato: that's a start
<fijal> arigato: for me pypy3.exe -c 'import _lzma_cffi' explodes with import error
Rhy0lite has joined #pypy
<arigato> I haven't yet managed to run build_cffi_imports.py successfully
<fijal> arigato: well I just tried to run import in downloaded version
<fijal> from buildbot
<fijal> (no I can't get build_cffi_imports to run either)
<arigato> yes, but I'm trying to get actual debuggable source code
<fijal> right now the problem is "cannot find vcvarsall.bar" which is clearly on the PATH (I can run it)
<arigato> otherwise, as you said, it's all a bit pointless
<fijal> sure :-)
<fijal> I'm at the stage of cloning pypy ;-)
<arigato> (I guess I should mention again that cloning from your laptop is 100x faster than cloning from bitbucket)
<fijal> rght
<fijal> ok....
<fijal> arigato: so my sys.maxint is 2^31
<fijal> but platform.architecture says 64bit
<fijal> which means I can't do anything
amaury has quit [Ping timeout: 248 seconds]
<arigato> fwiw, platform.architecture() returns ('32bit', 'WindowsPE') for me
<arigato> "import _audioop_cffi" stills fails
<fijal> platform.architecture() returns 64bit on32bit cpython
<fijal> (which means I can't build anything)
* fijal gives up for now
<arigato> importlib.machinery.EXTENSION_SUFFIXES contains '.pypy3-510-AMD64-win32.pyd', which is the name of the file
<arigato> fijal: I think it's something like: _imp.create_module() is called, and it works for a cffi module
<arigato> sorry, _imp.create_dynamic()
<arigato> but then there is _imp.exec_dynamic()
<arigato> which assumes blindly that it is a cpyext module
<arigato> if nothing else, it loads the cpyext module
<arigato> ...but it seems to work anyway, which means I've no clue why just a "import _audioop_cffi" fails
<arigato> imp.load_dynamic() works too
<arigato> imp.find_module() finds it correctly
<arigato> importlib.find_loader() works too
<arigato> no, wrong, find_loader() only finds it if I already imported it with imp...
<arigato> ok, find_loader() is not what I think it is anyway
* arigato mostly fails to follow the thousand of lines of importlib/*.py
<arigato> can I ask it "here's a module name, what path would you load?"
<ronan> arigato: importlib.util.find_spec(name).origin, I think
<arigato> right, getting None
<arigato> I think I'm getting closer
<arigato> I believe it's related to the fact that '.pypy3-510-AMD64-win32.pyd' contains uppercase letters
<arigato> on windows it casts everything to lowercase letters, and then not finding the name with AMD64 in it
Joannah has joined #pypy
Joannah has quit [Client Quit]
adamholmberg has joined #pypy
<arigato> on CPython 3.5, the equivalent is '.cp35-win32.pyd'
<arigato> I have some doubts about why we end up with AMD64 in the first place, but it seems to be the problem: no uppercase letters here please
<fijal> ronan, arigato: can I create a release branch?
<fijal> (there will still be stuff to be merged of course, but a release branch is a start)
<arigato> if you want
<fijal> arigato: I can wait until you're done with that too (it might make sense)
<arigato> I'm going to change the .so/.pyd extension
<arigato> I think including platform.machine() in it is just wrong
<arigato> sys.platform is enough
<fijal> I'll wait for ronan opinion
<ronan> fijal: sure, why not?
<arigato> machine.platform() was added by Stefan Beyer in march 2017
<arigato> I cannot find any more information about why
bremner has left #pypy ["Using Circe, the loveliest of all IRC clients"]
<ronan> maybe mjacob can remember
<ronan> arigato: it looks like a confusion with the wheel tags
<kenaan> arigo py3.5 98de75801589 /pypy/module/_cffi_backend/cerrno.py: Typo
<arigato> fijal: "import _audioop_cffi" now works
<kenaan> arigo py3.5 d79aaf54b0bc /pypy/module/imp/importing.py: Remove platform.machine() from the extension of the CPython- and CFFI-compatible dynamic libraries. I cannot figure ...
<arigato> fijal: "import _ssl" still crashes though
<arigato> but that's the next issue
<arigato> File "C:\Users\arigo\pypy\pypysrc\lib_pypy\_cffi_ssl\_stdssl\__init__.py", line 23, in <module>
<arigato> from select import poll, POLLIN, POLLOUT, select
<arigato> ImportError: cannot import name 'poll'
amaury has joined #pypy
yuyichao has joined #pypy
amaury has quit [Quit: Konversation terminated!]
yuyichao has quit [Ping timeout: 252 seconds]
tayfun26 has quit [Remote host closed the connection]
adamholmberg has quit [Read error: No route to host]
adamholmberg has joined #pypy
Arfrever has joined #pypy
yuyichao has joined #pypy
mattip has joined #pypy
dcrosta has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Jellyg00se has quit [Quit: Leaving]
yuyichao has quit [Read error: Connection reset by peer]
yuyichao has joined #pypy
<mattip> yay, some windows progress
<mattip> at some point I hought about fixing the platform/windows.py to look for vs2015, but gave up
raynold has joined #pypy
<fijal> arigato: why does it require poll?
<fijal> there is no poll on windows
<mattip> maybe passing some own tests would be a good first step
<fijal> we never passed own tests on windows, did we?
<mattip> no, but there seems to be somehting off with unicode
<mattip> on py3.5
<arigato> at least we *looked* at all failures over time
antocuni has quit [Ping timeout: 248 seconds]
<arigato> fijal: indeed, so it must be rewritten with more conditional code
<fijal> I would say being able to install packages would be good first step
<kenaan> fijal release-pypy3.5-v5.9.x 0d10fe25b245 /: create release branch
<fijal> hum
<fijal> so on trunk the version is 5.10.alpha
<arigato> yes? pypy 5.9 was released
<fijal> yes, so do we do 5.9.1 like matti suggested or 5.10?
<fijal> or 6.0?
* LarstiQ is of the 5.10 camp
<arigato> I think 5.10
<ronan> definitely not 5.9.1
<arigato> if we do a beta of pypy2 for cpyext, maybe it would also be a good idea to stick unicode-utf8 in the same beta, because of the same potential breakage
<arigato> but not in pypy3
* fijal makes it 5.10
<fijal> arigato: I think cpyext & utf8 warrant 6.0
<fijal> so we can do 6.0 beta
<arigato> ok, so 6.0 beta for pypy2, and still 5.10 for pypy3 to make it clearer that it's behind for utf8?
* arigato throwing up random suggestions, really
<fijal> yeah
<kenaan> fijal release-pypy3.5-v5.9.x cb3d0a043647 /pypy/: bump the versions
<cfbolz> that sounds pretty confusing, honestly
<ronan> arigato: I'm not sure what you're suggesting, but I'd rather not get into a state where we can't merge default into py3 for who knows how long
<fijal> .....
<cfbolz> shouldn't we just do a "boring" 5.10
<fijal> yes we should
<cfbolz> and then release again in february or so
<cfbolz> or whenever the other things are ready
<fijal> cfbolz: Im not sure if there is any point in releasing pypy2 5.10 though
amaury has joined #pypy
<arigato> well, cpyext and utf8 are both kind of ready, but not well-tested
<arigato> and indeed, with none of these two features, there isn't much news in pypy2
<cfbolz> arigato: is utf8 ready? eg the integration into py3 is still going to be quite a chunk of work
<fijal> it all requires work
<arigato> yes, but it's roughly ready for pypy2
<arigato> I see ronan's point about merging
<arigato> maybe merge default into unicode-utf8 and make that the beta release?
<fijal> how about we do nothing about pypy2 or utf8 and just do the 3.5 release?
<fijal> (as a start)
<cfbolz> +1
<fijal> and then we can think about merging
<arigato> yes, they are two independent questions so +1
glyph has quit [Quit: End of line.]
* arigato off
realitix_ has quit [Quit: realitix_]
glyph has joined #pypy
<LarstiQ> fijal: the point of pypy2 5.10 is to keep it unconfusing and predictable which versions exist for pypy2/pypy3
<LarstiQ> so personally I'd do boring 5.10 for pypy2/pypy3, and then move both on to 6.0beta
<cfbolz> tend to agree
<cfbolz> (but then, I'm not the one doing the work)
<fijal> yes, fair, but also it's a but of work for no real reason
<fijal> a bit of work
<fijal> let's do it that way - I'll try to release 3.5 and see if there is time left
<LarstiQ> I'm willing to volunteer some hours this month
<fijal> great, that would definitely make it easier
<fijal> should I write in the release announcement that it's a boring release, stuff works (more or less) and what is needed?
<fijal> we should at the very least try to fix installing packages on windows, but I can't seem to be able to get the dev env going at all
* fijal tries 32bit windows in a vm
<mattip> I am +1 for a 5.10 pypy2 and pypy3, just to keep them synced
dcrosta has joined #pypy
<mattip> there is also a small tkinter fix for matplotlib, if anyone ever merges my matplotlib tkagg-cffi branch then it will just work
<mattip> on 5.10
<mattip> fjial: where is the issue getting the devenv going?
<fijal> getting vcvarsbat working
<fijal> and then some 64 vs 32 bit issues
<fijal> anyway, I'll install 32bit windows on a VM don't want to care right now
<mattip> I tweaked platform/windows.py so vcvars should be found :(
<mattip> and the buildbots both are running on 64 bit windows
jamesaxl has joined #pypy
<fijal> mattip: yes, fine, but my pypy refuses because sys.machine or sys.architecture or something returns 64bit
<fijal> so platform does not pick it up
<fijal> mattip: my point being that while might be a genuine issue, fixing issues on my specific platform is not getting me anywhere
<mattip> ok
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/3579 [mattip: force build, py3.5]
<pjenvey> 5.10 should get mmap-for-arenas. maybe memory-accounting too but that could use more tweaks
<fijal> pjenvey: we can try to merge those
<mattip> it seems cpyext-avoid-roundtrip does not work on lxml, there are many more test failures than on default,
<fijal> pjenvey: do we know if mmap-for-arenas does anything?
<mattip> tested 93444:4f856cec59aa vs. 93445:b7431c4cc863
<pjenvey> I can't say 100% for sure it does, but avoiding malloc seems good. any potential downsides?
<fijal> I don't know
<fijal> changing deep inside stuff has some downsides
antocuni has joined #pypy
<mattip> antocuni: any idea why cpyext-avoid-roundtrip would not play nicely with lxml?
<antocuni> what's the problem?
* antocuni reads the log
<mattip> many more tests are failing on the branch than on default
<antocuni> I fear that the only way to know is to debug one of them and see what happens :(
<antocuni> no idea out of the box
<mattip> down another project's rabbit hole I go.
<antocuni> I'm just reading the discussion about the release: I think that fix-stacklet-vmprof-2 is enough to justify a pypy2 release as well
<mattip> cpython 2.7 runs the tests in ~30 seconds, passes all of them
<antocuni> also, I think that we should always try to keep pypy2 and pypy3 releases in sync
<fijal> antocuni: ok, but we have to release 3.5 this year and it's extra work
<antocuni> extra work to release pypy2?
<fijal> yeah
<antocuni> I admit that I don't know exactly what is involved in doing a release, but isn't it mostly "take the buildbot output and repackage"?
<fijal> well, you have to wait twice as long for buildbots
<fijal> I admit I would rather have working windows than do pypy2 release
<antocuni> I imagine lots of people will be confused by unsynced releases
<antocuni> anyway, sorry but I have to go :)
* antocuni off
<fijal> that was a passive agressive comment :
<fijal> )
<mattip> writing the release note is much harder than buildbots/repackaging/uploading IMO
<fijal> well should be minimal no?
<mattip> I usually start at the last release, and look over the commits to py3.5 and default trying to distill important commits
<antocuni> well, I just stated my opinion; but since I admit I am not the one who does the work, I cannot request it to be followed :)
<mattip> so it only becomes clear once it is finished how minimal it is
<fijal> mattip: that's why we have whatsnew right?
<mattip> not really, that only documents branches
<mattip> so most cpyext compatability addtions are simple single commits, but add api compliance that is nice to mention
<pjenvey> fijal: could optionally enable mmap-for-arenas via env I suppose, _PYPY_GC_MMAP_ARENAS maybe
<fijal> pjenvey: I would leave it to 6.0
<mattip> fijal: I can do the buildbots/packaging for pypy2.7 v5.10
<fijal> mattip: cool!
<fijal> mattip: so should I look hrough commits and see what cpyext improvements landed?
<fijal> or should we just say "cpyext improvements"?
antocuni has quit [Ping timeout: 260 seconds]
<mattip> your call. Looking quickly up the tree from the last release, the first non-whatsnew fix I found was this
<mattip> 92811 (df15dab6a182) "Issue2684: pyexpat.CreateParser() did not handle correctly namespace_separator=""
<mattip> and things like this
<mattip> 2841 (c2cf8296095b) ctypes: allow ptr[0] = foo when ptr is a pointer to struct
<mattip> s/2841/92481/
<fijal> I guess it makes sense to put them
<fijal> mattip: the win32 vm goes a bit better, how do I install all the .h files?
<fijal> like expat.h, openssl etc.
<mattip> download the local.zip from buildbot
<fijal> ok
<mattip> you also need to help pypy find vs, this is what I came up with
<mattip> and I always forget to do "editbin /largeaddressaware pypy.exe" and then get memoryerror while translating
tbodt has joined #pypy
<fijal> heh
Arfrever has quit [Quit: 御出で]
marr has quit [Ping timeout: 255 seconds]
Cuddlesby has joined #pypy
<Cuddlesby> Can anyone explain to me what's happening in this code on Pypy? https://pastebin.com/piH4Pbgu
<Cuddlesby> The loop appears to be doing the same thing, but results in an error.
<Cuddlesby> If I set the stack limit to 10000 before setting it to anything lower first, it crashes.
<cfbolz> Cuddlesby: it's not safe to set the recursion limit arbitrarily high (same in CPython) at some point you get crashes
<cfbolz> you run out of stack space and start writing stack frames into unrelated memory
<Cuddlesby> cfbolz: Of course, but ulimit reports I have ~8MB stack. And from the docs, 768B is required per call, so that gives me 10922 calls supposedly
<cfbolz> which docs?
<cfbolz> cpython and pypy require different amounts of stack per call (and in pypy it also depends on the JIT, so it's not even just a simple number)
<Cuddlesby> I got that slightly wrong actually, but here: http://doc.pypy.org/en/latest/cpython_differences.html
amaury has quit [Ping timeout: 268 seconds]
<Cuddlesby> It also doesn't explain why it fails with only setrecursionlimit(10000); f(0) but is fine in the example
<cfbolz> it even says that that number is very approximate only
<cfbolz> anyway, what are you trying to achieve?
<Cuddlesby> cfbolz: Trying to raise the stack limit to handle a set amount of recursion
<Cuddlesby> On Linux I can use ulimit/resource module but what about Windows?
<Cuddlesby> I've considered spawning a thread after setting threading.stack_size
<simpson> Cuddlesby: If this is to fix a production problem, then the correct fix is to rewrite your recursive code to either be iterative with a reified stack, or to use a trampoline/memoizer/etc.
<Cuddlesby> simpson: I would usually agree with you but that isn't an option in this case
<simpson> It's been an option every other time I've encountered this problem. What are you building?
<Cuddlesby> simpson: I know, in fact I already did such a rewrite but it doesn't fit elegantly and it's slow with no chance of speeding it up
dcrosta has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Cuddlesby> I essentally have to capture the state in a closure since the stack stores many different things
dcrosta has joined #pypy
<Cuddlesby> Anyway, I do know what I'm doing. I just want deep recursion like Golang can do. But I want Python. Possible?
<simpson> Is this an interpreter?
<Cuddlesby> Kind of
<simpson> Yes, there's a relatively straightforward mechanical transformation that you can do from closed recursion to open recursion, and then you can stick a trampoline into the open recursion. It's a fun afternoon's work to write the trampoline as a decorator.
<simpson> It's not free. Python isn't a language for free arbitrarily-deep recursion. (In a certain sense, no language gets it entirely for free!)
<Cuddlesby> Golang is close to free
<Cuddlesby> But anyway, I know the stack depth I want. So I just need to know how to set that up
<simpson> Doesn't Go do it with segmented stacks? So there's a cost, it's just covered for you by the runtime. Ditto with thread-local storage, etc.
<Cuddlesby> I think Golang does stack copying now. And I said "close". There's as much cost to appending/popping from a list arguably
<simpson> What's your Windows strategy? So far, I've found a way to alter python.exe to have a bigger default stack, and it seems like there's Win32 API too.
<Cuddlesby> Like I said, threading.stack_size maybe
<simpson> Have you tried it and seen whether it works yet?
<Cuddlesby> Nope
<mattip> win32 py3.5 can now load c-extension modules, but packaging fails, it tries to rebuild pyd which is being held (?maybe), and NTFS does not allow that
<mattip> so uploading the package gives up
dcrosta has quit [Quit: Textual IRC Client: www.textualapp.com]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dcrosta has joined #pypy
tbodt has joined #pypy
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/3579 [mattip: force build, py3.5]
Cuddlesby has quit [Quit: Page closed]
annonch has joined #pypy
<annonch> Hi has anyone used mpi with cffi / pypy ?
<arigato> ijal: my opinion on mmap-for-arenas is that I should just merge it, after an extra round of checking
<arigato> it seems to fix an apparent leak due to fragmentation
amaury has joined #pypy
* arigato does the checking
Rhy0lite has quit [Quit: Leaving]
marr has joined #pypy
<annonch> Hi I am new here, How do you set the c compiler when calling ffibuilder.compile(verbose = True)
<kenaan> mattip py3.5 1c2e6a98c3e0 /: minimum fix to allow import _ssl, build_cffi_imports to run on win32
<arigato> hi! compile() uses distutils, a standard python package
<arigato> how distutils itself can be influenced is hard to check and probably depends on your platform a lot
<kenaan> mattip py3.5 75cccb748415 /lib_pypy/_cffi_ssl/_stdssl/__init__.py: fix for non-win32
<arigato> if you really need fine-grained control, I would recommend to use only ffibuilder.emit_c_code() and then compiling that C code on your own
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<annonch> hmm thanks, just trying to get it to include MPI
<arigato> ah, if you only want to give a few options to the compiler, there are standard ways in distutils
<arigato> e.g. include_dirs=[ ] in ffi.set_source()
<annonch> Perfect!
<kenaan> arigo mmap-for-arenas 1c3ba5303112 /rpython/: Write the Windows part of arena_mmap()
<mattip> arigato: thanks for finding the `platform.machine()` on win32 py3.5
<arigato> np
tbodt has joined #pypy
<mattip> hmm cython-generated code on cpyext-avoid-roundtrip is warning that sizeof(PyTypeObject) != ((PyTypeObject *)result)->tp_basicsize
<mattip> on default that test passes
<mattip> the warning is "UserWarning: __builtin__.type size changed, may indicate binary incompatibility. Expected 880, got 400"
<arigato> already seen this, but I don't remember at all
<mattip> maybe just a symptom, but getting closer. Running the tests with "-v" helped
<mattip> it seems like somehow cython does not like cpyext-avoid-roundtrip
<mattip> but I'll keep diving into lxml to get a better idea of what cython doesn't like
<mattip> bye for now
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mattip has left #pypy ["bye"]
tbodt has joined #pypy
<kenaan> arigo mmap-for-arenas 685824de07b4 /rpython/rlib/rmmap.py: Translation fix
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
adamholmberg has quit [Read error: No route to host]
adamholmberg has joined #pypy
tbodt has quit [Ping timeout: 248 seconds]
annonch has quit [Ping timeout: 260 seconds]
adamholmberg has quit [Remote host closed the connection]
panni_ has quit [Ping timeout: 256 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
tbodt has joined #pypy
panni_ has joined #pypy