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
tsutsumi2 has quit [Ping timeout: 245 seconds]
marky1991 has joined #pypy
marky1991 has quit [Read error: Connection reset by peer]
marr has quit [Ping timeout: 268 seconds]
mattip has quit [Ping timeout: 260 seconds]
speeder39 has joined #pypy
dfee has joined #pypy
<dfee> how can i limit my package to python3.6+ OR pypy 6.0.0+?
<Rotonen> https://github.com/zopefoundation/zope.interface/blob/c1b436de3f36bb533634b3287a601cd81b63ccb2/setup.py#L135-L141 <- something like that in python_requires could be doable, but i'm not too sure how the optimized-for-cpython sorting works in that case, but you should be able to set multiple ranges of white and black lists
<njs> dfee: I don't think there is a way right now, but if you raise it as an issue on the distutils-sig mailing list or https://github.com/pypa/packaging-problems/issues/ then it increases the chance that it will get fixed
<njs> (there are some other limitations that people have run into with python_requires, like the awkwardness in Rotonen's example, so hopefully it will get extended at some point, and if your issue has been raised publically then it increases the chance that it'll get taken into account if/when that happen)
<dfee> njs: do you know if there is a way to specify python3.6+ but not prevent installation on pypy6.0.0? setup_requires seems to
<dfee> Rotonen: thanks, let me check that out
<njs> dfee: I don't know of a way
<dfee> Rotonen: unfortunately, z.i doesn't specify pypy vs cpython :(
<dfee> it's kinda hacky, but i wonder if i could detect that the interpreter is PyPy and adjsut the requirements from there (i.e. downgrade to 3.5)
<njs> dfee: not in a wheel
<njs> dfee: though you could python_requires: >= 3.5, and then at import time error out if you discover you're on cpython 3.5
<dfee> njs: i'm still not clear on what a wheel is.
<dfee> is it just defining the package through setup.cfg rather than setup.py?
<njs> there are two standard ways to distribute a python package. Option A is as an "sdist" (= "source distribution"), which is a tarball of your source tree, including a setup.py file, and you run the setup.py file to build it, or get metadata, or do anything with it really
<njs> and Option B is as a "wheel", which is a pre-built version of your package, with static metadata in some specific format and a bunch of files that just get dropped at appropriate places in your system, no setup.py involved at all
<dfee> ok
<njs> the distinction is most important for packages that have complicated build processes, binary extensions, etc., but it still makes sense for pure python packages too
<dfee> i wonder if i should just not support pypy then until it gains py36 compatibility. it's a bummer, but i don't know of any other way
<dfee> this is a fairly trivial installation: no dependencies, but it does have complexity in requiring ordered dicts.
<dfee> "insertion ordered" dicts
<njs> dfee: do you expect that there will be people trying to install it on cpython 3.5 and getting frustrated, or...?
<dfee> njs: yeah, i can imagine that happening.
[Arfrever] has quit [Ping timeout: 264 seconds]
<dfee> i'm trying to support pypy, but the package is really 3.6+ due to the "insertion ordered" dicts requirement
jacob22__ is now known as jacob22
<dstufft> well
<dstufft> you can produce a wheel that's good for pypy6+
<dstufft> and a wheel that's good for any Python implementation 3.6+
<dfee> dstufft: again, i'm sort of lacking in knowledge here, but that'd be idea
<dfee> *ideal
<dstufft> and a sdist that's good for only 3.6?
<njs> dstufft: oh heh sneaky
<dfee> oh jeez, is the sdist recipe necessary then?
<njs> dstufft: is there in fact a platform tag that means "pypy 6+"? I remember pip/wheel have some weird hacks around pypy platform tags...
<dstufft> well producing a sdist is good hygiene, it's not mandatory but downstream redistributors will generally want you to produce them
<dstufft> njs: I don't remember TBH
<dstufft> this is mostly just a random sketch of how it could work
<dstufft> not a fully fledged plan
<dstufft> unfortunately making it work is probably going to require a bit of effort, because it's an esoteric enough want that none of the tooling is designed for it, so you're going off the beaten path
<njs> dstufft: I guess if you want to be really clever it could even be a single wheel like: somepkg-1.0-py35.pp6-none-any.whl
<dfee> and of course jenkins doesn't support pypy6.0.0 so there'll be no testing for it.
<njs> dstufft: also a lot of tooling doesn't look at the metadata inside the wheel so just renaming the file is often enough to fool things...
<dfee> maybe i just do an sdist and check sys.version_info?
<dstufft> Hmm
<dstufft> simpler idea:
<dstufft> well first
<dstufft> dfee: has any version of this library ever supported 3.5+?
<dstufft> er
<dstufft> <3.6
<dstufft> I mean
<dfee> dstufft: nothing that's been released on pypi
<dfee> so, no public customers of the code
<dstufft> dfee: Ok, so easiest thing, produce a wheel that's 3.6+, produce a sdist that works for anything, and check sys.version_info in setup.py and error out if it's not supported
<dstufft> a 3.6+ Python will get the wheel, which is the happy case for installs (faster, etc)
<dstufft> something like PyPy 6 would get the sdist, and work cuz your setup.py code would allow it
<dstufft> Something like CPython 3.5 or even 2.7 would get the sdist and fail, cuz your setup.py code wouldn't allow it
<dstufft> does that make sense?
<dfee> dstufft: i'll need to learn how to build the wheel, but that sounds reasonable.
<dfee> dstufft: unfortunately, sys.version_info doesn't seem to report that the interpreter is pypy
<dfee> --> (major=3, minor=5, micro=3, releaselevel='final', serial=0)
<dstufft> dfee: there's something pypy introspection available too, I forget the mechanism off the top of my head
<dstufft> but setup.py is just python, so you can do whatever you want to figure out it's pypy
<dstufft> the platform module has some stuff
<dfee> just discovered the :mod:`platform`
<dfee> ah yes. platform.python_implementation() is the key
<dfee> i wonder if i should check if it's > 3.5.3 or if it's greater than 6.0.0 (<-- what is that number?)
<njs> pypy has had ordered dicts in both the py2 and py3 branches for a while...
wleslie has joined #pypy
R3d_Sky has joined #pypy
<dfee> this is what i'm working with as of now: https://paste.ofcode.org/KnVHWncVqaSLdQ4EKfJShH
<dfee> all the other options are defined in the setup.cfg file
[Arfrever] has joined #pypy
<dfee> if this works, is there a benefit to doing a wheel or is that just extra overhead?
<dstufft> dfee: wheels install faster
<dfee> of course platform.python_version_information returns strings, not ints... ugh. can i trust that they'll actually remain str-cast ints? https://paste.ofcode.org/bAp4BHTtKaW355dmPNyWRF
jcea has quit [Quit: jcea]
<njs> dfee: just use sys.version_info
<dfee> njs: thanks
<Rotonen> sounds like pypy would need to poke the setuptools folks to add pypy_version (or have one of those available pypy-only and tell packagers to conditionally inject that in at setup.py runtime)
<Rotonen> like one can already do platform specific trickery
<Rotonen> dfee: https://github.com/zopefoundation/ExtensionClass/blob/42c4b8e27003323f41412f441ac9603955087dc8/setup.py#L26-L48 <- i mean just set the python requires based on a block like this for now - should do
wleslie has quit [Quit: ~~~ Crash in JIT!]
mattip has joined #pypy
R3d_Sky has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jamesaxl has quit [Quit: WeeChat 2.1]
R3d_Sky has joined #pypy
mattip has quit [Ping timeout: 252 seconds]
mattip has joined #pypy
R3d_Sky has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
R3d_Sky has joined #pypy
tsutsumi2 has joined #pypy
dddddd has quit [Remote host closed the connection]
dfee has quit [Ping timeout: 256 seconds]
tsutsumi2 has quit [Ping timeout: 260 seconds]
tsutsumi2 has joined #pypy
R3d_Sky has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dfee has joined #pypy
speeder39 has quit [Quit: Connection closed for inactivity]
tsutsumi2 has quit [Ping timeout: 240 seconds]
tsutsumi has quit [Quit: Leaving]
tsutsumi19 is now known as tsutsumi
tsutsumi2 has joined #pypy
tsutsumi2 has quit [Ping timeout: 260 seconds]
tsutsumi2 has joined #pypy
R3d_Sky has joined #pypy
inhahe__ has quit [Ping timeout: 248 seconds]
inhahe__ has joined #pypy
R3d_Sky has quit [Read error: Connection reset by peer]
<mattip> ronan: were the 16 bit utf functions in 7b8b1a6cec71 a precursor to something?
<mattip> it seems that commit is a bit of an orphan at the moment
R3d_Sky has joined #pypy
R3d_Sky has quit [Quit: Textual IRC Client: www.textualapp.com]
inhahe__ has quit [Read error: Connection reset by peer]
inhahe__ has joined #pypy
mattip has quit [Quit: bye]
tsutsumi2 has quit [Ping timeout: 260 seconds]
lritter has joined #pypy
<fijal> mattip_: hi
hotpot33 has joined #pypy
<kenaan> arigo default 04a7d1343551 /: Tweak revdb
antocuni has joined #pypy
realitix has joined #pypy
hotpot33 has quit [Ping timeout: 245 seconds]
hotpot33 has joined #pypy
tayfun26 has joined #pypy
oberstet has joined #pypy
realitix_ has joined #pypy
realitix_ has quit [Remote host closed the connection]
realitix_ has joined #pypy
kenaan has quit [Read error: No route to host]
realitix has quit [Ping timeout: 252 seconds]
realitix_ is now known as realitix
marr has joined #pypy
arigato has left #pypy ["Leaving"]
hotpot33 has quit [Remote host closed the connection]
oberstet has quit [Ping timeout: 245 seconds]
dddddd has joined #pypy
wleslie has joined #pypy
mcyprian has joined #pypy
realitix has quit [Quit: realitix]
realitix has joined #pypy
mcyprian has quit [Ping timeout: 260 seconds]
mcyprian has joined #pypy
ulope has quit [Ping timeout: 248 seconds]
irclogs_io_bot has quit [Ping timeout: 256 seconds]
marvin_ has quit [Ping timeout: 240 seconds]
Rotonen has quit [Ping timeout: 260 seconds]
Hodgestar has quit [Ping timeout: 276 seconds]
marvin has joined #pypy
Hodgestar has joined #pypy
marself has quit [Ping timeout: 252 seconds]
marself has joined #pypy
jeremy has joined #pypy
jeremy has quit [Client Quit]
wleslie has quit [Quit: ~~~ Crash in JIT!]
Rotonen has joined #pypy
_whitelogger has joined #pypy
irclogs_io_bot has joined #pypy
antocuni has quit [Ping timeout: 252 seconds]
jamesaxl has joined #pypy
energizer has quit [Ping timeout: 245 seconds]
jcea has joined #pypy
raynold has quit [Quit: Connection closed for inactivity]
dfee has joined #pypy
dfee has quit [Ping timeout: 276 seconds]
exarkun has quit [Read error: Connection reset by peer]
antocuni has joined #pypy
marky1991 has joined #pypy
exarkun has joined #pypy
mcyprian has quit [Ping timeout: 260 seconds]
mcyprian has joined #pypy
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
kenaan has joined #pypy
<kenaan> antocuni gc-disable a75d8c7f141f /rpython/translator/goal/gcbench.py: add an option to control how the gc works inside gcbench: you can choose whether to use gc.disable() and/or g...
<kenaan> antocuni gc-disable 91902e174491 /pypy/module/gc/: the app-level gc.{enable,disable} now call also the rgc equivalent, to actually disable major collections
mcyprian has quit [Quit: Leaving.]
antocuni has quit [Ping timeout: 252 seconds]
antocuni has joined #pypy
marself has quit [Ping timeout: 276 seconds]
marself has joined #pypy
wleslie has joined #pypy
marself has quit [Ping timeout: 240 seconds]
wleslie has quit [Client Quit]
marself has joined #pypy
jcea has quit [Remote host closed the connection]
<ronan> mattip_: it's for reducing the diff with unicode-utf8
jcea has joined #pypy
mcyprian has joined #pypy
marky1991 has quit [Ping timeout: 260 seconds]
mcyprian has left #pypy [#pypy]
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
lazka has joined #pypy
marky1991 has quit [Ping timeout: 240 seconds]
tayfun26 has quit [Quit: tayfun26]
marky1991 has joined #pypy
mattip has joined #pypy
<mattip> fijal: hi
<mattip> ronan: ok, but the merge now default -> unicode-utf8 is non-trivial since the signatures are very different
commandoline has quit [Quit: Bye!]
commandoline has joined #pypy
commandoline has quit [Client Quit]
<ronan> mattip: hmm, that shouldn't be an issue, unicode-utf8 doesn't need to change
<mattip> maybe it's me using kdiff3 instead of meld
commandoline has joined #pypy
mattip has quit [Ping timeout: 252 seconds]
<ronan> mattip: I'll do the merge
realitix has quit [Quit: realitix]
lazka has quit [Quit: Leaving]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/5499 [ronan: force build, unicode-utf8]
<bbot2> Started: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/6776 [ronan: force build, unicode-utf8]
tbodt has joined #pypy
tbodt has quit [Client Quit]
tbodt has joined #pypy
<RemoteFox> what happened to the cast_object_to_weakaddress?
marky1991 has quit [Remote host closed the connection]
<bbot2> Failure: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/6776 [ronan: force build, unicode-utf8]
lazka has joined #pypy
marky1991 has joined #pypy
mattip has joined #pypy
energizer has joined #pypy
antocuni has quit [Ping timeout: 240 seconds]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/5499 [ronan: force build, unicode-utf8]
<cfbolz> RemoteFox: that's a fairly internal operation. maybe it got removed in some refactoring? why?
commandoline has quit [Ping timeout: 245 seconds]
commandoline has joined #pypy
<fijal> cfbolz: I like your euphemism for "really really obscure"
jcea has quit [Remote host closed the connection]
awygle is now known as aygle
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
aygle is now known as awygle
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
kcr has quit []
kcr has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991_2 has joined #pypy
SunDwarf is now known as Guest52326
_habnabit is now known as Guest67145
mwhudson is now known as Guest32565
graingert is now known as Guest25333
tito is now known as Guest31483
ionelmc is now known as Guest55264
phlebas is now known as Guest87736
tos9 is now known as Guest20026
nedbat is now known as Guest74655
bjs is now known as Guest2337
danchr is now known as Guest51510
ronny is now known as Guest36932
Guest74655 is now known as nedbat
dfee has joined #pypy
<dfee> can i count on `a` to be less than `b` in this psuedocode? {'a': nextval(), 'b': nextval()}. i'm not clear what happens at the AST level
<RemoteFox> cfbolz: I am writing interpreter and I have object memory layout of my language, where there are something like classes (maps, it is a prototype based OOP), and instances of objects points to this map, and I think I need a reference from map back to objects
<RemoteFox> so that when map change, I am able to change also all instances
<RemoteFox> and I thought that I will use weakrefs from maps to objects, so I won't prevent GC collecting them
marky1991_2 has quit [Ping timeout: 264 seconds]
<RemoteFox> cast_object_to_weakaddress is mentioned in the rpython documentation
<RemoteFox> but I've found, that it is not present anymore
<RemoteFox> I've found rweaklist, but I don't know if I can use that
Guest55264 has quit []
ionelmc has joined #pypy
<cfbolz> RemoteFox: you really don't want to keep a weak reference to every object around, it will kill your performance
<cfbolz> in whichever way you implement it
<cfbolz> dfee: I wouldn't count on that, no
<cfbolz> dfee: maybe it's accidentally the case currently, but it's not a guaranteed property
Guest67145 is now known as _habnabit
<RemoteFox> oh, hm
<dfee> cfbolz: then how are dictionaries ordered?
<cfbolz> wait, I am confused
<cfbolz> dfee: why do you bring up the AST?
<cfbolz> I thought you were talking about the AST nodes for 'a' and 'b'?
<dfee> i know that something happens between my python code and my CPU
<dfee> i don't know the realities of how the code is compiled
<cfbolz> ok, I see
<cfbolz> dfee: so you want to know whether this is always true list({'a': ..., 'b': ...}) == ['a', 'b']
<cfbolz> right?
<dfee> i *want* a = {'a': nextval(), 'b': nextval()} == {'a': 1, 'b': 2}
<dfee> i don't know the order of evaluation though
<cfbolz> ok, so the question is whether the nextvals are evaluated left to right?
<cfbolz> then the answer is yes
<dfee> yep
<cfbolz> it has nothing to do with dictionary ordering though
<dfee> cfbolz: ok
<cfbolz> that has always been the case, in all versions of python, afaik
<dfee> cfbolz: so a corrolary then... f(a=nextval(), b=nextval() -> [(a, 1), (b,2)]?
<cfbolz> yes, parameters are evaluated left to right as well
<dfee> i mean that's very loose psuedocode with a typo or two... but you get the question?
<dfee> ok
<dfee> so the original question was trying to ask if the code, when parsed into an AST would evaluate left to right
<dfee> i'm doing a "creation_order" hack to know the ordering of kw-params
<cfbolz> dfee: in pypy kw-params should iterate in the order that the caller specified them, yes
<dfee> of course in pypy3.5+ this is already ordered, but i'm trying to make it compatibile with CPython further back
<cfbolz> ah, in CPython
<cfbolz> I thought we were talking about pypy :-)
<dfee> cfbolz: kinda talking about both!
<dfee> so is LTR true in the python "standard" or is it just true to pypy
<cfbolz> in pypy2 dictionaries are also ordered, so you're good
<cfbolz> the left to right evaluation order is completely standard always
<dfee> ok
<cfbolz> but then the insertion into dicts messes the order up, in older versions of cpython
<dfee> i'm trying to write a library of broader appeal than just pypy.
<RemoteFox> I was trying to make creation of ordered dicts smaller pain under py2.7
<RemoteFox> (cpython)
<RemoteFox> it turned to by impossible using my approach
<RemoteFox> under 2.7
<dfee> hah
mattip has quit [Remote host closed the connection]
lazka has quit [Quit: Leaving]
Guest2337 is now known as bjs
<redj> how can I prevent setuptools from including all tracked files
<trfl> does this stage of the build process usually take about half an hour? https://my.mixtape.moe/ahktoz.png
<trfl> nothing's been happening for about that long
<trfl> ...nice timing, it JUST resumed lol
Guest36932 is now known as ronny
<RemoteFox> cfbolz: is there anything else I can use instead of weakrefs?
<ronny> redj: a MANIFEST.in with a exclude might help, more context is needed to give proper advise
<redj> ronny: I've tried MANIFEST.in and exclude_package_data but none of it is working
<cfbolz> RemoteFox: no, it's really a fundamental thing. You shouldn't keep track of all instances of anything that you'll allocate a lot of
<ronny> redj: then more context is needed
<RemoteFox> redj: what command are you using to build the package?
<redj> _habnabit: here's some information here: https://gist.github.com/redj/add3dfef226b4049d3c2ad23dfbb5e88
<redj> _habnabit: I'm sorry it's a bit messy, I'm preparing another gist
<_habnabit> aw jeez why would you crosspost into #pypy
<redj> sorry, that ^^ was for ronny and RemoteFox
<redj> _habnabit: I'm sorry, where should I post?
<_habnabit> redj, well, probably not #pypy, but definitely not crossposting
<redj> _habnabit: won't happen again
<ronny> redj: you might want to gi #pypa
<RemoteFox> cfbolz: any other trick? maybe scanning of all "instances" using given map, via the gc?
<cfbolz> No, sorry
<cfbolz> Why do you need to do that anyway?
<redj> ronny: thanks
<cfbolz> PyPy is using maps too, and we don't update all instances either
<dfee> i just relaized that in order to support < py3.5 i have to figure out how to pull my type annotations out of my code. ugh.
<RemoteFox> cfbolz: I don't know whether this make sense in class-based languages, but my language (inspired by Self), you may add or remove slots from the map, and I supposed that I would want to update all instances using that map
<cfbolz> RemoteFox: what's the value of the newly added slot? Some default?
<RemoteFox> Nil
<RemoteFox> so, yeah
<cfbolz> Then you don't need to store that into every instance, but do it lazily when you touch that field the next time
<RemoteFox> ok, I will try that
<RemoteFox> thanks
ciphergoth has joined #pypy
ciphergoth has quit [Remote host closed the connection]
ciphergoth has joined #pypy
jcea has joined #pypy
ciphergoth has quit [Ping timeout: 276 seconds]
Guest32565 is now known as mwhudson
ciphergoth has joined #pypy
dfee has quit [Ping timeout: 245 seconds]
lritter has quit [Ping timeout: 240 seconds]
ciphergoth has quit [Ping timeout: 260 seconds]
ciphergoth has joined #pypy
dfee has joined #pypy
marr has quit [Ping timeout: 252 seconds]
dfee has quit [Ping timeout: 252 seconds]