From fijall at gmail.com Thu Sep 7 19:35:19 2017 From: fijall at gmail.com (Maciej Fijalkowski) Date: Fri, 8 Sep 2017 01:35:19 +0200 Subject: [pypy-dev] Does pypy 58 arm version support numpy? In-Reply-To: References: Message-ID: Wait for pypy 5.9 :-) On Sun, Aug 20, 2017 at 6:29 AM, Gelin Yan wrote: > Hi All > > When I tried to use pip to install numpy, I got some compiler failtures. > I want to know whether pypy arm version fully support numpy. > > OS: raspbian > Gcc version: 4.9.2 > Pypy version: 5.8 > Hardware: raspberry pi 3 > > > Regards > > gelin yan > > _______________________________________________ > pypy-dev mailing list > pypy-dev at python.org > https://mail.python.org/mailman/listinfo/pypy-dev > From srhaque at theiet.org Wed Sep 13 00:23:45 2017 From: srhaque at theiet.org (Shaheed Haque) Date: Wed, 13 Sep 2017 05:23:45 +0100 Subject: [pypy-dev] Automated binding generation (and maintenance) In-Reply-To: References: Message-ID: Hi, I have been looking at the problem of automated binding generation (and maintenance) for large C++ code bases for a little while now [1], but am new to cppyy. One issue I am struggling to find a good solution for is to generate an accurate list of the objects (classes, functions, variables etc) in a given header file in order to populate the selection .XML. Ideally, I'd like to be able to say "all objects in this translation unit". I tried the wildcard "*" but I believe that selects the transitive fanout (and runs into errors). Short of running Clang directly to generate the names, what options do I have? (Currently, I'm working around this by manually specifying a narrower wildcard such as "KJS*"). Also, as I looked around for approaches to this issue, I noted that the cppyy backend v610 5 source code has a "getAllClasses" whereas PyPI has 6.10.0.2. I'm not sure of the mapping of versions, but what is the cadence for updates to PyPI? [1] https://marc.info/?l=kde-core-devel&m=150464598710128&w=2 -------------- next part -------------- An HTML attachment was scrubbed... URL: From srhaque at theiet.org Wed Sep 13 03:36:35 2017 From: srhaque at theiet.org (Shaheed Haque) Date: Wed, 13 Sep 2017 08:36:35 +0100 Subject: [pypy-dev] Automated binding generation (and maintenance) In-Reply-To: References: Message-ID: [ Resend now I am subscribed, apologies for any duplication ] Hi, I have been looking at the problem of automated binding generation (and maintenance) for large C++ code bases for a little while now [1], but am new to cppyy. One issue I am struggling to find a good solution for is to generate an accurate list of the objects (classes, functions, variables etc) in a given header file in order to populate the selection .XML. Ideally, I'd like to be able to say "all objects in this translation unit". I tried the wildcard "*" but I believe that selects the transitive fanout (and runs into errors). Short of running Clang directly to generate the names, what options do I have? (Currently, I'm working around this by manually specifying a narrower wildcard such as "KJS*"). Also, as I looked around for approaches to this issue, I noted that the cppyy backend v610 5 source code has a "getAllClasses" whereas PyPI has 6.10.0.2. I'm not sure of the mapping of versions, but what is the cadence for updates to PyPI? [1] https://marc.info/?l=kde-core-devel&m=150464598710128&w=2 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuaxo2 at yahoo.com Wed Sep 13 07:53:16 2017 From: stuaxo2 at yahoo.com (Stuart Axon) Date: Wed, 13 Sep 2017 11:53:16 +0000 (UTC) Subject: [pypy-dev] Tkinter ? References: <855602581.1111765.1505303596918.ref@mail.yahoo.com> Message-ID: <855602581.1111765.1505303596918@mail.yahoo.com> Hi all,?? Is TkInter pypy still a thing ??? I was trying some demos from aubio from pypy but they didn't work [1].My first thought was to try and install tkinter-pypy but that doens't seem to exist any more. I'm testing with pypy-nightly trunk on Ubuntu 17.04 64 bit. [1]$ ?python demo_keyboard.py Traceback (most recent call last): ? File "demo_keyboard.py", line 60, in ??? import matplotlib.pyplot as plt ? File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/pyplot.py", line 115, in ??? _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() ? File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup ??? globals(),locals(),[backend_name],0) ? File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/backends/backend_tkagg.py", line 13, in ??? import matplotlib.backends.tkagg as tkagg ? File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/backends/tkagg.py", line 9, in ??? from matplotlib.backends import _tkagg RuntimeError: Cannot dlopen tkinter module file S++ -------------- next part -------------- An HTML attachment was scrubbed... URL: From wlavrijsen at lbl.gov Wed Sep 13 20:04:28 2017 From: wlavrijsen at lbl.gov (wlavrijsen at lbl.gov) Date: Wed, 13 Sep 2017 17:04:28 -0700 (PDT) Subject: [pypy-dev] Automated binding generation (and maintenance) In-Reply-To: References: Message-ID: Shaheed, > One issue I am struggling to find a good solution for is to generate an > accurate list of the objects (classes, functions, variables etc) in a given > header file in order to populate the selection .XML. that option exists, but apparently no-one has ever used it, as it is clearly broken. :P It should be: genreflex exists for backwards compatibility, underneath it's rootcling, which accepts this: #pragma link C++ defined_in "SomeHeader.h"; and that does work ... I'll dig a bit, see what goes wrong with genreflex; should be no more than proper rule registration. But if not restricting selection, what errors are you seeing? > Short of running Clang directly to generate the names, what options do I > have? If using PyPy (not yet CPython), you can load all files in a header, include that, and simply start looping over dir(cppyy.gbl). (This is one of a set of things that I still have to equalize between PyPy/cppyy and CPython/cppyy.) > Also, as I looked around for approaches to this issue, I noted that the > cppyy backend v610 5 source code has a "getAllClasses" whereas PyPI has > 6.10.0.2. That getAllClasses was a hack for compatibility reasons that doesn't do what the name supposes it does: there can always be more classes that could be found through a mapping file, but haven't yet. Hence a functional dir() is a better approach. > I'm not sure of the mapping of versions, but what is the cadence for > updates to PyPI? It's only since a few months that I split everything off into a standalone package (there's a reason the first version digit is still 0) and I'm still sitting on some restructuring to separate things that update often from things that don't. The backend part is expected to update every half year or so, once packaging stabilizes (that's the cling schedule). > [1] https://marc.info/?l=kde-core-devel&m=150464598710128&w=2 Just a few minor points in response to that message. E.g. yes, overloads end up as a single Python function, but if you don't want that, then you can use __disp__("signature") to pick out the ones you want. Those are first-class objects, and allow any kind of restructuring that Python allows. As for needing cling, that's only if you need the dynamic features. It is also possible to use it to generate bindings to be used for cffi. You need to pre-instantiate templates and such, but that's already the case for any other bindings tool. And for that matter, at that level you could use it to generate what you need for SIP, too. Best regards, Wim -- WLavrijsen at lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net From matti.picus at gmail.com Thu Sep 14 00:49:13 2017 From: matti.picus at gmail.com (matti picus) Date: Thu, 14 Sep 2017 07:49:13 +0300 Subject: [pypy-dev] Updated win32 third-party libraries Message-ID: Hi Yuri. I uploaded an updated local.zip to bitbucket, could you update the win32 buildbot? The file is https://bitbucket.org/pypy/pypy/downloads/local_59.zip, with sha256 fbe769bf3a4ab6f5a8b0a05b61930fc7f37da2a9a85a8f609cf5a9bad06e2554 The long story is that the previous package used a precompiled expat lib that apparently used the wrong flags or wrong compiler, this one included an expat lib compiled reproducibly (see http://doc.pypy.org/en/latest/windows.html#the-expat-xml-parser). Thanks, Matti From yury at shurup.com Thu Sep 14 01:06:13 2017 From: yury at shurup.com (Yury V. Zaytsev) Date: Thu, 14 Sep 2017 07:06:13 +0200 (CEST) Subject: [pypy-dev] Updated win32 third-party libraries In-Reply-To: References: Message-ID: On Thu, 14 Sep 2017, matti picus wrote: > I uploaded an updated local.zip to bitbucket, could you update the > win32 buildbot? The file is Hi Matti, Will try to have a look into this the coming weekend! -- Sincerely yours, Yury V. Zaytsev From srhaque at theiet.org Thu Sep 14 04:02:13 2017 From: srhaque at theiet.org (Shaheed Haque) Date: Thu, 14 Sep 2017 09:02:13 +0100 Subject: [pypy-dev] Automated binding generation (and maintenance) In-Reply-To: References: Message-ID: Hi Wim, On 14 September 2017 at 01:04, wrote: > Shaheed, > >> One issue I am struggling to find a good solution for is to generate an >> accurate list of the objects (classes, functions, variables etc) in a >> given >> header file in order to populate the selection .XML. > > > that option exists, but apparently no-one has ever used it, as it is clearly > broken. :P It should be: > > > > > > > > > genreflex exists for backwards compatibility, underneath it's rootcling, > which accepts this: > > #pragma link C++ defined_in "SomeHeader.h"; Ah, I had not realised rootcling existed. I've seen that I can invoke it using Python version-specific paths...is this the correct way to invoke it: ROOTCLING=/usr/local/lib/python3.6/dist-packages/cppyy_backend LD_LIBRARY_PATH=$ROOTCLING/lib $ROOTCLING/bin/rootcling -h or is there a recommended wrapper? > and that does work ... I'll dig a bit, see what goes wrong with genreflex; > should be no more than proper rule registration. > But if not restricting selection, what errors are you seeing? > With this: ====== ====== I actually get some warnings and then the error: ====== Warning: Class or struct basic_string,allocator >::_Alloc_hider was selected but its dictionary cannot be generated: this is a private or protected class and this is not supported. No direct I/O operation of basic_string,allocator >::_Alloc_hider instances will be possible. Warning: Class or struct basic_string,allocator >::_Alloc_hider was selected but its dictionary cannot be generated: this is a private or protected class and this is not supported. No direct I/O operation of basic_string,allocator >::_Alloc_hider instances will be possible. Warning: Class or struct basic_string<_CharT,_Traits,_Alloc>::_Alloc_hider was selected but its dictionary cannot be generated: this is a private or protected class and this is not supported. No direct I/O operation of basic_string<_CharT,_Traits,_Alloc>::_Alloc_hider instances will be possible. Warning: Class or struct string::_Alloc_hider was selected but its dictionary cannot be generated: this is a private or protected class and this is not supported. No direct I/O operation of string::_Alloc_hider instances will be possible. Warning: Class or struct basic_string,allocator >::_Alloc_hider was selected but its dictionary cannot be generated: this is a private or protected class and this is not supported. No direct I/O operation of basic_string,allocator >::_Alloc_hider instances will be possible. Warning: Class or struct ios_base::_Callback_list was selected but its dictionary cannot be generated: this is a private or protected class and this is not supported. No direct I/O operation of ios_base::_Callback_list instances will be possible. Warning: Class or struct ios_base::_Words was selected but its dictionary cannot be generated: this is a private or protected class and this is not supported. No direct I/O operation of ios_base::_Words instances will be possible. Error in : Cannot find class __pthread_mutex_s. ====== The command line in use is: ====== genreflex /usr/include/KF5/kjs/kjsinterpreter.h -s selection.xml -o tmp3/kjsinterpreter.cpp -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/KF5/kjs -I/usr/include/KF5/wtf ====== I did wonder if I was missing some "-isystem" includes, and tried adding them but the --debug output from genreflex seemed to suggest they were being ignored. >> Short of running Clang directly to generate the names, what options do I >> have? > > > If using PyPy (not yet CPython), you can load all files in a header, include > that, and simply start looping over dir(cppyy.gbl). (This is one of a set of > things that I still have to equalize between PyPy/cppyy and CPython/cppyy.) > >> Also, as I looked around for approaches to this issue, I noted that the >> cppyy backend v610 5 source code has a "getAllClasses" whereas PyPI has >> 6.10.0.2. > > > That getAllClasses was a hack for compatibility reasons that doesn't do what > the name supposes it does: there can always be more classes that could be > found through a mapping file, but haven't yet. Hence a functional dir() is a > better approach. Ack. My driver code is exactly intended to handle this kind of thing by walking the directories and invoking genreflex/rootcling. One issue is that I've been experimenting with directly using cppyy.gbl.gROOT et. al. to try to identify only the classes (and later variables etc) directly in kjsinterprter.h by looking at cppyy.gbl.gInterpreter.ClassInfo_FileName() for the relevant class name with something roughly like this: ci = cppyy.gbl.gInterpreter.ClassInfo_Factory('KJSInterpreter') cppyy.gbl.gInterpreter.ClassInfo_FileName(ci) What is interesting, and might possibly throw light on the selection filter issue, is that the file name for the classes in kjsinterpreter.h itself is always the empty string ''. Classes that come from included files return non-empty strings such as 'kjsobject.h' for 'KJSObject'. BTW, the reason for doing this is that lots of KDE code has multiple classes and even namespaces in a single header file. Now, for discoverability of the loaded objects, I find the incremental "pop into cppyy,gbl on demand" somewhat limiting and I wanted to play about with that. I could also workaround the filter issue if I precomputed the needed names in a precursor pass. Finally, and most importantly given the fidelity with which cppyy renders the C++ code, I'm think about how Pythonisation customisation might be handled: e.g. a Python wrapper layer to allow a pointer-plus-size to render as a Python list/tuple, or generate a dict mapping fora QSet, and so on. (I'm dimly aware of the boost-recognition logic you have alluded to, this is specifically more about Qt-specific patterns and ad-hoc scenarios). >> I'm not sure of the mapping of versions, but what is the cadence for >> updates to PyPI? > > > It's only since a few months that I split everything off into a standalone > package (there's a reason the first version digit is still 0) and I'm still > sitting on some restructuring to separate things that update often from > things that don't. The backend part is expected to update every half year > or so, once packaging stabilizes (that's the cling schedule). > >> [1] https://marc.info/?l=kde-core-devel&m=150464598710128&w=2 > > > Just a few minor points in response to that message. E.g. yes, overloads > end up as a single Python function, but if you don't want that, then you > can use __disp__("signature") to pick out the ones you want. Those are > first-class objects, and allow any kind of restructuring that Python > allows. > > As for needing cling, that's only if you need the dynamic features. It is > also possible to use it to generate bindings to be used for cffi. You need > to pre-instantiate templates and such, but that's already the case for any > other bindings tool. And for that matter, at that level you could use it > to generate what you need for SIP, too. Thanks for the kind hints, but you've only managed to whet my appetite to get cppyy working as it is exactly things like the handling of overloads and template instantiation that I want most! Thanks, Shaheed P.S. Please note that after today, I'll likely not have much Internet access for a couple of weeks, so any responses may be limited. > Best regards, > Wim > -- > WLavrijsen at lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net From wlavrijsen at lbl.gov Fri Sep 15 02:43:28 2017 From: wlavrijsen at lbl.gov (wlavrijsen at lbl.gov) Date: Thu, 14 Sep 2017 23:43:28 -0700 (PDT) Subject: [pypy-dev] Automated binding generation (and maintenance) In-Reply-To: References: Message-ID: Shaheed, > Ah, I had not realised rootcling existed. I've seen that I can invoke > it using Python version-specific paths...is this the correct way to > invoke it: > > ROOTCLING=/usr/local/lib/python3.6/dist-packages/cppyy_backend > LD_LIBRARY_PATH=$ROOTCLING/lib $ROOTCLING/bin/rootcling -h Yes, and here's a description of the LinkDef.h format: https://root.cern.ch/root/html/guides/users-guide/AddingaClass.html#the-linkdef.h-file > or is there a recommended wrapper? No, but I'm going to add one for pip, same as I did for genreflex. I've been fleshing out the backend generation, taken over from Anto: https://bitbucket.org/wlav/cppyy-backend where all that can live. I'm told that I'll need rootcling anyway for use of modules (see below). > I actually get some warnings and then the error: Add this set of exclusions to the selection.xml: Of course, the larger problem of pulling in these standard libs over and over again is that it is a waste of cpu and memory, so I do want to see the file_name attribute fixed. As it stands, I'd simply exclude: especially since they are already available by default. Note that those two rules cover the ones needed for new_allocator and Alloc_hider. However, there is a more efficient approach that is right around the corner (and has been right about the corner for a long time, so don't hold me to that). Next release now seems likely though. The long term goal has always been to use modules: http://clang.llvm.org/docs/Modules.html but the original drivers (Apple, Google, and the C++ standards committee) have been going back and forth on it. Now, things are finally falling into place. Here's Google: https://www.youtube.com/watch?v=dHFNpBfemDI And here's ROOT: https://indico.cern.ch/event/643728/contributions/2612822/attachments/1494074/2323893/ROOTs_C_modules_status_report.pdf The big deal is that C++ developers have an incentive to deploy modules, so being able to patch into that should be a huge time saver (and where they don't, rootcling will soon be able to create modules from headers). Note that modules don't come for free: it will require some ambiguity resolution, but that is typically a Good Thing (code-quality wise). Modules allow deserialization of only the piece of the AST that is actually being requested, saving memory. This as opposed to header files (whether or not precompiled) which pull in everything before them. See the status report above for the improvements in memory usage. And with modules, of course, selection becomes unnecessary (markup for automatic streamers may still be useful, but that is not relevant for bindings generation). > I did wonder if I was missing some "-isystem" includes, and tried > adding them but the --debug output from genreflex seemed to suggest > they were being ignored. Some flags are ignored as no-one was using them (so far). Some others are definitely obsolete by now. > What is interesting, and might possibly throw light on the selection > filter issue, is that the file name for the classes in > kjsinterpreter.h itself is always the empty string ''. Classes that > come from included files return non-empty strings such as > 'kjsobject.h' for 'KJSObject'. That's after the fact (i.e. what is stored); I don't see the rule being respected/used at all. > BTW, the reason for doing this is that lots of KDE code has multiple > classes and even namespaces in a single header file. Now, for > discoverability of the loaded objects, I find the incremental "pop > into cppyy,gbl on demand" somewhat limiting and I wanted to play about > with that. I could also workaround the filter issue if I precomputed > the needed names in a precursor pass. The issue here is the memory cost of loading things that won't get used in the end. This is why a functional dir() (which needs nothing but strings, after all), in conjunction with lazy loading/creation when a real access happens work well. LLVM is fully lookup based, btw. There is a custom layer on top of Cling to make enumeration possible. > Finally, and most importantly given the fidelity with which cppyy > renders the C++ code, I'm think about how Pythonisation customisation > might be handled: e.g. a Python wrapper layer to allow a > pointer-plus-size to render as a Python list/tuple, or generate a dict > mapping fora QSet, and so on. (I'm dimly aware of the > boost-recognition logic you have alluded to, this is specifically more > about Qt-specific patterns and ad-hoc scenarios). In 2015, a GSoC student fleshed this out. I never put it into PyPy b/c of a lack of test coverage, but did put in in PyROOT. Here's an example of the "pointer-plus-size" pythonization (from ROOT.py): # python side pythonizations (should live in their own file, if we get many) def set_size(self, buf): buf.SetSize(self.GetN()) return buf # TODO: add pythonization API to pypy-c if not PYPY_CPPYY_COMPATIBILITY_FIXME: cppyy.add_pythonization( cppyy.compose_method("^TGraph(2D)?$|^TGraph.*Errors$", "GetE?[XYZ]$", set_size)) The functions selected by the regexps return naked pointers, but the object can be queried for the size (all have a consistent GetN() function). So the method composer patches up the return value, making it a sized array, instead of an "open-ended" one. I'm sitting on some patches as I wanted to tweak his APIs a bit. There was some ordering that I felt didn't compose well, but that is minor. Similarly, there's code to apply ownership rules, mapping exceptions, the new C++11 smartptrs, controlling auto-casting, handling the GIL, making properties, and adding overloads. All driven by regexp matching of patterns. See here: https://bitbucket.org/wlav/cppyy/src/4d14ba325e494f13cc11f3f11cbb87b44048b256/python/cppyy/_pythonization.py?at=master (plus further support inside the bindings layer itself). Of course, one can hook up completely custom functions, and he made it so that that is per C++ namespace, so nicely self-contained. Again, this is currently only partly available, as I need to write a lot more tests for PyPy (which are bound to unearth some problems along the way). And then there is documentation to be written ... > P.S. Please note that after today, I'll likely not have much Internet > access for a couple of weeks, so any responses may be limited. I'll make sure I have at least all my local changes pushed by then. :) Best regards, Wim -- WLavrijsen at lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net From armin.rigo at gmail.com Fri Sep 15 12:50:28 2017 From: armin.rigo at gmail.com (Armin Rigo) Date: Fri, 15 Sep 2017 18:50:28 +0200 Subject: [pypy-dev] Tkinter ? In-Reply-To: <855602581.1111765.1505303596918@mail.yahoo.com> References: <855602581.1111765.1505303596918.ref@mail.yahoo.com> <855602581.1111765.1505303596918@mail.yahoo.com> Message-ID: Hi Stuart, On 13 September 2017 at 13:53, Stuart Axon via pypy-dev wrote: > Is TkInter pypy still a thing ? Yes, ``import Tkinter`` works as expected for me. Maybe it doesn't work *in matplotlib,* which I'm not sure how to test. Others may know more about this. A bient?t, Armin. From tbaldridge at gmail.com Fri Sep 15 16:52:30 2017 From: tbaldridge at gmail.com (Timothy Baldridge) Date: Fri, 15 Sep 2017 14:52:30 -0600 Subject: [pypy-dev] Custom scanning methods? Message-ID: I have a rather complicated structure I'd like to create in RPython. The structure consists of a heterogeneous array of RPython classes laid out in a single "byte array". The problem is these structures will contain GC'd pointers. Is there a way (and can someone point me to the place) to tell the GC to use a special scanning method when looking for pointers in a specific object type? I've read the docs on rstrategies, but that seems to be dealing mostly with swapping out primitive arrays for object arrays, which isn't exactly what I'm looking for. Can anyone help? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From matti.picus at gmail.com Sat Sep 16 07:05:38 2017 From: matti.picus at gmail.com (matti picus) Date: Sat, 16 Sep 2017 11:05:38 +0000 Subject: [pypy-dev] Tkinter ? In-Reply-To: References: <855602581.1111765.1505303596918.ref@mail.yahoo.com> <855602581.1111765.1505303596918@mail.yahoo.com> Message-ID: On Fri, 15 Sep 2017 at 7:51 pm, Armin Rigo wrote: > Hi Stuart, > > On 13 September 2017 at 13:53, Stuart Axon via pypy-dev > wrote: > > Is TkInter pypy still a thing ? > > Yes, ``import Tkinter`` works as expected for me. Maybe it doesn't > work *in matplotlib,* which I'm not sure how to test. Others may know > more about this. > > > A bient?t, > > Armin. None of the GUI backends currently work out of the box with PyPy, see for intance this stack overflow question https://stackoverflow.com/questions/43278632/pypy-and-matplotlib-error-in-virtual-enviroment Someone did make progress with matplotlib and wx-cffi https://pythonfiles.wordpress.com/2017/06/28/making-matplotlib-work-with-pypy The none-gui backends should work, ie ipython inline or Jupyter notebooks. Matti -------------- next part -------------- An HTML attachment was scrubbed... URL: From anto.cuni at gmail.com Sat Sep 16 11:36:54 2017 From: anto.cuni at gmail.com (Antonio Cuni) Date: Sat, 16 Sep 2017 17:36:54 +0200 Subject: [pypy-dev] Custom scanning methods? In-Reply-To: References: Message-ID: Hi Timothy, I'm surely not an expert of this area and others can probably explain better how it works, but I think that you are looking for `rgc.register_custom_trace_hook`; for an example of usage, see e.g. pypy/module/micronumpy/concrete.py ciao, Anto On Fri, Sep 15, 2017 at 10:52 PM, Timothy Baldridge wrote: > I have a rather complicated structure I'd like to create in RPython. The > structure consists of a heterogeneous array of RPython classes laid out in > a single "byte array". The problem is these structures will contain GC'd > pointers. > > Is there a way (and can someone point me to the place) to tell the GC to > use a special scanning method when looking for pointers in a specific > object type? I've read the docs on rstrategies, but that seems to be > dealing mostly with swapping out primitive arrays for object arrays, which > isn't exactly what I'm looking for. > > Can anyone help? > > Thanks! > > > _______________________________________________ > pypy-dev mailing list > pypy-dev at python.org > https://mail.python.org/mailman/listinfo/pypy-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From njs at pobox.com Sat Sep 16 12:34:59 2017 From: njs at pobox.com (Nathaniel Smith) Date: Sat, 16 Sep 2017 09:34:59 -0700 Subject: [pypy-dev] Tkinter ? In-Reply-To: References: <855602581.1111765.1505303596918.ref@mail.yahoo.com> <855602581.1111765.1505303596918@mail.yahoo.com> Message-ID: On Sep 16, 2017 4:06 AM, "matti picus" wrote: On Fri, 15 Sep 2017 at 7:51 pm, Armin Rigo wrote: > Hi Stuart, > > On 13 September 2017 at 13:53, Stuart Axon via pypy-dev > wrote: > > Is TkInter pypy still a thing ? > > Yes, ``import Tkinter`` works as expected for me. Maybe it doesn't > work *in matplotlib,* which I'm not sure how to test. Others may know > more about this. > > > A bient?t, > > Armin. None of the GUI backends currently work out of the box with PyPy, see for intance this stack overflow question https://stackoverflow.com/questions/ 43278632/pypy-and-matplotlib-error-in-virtual-enviroment Someone did make progress with matplotlib and wx-cffi https://pythonfiles. wordpress.com/2017/06/28/making-matplotlib-work-with-pypy Might also be worth checking out https://github.com/anntzer/mpl_cairo which is pybind11-based. -n -------------- next part -------------- An HTML attachment was scrubbed... URL: From yury at shurup.com Sun Sep 17 08:01:12 2017 From: yury at shurup.com (Yury V. Zaytsev) Date: Sun, 17 Sep 2017 14:01:12 +0200 (CEST) Subject: [pypy-dev] Updated win32 third-party libraries In-Reply-To: References: Message-ID: On Thu, 14 Sep 2017, Yury V. Zaytsev wrote: > On Thu, 14 Sep 2017, matti picus wrote: > >> I uploaded an updated local.zip to bitbucket, could you update the >> win32 buildbot? The file is > > Will try to have a look into this the coming weekend! Hi Matti, I've deployed the files, adjusted the environment variables and will reboot the machine in the evening after the current build completes: I think it would be a pity to break it now... -- Sincerely yours, Yury V. Zaytsev From matti.picus at gmail.com Sun Sep 17 14:11:23 2017 From: matti.picus at gmail.com (Matti Picus) Date: Sun, 17 Sep 2017 21:11:23 +0300 Subject: [pypy-dev] Updated win32 third-party libraries In-Reply-To: References: Message-ID: Thanks Yury. You can check that everything is working by running pypy\goal\pypy-c.exe pytest.py -A pypy\module\pyexpat\test\test_build.py in c:\pypy\buildbot\pypy-c-jit-win-x86-32\build (or just by waiting a day) Matti On 17/09/17 15:01, Yury V. Zaytsev wrote: > On Thu, 14 Sep 2017, Yury V. Zaytsev wrote: > >> On Thu, 14 Sep 2017, matti picus wrote: >> >>> I uploaded an updated local.zip to bitbucket, could you update the >>> win32 buildbot? The file is >> >> Will try to have a look into this the coming weekend! > > Hi Matti, > > I've deployed the files, adjusted the environment variables and will > reboot the machine in the evening after the current build completes: I > think it would be a pity to break it now... > From yury at shurup.com Mon Sep 18 04:45:07 2017 From: yury at shurup.com (Yury V. Zaytsev) Date: Mon, 18 Sep 2017 10:45:07 +0200 (CEST) Subject: [pypy-dev] Updated win32 third-party libraries In-Reply-To: References: Message-ID: On Sun, 17 Sep 2017, Matti Picus wrote: > Thanks Yury. You can check that everything is working by running Hi Matti, Just waiting a day is a lot easier for me. Unfortunately, it didn't work: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/3380/steps/shell_2/logs/stdio It's also more or less clear why; will you adjust the packaging script to prefer libs in LIB if they are there at all, or you want me to add LIB to PATH, or else you'll prepare another fixed local package for me to deploy? In any case, let me know if I still have to do something for you... -- Sincerely yours, Yury V. Zaytsev From matti.picus at gmail.com Mon Sep 18 13:11:27 2017 From: matti.picus at gmail.com (Matti Picus) Date: Mon, 18 Sep 2017 20:11:27 +0300 Subject: [pypy-dev] Updated win32 third-party libraries In-Reply-To: References: Message-ID: <09fd86c2-16d1-2107-89d6-f2af47cc37d4@gmail.com> On 18/09/17 11:45, Yury V. Zaytsev wrote: > In any case, let me know if I still have to do something for you... > Hi. I updated the package and the sha256 sum 6344230e90ab7a9cb84efbae1ba22051cdeeb40a31823e0808545b705aba8911 Please download and try again. Sorry for the mess, Matti From yury at shurup.com Mon Sep 18 15:59:33 2017 From: yury at shurup.com (Yury V. Zaytsev) Date: Mon, 18 Sep 2017 21:59:33 +0200 (CEST) Subject: [pypy-dev] Updated win32 third-party libraries In-Reply-To: <09fd86c2-16d1-2107-89d6-f2af47cc37d4@gmail.com> References: <09fd86c2-16d1-2107-89d6-f2af47cc37d4@gmail.com> Message-ID: On Mon, 18 Sep 2017, Matti Picus wrote: > On 18/09/17 11:45, Yury V. Zaytsev wrote: >> In any case, let me know if I still have to do something for you... >> > Hi. I updated the package and the sha256 sum > 6344230e90ab7a9cb84efbae1ba22051cdeeb40a31823e0808545b705aba8911 > Please download and try again. > Sorry for the mess, Done, let's hope it works better tomorrow! -- Sincerely yours, Yury V. Zaytsev From yury at shurup.com Tue Sep 19 05:39:46 2017 From: yury at shurup.com (Yury V. Zaytsev) Date: Tue, 19 Sep 2017 11:39:46 +0200 (CEST) Subject: [pypy-dev] Updated win32 third-party libraries In-Reply-To: References: <09fd86c2-16d1-2107-89d6-f2af47cc37d4@gmail.com> Message-ID: On Mon, 18 Sep 2017, Yury V. Zaytsev wrote: > On Mon, 18 Sep 2017, Matti Picus wrote: > >> On 18/09/17 11:45, Yury V. Zaytsev wrote: >>> In any case, let me know if I still have to do something for you... >>> >> Hi. I updated the package and the sha256 sum >> 6344230e90ab7a9cb84efbae1ba22051cdeeb40a31823e0808545b705aba8911 >> Please download and try again. >> Sorry for the mess, > > Done, let's hope it works better tomorrow! Seems to work now! Thanks. -- Sincerely yours, Yury V. Zaytsev From srhaque at theiet.org Sat Sep 23 01:24:41 2017 From: srhaque at theiet.org (Shaheed Haque) Date: Sat, 23 Sep 2017 06:24:41 +0100 Subject: [pypy-dev] Automated binding generation (and maintenance) In-Reply-To: References: Message-ID: Wim, Thanks for the detailed and thoughtful reply. I will digest and respond when I am properly back in circulation. On 15 September 2017 at 07:43, wrote: > Shaheed, > >> Ah, I had not realised rootcling existed. I've seen that I can invoke >> it using Python version-specific paths...is this the correct way to >> invoke it: >> >> ROOTCLING=/usr/local/lib/python3.6/dist-packages/cppyy_backend >> LD_LIBRARY_PATH=$ROOTCLING/lib $ROOTCLING/bin/rootcling -h > > > Yes, and here's a description of the LinkDef.h format: > > > https://root.cern.ch/root/html/guides/users-guide/AddingaClass.html#the-linkdef.h-file > >> or is there a recommended wrapper? > > > No, but I'm going to add one for pip, same as I did for genreflex. I've > been fleshing out the backend generation, taken over from Anto: > > https://bitbucket.org/wlav/cppyy-backend > > where all that can live. I'm told that I'll need rootcling anyway for > use of modules (see below). > >> I actually get some warnings and then the error: > > > Add this set of exclusions to the selection.xml: > > > > > > > > Of course, the larger problem of pulling in these standard libs over and > over again is that it is a waste of cpu and memory, so I do want to see > the file_name attribute fixed. As it stands, I'd simply exclude: > > > > > especially since they are already available by default. Note that those two > rules cover the ones needed for new_allocator and Alloc_hider. > > However, there is a more efficient approach that is right around the corner > (and has been right about the corner for a long time, so don't hold me to > that). Next release now seems likely though. > > The long term goal has always been to use modules: > > http://clang.llvm.org/docs/Modules.html > > but the original drivers (Apple, Google, and the C++ standards committee) > have been going back and forth on it. Now, things are finally falling into > place. Here's Google: > > https://www.youtube.com/watch?v=dHFNpBfemDI > > And here's ROOT: > > > https://indico.cern.ch/event/643728/contributions/2612822/attachments/1494074/2323893/ROOTs_C_modules_status_report.pdf > > The big deal is that C++ developers have an incentive to deploy modules, so > being able to patch into that should be a huge time saver (and where they > don't, rootcling will soon be able to create modules from headers). Note > that modules don't come for free: it will require some ambiguity resolution, > but that is typically a Good Thing (code-quality wise). > > Modules allow deserialization of only the piece of the AST that is actually > being requested, saving memory. This as opposed to header files (whether or > not precompiled) which pull in everything before them. See the status report > above for the improvements in memory usage. > > And with modules, of course, selection becomes unnecessary (markup for > automatic streamers may still be useful, but that is not relevant for > bindings generation). > >> I did wonder if I was missing some "-isystem" includes, and tried >> adding them but the --debug output from genreflex seemed to suggest >> they were being ignored. > > > Some flags are ignored as no-one was using them (so far). Some others > are definitely obsolete by now. > >> What is interesting, and might possibly throw light on the selection >> filter issue, is that the file name for the classes in >> kjsinterpreter.h itself is always the empty string ''. Classes that >> come from included files return non-empty strings such as >> 'kjsobject.h' for 'KJSObject'. > > > That's after the fact (i.e. what is stored); I don't see the rule being > respected/used at all. > >> BTW, the reason for doing this is that lots of KDE code has multiple >> classes and even namespaces in a single header file. Now, for >> discoverability of the loaded objects, I find the incremental "pop >> into cppyy,gbl on demand" somewhat limiting and I wanted to play about >> with that. I could also workaround the filter issue if I precomputed >> the needed names in a precursor pass. > > > The issue here is the memory cost of loading things that won't get used > in the end. This is why a functional dir() (which needs nothing but > strings, after all), in conjunction with lazy loading/creation when a > real access happens work well. LLVM is fully lookup based, btw. There > is a custom layer on top of Cling to make enumeration possible. > >> Finally, and most importantly given the fidelity with which cppyy >> renders the C++ code, I'm think about how Pythonisation customisation >> might be handled: e.g. a Python wrapper layer to allow a >> pointer-plus-size to render as a Python list/tuple, or generate a dict >> mapping fora QSet, and so on. (I'm dimly aware of the >> boost-recognition logic you have alluded to, this is specifically more >> about Qt-specific patterns and ad-hoc scenarios). > > > In 2015, a GSoC student fleshed this out. I never put it into PyPy b/c of > a lack of test coverage, but did put in in PyROOT. Here's an example of > the "pointer-plus-size" pythonization (from ROOT.py): > > # python side pythonizations (should live in their own file, if we get > many) > def set_size(self, buf): > buf.SetSize(self.GetN()) > return buf > > # TODO: add pythonization API to pypy-c > if not PYPY_CPPYY_COMPATIBILITY_FIXME: > cppyy.add_pythonization( > cppyy.compose_method("^TGraph(2D)?$|^TGraph.*Errors$", > "GetE?[XYZ]$", set_size)) > > The functions selected by the regexps return naked pointers, but the object > can be queried for the size (all have a consistent GetN() function). So the > method composer patches up the return value, making it a sized array, > instead of an "open-ended" one. > > I'm sitting on some patches as I wanted to tweak his APIs a bit. There > was some ordering that I felt didn't compose well, but that is minor. > > Similarly, there's code to apply ownership rules, mapping exceptions, > the new C++11 smartptrs, controlling auto-casting, handling the GIL, making > properties, and adding overloads. All driven by regexp matching of patterns. > See here: > > > https://bitbucket.org/wlav/cppyy/src/4d14ba325e494f13cc11f3f11cbb87b44048b256/python/cppyy/_pythonization.py?at=master > > (plus further support inside the bindings layer itself). > > Of course, one can hook up completely custom functions, and he made it so > that that is per C++ namespace, so nicely self-contained. > > Again, this is currently only partly available, as I need to write a lot > more tests for PyPy (which are bound to unearth some problems along the > way). And then there is documentation to be written ... > >> P.S. Please note that after today, I'll likely not have much Internet >> access for a couple of weeks, so any responses may be limited. > > > I'll make sure I have at least all my local changes pushed by then. :) > > > Best regards, > Wim > -- > WLavrijsen at lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net From matti.picus at gmail.com Sun Sep 24 14:26:50 2017 From: matti.picus at gmail.com (Matti Picus) Date: Sun, 24 Sep 2017 21:26:50 +0300 Subject: [pypy-dev] macosx buildbot is very slow Message-ID: http://buildbot.pypy.org/builders/pypy-c-jit-macosx-x86-64 Is the macosx buildbot OK? It seems to be running very slow, translations take over 6 hours. I just noticed this while trying some extra translations for the 5.9 release cycle. Also it seems the buildbot is running PyPy 2.5.1, you might want to upgrade that if possible. Matti From armin.rigo at gmail.com Mon Sep 25 01:53:19 2017 From: armin.rigo at gmail.com (Armin Rigo) Date: Mon, 25 Sep 2017 07:53:19 +0200 Subject: [pypy-dev] macosx buildbot is very slow In-Reply-To: References: Message-ID: Hi Matti, hi David, On 24 September 2017 at 20:26, Matti Picus wrote: > Is the macosx buildbot OK? It seems to be running very slow, translations > take over 6 hours. It's a recent trend: here are translation times. 16 sep 2h 0' 17 sep 2h 0' 18 sep 3h 0' 19 sep 4h 8' 20 sep 5h 7' 21 sep 5h 50' 22 sep 7h 13' 23 sep 8h 11' latest 10h 16' Armin From matti.picus at gmail.com Mon Sep 25 01:58:21 2017 From: matti.picus at gmail.com (Matti Picus) Date: Mon, 25 Sep 2017 08:58:21 +0300 Subject: [pypy-dev] PyPy 5.9 release cycle has begun Message-ID: Looking at the unfinished release notes http://pypy.readthedocs.io/en/latest/release-v5.9.0.html shows a general maturity in PyPy2.7 and strides forward in PyPy3.5 beta, available only for linux64. Any suggestions for "killer features" to appear at the top of the release notes, please chime in. We are down to a handful of corner cases failing in pandas and numpy on PyPy2.7, are there more achievements? Please try out the beta release versions 92449-c2437cf9b7f1 available here http://buildbot.pypy.org/nightly/release-pypy2.7-5.x Matti From dynamicgl at gmail.com Mon Sep 25 03:19:37 2017 From: dynamicgl at gmail.com (Gelin Yan) Date: Mon, 25 Sep 2017 15:19:37 +0800 Subject: [pypy-dev] PyPy 5.9 release cycle has begun In-Reply-To: References: Message-ID: hi matti there is a minor typo: cython 2.7 ought to be cython 0.27 regards gelin yan -------------- next part -------------- An HTML attachment was scrubbed... URL: From omer.drow at gmail.com Mon Sep 25 07:15:06 2017 From: omer.drow at gmail.com (Omer Katz) Date: Mon, 25 Sep 2017 11:15:06 +0000 Subject: [pypy-dev] PyPy 5.9 release cycle has begun In-Reply-To: References: Message-ID: Typo in http://pypy.readthedocs.io/en/latest/release-v5.9.0.html#highlights-of-the-pypy3-5-release-since-5-8-beta-released-june-2017 : mplement PyType_FromSpec (PEP 384) and fix issues with PEP 489 support Should be implement ??????? ??? ??, 25 ????? 2017 ?-10:20 ??? ?Gelin Yan?? :? > hi matti > > there is a minor typo: cython 2.7 ought to be cython 0.27 > > regards > > gelin yan > _______________________________________________ > pypy-dev mailing list > pypy-dev at python.org > https://mail.python.org/mailman/listinfo/pypy-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From omer.drow at gmail.com Mon Sep 25 07:17:39 2017 From: omer.drow at gmail.com (Omer Katz) Date: Mon, 25 Sep 2017 11:17:39 +0000 Subject: [pypy-dev] PyPy 5.9 release cycle has begun In-Reply-To: References: Message-ID: Same section nsure that mappingproxy is recognised as a mapping, not a sequence Should be Ensure. Also links to issues aren't clickable. ??????? ??? ??, 25 ????? 2017 ?-14:15 ??? ?Omer Katz?? :? > Typo in > http://pypy.readthedocs.io/en/latest/release-v5.9.0.html#highlights-of-the-pypy3-5-release-since-5-8-beta-released-june-2017 > : > mplement PyType_FromSpec (PEP 384) and fix issues with PEP 489 support > > Should be implement > > ??????? ??? ??, 25 ????? 2017 ?-10:20 ??? ?Gelin Yan?? dynamicgl at gmail.com??>:? > >> hi matti >> >> there is a minor typo: cython 2.7 ought to be cython 0.27 >> >> regards >> >> gelin yan >> _______________________________________________ >> pypy-dev mailing list >> pypy-dev at python.org >> https://mail.python.org/mailman/listinfo/pypy-dev >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dw at botanicus.net Mon Sep 25 10:55:54 2017 From: dw at botanicus.net (David Wilson) Date: Mon, 25 Sep 2017 20:25:54 +0530 Subject: [pypy-dev] macosx buildbot is very slow In-Reply-To: References: Message-ID: Celery running for 2 months on the host machine with Django DEBUG = True which causes a slow leak. Now there is 8gb more available for cache, let me know if the problem has abated David On 25/09/2017 11:23, Armin Rigo wrote: > Hi Matti, hi David, > > On 24 September 2017 at 20:26, Matti Picus wrote: >> Is the macosx buildbot OK? It seems to be running very slow, translations >> take over 6 hours. > It's a recent trend: here are translation times. > > 16 sep 2h 0' > 17 sep 2h 0' > 18 sep 3h 0' > 19 sep 4h 8' > 20 sep 5h 7' > 21 sep 5h 50' > 22 sep 7h 13' > 23 sep 8h 11' > latest 10h 16' > > > Armin From parkersboyce at gmail.com Tue Sep 26 22:07:20 2017 From: parkersboyce at gmail.com (Parker Boyce) Date: Tue, 26 Sep 2017 20:07:20 -0600 Subject: [pypy-dev] Pip Install Fails Due to cppyy-backend setup.py Bug Message-ID: I recently had reason to try to install cppyy using Python 3 and pip. With the use of the wheels for cppyy-cling the process went smoothly enough until pip tried to build cppyy-backend . Building this package by itself results in the following error message; $ python3 setup.py build running build running build_ext x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ib'/usr/local/lib/python3.5/dist-packages/cppyy_backend/include' -I/usr/include/python3.5m -c src/clingwrapper.cxx -o build/temp.linux-x86_64-3.5/src/clingwrapper.o -std=c++11 -O2 cc1plus: warning: command line option ?-Wstrict-prototypes? is valid for C/ObjC but not for C++ In file included from src/clingwrapper.cxx:4:0: src/callcontext.h:11:20: fatal error: Rtypes.h: No such file or directory compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 A careful look at the command line argument for gcc reveals a mangled include argument, -Ib'/usr/local/lib/python3.5/dist-packages/cppyy_backend/include'. This is a binary literal string introduced by the output of a system call, "cling-config --cppflags". The functions in the subprocess module return 'bytes' objects in Python 3. In this case the return value from 'check_output' was appended wholesale into the 'include_dirs' argument of your extension, and the representation thereof was used in turn to build the function call to gcc. (The representation being a binary literal string) To fix this the bytes object returned by subprocess.check_output needs to be decoded to either 'utf-8' or 'ascii', preferably the former as Python 3 uses unicode literals. This can be accomplished by appending '.decode("utf-8")' to line 28; --- /home/parker/Documents/cppyy/cppyy-backend-0.2.0/setup.py Fri Sep 22 12:25:29 2017 +++ /home/parker/Documents/cppyy/cppyy-backend-0.2.0/setup.py.patched Tue Sep 26 19:37:50 2017 @@ -25,7 +25,7 @@ if root_install: return os.path.join(root_install, 'include') cli_arg = subprocess.check_output(['cling-config', '--cppflags']) - return cli_arg[2:-1] + return cli_arg[2:-1].decode("utf-8") class my_build_cpplib(_build_ext): def build_extension(self, ext): With this patch pip will be able to build the cppyy-backend package from source on Python 2 or 3, and pip installing cppyy will not require user intervention. P.S. The "Comments and Bugs" section of the cppyy docs directs the reader to a repository with issue tracking turned off, which is why you're getting this email instead. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wlavrijsen at lbl.gov Wed Sep 27 16:36:15 2017 From: wlavrijsen at lbl.gov (wlavrijsen at lbl.gov) Date: Wed, 27 Sep 2017 13:36:15 -0700 (PDT) Subject: [pypy-dev] Pip Install Fails Due to cppyy-backend setup.py Bug In-Reply-To: References: Message-ID: Parker, thanks! Both (encoding and tracker) are now fixed. Best regards, Wim -- WLavrijsen at lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net From nanjekyejoannah at gmail.com Thu Sep 28 16:54:02 2017 From: nanjekyejoannah at gmail.com (joannah nanjekye) Date: Thu, 28 Sep 2017 23:54:02 +0300 Subject: [pypy-dev] Explicit typing in RPython Message-ID: Hello, Did someone happen to work on this project? If not then is it one we can break down in small tasks so I can work on it with guidance of course. Also I will be at pyconZA in south Africa so if anyone on the team is coming we can chat about this a bit. Kind regards, -- Joannah Nanjekye +256776468213 F : Nanjekye Captain Joannah S : joannah.nanjekye T : @Captain_Joannah SO : joannah *"You think you know when you learn, are more sure when you can write, even more when you can teach, but certain when you can program." Alan J. Perlis* -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronan.lamy at gmail.com Thu Sep 28 17:35:10 2017 From: ronan.lamy at gmail.com (Ronan Lamy) Date: Thu, 28 Sep 2017 23:35:10 +0200 Subject: [pypy-dev] Explicit typing in RPython In-Reply-To: References: Message-ID: 2017-09-28 22:54 GMT+02:00 joannah nanjekye : > Hello, > > Did someone happen to work on this project? > Nope. If not then is it one we can break down in small tasks so I can work on it > with guidance of course. > TBH, the idea is a bit vague/speculative, so finding a good design up front is probably the hardest part. The implementation can probably be done incrementally. > Also I will be at pyconZA in south Africa so if anyone on the team is > coming we can chat about this a bit. > Yes, a few of us are coming (and are already in Cape Town, actually). I'll be happy to discuss it with you there. > Kind regards, > > -- > Joannah Nanjekye > +256776468213 <+256%20776%20468213> > F : Nanjekye Captain Joannah > S : joannah.nanjekye > T : @Captain_Joannah > SO : joannah > > > *"You think you know when you learn, are more sure when you can write, > even more when you can teach, but certain when you can program." Alan J. > Perlis* > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuaxo2 at yahoo.com Fri Sep 29 18:02:41 2017 From: stuaxo2 at yahoo.com (Stuart Axon) Date: Fri, 29 Sep 2017 22:02:41 +0000 (UTC) Subject: [pypy-dev] Numpy or Numpypy References: <948448139.799568.1506722561405.ref@mail.yahoo.com> Message-ID: <948448139.799568.1506722561405@mail.yahoo.com> Hi,?? I'm trying out aubio and pysoundcard with pypy nightly.??? They use numpy, should I still be using numpypy or is upstream numpy the way to go ? S++ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronan.lamy at gmail.com Fri Sep 29 18:47:24 2017 From: ronan.lamy at gmail.com (Ronan Lamy) Date: Sat, 30 Sep 2017 00:47:24 +0200 Subject: [pypy-dev] Numpy or Numpypy In-Reply-To: <948448139.799568.1506722561405@mail.yahoo.com> References: <948448139.799568.1506722561405.ref@mail.yahoo.com> <948448139.799568.1506722561405@mail.yahoo.com> Message-ID: 2017-09-30 0:02 GMT+02:00 Stuart Axon via pypy-dev : > Hi, > I'm trying out aubio and pysoundcard with pypy nightly. They use > numpy, should I still be using numpypy or is upstream numpy the way to go ? > Upstream numpy is definitely the way to go. > S++ > > _______________________________________________ > pypy-dev mailing list > pypy-dev at python.org > https://mail.python.org/mailman/listinfo/pypy-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuaxo2 at yahoo.com Fri Sep 29 20:32:01 2017 From: stuaxo2 at yahoo.com (Stuart Axon) Date: Sat, 30 Sep 2017 00:32:01 +0000 (UTC) Subject: [pypy-dev] Tkinter ? In-Reply-To: <855602581.1111765.1505303596918@mail.yahoo.com> References: <855602581.1111765.1505303596918.ref@mail.yahoo.com> <855602581.1111765.1505303596918@mail.yahoo.com> Message-ID: <482993294.840372.1506731521283@mail.yahoo.com> Cheers for the suggestons on TKinter and matplotlib - mplcairo is out, since it uses pycairo (as opposed to cairocffi).? Wx-CFFI looks interesting, however all the matplotlib tutorials give me errors like the one below, so that is probably out as well for now - I'll definitely keep an eye on it and see it starts working though. $ python pyplot.py /home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/wx/core.py:17: UserWarning: wxPython/wxWidgets release number mismatch ? warnings.warn("wxPython/wxWidgets release number mismatch") /home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/wx/_core.py:31546: UserWarning: implicit cast from 'unsigned char *' to 'char *' will be forbidden in the future (check that the types are as you expect; use an explicit ffi.cast() if they are correct) ? clib.Cursor_set_flags(wrapper_lib.get_ptr(self), flags) Traceback (most recent call last): ? File "pyplot.py", line 38, in ??? import matplotlib.pyplot as plt ? File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/pyplot.py", line 113, in ??? _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() ? File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/backends/__init__.py", line 60, in pylab_setup ??? [backend_name], 0) ? File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/backends/backend_wxagg.py", line 12, in ??? from . import backend_wx ? File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/backends/backend_wx.py", line 1818 SyntaxError: return outside function On Wednesday, September 13, 2017, 12:53:16 PM GMT+1, Stuart Axon wrote: Hi all,?? Is TkInter pypy still a thing ??? I was trying some demos from aubio from pypy but they didn't work [1].My first thought was to try and install tkinter-pypy but that doens't seem to exist any more. I'm testing with pypy-nightly trunk on Ubuntu 17.04 64 bit. [1]$ ?python demo_keyboard.py Traceback (most recent call last): ? File "demo_keyboard.py", line 60, in ??? import matplotlib.pyplot as plt ? File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/pyplot.py", line 115, in ??? _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() ? File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup ??? globals(),locals(),[backend_name],0) ? File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/backends/backend_tkagg.py", line 13, in ??? import matplotlib.backends.tkagg as tkagg ? File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/backends/tkagg.py", line 9, in ??? from matplotlib.backends import _tkagg RuntimeError: Cannot dlopen tkinter module file S++ -------------- next part -------------- An HTML attachment was scrubbed... URL: From matti.picus at gmail.com Sat Sep 30 15:56:44 2017 From: matti.picus at gmail.com (Matti Picus) Date: Sat, 30 Sep 2017 22:56:44 +0300 Subject: [pypy-dev] Tkinter ? In-Reply-To: <482993294.840372.1506731521283@mail.yahoo.com> References: <855602581.1111765.1505303596918.ref@mail.yahoo.com> <855602581.1111765.1505303596918@mail.yahoo.com> <482993294.840372.1506731521283@mail.yahoo.com> Message-ID: <6ea36291-e306-2e15-87e6-2a0d0949cbf4@gmail.com> An HTML attachment was scrubbed... URL: From stuaxo2 at yahoo.com Sat Sep 30 17:38:56 2017 From: stuaxo2 at yahoo.com (Stuart Axon) Date: Sat, 30 Sep 2017 21:38:56 +0000 (UTC) Subject: [pypy-dev] Tkinter ? In-Reply-To: <6ea36291-e306-2e15-87e6-2a0d0949cbf4@gmail.com> References: <855602581.1111765.1505303596918.ref@mail.yahoo.com> <855602581.1111765.1505303596918@mail.yahoo.com> <482993294.840372.1506731521283@mail.yahoo.com> <6ea36291-e306-2e15-87e6-2a0d0949cbf4@gmail.com> Message-ID: <1215647235.1189879.1506807536266@mail.yahoo.com> Here is backend_wx.pyhttps://pastebin.com/0bHs4rY5 from~/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+112.g17ec41612.dirty-py2.7-linux-x86_64.egg/matplotlib/backends/backend_wx.py Around line 1818 there is a mix of tabs and spaces, which doesn't seem right. Also? "class PrintoutWx(wx.Printout):" appears more than once. I'm using the method from that webpage, the only change is I added "sudo" and "-y" to the apt-get line. I used my script to grab pypy nightly:https://gist.github.com/stuaxo/5d4c0363317a875617271a6d424abbba activated the virtualenv it created for trunk $ source ~/.virtualenvs/pypy-nightly-trunk/bin/activate Then ran the script - pointing at the virtualenv$ ./build_wx-cffi.sh $VIRTUAL_ENV I noticed this error when building: doc "/mnt/data/home/stu/.virtualenvs/pypy-nightly-trunk/bin/pypy" etg/grid.py --cffi --nodoc Traceback (most recent call last): ? File "etg/grid.py", line 392, in ??? run() ? File "etg/grid.py", line 387, in run ??? tools.runGenerators(module) ? File "/tmp/t/wxpython-cffi/etgtools/tweaker_tools.py", line 636, in runGenerators ??? g.generate(module) ? File "/tmp/t/wxpython-cffi/etgtools/pi_generator.py", line 52, in generate ??? self.generateModule(module, stream) ? File "/tmp/t/wxpython-cffi/etgtools/pi_generator.py", line 149, in generateModule ??? function(item, stream) ? File "/tmp/t/wxpython-cffi/etgtools/pi_generator.py", line 365, in generateClass ??? bases = [self.fixWxPrefix(b, True) for b in bases] ? File "/tmp/t/wxpython-cffi/etgtools/tweaker_tools.py", line 96, in fixWxPrefix ??? self._getCoreTopLevelNames() ? File "/tmp/t/wxpython-cffi/etgtools/tweaker_tools.py", line 133, in _getCoreTopLevelNames ??? parseTree = ast.parse(text, filename) ? File "/home/stu/pypy-nightly/trunk/pypy-c-jit-latest-linux64/lib-python/2.7/ast.py", line 37, in parse ??? return compile(source, filename, mode, PyCF_ONLY_AST) ? File "wx/core.pi", line 27712 ??? def operator==(): I can't paste the whole compile output on pastebin as it is > 512k On Saturday, September 30, 2017, 8:56:48 PM GMT+1, Matti Picus wrote: #yiv9103688383 body p {margin-bottom:0cm;margin-top:0pt;} On 30/09/17 03:32, Stuart Axon via pypy-dev wrote: Cheers for the suggestons on TKinter and matplotlib - mplcairo is out, since it uses pycairo (as opposed to cairocffi).? Wx-CFFI looks interesting, however all the matplotlib tutorials give me errors like the one below, so that is probably out as well for now - I'll definitely keep an eye on it and see it starts working though. $ python pyplot.py /home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/wx/core.py:17: UserWarning: wxPython/wxWidgets release number mismatch ? warnings.warn("wxPython/wxWidgets release number mismatch") /home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/wx/_core.py:31546: UserWarning: implicit cast from 'unsigned char *' to 'char *' will be forbidden in the future (check that the types are as you expect; use an explicit ffi.cast() if they are correct) ? clib.Cursor_set_flags(wrapper_lib.get_ptr(self), flags) Traceback (most recent call last): ? File "pyplot.py", line 38, in ??? import matplotlib.pyplot as plt ? File"/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/pyplot.py", line 113, in ??? _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() ? File"/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/backends/__init__.py", line 60, in pylab_setup ??? [backend_name], 0) ? File"/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/backends/backend_wxagg.py", line 12, in ??? from . import backend_wx ? File"/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/backends/backend_wx.py", line 1818 SyntaxError: return outside function That seems like a strange syntax error, since backend_wx.py is used in the standard matplotlib (non-pypy) which is green on their buildbot. if you are using the method here https://pythonfiles.wordpress.com/2017/06/28/making-matplotlib-work-with-pypy/ perhaps it just needs a bit of tweaking for newer versions of backend_wx Could you post your backend_wx.py to a pastebin or gist so we can reproduce? Matti -------------- next part -------------- An HTML attachment was scrubbed... URL: