From arigo at tunes.org Tue Jun 3 09:56:31 2014 From: arigo at tunes.org (Armin Rigo) Date: Tue, 3 Jun 2014 09:56:31 +0200 Subject: [pypy-dev] europython sprints? In-Reply-To: References: Message-ID: Hi Martin, On 28 May 2014 19:15, Martin Matusiak wrote: > I'm wondering if there will be pypy sprints at Europython this year > (?) And if so, which are the principal topics (I assume stm is one of > them..)? As you might have guessed from the lack of answer, we don't know yet. I guess there will be a PyPy sprint, yes. A bient?t, Armin. From arigo at tunes.org Tue Jun 3 10:00:17 2014 From: arigo at tunes.org (Armin Rigo) Date: Tue, 3 Jun 2014 10:00:17 +0200 Subject: [pypy-dev] Getting involved In-Reply-To: <5386286A.9010300@oracle.com> References: <5386286A.9010300@oracle.com> Message-ID: Hi Travis, On 28 May 2014 20:18, Travis Jensen wrote: > I've been following pypy for a while and have thought it would be fun to get > involved. Recently, I've been wondering what python with tail call > optimization would look like (I'm disgruntled by GVR's decision :), and > realized this might be a good way for me to get involved in pypy. About this topic, we stick with Guido's language design and don't want a PyPy in which a number of frames may be skipped from tracebacks. Now, if you don't want to change the official PyPy but just play around for fun, then yes, PyPy is a good choice. You'd have to tweak the interpreter, around the files interpreter/pyframe.py and interpreter/pyopcode.py, as well as the bytecode compiler in interpreter/astcompiler/. A bient?t, Armin. From matti.picus at gmail.com Fri Jun 6 15:49:04 2014 From: matti.picus at gmail.com (Matti Picus) Date: Fri, 06 Jun 2014 16:49:04 +0300 Subject: [pypy-dev] release 2.3.1 Message-ID: <5391C6D0.9080404@gmail.com> Please download and try out the release candidate 71938-32f35069a16d from http://buildbot.pypy.org/nightly/release-2.3.x Comments on the release notice http://doc.pypy.org/en/latest/release-2.3.1.html are welcome as well. Barring last minute failures, I intend to release over the weekend. Matti From arigo at tunes.org Sun Jun 8 09:08:41 2014 From: arigo at tunes.org (Armin Rigo) Date: Sun, 8 Jun 2014 09:08:41 +0200 Subject: [pypy-dev] PyPy 2.3.1 released Message-ID: Hi all, We're pleased to announce PyPy 2.3.1, a feature-and-bugfix improvement over our recent 2.3 release last month. This release contains several bugfixes and enhancements among the user-facing improvements: * The built-in struct module was renamed to _struct, solving issues with IDLE and other modules * Support for compilation with gcc-4.9 * A CFFI-based version of the gdbm module is now included in our binary bundle * Many issues were resolved since the 2.3 release on May 8 Complete release notice: http://doc.pypy.org/en/latest/release-2.3.1.html Download: http://pypy.org/download.html Please try it out and let us know what you think. We especially welcome success stories, please tell us about how it has helped you! Cheers, The PyPy Team (thanks Matti!) From naylor.b.david at gmail.com Sun Jun 8 15:22:18 2014 From: naylor.b.david at gmail.com (David Naylor) Date: Sun, 08 Jun 2014 16:22:18 +0300 Subject: [pypy-dev] PyPy 2.3.1 released In-Reply-To: References: Message-ID: <1794958.6Ysl0DVEMg@dragon.dg> Hi, The links to the source tarballs are broken (on the download page). Regards On Sunday, 8 June 2014 09:08:41 Armin Rigo wrote: > Hi all, > > We're pleased to announce PyPy 2.3.1, a feature-and-bugfix improvement > over our recent 2.3 release last month. > > > This release contains several bugfixes and enhancements among the > user-facing improvements: > > * The built-in struct module was renamed to _struct, solving issues > with IDLE and other modules > > * Support for compilation with gcc-4.9 > > * A CFFI-based version of the gdbm module is now included in our binary > bundle > > * Many issues were resolved since the 2.3 release on May 8 > > > Complete release notice: http://doc.pypy.org/en/latest/release-2.3.1.html > Download: http://pypy.org/download.html > > Please try it out and let us know what you think. We especially > welcome success stories, please tell us about how it has helped you! > > Cheers, The PyPy Team (thanks Matti!) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 964 bytes Desc: This is a digitally signed message part. URL: From matti.picus at gmail.com Sun Jun 8 17:01:32 2014 From: matti.picus at gmail.com (Matti Picus) Date: Sun, 08 Jun 2014 18:01:32 +0300 Subject: [pypy-dev] PyPy 2.3.1 released In-Reply-To: <1794958.6Ysl0DVEMg@dragon.dg> References: <1794958.6Ysl0DVEMg@dragon.dg> Message-ID: <53947ACC.10204@gmail.com> Thanks, fixed. It may take a few minutes to percolate out, and then you need to refresh the cached page. Matti On 06/08/2014 04:22 PM, David Naylor wrote: > Hi, > > The links to the source tarballs are broken (on the download page). > > Regards > > On Sunday, 8 June 2014 09:08:41 Armin Rigo wrote: >> Hi all, >> >> We're pleased to announce PyPy 2.3.1, a feature-and-bugfix improvement >> over our recent 2.3 release last month. >> >> >> This release contains several bugfixes and enhancements among the >> user-facing improvements: >> >> * The built-in struct module was renamed to _struct, solving issues >> with IDLE and other modules >> >> * Support for compilation with gcc-4.9 >> >> * A CFFI-based version of the gdbm module is now included in our binary >> bundle >> >> * Many issues were resolved since the 2.3 release on May 8 >> >> >> Complete release notice: http://doc.pypy.org/en/latest/release-2.3.1.html >> Download: http://pypy.org/download.html >> >> Please try it out and let us know what you think. We especially >> welcome success stories, please tell us about how it has helped you! >> >> Cheers, The PyPy Team (thanks Matti!) >> >> >> _______________________________________________ >> pypy-dev mailing list >> pypy-dev at python.org >> https://mail.python.org/mailman/listinfo/pypy-dev From wpf710 at gmail.com Mon Jun 9 07:18:23 2014 From: wpf710 at gmail.com (wpf) Date: Mon, 9 Jun 2014 13:18:23 +0800 Subject: [pypy-dev] No Module _bsddb Message-ID: Hi All I am trying to use the Pypy under Ubuntu 12.04, and pypy version as below ~$ pypy --version Python 2.7.6 (2.3+dfsg-1~ppa0, May 20 2014, 09:11:18) [PyPy 2.3.0 with GCC 4.6.3] -$ python --version Python 2.7.3 and when I try to import _bsddb in pypy, it complains that 'No module named _bsddb' but it works for python. so how to resolve it? I 'd tried to google it ,but nothing useful found. THanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjamin at python.org Mon Jun 9 07:29:38 2014 From: benjamin at python.org (Benjamin Peterson) Date: Sun, 08 Jun 2014 22:29:38 -0700 Subject: [pypy-dev] No Module _bsddb In-Reply-To: References: Message-ID: <1402291778.962.126610293.1B1D79B3@webmail.messagingengine.com> On Sun, Jun 8, 2014, at 22:18, wpf wrote: > Hi All > > I am trying to use the Pypy under Ubuntu 12.04, and pypy version as > below > > ~$ pypy --version > Python 2.7.6 (2.3+dfsg-1~ppa0, May 20 2014, 09:11:18) > [PyPy 2.3.0 with GCC 4.6.3] > > -$ python --version > Python 2.7.3 > > and when I try to import _bsddb in pypy, it complains that 'No module > named _bsddb' > > but it works for python. > > so how to resolve it? I 'd tried to google it ,but nothing useful found. PyPy doesn't support the bsddb module. From matti.picus at gmail.com Mon Jun 9 20:41:17 2014 From: matti.picus at gmail.com (Matti Picus) Date: Mon, 09 Jun 2014 21:41:17 +0300 Subject: [pypy-dev] No Module _bsddb In-Reply-To: <1402291778.962.126610293.1B1D79B3@webmail.messagingengine.com> References: <1402291778.962.126610293.1B1D79B3@webmail.messagingengine.com> Message-ID: <5395FFCD.9070108@gmail.com> It would seem to be pretty easy to support in the same way as we support gdbm: as a thin cffi wrapper around the Berkely DB shared object. This might be something a new developer could easily contribute... Matti On 06/09/2014 08:29 AM, Benjamin Peterson wrote: > On Sun, Jun 8, 2014, at 22:18, wpf wrote: >> Hi All >> >> I am trying to use the Pypy under Ubuntu 12.04, and pypy version as >> below >> >> ~$ pypy --version >> Python 2.7.6 (2.3+dfsg-1~ppa0, May 20 2014, 09:11:18) >> [PyPy 2.3.0 with GCC 4.6.3] >> >> -$ python --version >> Python 2.7.3 >> >> and when I try to import _bsddb in pypy, it complains that 'No module >> named _bsddb' >> >> but it works for python. >> >> so how to resolve it? I 'd tried to google it ,but nothing useful found. > PyPy doesn't support the bsddb module. > _______________________________________________ > pypy-dev mailing list > pypy-dev at python.org > https://mail.python.org/mailman/listinfo/pypy-dev From wpf710 at gmail.com Tue Jun 10 04:14:55 2014 From: wpf710 at gmail.com (wpf) Date: Tue, 10 Jun 2014 10:14:55 +0800 Subject: [pypy-dev] No Module _bsddb In-Reply-To: <1402291778.962.126610293.1B1D79B3@webmail.messagingengine.com> References: <1402291778.962.126610293.1B1D79B3@webmail.messagingengine.com> Message-ID: Hi Benjamin I understand that. anyway, when I checking the code as below norman at norman-ThinkCentre-M92P:/usr/lib/pypy/lib-python/2.7/bsddb$ which pypy /usr/bin/pypy norman at norman-ThinkCentre-M92P:/usr/lib/pypy/lib-python/2.7/bsddb$ ls -lt /usr/bin/pypy lrwxrwxrwx 1 root root 22 May 20 19:57 /usr/bin/pypy -> ../lib/pypy/bin/pypy-c norman at norman-ThinkCentre-M92P:/usr/lib/pypy/lib-python/2.7/bsddb$ pwd /usr/lib/pypy/lib-python/2.7/bsddb norman at norman-ThinkCentre-M92P:/usr/lib/pypy/lib-python/2.7/bsddb$ ls -lt __init__.py -rw-r--r-- 1 root root 15988 May 20 10:48 __init__.py from the code of __init__.py , it's still trying to load _bsddb module, you know ,I am a newbie to python, did I misunderstand something? and also I will try to understand why my code(actually ,it's openstack tox env) will trigger that. On Mon, Jun 9, 2014 at 1:29 PM, Benjamin Peterson wrote: > On Sun, Jun 8, 2014, at 22:18, wpf wrote: > > Hi All > > > > I am trying to use the Pypy under Ubuntu 12.04, and pypy version as > > below > > > > ~$ pypy --version > > Python 2.7.6 (2.3+dfsg-1~ppa0, May 20 2014, 09:11:18) > > [PyPy 2.3.0 with GCC 4.6.3] > > > > -$ python --version > > Python 2.7.3 > > > > and when I try to import _bsddb in pypy, it complains that 'No module > > named _bsddb' > > > > but it works for python. > > > > so how to resolve it? I 'd tried to google it ,but nothing useful found. > > PyPy doesn't support the bsddb module. > -- ??! ??? msn: dragoninfield at hotmail.com mobile: 13681265240 -------------- next part -------------- An HTML attachment was scrubbed... URL: From radix at twistedmatrix.com Tue Jun 10 05:08:46 2014 From: radix at twistedmatrix.com (Christopher Armstrong) Date: Mon, 9 Jun 2014 22:08:46 -0500 Subject: [pypy-dev] No Module _bsddb In-Reply-To: References: <1402291778.962.126610293.1B1D79B3@webmail.messagingengine.com> Message-ID: On June 9, 2014 at 9:15:30 PM, wpf (wpf710 at gmail.com) wrote: Hi Benjamin ? ? I understand that.? ? ? anyway, when I checking the code as below norman at norman-ThinkCentre-M92P:/usr/lib/pypy/lib-python/2.7/bsddb$ which pypy /usr/bin/pypy norman at norman-ThinkCentre-M92P:/usr/lib/pypy/lib-python/2.7/bsddb$ ls -lt /usr/bin/pypy lrwxrwxrwx 1 root root 22 May 20 19:57 /usr/bin/pypy -> ../lib/pypy/bin/pypy-c norman at norman-ThinkCentre-M92P:/usr/lib/pypy/lib-python/2.7/bsddb$ pwd /usr/lib/pypy/lib-python/2.7/bsddb norman at norman-ThinkCentre-M92P:/usr/lib/pypy/lib-python/2.7/bsddb$ ls -lt __init__.py -rw-r--r-- 1 root root 15988 May 20 10:48 __init__.py from the code of __init__.py , it's still trying to load _bsddb module, ?you know ,I am a newbie to python, did I misunderstand something? and also I will try to understand why my code(actually ,it's openstack tox env) will trigger that. This may be happening because you?ve run tests with normal python and then switched to pypy. Some of the testing tools used by openstack create a .testrepository directory with data files based on bsddb if it?s available, but use something else if it?s not. Try deleting your .testrepository directory and trying again. --? Christopher Armstrong http://twitter.com/radix http://wordeology.com/ On Mon, Jun 9, 2014 at 1:29 PM, Benjamin Peterson wrote: On Sun, Jun 8, 2014, at 22:18, wpf wrote: > Hi All > > ? I am trying to use the Pypy under Ubuntu 12.04, and pypy version as > ? below > > ~$ pypy --version > Python 2.7.6 (2.3+dfsg-1~ppa0, May 20 2014, 09:11:18) > [PyPy 2.3.0 with GCC 4.6.3] > > -$ python --version > Python 2.7.3 > > and when I ?try to import _bsddb in pypy, it complains that 'No module > named _bsddb' > > but it works for python. > > so how to resolve it? I 'd tried to google it ,but nothing useful found. PyPy doesn't support the bsddb module. -- ??! ? ?? ??? ? ? msn: dragoninfield at hotmail.com ? ? mobile: 13681265240 _______________________________________________ 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 wpf710 at gmail.com Tue Jun 10 05:31:36 2014 From: wpf710 at gmail.com (wpf) Date: Tue, 10 Jun 2014 11:31:36 +0800 Subject: [pypy-dev] No Module _bsddb In-Reply-To: References: <1402291778.962.126610293.1B1D79B3@webmail.messagingengine.com> Message-ID: That really help!! Thanks a lot. On Tue, Jun 10, 2014 at 11:08 AM, Christopher Armstrong < radix at twistedmatrix.com> wrote: > On June 9, 2014 at 9:15:30 PM, wpf (wpf710 at gmail.com) wrote: > > Hi Benjamin > > I understand that. > > anyway, when I checking the code as below > > norman at norman-ThinkCentre-M92P:/usr/lib/pypy/lib-python/2.7/bsddb$ which > pypy > /usr/bin/pypy > norman at norman-ThinkCentre-M92P:/usr/lib/pypy/lib-python/2.7/bsddb$ ls > -lt /usr/bin/pypy > lrwxrwxrwx 1 root root 22 May 20 19:57 /usr/bin/pypy -> > ../lib/pypy/bin/pypy-c > norman at norman-ThinkCentre-M92P:/usr/lib/pypy/lib-python/2.7/bsddb$ pwd > /usr/lib/pypy/lib-python/2.7/bsddb > norman at norman-ThinkCentre-M92P:/usr/lib/pypy/lib-python/2.7/bsddb$ ls > -lt __init__.py > -rw-r--r-- 1 root root 15988 May 20 10:48 __init__.py > > from the code of __init__.py , it's still trying to load _bsddb module, > you know ,I am a newbie to python, did I misunderstand something? > > and also I will try to understand why my code(actually ,it's openstack tox > env) will trigger that. > > > > > This may be happening because you?ve run tests with normal python and then > switched to pypy. Some of the testing tools used by openstack create a > .testrepository directory with data files based on bsddb if it?s available, > but use something else if it?s not. Try deleting your .testrepository > directory and trying again. > > > -- > Christopher Armstrong > http://twitter.com/radix > http://wordeology.com/ > > > > > On Mon, Jun 9, 2014 at 1:29 PM, Benjamin Peterson > wrote: > >> On Sun, Jun 8, 2014, at 22:18, wpf wrote: >> > Hi All >> > >> > I am trying to use the Pypy under Ubuntu 12.04, and pypy version as >> > below >> > >> > ~$ pypy --version >> > Python 2.7.6 (2.3+dfsg-1~ppa0, May 20 2014, 09:11:18) >> > [PyPy 2.3.0 with GCC 4.6.3] >> > >> > -$ python --version >> > Python 2.7.3 >> > >> > and when I try to import _bsddb in pypy, it complains that 'No module >> > named _bsddb' >> > >> > but it works for python. >> > >> > so how to resolve it? I 'd tried to google it ,but nothing useful found. >> >> PyPy doesn't support the bsddb module. >> > > > > -- > ??! > > ??? > msn: dragoninfield at hotmail.com > mobile: 13681265240 > _______________________________________________ > pypy-dev mailing list > pypy-dev at python.org > https://mail.python.org/mailman/listinfo/pypy-dev > > -- ??! ??? msn: dragoninfield at hotmail.com mobile: 13681265240 -------------- next part -------------- An HTML attachment was scrubbed... URL: From usethisid2014 at gmail.com Wed Jun 11 07:32:31 2014 From: usethisid2014 at gmail.com (Gayathri J) Date: Wed, 11 Jun 2014 11:02:31 +0530 Subject: [pypy-dev] Numpy on pypy Message-ID: Hi I am trying to do a matrix dot using numpy.dot the numpy.dot on pypy seems lot slower than bumpy.do on python is there an alternative to using numpy.dot - so that i can do matrix.dot on pypy faster than cpython.... suggestions would be very helpful thanks Gayathri -------------- next part -------------- An HTML attachment was scrubbed... URL: From usethisid2014 at gmail.com Wed Jun 11 18:07:17 2014 From: usethisid2014 at gmail.com (Gayathri J) Date: Wed, 11 Jun 2014 21:37:17 +0530 Subject: [pypy-dev] Matrix dot product Message-ID: Following is my python code for matrix multiplication *import time* *a=random.rand(1**28,128,128,15)* *b=np.random.rand(15,15)* *c=np.zeros((128,128,128,15), dtype=np.float64)* *t=time.time()* *c=a.dot(b)* *print time.time()-t* Timing for *pypy -> 3.957* *python 2.7 -> .80* So find that the basic matrix dot operation is faster on python 2.7 than on pypy 2.2.1 why is this so? am i missing something? thanks gayathri -------------- next part -------------- An HTML attachment was scrubbed... URL: From skip at pobox.com Wed Jun 11 19:12:36 2014 From: skip at pobox.com (Skip Montanaro) Date: Wed, 11 Jun 2014 12:12:36 -0500 Subject: [pypy-dev] Matrix dot product In-Reply-To: References: Message-ID: On Wed, Jun 11, 2014 at 11:07 AM, Gayathri J wrote: > So find that the basic matrix dot operation is faster on python 2.7 than on > pypy 2.2.1 > why is this so? am i missing something? Warning: I am not a PyPy user, just an observer. It looks to me like you haven't executed the dot product code enough for PyPy's tracing code to recognize it as a critical path. Consequently, you have only suffered from the JIT machinery startup and execution tracing overhead, and haven't benefited from the JIT compilation. You might try wrapping a loop around the a.dot(b) call: for i in range(1000): c = a.dot(b) I have a couple more nits which are not PyPy-specific: 1. When asking for help, it really helps to post code that actually runs. Your code doesn't include the numpy import. You also must of left off the "np." prefix in the assignment to a. 2. You don't need the c = np.zeros(...) call either. You just throw it away two lines later. Skip From matti.picus at gmail.com Wed Jun 11 19:10:26 2014 From: matti.picus at gmail.com (Matti Picus) Date: Wed, 11 Jun 2014 20:10:26 +0300 Subject: [pypy-dev] Matrix dot product In-Reply-To: References: Message-ID: <53988D82.2030009@gmail.com> An HTML attachment was scrubbed... URL: From john.barry at pervasive-health.com Wed Jun 11 23:27:04 2014 From: john.barry at pervasive-health.com (Barry, John) Date: Wed, 11 Jun 2014 16:27:04 -0500 Subject: [pypy-dev] --sandbox woes. H ow do I install modules? Message-ID: Hoping someone here can point me in the right direction. I'm attempting to create a sandbox, load it up with our requirements via pip, and start figuring out how to execute this from our codebase. It all falls down every single time when I attempt to install distribute.py, because import time fails within the sandbox. So the question is twofold: (1) How can I get import time working (as we call datetime.datetime.utcnow() with astonishing regularity) (2) How do I install additional packages into the sandbox if I can't install pip (potentially not an issue if import time reoslves it) -- Confidentiality Notice: This e-mail transmission may contain confidential or legally privileged information that is intended only for the individual or entity named in the e-mail address. If you have received this communication in error, please notify me by return e-mail, and destroy this communication and all copies thereof, including any attachments. Apervita ? is a registered trademark of Pervasive Health Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From arigo at tunes.org Thu Jun 12 11:00:00 2014 From: arigo at tunes.org (Armin Rigo) Date: Thu, 12 Jun 2014 11:00:00 +0200 Subject: [pypy-dev] Numpy on pypy In-Reply-To: References: Message-ID: Hi, On 11 June 2014 07:32, Gayathri J wrote: > I am trying to do a matrix dot using numpy.dot > > the numpy.dot on pypy seems lot slower than bumpy.do on python > is there an alternative to using numpy.dot - so that i can do matrix.dot on > pypy faster than cpython.... For reference, I think you are misunderstanding PyPy somewhere. Assume that there existed a general-purpose self-contained algorithm to run matrix.dot(a,b) 10 times faster, written in C or Fortran. Don't you think that the same algorithm would be used by CPython's numpy too? PyPy can't magically speed up a _single_ operation that takes a lot of time. What PyPy can do is optimize some complex Python code between such operations. In some cases it can also select more optimized versions of the operations based on information from the Python context. For example, if you are timing how long it takes to do ``x = 3**10000000``, then there is no chance it would be faster on PyPy than on CPython. But if you're writing in Python an algorithm that computes the same result, then this Python code would run much faster on PyPy than on CPython. Another example is that the time it takes to compare two very big strings should be the same; but if we know that one string is always "A", then the comparison ``s == "A"`` can be optimized by selecting a special string comparison for length one. A bient?t, Armin. From running.sun at gmail.com Thu Jun 12 22:18:17 2014 From: running.sun at gmail.com (nejaka osoba) Date: Thu, 12 Jun 2014 22:18:17 +0200 Subject: [pypy-dev] my notes about trying to build unipycation Message-ID: https://gist.github.com/koo5/393746b19624debb2472 From matti.picus at gmail.com Thu Jun 12 23:24:14 2014 From: matti.picus at gmail.com (Matti Picus) Date: Fri, 13 Jun 2014 00:24:14 +0300 Subject: [pypy-dev] failing test for on windows Message-ID: <539A1A7E.3060705@gmail.com> We are down to the last 50 own tests on win32. Here is one I need help with: http://buildbot.pypy.org/summary/longrepr?testname=TestLowLevelType.%28%29.test_round_up_for_allocation&builder=own-win-x86-32&build=162&mod=translator.c.test.test_lltyped The failure is that, like ARM, ssize == llmemory.sizeof(Signed) * 2 where ssize is 8 Is the test wrong or is there a problem with overallocating memory? Matti From matti.picus at gmail.com Thu Jun 12 23:21:10 2014 From: matti.picus at gmail.com (Matti Picus) Date: Fri, 13 Jun 2014 00:21:10 +0300 Subject: [pypy-dev] test_round_up_for_allocation is failing on windows Message-ID: <539A19C6.20004@gmail.com> An HTML attachment was scrubbed... URL: From matti.picus at gmail.com Fri Jun 13 15:10:30 2014 From: matti.picus at gmail.com (Matti Picus) Date: Fri, 13 Jun 2014 16:10:30 +0300 Subject: [pypy-dev] PYPYLOG and colon as a special character Message-ID: <539AF846.2020603@gmail.com> if PYPYLOG is a filename, we log to it (except debug_print) if PYPYLOG is :filename, we log debug_print as well if PYPYLOG is section:filename, we log only that section But : is a valid char for filename on windows, so something like PYPYLOG=C:\TEMP\log.log does the wrong thing, and even worse, does so silently. Matti From chrish at pianocktail.org Fri Jun 13 16:21:39 2014 From: chrish at pianocktail.org (Christian Hudon) Date: Fri, 13 Jun 2014 10:21:39 -0400 Subject: [pypy-dev] PYPYLOG and colon as a special character In-Reply-To: <539AF846.2020603@gmail.com> References: <539AF846.2020603@gmail.com> Message-ID: <0c88c477fded5d1448af6854096882f5@chrish.pianocktail.org> The colon character is valid in paths in Windows (because of the drive letter), but not in filenames (it's used for supporting different streams, which hardly anyone uses). So doing that check on os.path.basename(os.getenv("PYPYLOG")) should work under Windows also. Of course, I didn't check the code, so it's possible I'm missing something too. On 2014-06-13 9:10, Matti Picus wrote: > if PYPYLOG is a filename, we log to it (except debug_print) > if PYPYLOG is :filename, we log debug_print as well > if PYPYLOG is section:filename, we log only that section > > But : is a valid char for filename on windows, so something like > PYPYLOG=C:\TEMP\log.log > does the wrong thing, and even worse, does so silently. > > Matti > _______________________________________________ > pypy-dev mailing list > pypy-dev at python.org > https://mail.python.org/mailman/listinfo/pypy-dev From matti.picus at gmail.com Fri Jun 13 16:34:13 2014 From: matti.picus at gmail.com (Matti Picus) Date: Fri, 13 Jun 2014 17:34:13 +0300 Subject: [pypy-dev] PYPYLOG and colon as a special character In-Reply-To: <0c88c477fded5d1448af6854096882f5@chrish.pianocktail.org> References: <539AF846.2020603@gmail.com> <0c88c477fded5d1448af6854096882f5@chrish.pianocktail.org> Message-ID: <539B0BE5.3070207@gmail.com> We discussed this on IRC and decided to add a workaround, '+filename' will be handled like 'filename' Matti On 13/06/2014 5:21 PM, Christian Hudon wrote: > The colon character is valid in paths in Windows (because of the drive > letter), but not in filenames (it's used for supporting different > streams, which hardly anyone uses). So doing that check on > os.path.basename(os.getenv("PYPYLOG")) should work under Windows also. > > Of course, I didn't check the code, so it's possible I'm missing > something too. > > On 2014-06-13 9:10, Matti Picus wrote: >> if PYPYLOG is a filename, we log to it (except debug_print) >> if PYPYLOG is :filename, we log debug_print as well >> if PYPYLOG is section:filename, we log only that section >> >> But : is a valid char for filename on windows, so something like >> PYPYLOG=C:\TEMP\log.log >> does the wrong thing, and even worse, does so silently. >> >> Matti >> _______________________________________________ >> pypy-dev mailing list >> pypy-dev at python.org >> https://mail.python.org/mailman/listinfo/pypy-dev > > _______________________________________________ > pypy-dev mailing list > pypy-dev at python.org > https://mail.python.org/mailman/listinfo/pypy-dev From arigo at tunes.org Fri Jun 13 17:08:07 2014 From: arigo at tunes.org (Armin Rigo) Date: Fri, 13 Jun 2014 17:08:07 +0200 Subject: [pypy-dev] PYPYLOG and colon as a special character In-Reply-To: <0c88c477fded5d1448af6854096882f5@chrish.pianocktail.org> References: <539AF846.2020603@gmail.com> <0c88c477fded5d1448af6854096882f5@chrish.pianocktail.org> Message-ID: Hi Christian, On 13 June 2014 16:21, Christian Hudon wrote: > The colon character is valid in paths in Windows (because of the drive > letter), but not in filenames (it's used for supporting different streams, > which hardly anyone uses). So doing that check on > os.path.basename(os.getenv("PYPYLOG")) should work under Windows also. You're missing the fact that "C:\Foo" might represent either a path name (case 1), or (case 3) "section:filename", with section "C" and path "\Foo". A bient?t, Armin. From arigo at tunes.org Sat Jun 14 18:26:30 2014 From: arigo at tunes.org (Armin Rigo) Date: Sat, 14 Jun 2014 18:26:30 +0200 Subject: [pypy-dev] --sandbox woes. H ow do I install modules? In-Reply-To: References: Message-ID: Hi John, On 11 June 2014 23:27, Barry, John wrote: > I'm attempting to create a sandbox, load it up with our requirements via > pip, and start figuring out how to execute this from our codebase. > > It all falls down every single time when I attempt to install distribute.py, > because import time fails within the sandbox. That's expected: I would not expect pip to work *at all* in a sandboxed PyPy. Now more precisely, the "time" module should be present in a reduced format, containing only three functions; you seem to say that it is completely absent, which I find strange but certainly not impossible as we don't test the sandbox regularly. But speaking more generally, most standard built-in modules are absent (or very reduced, like "time") for now. The idea is that you run small snippets of code provided by some untrusted user, doing some computation in Python. Ideally you don't need a lot of performance, so you can leave out the JIT, whose presence could in theory introduce additional security bugs. Now if someone really needs to run a large program with many dependencies, then he needs to invest some more serious amount of time into pypy's sandbox, and finish it at least until all modules that he really needs are supported. This shouldn't be too hard -- and, more importantly, it should be easy to make it work *in a secure way* -- but it is time-consuming. We haven't found anyone interested in doing this so far. A bient?t, Armin. From matti at picus.org.il Sat Jun 14 23:54:44 2014 From: matti at picus.org.il (Matti Picus) Date: Sun, 15 Jun 2014 00:54:44 +0300 Subject: [pypy-dev] wierd test failure when running tests in parallel Message-ID: <539CC4A4.8030606@picus.org.il> on windows own build, tests that call ctypes2lltype with an Unsigned failed last night's build, for instance http://buildbot.pypy.org/summary/longrepr?testname=test_connect_ex&builder=own-win-x86-32&build=164&mod=rlib.test.test_rsocket Running this test alone passes. Two questions 1. Should there be a fastpath like elif T is lltype.Unsigned: llobj = cobj 2. how can ctypes2lltype(Unsigned, 784L) fail? Note: I have started running two test processes in parallel, which may be creating many more open file handles. Matti From arigo at tunes.org Sun Jun 15 10:06:48 2014 From: arigo at tunes.org (Armin Rigo) Date: Sun, 15 Jun 2014 10:06:48 +0200 Subject: [pypy-dev] wierd test failure when running tests in parallel In-Reply-To: <539CC4A4.8030606@picus.org.il> References: <539CC4A4.8030606@picus.org.il> Message-ID: Hi Matti, On 14 June 2014 23:54, Matti Picus wrote: > 2. how can ctypes2lltype(Unsigned, 784L) fail? Shooting in the dark, maybe running multiple tests in parallel caused interference which meant that 'rffi.platform.numbertype_to_rclass' is incompletely populated? Armin From arigo at tunes.org Mon Jun 16 14:29:02 2014 From: arigo at tunes.org (Armin Rigo) Date: Mon, 16 Jun 2014 14:29:02 +0200 Subject: [pypy-dev] pypy-stm: not dead Message-ID: Hi all, Just a quick note to tell you sorry: although the 2.3 release of PyPy said the release of PyPy-STM would occur very soon, it's still delayed. We have found some real use cases in which it is several times slower than PyPy (both with the JIT) and so we're busy setting up a few missing things with the GC, notably the card marking scheme, which we think is causing it. Armin From arigo at tunes.org Mon Jun 16 14:33:40 2014 From: arigo at tunes.org (Armin Rigo) Date: Mon, 16 Jun 2014 14:33:40 +0200 Subject: [pypy-dev] pypy-stm: not dead In-Reply-To: References: Message-ID: Hi again, We have also been "delayed" by writing two papers about STM :-) Thanks to Remi for doing the main work. The first is a position paper already accepted at ICOOOLPS'14: http://bitbucket.org/pypy/extradoc/raw/extradoc/talk/icooolps2014/position-paper.pdf The second one is submitted for DLS'14: http://bitbucket.org/pypy/extradoc/raw/extradoc/talk/dls2014/paper/paper.pdf A bient?t, Armin. From matti.picus at gmail.com Tue Jun 17 22:01:20 2014 From: matti.picus at gmail.com (Matti Picus) Date: Tue, 17 Jun 2014 23:01:20 +0300 Subject: [pypy-dev] how can a class method become frozen in tests only on windows? Message-ID: <53A09E90.5080502@gmail.com> in looking at the own test_rzipfile failures on windows[0], the annotator is failing in rtyper.rpbc.redispatch_call since the method being called is a MultipleFrozenPBCRepr . The method is flush_buffers from (it seems) streamio.Stream [1] Any hints how this can happen? Matti [0] http://buildbot.pypy.org/summary/longrepr?testname=TestRZipFile.%28%29.test_rzipfile&builder=own-win-x86-32&build=167&mod=rlib.test.test_rzipfile [1] I added --pdb to the test run, and here is what the debugger had to say: > d:\pypy_stuff\pypy\rpython\rtyper\rpbc.py(825)redispatch_call() -> SmallFunctionSetPBCRepr)) (Pdb) p self (Pdb) p self.methodname 'flush_buffers' From cclauss at me.com Wed Jun 18 03:19:43 2014 From: cclauss at me.com (cclauss) Date: Wed, 18 Jun 2014 03:19:43 +0200 Subject: [pypy-dev] Support for current versions of Pypy on Heroku and Cloud Foundry platforms? Message-ID: Hi Folks, Currently Heroku only has Pypy 1.9 on an unsupported, experimental basis. https://devcenter.heroku.com/articles/python-runtimes#supported-python-runtimes and https://github.com/heroku/heroku-buildpack-python/issues/139 Other Cloud Foundry-based IaaS offering (IBM BlueMix, etc.) seem to use similar buildpacks. https://github.com/cloudfoundry-community/cf-docs-contrib/wiki/Buildpacks Do any of you know of an Infrastructure as a Service provider that supports current versions of Pypy? Thanks for any pointers that you can provide. Chris Clauss From alex.gaynor at gmail.com Wed Jun 18 07:06:40 2014 From: alex.gaynor at gmail.com (Alex Gaynor) Date: Tue, 17 Jun 2014 22:06:40 -0700 Subject: [pypy-dev] Support for current versions of Pypy on Heroku and Cloud Foundry platforms? In-Reply-To: References: Message-ID: Hi Chris, Are you looking for an Infrastructure as a Service (something like AWS, or Rackspace Cloud) or a Platform as a Service (Heroku)? Typically IaaS providers just give you a bare linux box, where you can of course install your own PyPy; as you've seen it looks like the PyPy on Heroku is out of date. I think the easiest move is probably to look into writing a custom build pack for Heroku, if that's what you're interested in. Alex PS: Disclaimer, I work at Rackspace. On Tue, Jun 17, 2014 at 6:19 PM, cclauss wrote: > Hi Folks, > > Currently Heroku only has Pypy 1.9 on an unsupported, experimental > basis. > > > https://devcenter.heroku.com/articles/python-runtimes#supported-python-runtimes > and https://github.com/heroku/heroku-buildpack-python/issues/139 > > Other Cloud Foundry-based IaaS offering (IBM BlueMix, etc.) seem to > use similar buildpacks. > https://github.com/cloudfoundry-community/cf-docs-contrib/wiki/Buildpacks > > Do any of you know of an Infrastructure as a Service provider that > supports current versions of Pypy? > > Thanks for any pointers that you can provide. Chris Clauss > _______________________________________________ > pypy-dev mailing list > pypy-dev at python.org > https://mail.python.org/mailman/listinfo/pypy-dev > -- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084 -------------- next part -------------- An HTML attachment was scrubbed... URL: From cclauss at me.com Wed Jun 18 08:01:53 2014 From: cclauss at me.com (cclauss) Date: Wed, 18 Jun 2014 08:01:53 +0200 Subject: [pypy-dev] Support for current versions of Pypy on Heroku and Cloud Foundry platforms? In-Reply-To: References: Message-ID: <29183C4F-26D9-43B1-BDB2-3A067992F80B@me.com> PaaS is what I am looking for. On 18 Jun 2014, at 07:06, Alex Gaynor wrote: > Hi Chris, > > Are you looking for an Infrastructure as a Service (something like AWS, or Rackspace Cloud) or a Platform as a Service (Heroku)? > > Typically IaaS providers just give you a bare linux box, where you can of course install your own PyPy; as you've seen it looks like the PyPy on Heroku is out of date. I think the easiest move is probably to look into writing a custom build pack for Heroku, if that's what you're interested in. > > Alex > > PS: Disclaimer, I work at Rackspace. > > > On Tue, Jun 17, 2014 at 6:19 PM, cclauss wrote: > Hi Folks, > > Currently Heroku only has Pypy 1.9 on an unsupported, experimental basis. > > https://devcenter.heroku.com/articles/python-runtimes#supported-python-runtimes > and https://github.com/heroku/heroku-buildpack-python/issues/139 > > Other Cloud Foundry-based IaaS offering (IBM BlueMix, etc.) seem to use similar buildpacks. > https://github.com/cloudfoundry-community/cf-docs-contrib/wiki/Buildpacks > > Do any of you know of an Infrastructure as a Service provider that supports current versions of Pypy? > > Thanks for any pointers that you can provide. Chris Clauss > _______________________________________________ > pypy-dev mailing list > pypy-dev at python.org > https://mail.python.org/mailman/listinfo/pypy-dev > > > > -- > "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) > "The people's good is the highest law." -- Cicero > GPG Key fingerprint: 125F 5C67 DFE9 4084 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at jdborg.com Thu Jun 19 10:28:26 2014 From: mail at jdborg.com (=?UTF-8?B?Sm9lIEJvcsSh?=) Date: Thu, 19 Jun 2014 09:28:26 +0100 Subject: [pypy-dev] [pypy] Adding gcc flags to Makefile Message-ID: Hi all, Because I've had to build zlib away from its normal home, I need to pass -I to gcc (LD_LIBRARY_PATH doesn't work). Setting this -I fixes my build issue: gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-release-2.3.1-3/platcheck_57.c -o /tmp/usession-release-2.3.1-3/platcheck_57.o /tmp/usession-release-2.3.1-3/platcheck_57.c:33:19: fatal error: bzlib.h: No such file or director gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused -I/scratch/root/include /tmp/usession-release-2.3.1-3/platcheck_57.c -o /tmp/usession-release-2.3.1-3/platcheck_57.o Thanks, Joseph David Bor? josephb.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From rymg19 at gmail.com Thu Jun 19 18:05:00 2014 From: rymg19 at gmail.com (Ryan Gonzalez) Date: Thu, 19 Jun 2014 11:05:00 -0500 Subject: [pypy-dev] [pypy] Adding gcc flags to Makefile In-Reply-To: References: Message-ID: NOTE: I am not a PyPy developer. Looking at RPython's translator(rpython/translator/c/genc.py), can't you set the CFLAGSEXTRA environment variable with the extra flags? On Thu, Jun 19, 2014 at 3:28 AM, Joe Bor? wrote: > Hi all, > > Because I've had to build zlib away from its normal home, I need to pass > -I to gcc (LD_LIBRARY_PATH doesn't work). > > Setting this -I fixes my build issue: > > gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused > /tmp/usession-release-2.3.1-3/platcheck_57.c -o > /tmp/usession-release-2.3.1-3/platcheck_57.o > /tmp/usession-release-2.3.1-3/platcheck_57.c:33:19: fatal error: bzlib.h: > No such file or director > > gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused > -I/scratch/root/include /tmp/usession-release-2.3.1-3/platcheck_57.c -o > /tmp/usession-release-2.3.1-3/platcheck_57.o > > > Thanks, > Joseph David Bor? > josephb.org > > _______________________________________________ > pypy-dev mailing list > pypy-dev at python.org > https://mail.python.org/mailman/listinfo/pypy-dev > > -- Ryan If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated." -------------- next part -------------- An HTML attachment was scrubbed... URL: From romain.py at gmail.com Thu Jun 19 19:48:25 2014 From: romain.py at gmail.com (Romain Guillebert) Date: Thu, 19 Jun 2014 19:48:25 +0200 Subject: [pypy-dev] [pypy] Adding gcc flags to Makefile In-Reply-To: References: Message-ID: <20140619174825.GC20988@Plop> Hi Joe Isn't LIBRARY_PATH the proper variable for finding libraries at compile time ? Cheers Romain On 06/19, Joe Bor? wrote: > Hi all, > > Because I've had to build zlib away from its normal home, I need to pass -I > to gcc (LD_LIBRARY_PATH doesn't work). > > Setting this -I fixes my build issue: > > gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused > /tmp/usession-release-2.3.1-3/platcheck_57.c -o > /tmp/usession-release-2.3.1-3/platcheck_57.o > /tmp/usession-release-2.3.1-3/platcheck_57.c:33:19: fatal error: bzlib.h: > No such file or director > > gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused > -I/scratch/root/include /tmp/usession-release-2.3.1-3/platcheck_57.c -o > /tmp/usession-release-2.3.1-3/platcheck_57.o > > > Thanks, > Joseph David Bor? > josephb.org > _______________________________________________ > pypy-dev mailing list > pypy-dev at python.org > https://mail.python.org/mailman/listinfo/pypy-dev From yyc1992 at gmail.com Fri Jun 20 00:29:38 2014 From: yyc1992 at gmail.com (Yichao Yu) Date: Fri, 20 Jun 2014 06:29:38 +0800 Subject: [pypy-dev] [pypy] Adding gcc flags to Makefile In-Reply-To: <20140619174825.GC20988@Plop> References: <20140619174825.GC20988@Plop> Message-ID: On Fri, Jun 20, 2014 at 1:48 AM, Romain Guillebert wrote: > Hi Joe > > Isn't LIBRARY_PATH the proper variable for finding libraries at compile > time ? But isn't your problem finding the header files? (Thus -I.) ? > > Cheers > Romain > > On 06/19, Joe Bor? wrote: >> Hi all, >> >> Because I've had to build zlib away from its normal home, I need to pass -I >> to gcc (LD_LIBRARY_PATH doesn't work). >> >> Setting this -I fixes my build issue: >> >> gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused >> /tmp/usession-release-2.3.1-3/platcheck_57.c -o >> /tmp/usession-release-2.3.1-3/platcheck_57.o >> /tmp/usession-release-2.3.1-3/platcheck_57.c:33:19: fatal error: bzlib.h: >> No such file or director >> >> gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused >> -I/scratch/root/include /tmp/usession-release-2.3.1-3/platcheck_57.c -o >> /tmp/usession-release-2.3.1-3/platcheck_57.o >> >> >> Thanks, >> Joseph David Bor? >> josephb.org > >> _______________________________________________ >> pypy-dev mailing list >> pypy-dev at python.org >> https://mail.python.org/mailman/listinfo/pypy-dev > > _______________________________________________ > pypy-dev mailing list > pypy-dev at python.org > https://mail.python.org/mailman/listinfo/pypy-dev From romain.py at gmail.com Fri Jun 20 00:54:03 2014 From: romain.py at gmail.com (Romain Guillebert) Date: Fri, 20 Jun 2014 00:54:03 +0200 Subject: [pypy-dev] [pypy] Adding gcc flags to Makefile In-Reply-To: References: <20140619174825.GC20988@Plop> Message-ID: <20140619225403.GD20988@Plop> Yes, sorry then the variable is CPATH (https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html) On 06/20, Yichao Yu wrote: > On Fri, Jun 20, 2014 at 1:48 AM, Romain Guillebert wrote: > > Hi Joe > > > > Isn't LIBRARY_PATH the proper variable for finding libraries at compile > > time ? > > But isn't your problem finding the header files? (Thus -I.) ? > > > > > Cheers > > Romain > > > > On 06/19, Joe Bor? wrote: > >> Hi all, > >> > >> Because I've had to build zlib away from its normal home, I need to pass -I > >> to gcc (LD_LIBRARY_PATH doesn't work). > >> > >> Setting this -I fixes my build issue: > >> > >> gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused > >> /tmp/usession-release-2.3.1-3/platcheck_57.c -o > >> /tmp/usession-release-2.3.1-3/platcheck_57.o > >> /tmp/usession-release-2.3.1-3/platcheck_57.c:33:19: fatal error: bzlib.h: > >> No such file or director > >> > >> gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused > >> -I/scratch/root/include /tmp/usession-release-2.3.1-3/platcheck_57.c -o > >> /tmp/usession-release-2.3.1-3/platcheck_57.o > >> > >> > >> Thanks, > >> Joseph David Bor? > >> josephb.org > > > >> _______________________________________________ > >> pypy-dev mailing list > >> pypy-dev at python.org > >> https://mail.python.org/mailman/listinfo/pypy-dev > > > > _______________________________________________ > > pypy-dev mailing list > > pypy-dev at python.org > > https://mail.python.org/mailman/listinfo/pypy-dev From pjenvey at underboss.org Fri Jun 20 22:32:08 2014 From: pjenvey at underboss.org (Philip Jenvey) Date: Fri, 20 Jun 2014 13:32:08 -0700 Subject: [pypy-dev] PyPy3 2.3.1 released Message-ID: ===================== PyPy3 2.3.1 - Fulcrum ===================== We're pleased to announce the first stable release of PyPy3. PyPy3 targets Python 3 (3.2.5) compatibility. We would like to thank all of the people who donated_ to the `py3k proposal`_ for supporting the work that went into this. You can download the PyPy3 2.3.1 release here: http://pypy.org/download.html#pypy3-2-3-1 Highlights ========== * The first stable release of PyPy3: support for Python 3! * The stdlib has been updated to Python 3.2.5 * Additional support for the u'unicode' syntax (`PEP 414`_) from Python 3.3 * Updates from the default branch, such as incremental GC and various JIT improvements * Resolved some notable JIT performance regressions from PyPy2: - Re-enabled the previously disabled collection (list/dict/set) strategies - Resolved performance of iteration over range objects - Resolved handling of Python 3's exception __context__ unnecessarily forcing frame object overhead .. _`PEP 414`: http://legacy.python.org/dev/peps/pep-0414/ What is PyPy? ============== PyPy is a very compliant Python interpreter, almost a drop-in replacement for CPython 2.7.6 or 3.2.5. It's fast due to its integrated tracing JIT compiler. This release supports x86 machines running Linux 32/64, Mac OS X 64, Windows, and OpenBSD, as well as newer ARM hardware (ARMv6 or ARMv7, with VFPv3) running Linux. While we support 32 bit python on Windows, work on the native Windows 64 bit python is still stalling, we would welcome a volunteer to `handle that`_. .. _`handle that`: http://doc.pypy.org/en/latest/windows.html#what-is-missing-for-a-full-64-bit-translation How to use PyPy? ================= We suggest using PyPy from a `virtualenv`_. Once you have a virtualenv installed, you can follow instructions from `pypy documentation`_ on how to proceed. This document also covers other `installation schemes`_. .. _donated: http://morepypy.blogspot.com/2012/01/py3k-and-numpy-first-stage-thanks-to.html .. _`py3k proposal`: http://pypy.org/py3donate.html .. _`pypy documentation`: http://doc.pypy.org/en/latest/getting-started.html#installing-using-virtualenv .. _`virtualenv`: http://www.virtualenv.org/en/latest/ .. _`installation schemes`: http://doc.pypy.org/en/latest/getting-started.html#installing-pypy Cheers, the PyPy team -- Philip Jenvey From arigo at tunes.org Sat Jun 21 14:26:01 2014 From: arigo at tunes.org (Armin Rigo) Date: Sat, 21 Jun 2014 14:26:01 +0200 Subject: [pypy-dev] how can a class method become frozen in tests only on windows? In-Reply-To: <53A09E90.5080502@gmail.com> References: <53A09E90.5080502@gmail.com> Message-ID: Hi Matti, On 17 June 2014 22:01, Matti Picus wrote: > in looking at the own test_rzipfile failures on windows[0], the annotator is > failing in rtyper.rpbc.redispatch_call since the method being called is a > MultipleFrozenPBCRepr . Not sure, but this seems to fix the problem: http://bpaste.net/show/393277/ If you can confirm, feel free to check it in. A bient?t, Armin. From matti.picus at gmail.com Sat Jun 21 22:24:24 2014 From: matti.picus at gmail.com (Matti Picus) Date: Sat, 21 Jun 2014 23:24:24 +0300 Subject: [pypy-dev] pythonapi and pypy on windows Message-ID: <53A5E9F8.1000508@gmail.com> An HTML attachment was scrubbed... URL: From alex.gaynor at gmail.com Sat Jun 21 22:28:44 2014 From: alex.gaynor at gmail.com (Alex Gaynor) Date: Sat, 21 Jun 2014 13:28:44 -0700 Subject: [pypy-dev] pythonapi and pypy on windows In-Reply-To: <53A5E9F8.1000508@gmail.com> References: <53A5E9F8.1000508@gmail.com> Message-ID: I think we shoudl either disable it, or make it be really good: meaning completely skipping the C-call layer, and just making things super simple: def PyListAppend(list, item): list.append(item) There's no point in having it if it's super expensive (IMO). Alex On Sat, Jun 21, 2014 at 1:24 PM, Matti Picus wrote: > Cpython has a feature that allows you to call c-api functions from python > via ctypes.pythonapi > It doesn't currently work on pypy, I started to document why not on the > disable_pythonapi branch: > > ``ctypes.pythonapi`` lets you access the CPython C API > emulation layer. It does not work on PyPy at the moment, we are > missing a > ``getfunc`` method for CDLL. Work was begun > to refactor the rpython implementation of _rawffi (in > pypy/modules/_rawffi/alt) but that project has stalled. > > Note that even if it worked, our implementation would not do anything > sensible about the GIL and the functions will be named with an extra > "Py", for example ``PyPyInt_FromLong()``. Basically, don't use this. > Assuming the PyObject pointers you get have any particular fields in > any particular order is just going to crash. > > but since it is such a bad idea, can we just disable it instead of fixing? > In Favor of disabling: no need to extend _rawffi, only remove some code > and fix tests > Against disabling: another obscure cpython incompatability > > Matti > > _______________________________________________ > pypy-dev mailing list > pypy-dev at python.org > https://mail.python.org/mailman/listinfo/pypy-dev > > -- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084 -------------- next part -------------- An HTML attachment was scrubbed... URL: From laurie at tratt.net Sun Jun 22 12:12:08 2014 From: laurie at tratt.net (Laurence Tratt) Date: Sun, 22 Jun 2014 11:12:08 +0100 Subject: [pypy-dev] 2.3.1 distribution issues? Message-ID: <20140622101208.GA7266@overdrive.tratt.net> I feel I might be going mad but I think there are a few web-page issues with the 2.3.1 release. First the links to pypy-2.3.1-src.tar.bz2 and pypy-2.3.1-src.zip point to release-2.3.1.tar.bz2 and release-2.3.1.zip respectively in the get directory [1]. This confused the life out of me for a while. It also makes OS packagers nervous because there is a history of files being fetched from tags changing their checksums over time. [As an aside, decompressing release-2.3.1.tar.bz2 leads to a pypy-pypy- directory, which makes it annoying for OS packagers to upgrade the package. 2.3 has this problem as well, although I'm sure some past source releases had a more standard pypy-V.V directory.] If I go instead to BitBucket's downloads page [2], I can see binaries for various platforms for 2.3.1, but not a source archive? Laurie [1] http://pypy.org/download.html#building-from-source [2] https://bitbucket.org/pypy/pypy/downloads From matti.picus at gmail.com Sun Jun 22 12:27:02 2014 From: matti.picus at gmail.com (Matti Picus) Date: Sun, 22 Jun 2014 13:27:02 +0300 Subject: [pypy-dev] 2.3.1 distribution issues? In-Reply-To: <20140622101208.GA7266@overdrive.tratt.net> References: <20140622101208.GA7266@overdrive.tratt.net> Message-ID: <53A6AF76.1090604@gmail.com> An HTML attachment was scrubbed... URL: From laurie at tratt.net Sun Jun 22 18:26:04 2014 From: laurie at tratt.net (Laurence Tratt) Date: Sun, 22 Jun 2014 17:26:04 +0100 Subject: [pypy-dev] 2.3.1 distribution issues? In-Reply-To: <53A6AF76.1090604@gmail.com> References: <20140622101208.GA7266@overdrive.tratt.net> <53A6AF76.1090604@gmail.com> Message-ID: <20140622162604.GD7266@overdrive.tratt.net> On Sun, Jun 22, 2014 at 01:27:02PM +0300, Matti Picus wrote: > Sorry, it's my fault, I didn't download/repackage/upload the source files > as in previous builds, it seemed redundant. > I see it was not, so I will try to fix. Thanks Matti! Laurie From arigo at tunes.org Mon Jun 23 09:34:06 2014 From: arigo at tunes.org (Armin Rigo) Date: Mon, 23 Jun 2014 09:34:06 +0200 Subject: [pypy-dev] pythonapi and pypy on windows In-Reply-To: <53A5E9F8.1000508@gmail.com> References: <53A5E9F8.1000508@gmail.com> Message-ID: Hi Matti, First question, what is the relationship of this mail and "PyPy on Windows"? On 21 June 2014 22:24, Matti Picus wrote: > ``ctypes.pythonapi`` lets you access the CPython C API > emulation layer. It does not work on PyPy at the moment, we are missing > a > ``getfunc`` method for CDLL. Work was begun > to refactor the rpython implementation of _rawffi (in > pypy/modules/_rawffi/alt) but that project has stalled. I thought we simply didn't provide ``ctypes.pythonapi``. Seems we do, but I don't want to know what nonsense it does. Just remove it? As Alex says, I don't think it's as simple as adding some method on some CDLL. A bient?t, Armin. From piotr.skamruk at gmail.com Mon Jun 23 10:21:43 2014 From: piotr.skamruk at gmail.com (Piotr Skamruk) Date: Mon, 23 Jun 2014 10:21:43 +0200 Subject: [pypy-dev] [pypy] Adding gcc flags to Makefile In-Reply-To: References: Message-ID: bzlib is library for bzip2 archives. it's not zlib which You mentioned in first sentence. 2014-06-19 10:28 GMT+02:00 Joe Bor? : > Hi all, > > Because I've had to build zlib away from its normal home, I need to pass -I > to gcc (LD_LIBRARY_PATH doesn't work). > > Setting this -I fixes my build issue: > > gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused > /tmp/usession-release-2.3.1-3/platcheck_57.c -o > /tmp/usession-release-2.3.1-3/platcheck_57.o > /tmp/usession-release-2.3.1-3/platcheck_57.c:33:19: fatal error: bzlib.h: No > such file or director > > gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused > -I/scratch/root/include /tmp/usession-release-2.3.1-3/platcheck_57.c -o > /tmp/usession-release-2.3.1-3/platcheck_57.o > > > Thanks, > Joseph David Bor? > josephb.org > > _______________________________________________ > pypy-dev mailing list > pypy-dev at python.org > https://mail.python.org/mailman/listinfo/pypy-dev > From fabiofz at gmail.com Tue Jun 24 02:11:42 2014 From: fabiofz at gmail.com (Fabio Zadrozny) Date: Mon, 23 Jun 2014 21:11:42 -0300 Subject: [pypy-dev] PyPy on JVM Message-ID: Hi PyPy-dev, I remember there was some work on getting PyPy on JVM... is that still possible? Can someone point me on how to do it? Thank you, Fabio -------------- next part -------------- An HTML attachment was scrubbed... URL: From kitizz.devside at gmail.com Tue Jun 24 02:42:18 2014 From: kitizz.devside at gmail.com (Kit Ham) Date: Tue, 24 Jun 2014 10:42:18 +1000 Subject: [pypy-dev] Question about PyPy Sandboxing Message-ID: Hi devs, Can multiple PyPy sandboxes be executed and interacted with from C/C++? For context, I'm adding plugin support to my application. I'd like people to be able to write a python module, and call it's functions from the C/C++ in a sandboxed environment. This is for 2 reasons: 1) So that a plugin can't mess with the user's system 2) So that a plugin's access to other plugins can be controlled Cheers, Kit P.S. I'm currently using PyOtherSide in my Qt app, but I'm realising it may not be a good solution for plugins. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fijall at gmail.com Tue Jun 24 09:06:32 2014 From: fijall at gmail.com (Maciej Fijalkowski) Date: Tue, 24 Jun 2014 09:06:32 +0200 Subject: [pypy-dev] PyPy on JVM In-Reply-To: References: Message-ID: On Tue, Jun 24, 2014 at 2:11 AM, Fabio Zadrozny wrote: > Hi PyPy-dev, > > I remember there was some work on getting PyPy on JVM... is that still > possible? Can someone point me on how to do it? > > Thank you, > > Fabio Hi Fabio. The PyPy JVM backend was abandoned together with ootype. From arigo at tunes.org Tue Jun 24 09:09:52 2014 From: arigo at tunes.org (Armin Rigo) Date: Tue, 24 Jun 2014 09:09:52 +0200 Subject: [pypy-dev] PyPy on JVM In-Reply-To: References: Message-ID: Hi Fabio, On 24 June 2014 02:11, Fabio Zadrozny wrote: > I remember there was some work on getting PyPy on JVM... is that still > possible? Can someone point me on how to do it? Sorry, we dropped support for that due to general lack of interest. It was theoretically possible since long ago, but unfinished. No-one ever did more than realize (again and again) that it was going to be more work than they originally thought, notably to integrate the Python side and the Java side a la Jython. Then there would have been quite a lot of additional work to make the JIT work there. So we dropped "ootype" support. This did (and still does) let us simplify large parts of RPython. A bient?t, Armin. From arigo at tunes.org Tue Jun 24 09:17:28 2014 From: arigo at tunes.org (Armin Rigo) Date: Tue, 24 Jun 2014 09:17:28 +0200 Subject: [pypy-dev] Question about PyPy Sandboxing In-Reply-To: References: Message-ID: Hi Kit, On 24 June 2014 02:42, Kit Ham wrote: > Can multiple PyPy sandboxes be executed and interacted with from C/C++? Yes, you can in theory do whatever you want, but it is not really finished and documented. You first need to decide if it's ok that each sandbox runs in a separate process or if you would rather have an in-process solution (more work). In the first case, you'd extend the "controller" (regular Python code controlling the sandboxed subprocess) so that it can handle several subprocesses at once. Then, for example, you'd run the controller in CPython, and link to CPython from your C/C++ code using the standard CPython ways. Or you can even rewrite the controller in C/C++: it's just some code reading and writing to the subprocesses' stdin/stdout. (Each subprocess is one sandboxed PyPy instance.) A bient?t, Armin. From fabiofz at gmail.com Tue Jun 24 12:50:35 2014 From: fabiofz at gmail.com (Fabio Zadrozny) Date: Tue, 24 Jun 2014 07:50:35 -0300 Subject: [pypy-dev] PyPy on JVM In-Reply-To: References: Message-ID: Ok, Thank you for the info. Best Regards, Fabio On Tue, Jun 24, 2014 at 4:09 AM, Armin Rigo wrote: > Hi Fabio, > > On 24 June 2014 02:11, Fabio Zadrozny wrote: > > I remember there was some work on getting PyPy on JVM... is that still > > possible? Can someone point me on how to do it? > > Sorry, we dropped support for that due to general lack of interest. > It was theoretically possible since long ago, but unfinished. No-one > ever did more than realize (again and again) that it was going to be > more work than they originally thought, notably to integrate the > Python side and the Java side a la Jython. Then there would have been > quite a lot of additional work to make the JIT work there. So we > dropped "ootype" support. This did (and still does) let us simplify > large parts of RPython. > > > A bient?t, > > Armin. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matti.picus at gmail.com Wed Jun 25 14:47:06 2014 From: matti.picus at gmail.com (Matti Picus) Date: Wed, 25 Jun 2014 15:47:06 +0300 Subject: [pypy-dev] pythonapi In-Reply-To: References: <53A5E9F8.1000508@gmail.com> Message-ID: <53AAC4CA.6060602@gmail.com> (previous subject mistakenly included reference to "PyPy on Windows") I created a branch disable_pythonapi that copletely removes pythonapi and PyDLL from ctypes, removes sys.dllhandle on windows, and documents these differences to cpython. Should I merge it to default? Matti On 23/06/2014 10:34 AM, Armin Rigo wrote: > Hi Matti, > > First question, what is the relationship of this mail and "PyPy on Windows"? > > On 21 June 2014 22:24, Matti Picus wrote: >> ``ctypes.pythonapi`` lets you access the CPython C API >> emulation layer. It does not work on PyPy at the moment, we are missing >> a >> ``getfunc`` method for CDLL. Work was begun >> to refactor the rpython implementation of _rawffi (in >> pypy/modules/_rawffi/alt) but that project has stalled. > I thought we simply didn't provide ``ctypes.pythonapi``. Seems we do, > but I don't want to know what nonsense it does. Just remove it? As > Alex says, I don't think it's as simple as adding some method on some > CDLL. > > > A bient?t, > > Armin. From arigo at tunes.org Wed Jun 25 16:04:05 2014 From: arigo at tunes.org (Armin Rigo) Date: Wed, 25 Jun 2014 16:04:05 +0200 Subject: [pypy-dev] pythonapi In-Reply-To: <53AAC4CA.6060602@gmail.com> References: <53A5E9F8.1000508@gmail.com> <53AAC4CA.6060602@gmail.com> Message-ID: Hi Matti, On 25 June 2014 14:47, Matti Picus wrote: > removes sys.dllhandle on windows, Can you explain why removing sys.dllhandle is a good idea? It seems unrelated to the ctypes changes, but maybe it is not. A bient?t, Armin. From matti.picus at gmail.com Wed Jun 25 16:10:24 2014 From: matti.picus at gmail.com (Matti Picus) Date: Wed, 25 Jun 2014 17:10:24 +0300 Subject: [pypy-dev] pythonapi In-Reply-To: References: <53A5E9F8.1000508@gmail.com> <53AAC4CA.6060602@gmail.com> Message-ID: <53AAD850.20001@gmail.com> Assuming I understand correctly, the reason sys.dllhandle exists is that you can do dlopen(NULL) in linux to get a handle to the current process, but not LoadLibrary(NULL). So windows builds provide a handle to the current process DLL as sys.dllhandle, which is then wrapped into ctypes.PyDLL(..., sys.dllhandle) and served up as ctypes.pythonapi. Working backwards from no pythonapi -> no PyDLL -> no sys.dllhandle. Matti On 25/06/2014 5:04 PM, Armin Rigo wrote: > Hi Matti, > > On 25 June 2014 14:47, Matti Picus wrote: >> removes sys.dllhandle on windows, > Can you explain why removing sys.dllhandle is a good idea? It seems > unrelated to the ctypes changes, but maybe it is not. > > > A bient?t, > > Armin. From arigo at tunes.org Wed Jun 25 16:33:06 2014 From: arigo at tunes.org (Armin Rigo) Date: Wed, 25 Jun 2014 16:33:06 +0200 Subject: [pypy-dev] pythonapi In-Reply-To: <53AAD850.20001@gmail.com> References: <53A5E9F8.1000508@gmail.com> <53AAC4CA.6060602@gmail.com> <53AAD850.20001@gmail.com> Message-ID: Hi Matti, On 25 June 2014 16:10, Matti Picus wrote: > Working backwards from no pythonapi -> no PyDLL -> no sys.dllhandle. Right, but I'm not sure that it's only used by ctypes and nothing else. If that were the case it would be some private name in the _ctypes module... Also, I'm not sure I understand it correctly, but it seems that on CPython, sys.dllhandle is just an integer, whereas on PyPy so far it is some W_CDLL instance. I wouldn't mind fixing it to be like CPython (then it has nothing to do with cpyext or with _rawffi). A bient?t, Armin. From yyc1992 at gmail.com Fri Jun 27 04:09:35 2014 From: yyc1992 at gmail.com (Yichao Yu) Date: Fri, 27 Jun 2014 10:09:35 +0800 Subject: [pypy-dev] The correct way to incrementally build list in RPython Message-ID: Hi, On an attempt to fix the hash function of numpy.dtype, I came up with the patch in the attachment translated from hashdescr.c in the original numpy source. The patch passed the test when running in pyinteractive.py. However, when started to translate pypy, I get an ListChangeUnallowed error. I read in the Coding Guide that list.append should be allowed (which also said there's a lot of special rules) and I have seen usage of append in other RPython modules. So what is the rule of using list.append and what is the best way of doing this? (I guess I can always using application level lists but is that the only/best way?) Other comments on this patch (style/naming etc) are also welcome. Yichao Yu -------------- next part -------------- A non-text attachment was scrubbed... Name: numpy-hash.patch Type: text/x-patch Size: 1712 bytes Desc: not available URL: From arigo at tunes.org Fri Jun 27 09:07:43 2014 From: arigo at tunes.org (Armin Rigo) Date: Fri, 27 Jun 2014 09:07:43 +0200 Subject: [pypy-dev] The correct way to incrementally build list in RPython In-Reply-To: References: Message-ID: Hi Yichao, On 27 June 2014 04:09, Yichao Yu wrote: > On an attempt to fix the hash function of numpy.dtype, I came up with > the patch in the attachment translated from hashdescr.c in the > original numpy source. The patch passed the test when running in > pyinteractive.py. However, when started to translate pypy, I get an > ListChangeUnallowed error. That errors comes from space.newtuple(lst): it must be passed a list "lst" that is "not resized", that is, a list on which we never do an append() or pop() or similar. The standard fix is to do "lst = [None] * length" and then fill "lst[index] = ...". This only works if you know the final length in advance. A more heavy way to fix it is simply to call space.newtuple(lst[:]), making a fresh copy of the list. But in this case, a better fix would be to avoid the list and the space.newtuple() and space.hash() completely, and instead compute the hash value incrementally, by copying the logic in pypy/objspace/std/tupleobject.py:descr_hash(). Similarly, I'm not sure you need to wrap self.kind, 0, self.elsize and self.alignment and put them inside a tuple of length 4, when all you could do is some random computation with these three numbers. A bient?t, Armin. From yyc1992 at gmail.com Fri Jun 27 09:27:28 2014 From: yyc1992 at gmail.com (Yichao Yu) Date: Fri, 27 Jun 2014 15:27:28 +0800 Subject: [pypy-dev] The correct way to incrementally build list in RPython In-Reply-To: References: Message-ID: On Fri, Jun 27, 2014 at 3:07 PM, Armin Rigo wrote: > Hi Yichao, > > On 27 June 2014 04:09, Yichao Yu wrote: >> On an attempt to fix the hash function of numpy.dtype, I came up with >> the patch in the attachment translated from hashdescr.c in the >> original numpy source. The patch passed the test when running in >> pyinteractive.py. However, when started to translate pypy, I get an >> ListChangeUnallowed error. > > That errors comes from space.newtuple(lst): it must be passed a list > "lst" that is "not resized", that is, a list on which we never do an > append() or pop() or similar. Hmmm. So the error actually happens when the compiler traces back function calls? I was trying to figure out what's wrong from inside my function T_T ... > > The standard fix is to do "lst = [None] * length" and then fill > "lst[index] = ...". This only works if you know the final length in > advance. A more heavy way to fix it is simply to call > space.newtuple(lst[:]), making a fresh copy of the list. But in this > case, a better fix would be to avoid the list and the space.newtuple() > and space.hash() completely, and instead compute the hash value > incrementally, by copying the logic in > pypy/objspace/std/tupleobject.py:descr_hash(). Thank you for your advices. I would definitely try that. > > Similarly, I'm not sure you need to wrap self.kind, 0, self.elsize and > self.alignment and put them inside a tuple of length 4, when all you > could do is some random computation with these three numbers. I agree. As I said, this is basically copied from the c implementation and this is what they do over there..... (btw, it is actually a tuple of length 5 with endian being the second element ;P ). > > > A bient?t, > > Armin. Yichao Yu From yyc1992 at gmail.com Fri Jun 27 12:17:22 2014 From: yyc1992 at gmail.com (Yichao Yu) Date: Fri, 27 Jun 2014 18:17:22 +0800 Subject: [pypy-dev] The correct way to incrementally build list in RPython In-Reply-To: References: Message-ID: On Fri, Jun 27, 2014 at 3:27 PM, Yichao Yu wrote: > On Fri, Jun 27, 2014 at 3:07 PM, Armin Rigo wrote: >> Hi Yichao, >> >> On 27 June 2014 04:09, Yichao Yu wrote: >>> On an attempt to fix the hash function of numpy.dtype, I came up with >>> the patch in the attachment translated from hashdescr.c in the >>> original numpy source. The patch passed the test when running in >>> pyinteractive.py. However, when started to translate pypy, I get an >>> ListChangeUnallowed error. >> >> That errors comes from space.newtuple(lst): it must be passed a list >> "lst" that is "not resized", that is, a list on which we never do an >> append() or pop() or similar. > > Hmmm. So the error actually happens when the compiler traces back > function calls? I was trying to figure out what's wrong from inside my > function T_T ... > >> >> The standard fix is to do "lst = [None] * length" and then fill >> "lst[index] = ...". This only works if you know the final length in >> advance. A more heavy way to fix it is simply to call >> space.newtuple(lst[:]), making a fresh copy of the list. But in this >> case, a better fix would be to avoid the list and the space.newtuple() >> and space.hash() completely, and instead compute the hash value >> incrementally, by copying the logic in >> pypy/objspace/std/tupleobject.py:descr_hash(). > > Thank you for your advices. I would definitely try that. I've made a new version[1] and it seems to work. I am using the hash function from `compute_hash` instead of the improved one in tupleobject.py:descr_hash since the length is not known in advance. [1] https://bitbucket.org/pypy/pypy/pull-request/242/fix-hash-function-for-complicated/diff > >> >> Similarly, I'm not sure you need to wrap self.kind, 0, self.elsize and >> self.alignment and put them inside a tuple of length 4, when all you >> could do is some random computation with these three numbers. I am still creating a tuple out of these 5 numbers/strings since I don't want to duplicate the hash functions for all of them. Can the compiler deal with this case efficiently? > > I agree. As I said, this is basically copied from the c implementation > and this is what they do over there..... (btw, it is actually a tuple > of length 5 with endian being the second element ;P ). > >> >> >> A bient?t, >> >> Armin. > > Yichao Yu From arigo at tunes.org Fri Jun 27 12:37:32 2014 From: arigo at tunes.org (Armin Rigo) Date: Fri, 27 Jun 2014 12:37:32 +0200 Subject: [pypy-dev] The correct way to incrementally build list in RPython In-Reply-To: References: Message-ID: Hi Yichao, On 27 June 2014 12:17, Yichao Yu wrote: > I am still creating a tuple out of these 5 numbers/strings since I > don't want to duplicate the hash functions for all of them. Can the > compiler deal with this case efficiently? If by "deal with this case efficiently" you mean, will the compiler remove the tuple allocation and inline the 5-elements hash, then it might just be possible depending on a number of details, but I doubt it. Better to be explicit. I had in mind something like: my_hash = num1 * 1000003 my_hash = (my_hash ^ num2) * 1000003 my_hash = (my_hash ^ compute_hash(string3)) my_hash = intmask(my_hash) # at the end A bient?t, Armin. From yyc1992 at gmail.com Fri Jun 27 15:17:26 2014 From: yyc1992 at gmail.com (Yichao Yu) Date: Fri, 27 Jun 2014 21:17:26 +0800 Subject: [pypy-dev] The correct way to incrementally build list in RPython In-Reply-To: References: Message-ID: On Fri, Jun 27, 2014 at 6:37 PM, Armin Rigo wrote: > Hi Yichao, > > On 27 June 2014 12:17, Yichao Yu wrote: >> I am still creating a tuple out of these 5 numbers/strings since I >> don't want to duplicate the hash functions for all of them. Can the >> compiler deal with this case efficiently? > > If by "deal with this case efficiently" you mean, will the compiler > remove the tuple allocation and inline the 5-elements hash, then it > might just be possible depending on a number of details, but I doubt > it. Better to be explicit. I had in mind something like: > > my_hash = num1 * 1000003 > my_hash = (my_hash ^ num2) * 1000003 > my_hash = (my_hash ^ compute_hash(string3)) > my_hash = intmask(my_hash) # at the end > Done > > A bient?t, > > Armin. From arigo at tunes.org Sat Jun 28 17:10:35 2014 From: arigo at tunes.org (Armin Rigo) Date: Sat, 28 Jun 2014 17:10:35 +0200 Subject: [pypy-dev] europython sprints? In-Reply-To: References: Message-ID: Hi all, On 3 June 2014 09:56, Armin Rigo wrote: > I guess there will be a PyPy sprint, yes. It seems there will be an informal PyPy sprint on the first sprint day (Saturday 26), with at least Romain, Manuel Jacob, myself, and probably a few others. A bient?t, Armin. From matti.picus at gmail.com Mon Jun 30 03:12:07 2014 From: matti.picus at gmail.com (Matti Picus) Date: Mon, 30 Jun 2014 11:12:07 +1000 Subject: [pypy-dev] pythonapi In-Reply-To: References: <53A5E9F8.1000508@gmail.com> <53AAC4CA.6060602@gmail.com> <53AAD850.20001@gmail.com> Message-ID: <53B0B967.4050309@gmail.com> Googling sys.dllhandle gave me no other uses, the only use case I can of think would involve casting to some kind of ctypes dll and accessing capi (cpyext) capabilites. The original failing test that led me down the path to discover all this was module.cpyext.test.test_cpyext's AppTestApi.().test_dllhandle - note it is in cpyext not sys, there are no tests in sys in pypy nor in cpython that use dllhandle. However, for the mean time, I have restored sys.dllhandle as an int. If it seems OK, feel free to merge into default Matti On 25/06/2014 5:33 PM, Armin Rigo wrote: > Hi Matti, > > On 25 June 2014 16:10, Matti Picus wrote: >> Working backwards from no pythonapi -> no PyDLL -> no sys.dllhandle. > Right, but I'm not sure that it's only used by ctypes and nothing > else. If that were the case it would be some private name in the > _ctypes module... > > Also, I'm not sure I understand it correctly, but it seems that on > CPython, sys.dllhandle is just an integer, whereas on PyPy so far it > is some W_CDLL instance. I wouldn't mind fixing it to be like CPython > (then it has nothing to do with cpyext or with _rawffi). > > > A bient?t, > > Armin.