From issues-reply at bitbucket.org Tue Jul 1 00:43:55 2014 From: issues-reply at bitbucket.org (Philip Jenvey) Date: Mon, 30 Jun 2014 22:43:55 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1807: os.readlink unicode behaviour on pypy3 (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1807: os.readlink unicode behaviour on pypy3 https://bitbucket.org/pypy/pypy/issue/1807/osreadlink-unicode-behaviour-on-pypy3 Philip Jenvey: This is the right place =] thanks for the report -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1807/unsubscribe/pypy-issue/07af1bee6348a5d33a2b392406f6bb0be0c4df74/ From issues-reply at bitbucket.org Tue Jul 1 18:17:49 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Tue, 01 Jul 2014 16:17:49 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1780: pip install gevent doesn't work on pypy (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1780: pip install gevent doesn't work on pypy https://bitbucket.org/pypy/pypy/issue/1780/pip-install-gevent-doesnt-work-on-pypy Armin Rigo: Isn't the error simply that Jacky is trying to install the standard gevent instead of the "pypycore" version discussed in https://github.com/surfly/gevent/issues/248 ? -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1780/unsubscribe/pypy-issue/faf96750836e2beb47ba4630687dd4426e58ddbe/ From issues-reply at bitbucket.org Wed Jul 2 11:26:27 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Wed, 02 Jul 2014 09:26:27 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1782: Test case where pypy is more than 4x slower than CPython (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1782: Test case where pypy is more than 4x slower than CPython https://bitbucket.org/pypy/pypy/issue/1782/test-case-where-pypy-is-more-than-4x Armin Rigo: Simplified test case: this runs in 1.1 seconds on CPython, 5.8 seconds on "PyPy --jit off", and seems never to finish on PyPy (out of ram after 2 minutes): def g(n): if n > 0: for x in g(n-1): yield x for x in g(n-1): yield x else: yield 0 list(g(20)) -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1782/unsubscribe/pypy-issue/d9a924638af2cba0353c4eb1357e89eaa4d77aca/ From issues-reply at bitbucket.org Wed Jul 2 12:43:04 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Wed, 02 Jul 2014 10:43:04 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1783: 50x higher memory usage with array.array (compared to CPython) (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1783: 50x higher memory usage with array.array (compared to CPython) https://bitbucket.org/pypy/pypy/issue/1783/50x-higher-memory-usage-with-arrayarray Armin Rigo: Fixed in 93a8f5aeb3bc. Your example runs in 10x less memory, and also 4x faster now. Changes: status: new -> resolved -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1783/unsubscribe/pypy-issue/d08656720ec1e86cc849f75a93f72dee4658d095/ From issues-reply at bitbucket.org Wed Jul 2 15:51:15 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Wed, 02 Jul 2014 13:51:15 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1782: Test case where pypy is more than 4x slower than CPython (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1782: Test case where pypy is more than 4x slower than CPython https://bitbucket.org/pypy/pypy/issue/1782/test-case-where-pypy-is-more-than-4x Armin Rigo: Add some logic in an attempt to fix issue #1782. There are cases where it slows things down; see comments. ? <> Changes: status: new -> resolved -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1782/unsubscribe/pypy-issue/d9a924638af2cba0353c4eb1357e89eaa4d77aca/ From issues-reply at bitbucket.org Wed Jul 2 15:54:28 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Wed, 02 Jul 2014 13:54:28 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1782: Test case where pypy is more than 4x slower than CPython (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1782: Test case where pypy is more than 4x slower than CPython https://bitbucket.org/pypy/pypy/issue/1782/test-case-where-pypy-is-more-than-4x Armin Rigo: Fixed by 640d0a2fedc6. Now the example runs at around the same speed as CPython. -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1782/unsubscribe/pypy-issue/d9a924638af2cba0353c4eb1357e89eaa4d77aca/ From issues-reply at bitbucket.org Wed Jul 2 17:07:37 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Wed, 02 Jul 2014 15:07:37 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1776: Creating instances of a namedtuple is inexplicably very slow (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1776: Creating instances of a namedtuple is inexplicably very slow https://bitbucket.org/pypy/pypy/issue/1776/creating-instances-of-a-namedtuple-is Armin Rigo: It seems that the problem was fixed in PyPy 2.3. Then timeit.py needed an extra tweak to avoid an artificial problem (see bbabcc9974eb). Changes: status: new -> resolved -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1776/unsubscribe/pypy-issue/52c6c1b4c2274e01045426779bf03c318cb5f1cd/ From issues-reply at bitbucket.org Wed Jul 2 17:43:43 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Wed, 02 Jul 2014 15:43:43 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1790: numpy.empty 1800x slower than CPython; numpy.zeros 10x slower (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1790: numpy.empty 1800x slower than CPython; numpy.zeros 10x slower https://bitbucket.org/pypy/pypy/issue/1790/numpyempty-1800x-slower-than-cpython Armin Rigo: Split `numpy.zeros()` and `numpy.empty()` in 4d1d1c2d78ae. Not highly tested, but the micronumpy tests pass, at least. It should reduce the gulf with CPython's `numpy.empty()`. -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1790/unsubscribe/pypy-issue/e66f855a6c025a0abe90c3d7e68af00e422e5f46/ From issues-reply at bitbucket.org Wed Jul 2 17:44:32 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Wed, 02 Jul 2014 15:44:32 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1779: im.point() 4000x slower than CPython (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1779: im.point() 4000x slower than CPython https://bitbucket.org/pypy/pypy/issue/1779/impoint-4000x-slower-than-cpython Armin Rigo: Fixed in 07de89e151e9. Thanks for reporting the issue! Changes: status: new -> resolved -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1779/unsubscribe/pypy-issue/a7ad7e8a106f3b0c5db643dd1e10ebb15caebcec/ From issues-reply at bitbucket.org Wed Jul 2 17:56:19 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Wed, 02 Jul 2014 15:56:19 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1792: SymPy (a pure Python library) runs multiple times slower than in CPython (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1792: SymPy (a pure Python library) runs multiple times slower than in CPython https://bitbucket.org/pypy/pypy/issue/1792/sympy-a-pure-python-library-runs-multiple Armin Rigo: sympy is pure Python, but it is a well-known hard program to optimize for PyPy, because it contains code that is extremely tracing-JIT-unfriendly. Nevertheless, the official PyPy 2.3 gets me these results: time pypy x.py real 0m10.964s time python2 x.py real 0m11.086s As Ben mentioned, the real problem is the warm-up time, which is extremely large in sympy. If I add a "while" loop in your example, repeating the whole program, then the time above is only the first iteration; the second one runs in 3.5 seconds and after about 10 iterations it takes 2.2 seconds. So this can be classified as an issue of the warm-up time. -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1792/unsubscribe/pypy-issue/d8d4477e9c650fb1a6d4877f8bbfd750a0122684/ From issues-reply at bitbucket.org Wed Jul 2 18:03:14 2014 From: issues-reply at bitbucket.org (Crusader Ky) Date: Wed, 02 Jul 2014 16:03:14 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1790: numpy.empty 1800x slower than CPython; numpy.zeros 10x slower (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1790: numpy.empty 1800x slower than CPython; numpy.zeros 10x slower https://bitbucket.org/pypy/pypy/issue/1790/numpyempty-1800x-slower-than-cpython Crusader Ky: I think that with your new unit test + raise AssertionError( + "empty() returned a zeroed out array of length 1000 (unlikely)" you're venturing in a minefield of importability and casuality. If I remember correctly, on most modern OSs malloc() _normally_ returns garbage; however if the memory page used to belong to a different process, the kernel zeros it out before returning it for obvious security reasons. -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1790/unsubscribe/pypy-issue/e66f855a6c025a0abe90c3d7e68af00e422e5f46/ From issues-reply at bitbucket.org Wed Jul 2 18:59:22 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Wed, 02 Jul 2014 16:59:22 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1771: 3x slower than CPython on alphabet soup challenge script (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1771: 3x slower than CPython on alphabet soup challenge script https://bitbucket.org/pypy/pypy/issue/1771/3x-slower-than-cpython-on-alphabet-soup Armin Rigo: This is 3.3x slower on PyPy than on CPython: import time prebuilt = set([str(n) for n in range(10**7)]) t1 = time.time() for i in range(5): foo = set(['Foo']) foo |= prebuilt print time.time() - t1 This is 6.4x slower: import time prebuilt = {} for i in range(10**7): prebuilt[str(i)] = -12.34 t1 = time.time() for i in range(5): foo = {'Foo': 213.1} foo.update(prebuilt) print time.time() - t1 -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1771/unsubscribe/pypy-issue/79a5d3959472405a05d001fb420d9d19d02cc908/ From issues-reply at bitbucket.org Wed Jul 2 18:59:39 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Wed, 02 Jul 2014 16:59:39 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1771: 3x slower than CPython on alphabet soup challenge script (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1771: 3x slower than CPython on alphabet soup challenge script https://bitbucket.org/pypy/pypy/issue/1771/3x-slower-than-cpython-on-alphabet-soup Armin Rigo: Changes: responsible: nothing -> arigo -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1771/unsubscribe/pypy-issue/79a5d3959472405a05d001fb420d9d19d02cc908/ From issues-reply at bitbucket.org Wed Jul 2 19:19:28 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Wed, 02 Jul 2014 17:19:28 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1790: numpy.empty 1800x slower than CPython; numpy.zeros 10x slower (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1790: numpy.empty 1800x slower than CPython; numpy.zeros 10x slower https://bitbucket.org/pypy/pypy/issue/1790/numpyempty-1800x-slower-than-cpython Armin Rigo: This test will be disabled if it fails. Remember that we're not in C, but in a mess of Python code in these tests. It's very unlikely that we'll get fresh memory from the OS just there. -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1790/unsubscribe/pypy-issue/e66f855a6c025a0abe90c3d7e68af00e422e5f46/ From issues-reply at bitbucket.org Thu Jul 3 07:37:23 2014 From: issues-reply at bitbucket.org (hugovk) Date: Thu, 03 Jul 2014 05:37:23 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1779: im.point() 4000x slower than CPython (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1779: im.point() 4000x slower than CPython https://bitbucket.org/pypy/pypy/issue/1779/impoint-4000x-slower-than-cpython hugovk: Great, thanks for fixing it! -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1779/unsubscribe/pypy-issue/a7ad7e8a106f3b0c5db643dd1e10ebb15caebcec/ From issues-reply at bitbucket.org Thu Jul 3 08:24:14 2014 From: issues-reply at bitbucket.org (Alex Gaynor) Date: Thu, 03 Jul 2014 06:24:14 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1796: pypy & pypy3 in the same path (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1796: pypy & pypy3 in the same path https://bitbucket.org/pypy/pypy/issue/1796/pypy-pypy3-in-the-same-path Alex Gaynor: I think we should always use `pypy3` as the binary name. -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1796/unsubscribe/pypy-issue/7e9eac08570883b1cf98a8a6fc7ce526765fcba2/ From issues-reply at bitbucket.org Thu Jul 3 20:48:27 2014 From: issues-reply at bitbucket.org (Konstantin Lopuhin) Date: Thu, 03 Jul 2014 18:48:27 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1783: 50x higher memory usage with array.array (compared to CPython) (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1783: 50x higher memory usage with array.array (compared to CPython) https://bitbucket.org/pypy/pypy/issue/1783/50x-higher-memory-usage-with-arrayarray Konstantin Lopuhin: This now even better than CPython! I found it while preparing a talk about memory usage in Python, but for our in-memory OLAP database this change saves around 20% in memory usage and the same in startup speed. Thank you very much! -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1783/unsubscribe/pypy-issue/d08656720ec1e86cc849f75a93f72dee4658d095/ From issues-reply at bitbucket.org Thu Jul 3 23:31:24 2014 From: issues-reply at bitbucket.org (Alex Gaynor) Date: Thu, 03 Jul 2014 21:31:24 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1808: Trying to pip install mercurial fails (pypy/pypy) Message-ID: --- you can reply above this line --- New issue 1808: Trying to pip install mercurial fails https://bitbucket.org/pypy/pypy/issue/1808/trying-to-pip-install-mercurial-fails Alex Gaynor: Using pypy 2.3.1: ``` $ mktmpenv -p pypy Running virtualenv with interpreter /Users/alex_gaynor/.pyenv/versions/pypy-2.3.1/bin/pypy New pypy executable in /Users/alex_gaynor/.virtualenvs/tempenv-436158441eee/bin/pypy Installing setuptools, pip...done. [14:30:22] (tempenv-436158441eee) ~ $ pip install mercurial Downloading/unpacking mercurial Using download cache from /Users/alex_gaynor/.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FM%2FMercurial%2Fmercurial-3.0.1.tar.gz Running setup.py (path:/Users/alex_gaynor/.virtualenvs/tempenv-436158441eee/build/mercurial/setup.py) egg_info for package mercurial Traceback (most recent call last): File "app_main.py", line 75, in run_toplevel File "app_main.py", line 581, in run_it File "", line 17, in File "/Users/alex_gaynor/.virtualenvs/tempenv-436158441eee/build/mercurial/setup.py", line 537, in if re.search(r'-mno-fused-madd\b', cflags) is not None: File "/Users/alex_gaynor/.virtualenvs/tempenv-436158441eee/lib-python/2.7/re.py", line 142, in search return _compile(pattern, flags).search(string) TypeError: expected a readable buffer object Complete output from command python setup.py egg_info: Traceback (most recent call last): File "app_main.py", line 75, in run_toplevel File "app_main.py", line 581, in run_it File "", line 17, in File "/Users/alex_gaynor/.virtualenvs/tempenv-436158441eee/build/mercurial/setup.py", line 537, in if re.search(r'-mno-fused-madd\b', cflags) is not None: File "/Users/alex_gaynor/.virtualenvs/tempenv-436158441eee/lib-python/2.7/re.py", line 142, in search return _compile(pattern, flags).search(string) TypeError: expected a readable buffer object ---------------------------------------- Cleaning up... Command python setup.py egg_info failed with error code 1 in /Users/alex_gaynor/.virtualenvs/tempenv-436158441eee/build/mercurial Storing debug log for failure in /Users/alex_gaynor/.pip/pip.log ``` -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1808/unsubscribe/pypy-issue/fd6d07195d60828e5f5bfedd2237379f3f94fcc3/ From issues-reply at bitbucket.org Thu Jul 3 23:31:24 2014 From: issues-reply at bitbucket.org (Alex Gaynor) Date: Thu, 03 Jul 2014 21:31:24 -0000 Subject: [pypy-issue] Issue #1808: Trying to pip install mercurial fails (pypy/pypy) Message-ID: <20140703213124.18163.99797@app06.ash-private.bitbucket.org> New issue 1808: Trying to pip install mercurial fails https://bitbucket.org/pypy/pypy/issue/1808/trying-to-pip-install-mercurial-fails Alex Gaynor: Using pypy 2.3.1: ``` $ mktmpenv -p pypy Running virtualenv with interpreter /Users/alex_gaynor/.pyenv/versions/pypy-2.3.1/bin/pypy New pypy executable in /Users/alex_gaynor/.virtualenvs/tempenv-436158441eee/bin/pypy Installing setuptools, pip...done. [14:30:22] (tempenv-436158441eee) ~ $ pip install mercurial Downloading/unpacking mercurial Using download cache from /Users/alex_gaynor/.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FM%2FMercurial%2Fmercurial-3.0.1.tar.gz Running setup.py (path:/Users/alex_gaynor/.virtualenvs/tempenv-436158441eee/build/mercurial/setup.py) egg_info for package mercurial Traceback (most recent call last): File "app_main.py", line 75, in run_toplevel File "app_main.py", line 581, in run_it File "", line 17, in File "/Users/alex_gaynor/.virtualenvs/tempenv-436158441eee/build/mercurial/setup.py", line 537, in if re.search(r'-mno-fused-madd\b', cflags) is not None: File "/Users/alex_gaynor/.virtualenvs/tempenv-436158441eee/lib-python/2.7/re.py", line 142, in search return _compile(pattern, flags).search(string) TypeError: expected a readable buffer object Complete output from command python setup.py egg_info: Traceback (most recent call last): File "app_main.py", line 75, in run_toplevel File "app_main.py", line 581, in run_it File "", line 17, in File "/Users/alex_gaynor/.virtualenvs/tempenv-436158441eee/build/mercurial/setup.py", line 537, in if re.search(r'-mno-fused-madd\b', cflags) is not None: File "/Users/alex_gaynor/.virtualenvs/tempenv-436158441eee/lib-python/2.7/re.py", line 142, in search return _compile(pattern, flags).search(string) TypeError: expected a readable buffer object ---------------------------------------- Cleaning up... Command python setup.py egg_info failed with error code 1 in /Users/alex_gaynor/.virtualenvs/tempenv-436158441eee/build/mercurial Storing debug log for failure in /Users/alex_gaynor/.pip/pip.log ``` From issues-reply at bitbucket.org Thu Jul 3 23:37:35 2014 From: issues-reply at bitbucket.org (Alex Gaynor) Date: Thu, 03 Jul 2014 21:37:35 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1808: Trying to pip install mercurial fails (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1808: Trying to pip install mercurial fails https://bitbucket.org/pypy/pypy/issue/1808/trying-to-pip-install-mercurial-fails Alex Gaynor: The problem is: ``` $ python ? 32.4s Python 2.7.6 (32f35069a16d, Jun 06 2014, 20:12:47) [PyPy 2.3.1 with GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>> from distutils.sysconfig import get_config_var >>>> get_config_var("CFLAGS") >>>> ``` compare with: ``` $ /usr//bin/python ? 3.61s Python 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from distutils.sysconfig import get_config_var >>> get_config_var("CFLAGS") '-fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE' >>> ``` -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1808/unsubscribe/pypy-issue/fd6d07195d60828e5f5bfedd2237379f3f94fcc3/ From issues-reply at bitbucket.org Thu Jul 3 23:40:54 2014 From: issues-reply at bitbucket.org (Alex Gaynor) Date: Thu, 03 Jul 2014 21:40:54 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1808: Trying to pip install mercurial fails (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1808: Trying to pip install mercurial fails https://bitbucket.org/pypy/pypy/issue/1808/trying-to-pip-install-mercurial-fails Alex Gaynor: Talking with @dstufft, I think this a bug in mercurial, will file it there. Changes: status: new -> invalid -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1808/unsubscribe/pypy-issue/fd6d07195d60828e5f5bfedd2237379f3f94fcc3/ From issues-reply at bitbucket.org Fri Jul 4 11:34:06 2014 From: issues-reply at bitbucket.org (Yichao Yu) Date: Fri, 04 Jul 2014 09:34:06 -0000 Subject: [pypy-issue] Issue #1809: `type(''.find) == type(str.find)` on pypy (pypy/pypy) Message-ID: <20140704093406.20002.15626@app04.ash-private.bitbucket.org> New issue 1809: `type(''.find) == type(str.find)` on pypy https://bitbucket.org/pypy/pypy/issue/1809/type-find-type-strfind-on-pypy Yichao Yu: The expression `type(''.find) == type(str.find)` returns `False` on CPython 2 and 3 and pypy3 but returns True on pypy(2) since both of them are `method`s. This breaks [certain functions](https://github.com/ipython/ipython/pull/5229) on IPython (see the [`isinstance(..., type(str.find))`](https://github.com/ipython/ipython/pull/5229/files#diff-eb94d53c1e543e3e738a804be75f5e4cR69)) Is this possible to fix in PyPy (at least it seems fine (although having different names) in the #py3k branch) or is there another way to distinguish between bound and unbound method in pypy? From issues-reply at bitbucket.org Fri Jul 4 11:34:06 2014 From: issues-reply at bitbucket.org (Yichao Yu) Date: Fri, 04 Jul 2014 09:34:06 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1809: `type(''.find) == type(str.find)` on pypy (pypy/pypy) Message-ID: --- you can reply above this line --- New issue 1809: `type(''.find) == type(str.find)` on pypy https://bitbucket.org/pypy/pypy/issue/1809/type-find-type-strfind-on-pypy Yichao Yu: The expression `type(''.find) == type(str.find)` returns `False` on CPython 2 and 3 and pypy3 but returns True on pypy(2) since both of them are `method`s. This breaks [certain functions](https://github.com/ipython/ipython/pull/5229) on IPython (see the [`isinstance(..., type(str.find))`](https://github.com/ipython/ipython/pull/5229/files#diff-eb94d53c1e543e3e738a804be75f5e4cR69)) Is this possible to fix in PyPy (at least it seems fine (although having different names) in the #py3k branch) or is there another way to distinguish between bound and unbound method in pypy? -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1809/unsubscribe/pypy-issue/6e76247274a3807c79a06038960a37232129c3c2/ From issues-reply at bitbucket.org Fri Jul 4 12:10:53 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Fri, 04 Jul 2014 10:10:53 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1809: `type(''.find) == type(str.find)` on pypy (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1809: `type(''.find) == type(str.find)` on pypy https://bitbucket.org/pypy/pypy/issue/1809/type-find-type-strfind-on-pypy Armin Rigo: This is documented here: http://pypy.readthedocs.org/en/latest/cpython_differences.html (search for `method-wrapper`). The problem is that built-in types behave more like user-defined types. `A.meth` and `A().meth` both return an object of type `MethodType`. This likely needs to be fixed in IPython. As usual in CPython, given a method object you can find if it's bound or unbound by checking if `methodobj.im_self` is None or not. Changes: status: new -> invalid -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1809/unsubscribe/pypy-issue/6e76247274a3807c79a06038960a37232129c3c2/ From issues-reply at bitbucket.org Fri Jul 4 12:44:20 2014 From: issues-reply at bitbucket.org (Yichao Yu) Date: Fri, 04 Jul 2014 10:44:20 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1809: `type(''.find) == type(str.find)` on pypy (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1809: `type(''.find) == type(str.find)` on pypy https://bitbucket.org/pypy/pypy/issue/1809/type-find-type-strfind-on-pypy Yichao Yu: I've seen the document but I am asking because `list.__add__` and `str.find` are of different types on CPython. You are right that I missed the case for user defined classes which actually means the type check in IPython is wrong and useless. (probably only not for a class defined in c extension? unlikely anyway....) Will file a issue there. Will still be interesting, though not really needed in this case, to see if it is possible to check if a object is a bound/unbound method. -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1809/unsubscribe/pypy-issue/6e76247274a3807c79a06038960a37232129c3c2/ From issues-reply at bitbucket.org Fri Jul 4 13:04:29 2014 From: issues-reply at bitbucket.org (Yichao Yu) Date: Fri, 04 Jul 2014 11:04:29 -0000 Subject: [pypy-issue] Issue #1810: PyPy3: `os.strerror` uses wrong encoding with non-US locale (pypy/pypy) Message-ID: <20140704110429.23586.10921@app09.ash-private.bitbucket.org> New issue 1810: PyPy3: `os.strerror` uses wrong encoding with non-US locale https://bitbucket.org/pypy/pypy/issue/1810/pypy3-osstrerror-uses-wrong-encoding-with Yichao Yu: First of all, it seems that pypy3 calls `setlocale()` on initialization. (which is not a big issue but is different from all other versions.) Moreover, the `os.strerror` method returns wrong unicode string for non-ascii error message. With the following script and `zh_CN.utf8` locale ```python import os from cffi import FFI ffi = FFI() ffi.cdef(''' void _setlocale(); char *strerror(int); ''') lib = ffi.verify(''' #include #include void _setlocale() { setlocale(LC_ALL, \"\"); } ''', extra_compile_args=['-w']) err = os.strerror(21) print(err) if not isinstance(err, bytes): print(err.encode('utf8')) print(ffi.string(lib.strerror(21)).decode('utf8')) lib._setlocale() err = os.strerror(21) print(err) if not isinstance(err, bytes): print(err.encode('utf8')) print(ffi.string(lib.strerror(21)).decode('utf8')) ``` The output on pypy(2) and cpython2 is, ``` Is a directory Is a directory ????? ????? ``` On cpython3, ``` Is a directory b'Is a directory' Is a directory ????? b'\xe6\x98\xaf\xe4\xb8\x80\xe4\xb8\xaa\xe7\x9b\xae\xe5\xbd\x95' ????? ``` On pypy3 ``` ??????????????? b'\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd' ????? ??????????????? b'\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd' ????? ``` I've also checked the validity of the libc translation files ``` $ TEXTDOMAIN=libc gettext 'Is a directory' ????? ``` From issues-reply at bitbucket.org Fri Jul 4 13:04:29 2014 From: issues-reply at bitbucket.org (Yichao Yu) Date: Fri, 04 Jul 2014 11:04:29 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1810: PyPy3: `os.strerror` uses wrong encoding with non-US locale (pypy/pypy) Message-ID: --- you can reply above this line --- New issue 1810: PyPy3: `os.strerror` uses wrong encoding with non-US locale https://bitbucket.org/pypy/pypy/issue/1810/pypy3-osstrerror-uses-wrong-encoding-with Yichao Yu: First of all, it seems that pypy3 calls `setlocale()` on initialization. (which is not a big issue but is different from all other versions.) Moreover, the `os.strerror` method returns wrong unicode string for non-ascii error message. With the following script and `zh_CN.utf8` locale ```python import os from cffi import FFI ffi = FFI() ffi.cdef(''' void _setlocale(); char *strerror(int); ''') lib = ffi.verify(''' #include #include void _setlocale() { setlocale(LC_ALL, \"\"); } ''', extra_compile_args=['-w']) err = os.strerror(21) print(err) if not isinstance(err, bytes): print(err.encode('utf8')) print(ffi.string(lib.strerror(21)).decode('utf8')) lib._setlocale() err = os.strerror(21) print(err) if not isinstance(err, bytes): print(err.encode('utf8')) print(ffi.string(lib.strerror(21)).decode('utf8')) ``` The output on pypy(2) and cpython2 is, ``` Is a directory Is a directory ????? ????? ``` On cpython3, ``` Is a directory b'Is a directory' Is a directory ????? b'\xe6\x98\xaf\xe4\xb8\x80\xe4\xb8\xaa\xe7\x9b\xae\xe5\xbd\x95' ????? ``` On pypy3 ``` ??????????????? b'\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd' ????? ??????????????? b'\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd' ????? ``` I've also checked the validity of the libc translation files ``` $ TEXTDOMAIN=libc gettext 'Is a directory' ????? ``` -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1810/unsubscribe/pypy-issue/76bef29a85888947807dbe0996c31daf132a854d/ From issues-reply at bitbucket.org Fri Jul 4 13:05:11 2014 From: issues-reply at bitbucket.org (Yichao Yu) Date: Fri, 04 Jul 2014 11:05:11 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1810: PyPy3: `os.strerror` uses wrong encoding with non-US locale (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1810: PyPy3: `os.strerror` uses wrong encoding with non-US locale https://bitbucket.org/pypy/pypy/issue/1810/pypy3-osstrerror-uses-wrong-encoding-with Yichao Yu: I can create a separate issue if setting locale on start up should be fixed... -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1810/unsubscribe/pypy-issue/76bef29a85888947807dbe0996c31daf132a854d/ From issues-reply at bitbucket.org Sun Jul 6 14:21:09 2014 From: issues-reply at bitbucket.org (Rui Carmo) Date: Sun, 06 Jul 2014 12:21:09 -0000 Subject: [pypy-issue] Issue #1811: finditer() stalls PyPy 2.3.1 (pypy/pypy) Message-ID: <20140706122109.14409.58374@app12.ash-private.bitbucket.org> New issue 1811: finditer() stalls PyPy 2.3.1 https://bitbucket.org/pypy/pypy/issue/1811/finditer-stalls-pypy-231 Rui Carmo: I've come across a significant performance hit when using PyPy 2.3.1 with Bottle ([commit](https://github.com/defnull/bottle/blob/bc312ae49d9f7f389c06db53898e5a5f7b63c93c/bottle.py#L3429)) on Linux x86_64. In the method below ([ref](https://github.com/defnull/bottle/blob/bc312ae49d9f7f389c06db53898e5a5f7b63c93c/bottle.py#L3429)), PyPy stalls when instantiating the generator for a good three seconds according to the timestamps of the log messages I inserted, whereas stock CPython just breezes through this. ```python def flush_text(self): text = ''.join(self.text_buffer) del self.text_buffer[:] if not text: return parts, pos, nl = [], 0, '\\\n'+' '*self.indent log.debug("begin stall") for m in self.re_inl.finditer(text): log.debug("end stall") prefix, pos = text[pos:m.start()], m.end() if prefix: parts.append(nl.join(map(repr, prefix.splitlines(True)))) ``` I suspect this is partly due to the complexity of the regexp, but it shouldn't happen. I've filed [an issue there](https://github.com/defnull/bottle/issues/638) with a `pstats` profile. From issues-reply at bitbucket.org Sun Jul 6 14:21:08 2014 From: issues-reply at bitbucket.org (Rui Carmo) Date: Sun, 06 Jul 2014 12:21:08 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1811: finditer() stalls PyPy 2.3.1 (pypy/pypy) Message-ID: --- you can reply above this line --- New issue 1811: finditer() stalls PyPy 2.3.1 https://bitbucket.org/pypy/pypy/issue/1811/finditer-stalls-pypy-231 Rui Carmo: I've come across a significant performance hit when using PyPy 2.3.1 with Bottle ([commit](https://github.com/defnull/bottle/blob/bc312ae49d9f7f389c06db53898e5a5f7b63c93c/bottle.py#L3429)) on Linux x86_64. In the method below ([ref](https://github.com/defnull/bottle/blob/bc312ae49d9f7f389c06db53898e5a5f7b63c93c/bottle.py#L3429)), PyPy stalls when instantiating the generator for a good three seconds according to the timestamps of the log messages I inserted, whereas stock CPython just breezes through this. ```python def flush_text(self): text = ''.join(self.text_buffer) del self.text_buffer[:] if not text: return parts, pos, nl = [], 0, '\\\n'+' '*self.indent log.debug("begin stall") for m in self.re_inl.finditer(text): log.debug("end stall") prefix, pos = text[pos:m.start()], m.end() if prefix: parts.append(nl.join(map(repr, prefix.splitlines(True)))) ``` I suspect this is partly due to the complexity of the regexp, but it shouldn't happen. I've filed [an issue there](https://github.com/defnull/bottle/issues/638) with a `pstats` profile. -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1811/unsubscribe/pypy-issue/156d88f10f59cee0cf44252c100405a5a3e208a3/ From issues-reply at bitbucket.org Sun Jul 6 15:07:31 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Sun, 06 Jul 2014 13:07:31 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1811: finditer() stalls PyPy 2.3.1 (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1811: finditer() stalls PyPy 2.3.1 https://bitbucket.org/pypy/pypy/issue/1811/finditer-stalls-pypy-231 Armin Rigo: Can you write down explicitly an example of regexp that ends up as `self.re_inl`? -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1811/unsubscribe/pypy-issue/156d88f10f59cee0cf44252c100405a5a3e208a3/ From issues-reply at bitbucket.org Sun Jul 6 15:42:52 2014 From: issues-reply at bitbucket.org (Ronan Lamy) Date: Sun, 06 Jul 2014 13:42:52 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1707: speed regression on simple numpy loop (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1707: speed regression on simple numpy loop https://bitbucket.org/pypy/pypy/issue/1707/speed-regression-on-simple-numpy-loop Ronan Lamy: *Now*, it's resolved. Changes: status: open -> resolved -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1707/unsubscribe/pypy-issue/3e91cb461af59221f66f29f16adeeaff2f101a05/ From issues-reply at bitbucket.org Sun Jul 6 16:18:43 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Sun, 06 Jul 2014 14:18:43 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1812: numpy: two pull requests (pypy/pypy) Message-ID: --- you can reply above this line --- New issue 1812: numpy: two pull requests https://bitbucket.org/pypy/pypy/issue/1812/numpy-two-pull-requests Armin Rigo: Please have a look at pull request #242 and pull request #244. -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1812/unsubscribe/pypy-issue/9c523d9097f5a2b9d3d99c2fc069ac29ee4d7a7e/ From issues-reply at bitbucket.org Sun Jul 6 16:18:43 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Sun, 06 Jul 2014 14:18:43 -0000 Subject: [pypy-issue] Issue #1812: numpy: two pull requests (pypy/pypy) Message-ID: <20140706141843.24731.600@app05.ash-private.bitbucket.org> New issue 1812: numpy: two pull requests https://bitbucket.org/pypy/pypy/issue/1812/numpy-two-pull-requests Armin Rigo: Please have a look at pull request #242 and pull request #244. From issues-reply at bitbucket.org Sun Jul 6 16:54:18 2014 From: issues-reply at bitbucket.org (Rui Carmo) Date: Sun, 06 Jul 2014 14:54:18 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1811: finditer() stalls PyPy 2.3.1 (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1811: finditer() stalls PyPy 2.3.1 https://bitbucket.org/pypy/pypy/issue/1811/finditer-stalls-pypy-231 Rui Carmo: Oh, yes, sure. At that point, printing `self.re_inl.pattern` gives me this: ``` \{\{((?:((?m)[urbURB]?(?:''(?!')|""(?!")|'{6}|"{6}|'(?:[^\\']|\\.)+?'|"(?:[^\\"]|\\.)+?"|'{3}(?:[^\\]|\\.)+?'{3}|"{3}(?:[^\\]|\\.)+?"{3}))|[^'" ]*?)+)\}\} ``` -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1811/unsubscribe/pypy-issue/156d88f10f59cee0cf44252c100405a5a3e208a3/ From issues-reply at bitbucket.org Sun Jul 6 17:13:40 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Sun, 06 Jul 2014 15:13:40 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1811: finditer() stalls PyPy 2.3.1 (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1811: finditer() stalls PyPy 2.3.1 https://bitbucket.org/pypy/pypy/issue/1811/finditer-stalls-pypy-231 Armin Rigo: It takes at worst twice as long as CPython on a big random text in English. I guess the text needs to be not random for the difference to show up. Can you attach (or paste to http://bpaste.net ) an example of text in which PyPy's re takes substantially longer than CPython's? -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1811/unsubscribe/pypy-issue/156d88f10f59cee0cf44252c100405a5a3e208a3/ From issues-reply at bitbucket.org Sun Jul 6 17:19:46 2014 From: issues-reply at bitbucket.org (Rui Carmo) Date: Sun, 06 Jul 2014 15:19:46 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1811: finditer() stalls PyPy 2.3.1 (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1811: finditer() stalls PyPy 2.3.1 https://bitbucket.org/pypy/pypy/issue/1811/finditer-stalls-pypy-231 Rui Carmo: The value of the `text` variable prior to `finditer()` invocation -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1811/unsubscribe/pypy-issue/156d88f10f59cee0cf44252c100405a5a3e208a3/ From issues-reply at bitbucket.org Sun Jul 6 17:35:51 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Sun, 06 Jul 2014 15:35:51 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1811: finditer() stalls PyPy 2.3.1 (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1811: finditer() stalls PyPy 2.3.1 https://bitbucket.org/pypy/pypy/issue/1811/finditer-stalls-pypy-231 Armin Rigo: Ok, I see that it takes forever in PyPy 2.3.0. It also seems that the issue was fixed recently: with a pypy trunk it is very fast (http://buildbot.pypy.org/nightly/trunk/ ). Can you double-check? -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1811/unsubscribe/pypy-issue/156d88f10f59cee0cf44252c100405a5a3e208a3/ From issues-reply at bitbucket.org Sun Jul 6 17:39:32 2014 From: issues-reply at bitbucket.org (Rui Carmo) Date: Sun, 06 Jul 2014 15:39:32 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1811: finditer() stalls PyPy 2.3.1 (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1811: finditer() stalls PyPy 2.3.1 https://bitbucket.org/pypy/pypy/issue/1811/finditer-stalls-pypy-231 Rui Carmo: I'm using `pyenv` to switch between PyPy 2.3.1 and CPython 2.7.7. I'm going to check if there's a fresh tarball or if I need to build the whole thing from scratch... -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1811/unsubscribe/pypy-issue/156d88f10f59cee0cf44252c100405a5a3e208a3/ From issues-reply at bitbucket.org Sun Jul 6 18:27:29 2014 From: issues-reply at bitbucket.org (Armin Rigo) Date: Sun, 06 Jul 2014 16:27:29 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1811: finditer() stalls PyPy 2.3.1 (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1811: finditer() stalls PyPy 2.3.1 https://bitbucket.org/pypy/pypy/issue/1811/finditer-stalls-pypy-231 Armin Rigo: Marked as resolved. It seems that the fix in c4a666833c26 also helps here. Your regexp contains indeed the case: it is of the form `(...|..*?)+`. Strictly speaking, the "+" means "repeat the previous thing as often as possible", and the previous thing can match, repeatedly, zero characters because of the `*?` in the last case... Changes: status: new -> resolved -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1811/unsubscribe/pypy-issue/156d88f10f59cee0cf44252c100405a5a3e208a3/ From issues-reply at bitbucket.org Sun Jul 6 18:32:50 2014 From: issues-reply at bitbucket.org (Rui Carmo) Date: Sun, 06 Jul 2014 16:32:50 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1811: finditer() stalls PyPy 2.3.1 (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1811: finditer() stalls PyPy 2.3.1 https://bitbucket.org/pypy/pypy/issue/1811/finditer-stalls-pypy-231 Rui Carmo: Aaand I'm back. Stalling does seem to be gone in 2.4.0-alpha0 (`pypy-c-jit-72361-85672cabac67-linux64.tar.bz2`) using `re`, but overall, it's not as fast as CPython (I'm seeing on average twice as long times). `regex` seems to be slightly faster (~200ms less), but I need to run a proper profile and average this out over 100(ish) invocations to be sure. -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1811/unsubscribe/pypy-issue/156d88f10f59cee0cf44252c100405a5a3e208a3/ From issues-reply at bitbucket.org Mon Jul 7 23:01:21 2014 From: issues-reply at bitbucket.org (Julian Berman) Date: Mon, 07 Jul 2014 21:01:21 -0000 Subject: [pypy-issue] Issue #1813: importing gdbm after install requires permissions in the install directory (pypy/pypy) Message-ID: <20140707210121.15242.14632@app13.ash-private.bitbucket.org> New issue 1813: importing gdbm after install requires permissions in the install directory https://bitbucket.org/pypy/pypy/issue/1813/importing-gdbm-after-install-requires Julian Berman: The gdbm CFFI module isn't precompiled, so importing it the first time requires potentially root. IIRC something was done about this for other CFFI modules? From issues-reply at bitbucket.org Mon Jul 7 23:01:21 2014 From: issues-reply at bitbucket.org (Julian Berman) Date: Mon, 07 Jul 2014 21:01:21 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1813: importing gdbm after install requires permissions in the install directory (pypy/pypy) Message-ID: --- you can reply above this line --- New issue 1813: importing gdbm after install requires permissions in the install directory https://bitbucket.org/pypy/pypy/issue/1813/importing-gdbm-after-install-requires Julian Berman: The gdbm CFFI module isn't precompiled, so importing it the first time requires potentially root. IIRC something was done about this for other CFFI modules? -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1813/unsubscribe/pypy-issue/b747233edd8e271bdfdf11a48031564589c0e617/ From issues-reply at bitbucket.org Mon Jul 7 23:03:05 2014 From: issues-reply at bitbucket.org (Julian Berman) Date: Mon, 07 Jul 2014 21:03:05 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1814: gdbm.error only sets message, not errno (pypy/pypy) Message-ID: --- you can reply above this line --- New issue 1814: gdbm.error only sets message, not errno https://bitbucket.org/pypy/pypy/issue/1814/gdbmerror-only-sets-message-not-errno Julian Berman: On CPython, gdbm.error gets passed errno and message as the two positional args. PyPy's gdbm only passes message. -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1814/unsubscribe/pypy-issue/b7edf3003693f2a8620692d0fea77b10da12f09c/ From issues-reply at bitbucket.org Mon Jul 7 23:03:06 2014 From: issues-reply at bitbucket.org (Julian Berman) Date: Mon, 07 Jul 2014 21:03:06 -0000 Subject: [pypy-issue] Issue #1814: gdbm.error only sets message, not errno (pypy/pypy) Message-ID: <20140707210306.19889.66139@app08.ash-private.bitbucket.org> New issue 1814: gdbm.error only sets message, not errno https://bitbucket.org/pypy/pypy/issue/1814/gdbmerror-only-sets-message-not-errno Julian Berman: On CPython, gdbm.error gets passed errno and message as the two positional args. PyPy's gdbm only passes message. From issues-reply at bitbucket.org Mon Jul 7 23:04:12 2014 From: issues-reply at bitbucket.org (Julian Berman) Date: Mon, 07 Jul 2014 21:04:12 -0000 Subject: [pypy-issue] Issue #1815: gdbm does not implicitly coerce unicode (pypy/pypy) Message-ID: <20140707210412.8956.93024@app12.ash-private.bitbucket.org> New issue 1815: gdbm does not implicitly coerce unicode https://bitbucket.org/pypy/pypy/issue/1815/gdbm-does-not-implicitly-coerce-unicode Julian Berman: On CPython, gdbm coerces Unicode keys to ASCII. PyPy's gdbm only checks for str, and throws a TypeError. From issues-reply at bitbucket.org Mon Jul 7 23:04:12 2014 From: issues-reply at bitbucket.org (Julian Berman) Date: Mon, 07 Jul 2014 21:04:12 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1815: gdbm does not implicitly coerce unicode (pypy/pypy) Message-ID: --- you can reply above this line --- New issue 1815: gdbm does not implicitly coerce unicode https://bitbucket.org/pypy/pypy/issue/1815/gdbm-does-not-implicitly-coerce-unicode Julian Berman: On CPython, gdbm coerces Unicode keys to ASCII. PyPy's gdbm only checks for str, and throws a TypeError. -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1815/unsubscribe/pypy-issue/89d4d32606a4912567669b34d498125110ae7473/ From issues-reply at bitbucket.org Tue Jul 8 04:32:31 2014 From: issues-reply at bitbucket.org (Yichao Yu) Date: Tue, 08 Jul 2014 02:32:31 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1810: PyPy3: `os.strerror` uses wrong encoding with non-US locale (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1810: PyPy3: `os.strerror` uses wrong encoding with non-US locale https://bitbucket.org/pypy/pypy/issue/1810/pypy3-osstrerror-uses-wrong-encoding-with Yichao Yu: Somehow the locale is not initialized to the env setting when running non-translated... -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1810/unsubscribe/pypy-issue/76bef29a85888947807dbe0996c31daf132a854d/ From issues-reply at bitbucket.org Tue Jul 8 05:26:52 2014 From: issues-reply at bitbucket.org (mattip) Date: Tue, 08 Jul 2014 03:26:52 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1772: Complex dtype unhashable. (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1772: Complex dtype unhashable. https://bitbucket.org/pypy/pypy/issue/1772/complex-dtype-unhashable mattip: fixed in changeset f20ac16753b6, thanks Yichaou Yu -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1772/unsubscribe/pypy-issue/ba307e4d398acf786993f9a16d1bb213bb94a03d/ From issues-reply at bitbucket.org Tue Jul 8 05:27:23 2014 From: issues-reply at bitbucket.org (mattip) Date: Tue, 08 Jul 2014 03:27:23 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1772: Complex dtype unhashable. (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1772: Complex dtype unhashable. https://bitbucket.org/pypy/pypy/issue/1772/complex-dtype-unhashable mattip: fixed in changeset f20ac16753b6f, thanks Changes: status: new -> resolved -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1772/unsubscribe/pypy-issue/ba307e4d398acf786993f9a16d1bb213bb94a03d/ From issues-reply at bitbucket.org Tue Jul 8 05:50:32 2014 From: issues-reply at bitbucket.org (Yichao Yu) Date: Tue, 08 Jul 2014 03:50:32 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1807: os.readlink unicode behaviour on pypy3 (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1807: os.readlink unicode behaviour on pypy3 https://bitbucket.org/pypy/pypy/issue/1807/osreadlink-unicode-behaviour-on-pypy3 Yichao Yu: Moreover, `os.readlink` does not return correct non-ascii unicode result. -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1807/unsubscribe/pypy-issue/07af1bee6348a5d33a2b392406f6bb0be0c4df74/ From issues-reply at bitbucket.org Tue Jul 8 05:53:10 2014 From: issues-reply at bitbucket.org (mattip) Date: Tue, 08 Jul 2014 03:53:10 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1812: numpy: two pull requests (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1812: numpy: two pull requests https://bitbucket.org/pypy/pypy/issue/1812/numpy-two-pull-requests mattip: merged, thanks Yichao Yu for the fixes Changes: status: new -> resolved -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1812/unsubscribe/pypy-issue/9c523d9097f5a2b9d3d99c2fc069ac29ee4d7a7e/ From issues-reply at bitbucket.org Tue Jul 8 09:49:03 2014 From: issues-reply at bitbucket.org (Maciej Fijalkowski) Date: Tue, 08 Jul 2014 07:49:03 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1815: gdbm does not implicitly coerce unicode (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1815: gdbm does not implicitly coerce unicode https://bitbucket.org/pypy/pypy/issue/1815/gdbm-does-not-implicitly-coerce-unicode Maciej Fijalkowski: Fixed in c8d30edc0498 Changes: status: new -> resolved -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1815/unsubscribe/pypy-issue/89d4d32606a4912567669b34d498125110ae7473/ From issues-reply at bitbucket.org Tue Jul 8 09:54:28 2014 From: issues-reply at bitbucket.org (Maciej Fijalkowski) Date: Tue, 08 Jul 2014 07:54:28 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1813: importing gdbm after install requires permissions in the install directory (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1813: importing gdbm after install requires permissions in the install directory https://bitbucket.org/pypy/pypy/issue/1813/importing-gdbm-after-install-requires Maciej Fijalkowski: This thing should be fixed in recent PyPy. What's your PyPy version? -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1813/unsubscribe/pypy-issue/b747233edd8e271bdfdf11a48031564589c0e617/ From issues-reply at bitbucket.org Tue Jul 8 09:55:33 2014 From: issues-reply at bitbucket.org (Julian Berman) Date: Tue, 08 Jul 2014 07:55:33 -0000 Subject: [pypy-issue] [Bitbucket] Issue #1813: importing gdbm after install requires permissions in the install directory (pypy/pypy) In-Reply-To: References: Message-ID: --- you can reply above this line --- Issue 1813: importing gdbm after install requires permissions in the install directory https://bitbucket.org/pypy/pypy/issue/1813/importing-gdbm-after-install-requires Julian Berman: 2.3.1 -- Unsubscribe from issue emails for this repository. https://bitbucket.org/pypy/pypy/issue/1813/unsubscribe/pypy-issue/b747233edd8e271bdfdf11a48031564589c0e617/ From issues-reply at bitbucket.org Sun Jul 13 16:19:45 2014 From: issues-reply at bitbucket.org (art iv) Date: Sun, 13 Jul 2014 14:19:45 -0000 Subject: [pypy-issue] Issue #1816: Python Programmer (pypy/pypy) Message-ID: <20140713141945.16971.88963@app11.ash-private.bitbucket.org> New issue 1816: Python Programmer https://bitbucket.org/pypy/pypy/issue/1816/python-programmer art iv: This code runs significantly slower in PyPy than in CPython 2.7 Considering the simplicity it isn't hard to check it. Responsible: arigo From issues-reply at bitbucket.org Mon Jul 14 11:14:42 2014 From: issues-reply at bitbucket.org (Edd Barrett) Date: Mon, 14 Jul 2014 09:14:42 -0000 Subject: [pypy-issue] Issue #1817: RPython should support multiple frame vref types? (pypy/pypy) Message-ID: <20140714091442.6328.22688@app05.ash-private.bitbucket.org> New issue 1817: RPython should support multiple frame vref types? https://bitbucket.org/pypy/pypy/issue/1817/rpython-should-support-multiple-frame-vref Edd Barrett: Hi, In the pypy bridge, I've had ti disable vrefs in at least one of the two interpreters to avoid the following error: ``` [translation:ERROR] UnionError: [translation:ERROR] [translation:ERROR] RPython cannot unify instances with no common base class [translation:ERROR] [translation:ERROR] Offending annotations: [translation:ERROR] SomeInstance(can_be_None=False, classdef=pypy.objspace.std .frame.StdObjSpaceFrame) [translation:ERROR] SomeInstance(can_be_None=False, classdef=hippy.frame.Frame ) [translation:ERROR] [translation:ERROR] [translation:ERROR] Occurred processing the following simple_call: [translation:ERROR] (KeyError getting at the binding!) [translation:ERROR] v1101 = simple_call((function virtual_ref), frame_0) [translation:ERROR] [translation:ERROR] In : [translation:ERROR] Happened at file hippy/interpreter.py line 901 [translation:ERROR] [translation:ERROR] frame.f_backref = self.topframeref [translation:ERROR] ==> self.topframeref = jit.virtual_ref(frame) [translation:ERROR] #self.topframeref = jit.non_virtual_ref(frame) [translation:ERROR] if self.debugger is not None: [translation:ERROR] [translation:ERROR] Known variable annotations: [translation:ERROR] frame_0 = SomeInstance(can_be_None=False, classdef=hippy.fr ame.Frame) [translation:ERROR] [translation:ERROR] Processing block: [translation:ERROR] block at 3 is a [translation:ERROR] in (hippy.interpreter:899)Interpreter.enter [translation:ERROR] containing the following operations: [translation:ERROR] v1102 = getattr(self_139, ('topframeref')) [translation:ERROR] v1103 = setattr(frame_0, ('f_backref'), v1102) [translation:ERROR] v1101 = simple_call((function virtual_ref), frame_0) [translation:ERROR] v1104 = setattr(self_139, ('topframeref'), v1101) [translation:ERROR] v1105 = getattr(self_139, ('debugger')) [translation:ERROR] v1106 = is_(v1105, (None)) [translation:ERROR] v1107 = bool(v1106) [translation:ERROR] --end-- ``` So basically, a hippy frame and a pypy frame cannot be unioned. There are two possible fixes: * Provide some base abstract frame type and force VM implementers to use it. * Allow RPython to support multiple frame types for vrefs. I don't feel qualified to comment further. What do the pypy devs think? From issues-reply at bitbucket.org Tue Jul 15 21:10:43 2014 From: issues-reply at bitbucket.org (larstiq) Date: Tue, 15 Jul 2014 19:10:43 -0000 Subject: [pypy-issue] Issue #1818: xml sax/BytesIO performance regression since 2.2.1 (pypy/pypy) Message-ID: <20140715191043.21528.20050@app02.ash-private.bitbucket.org> New issue 1818: xml sax/BytesIO performance regression since 2.2.1 https://bitbucket.org/pypy/pypy/issue/1818/xml-sax-bytesio-performance-regression larstiq: On irc IvIePhisto mentioned a performance regression. To reproduce I downloaded https://raw.githubusercontent.com/IvIePhisto/ECoXiPy/master/tests/performance/xml_sax.py and ran from timeit import repeat print repeat("from xml_sax import create_testdoc; create_testdoc('title', 'content', 2**4, 'text')", number=100) There are some numbers to tweak; with these settings I got on my linux32 laptop: pypy 2.2.1 [1.6042330265045166, 0.6979169845581055, 0.8283989429473877] pypy 8a9c64ba35dc [27.671435832977295, 32.030592918395996, 36.68885684013367] From issues-reply at bitbucket.org Sun Jul 20 08:16:56 2014 From: issues-reply at bitbucket.org (glyph) Date: Sun, 20 Jul 2014 06:16:56 -0000 Subject: [pypy-issue] Issue #1819: my objects are not aligned for some reason (pypy/pypy) Message-ID: <20140720061656.28840.36107@app14.ash-private.bitbucket.org> New issue 1819: my objects are not aligned for some reason https://bitbucket.org/pypy/pypy/issue/1819/my-objects-are-not-aligned-for-some-reason glyph: I do not even know what is an math, but I wrote some OpenGL code for fun and then I tried to run it with numpypy and it didn't work. This seems like some pretty basic linear algebra to me, but what am I doing wrong? Is it possible to work around this? ``` >>>> from numpy import matrix, linalg >>>> matrix([1, 2, 3]) / linalg.norm(matrix([1, 2, 3])) Traceback (most recent call last): File "", line 1, in File "/Users/glyph/.virtualenvs/pypy/site-packages/numpy/linalg/linalg.py", line 2056, in norm return sqrt(add.reduce((x.conj() * x).real, axis=None)) File "/Users/glyph/.virtualenvs/pypy/site-packages/numpy/matrixlib/defmatrix.py", line 341, in __mul__ return N.dot(self, asmatrix(other)) ValueError: objects are not aligned ``` From issues-reply at bitbucket.org Sun Jul 20 09:06:40 2014 From: issues-reply at bitbucket.org (Yichao Yu) Date: Sun, 20 Jul 2014 07:06:40 -0000 Subject: [pypy-issue] Issue #1820: IPython timeit magic not working anymore. (pypy/pypy) Message-ID: <20140720070640.31101.30437@app13.ash-private.bitbucket.org> New issue 1820: IPython timeit magic not working anymore. https://bitbucket.org/pypy/pypy/issue/1820/ipython-timeit-magic-not-working-anymore Yichao Yu: The following is a copy of the `%timeit` magic in IPython. It works correctly (with limited function of course) on CPython 2 and 3 but the input statement does not work at all on pypy. For testing, run `run_timeit("print(1)")`. On CPython, a lot of "1"'s are printed. On pypy, there's no output at all. PyPy version, latest default 24db6697b691 ArchLinux x86_64, gcc 4.9, `CFLAGS=-O3`, pypy translated with `--shared`, ```python import timeit, ast, sys class TimeitTemplateFiller(ast.NodeTransformer): """Fill in the AST template. for timing execution. This is quite closely tied to the template definition, which is in :meth:`ExecutionMagics.timeit`. """ def __init__(self, ast_setup, ast_stmt): self.ast_setup = ast_setup self.ast_stmt = ast_stmt def visit_FunctionDef(self, node): "Fill in the setup statement" self.generic_visit(node) if node.name == "inner": node.body[:1] = self.ast_setup.body return node def visit_For(self, node): "Fill in the statement to be timed" if getattr(getattr(node.body[0], 'value', None), 'id', None) == 'stmt': node.body = self.ast_stmt.body return node def _format_time(timespan, precision=3): """Formats the timespan in a human readable form""" import math if timespan >= 60.0: # we have more than a minute, format that in a human readable form # Idea from http://snipplr.com/view/5713/ parts = [("d", 60*60*24),("h", 60*60),("min", 60), ("s", 1)] time = [] leftover = timespan for suffix, length in parts: value = int(leftover / length) if value > 0: leftover = leftover % length time.append(u'%s%s' % (str(value), suffix)) if leftover < 1: break return " ".join(time) # Unfortunately the unicode 'micro' symbol can cause problems in # certain terminals. # See bug: https://bugs.launchpad.net/ipython/+bug/348466 # Try to prevent crashes by being more secure than it needs to # E.g. eclipse is able to print a, but has no sys.stdout.encoding set. units = [u"s", u"ms",u'us',"ns"] # the save value if hasattr(sys.stdout, 'encoding') and sys.stdout.encoding: try: u'\xb5'.encode(sys.stdout.encoding) units = [u"s", u"ms",u'\xb5s',"ns"] except: pass scaling = [1, 1e3, 1e6, 1e9] if timespan > 0.0: order = min(-int(math.floor(math.log10(timespan)) // 3), 3) else: order = 3 return u"%.*g %s" % (precision, timespan * scaling[order], units[order]) def run_timeit(stmt): timefunc = timeit.default_timer number = 0 repeat = timeit.default_repeat precision = 3 timer = timeit.Timer(timer=timefunc) # this code has tight coupling to the inner workings of timeit.Timer, # but is there a better way to achieve that the code stmt has access # to the shell namespace? # called as line magic ast_setup = ast.parse("pass") ast_stmt = ast.parse(stmt) # This codestring is taken from timeit.template - we fill it in as an # AST, so that we can apply our AST transformations to the user code # without affecting the timing code. timeit_ast_template = ast.parse('def inner(_it, _timer):\n' ' setup\n' ' _t0 = _timer()\n' ' for _i in _it:\n' ' stmt\n' ' _t1 = _timer()\n' ' return _t1 - _t0\n') timeit_ast = TimeitTemplateFiller(ast_setup, ast_stmt).visit(timeit_ast_template) timeit_ast = ast.fix_missing_locations(timeit_ast) code = compile(timeit_ast, "", "exec") ns = {} exec(code, {}, ns) timer.inner = ns["inner"] if number == 0: # determine number so that 0.2 <= total time < 2.0 number = 1 for _ in range(1, 10): if timer.timeit(number) >= 0.2: break number *= 10 all_runs = timer.repeat(repeat, number) best = min(all_runs) / number print(u"%d loops, best of %d: %s per loop" % (number, repeat, _format_time(best, precision))) ``` From issues-reply at bitbucket.org Tue Jul 22 13:54:31 2014 From: issues-reply at bitbucket.org (Andreas Sommer) Date: Tue, 22 Jul 2014 11:54:31 -0000 Subject: [pypy-issue] Issue #1821: Regular expression doesn't find Unicode character (but works in CPython) (pypy/pypy) Message-ID: <20140722115431.21564.10401@app01.ash-private.bitbucket.org> New issue 1821: Regular expression doesn't find Unicode character (but works in CPython) https://bitbucket.org/pypy/pypy/issue/1821/regular-expression-doesnt-find-unicode Andreas Sommer: Found this different behavior between pypy3 2.3.1 and CPython 3.3.0: ``` #!python Python 3.2.5 (986752d005bb, Jun 19 2014, 21:38:38) [PyPy 2.3.1 with MSC v.1500 32 bit] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>> import re >>>> re.compile(r'^[\u4e2d\u6587]*$').match('\u4e2d\u6587') >>>> Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> re.compile(r'^[\u4e2d\u6587]*$').match('\u4e2d\u6587') <_sre.SRE_Match object at 0x028B7988> >>> ``` From issues-reply at bitbucket.org Tue Jul 22 16:41:54 2014 From: issues-reply at bitbucket.org (Remi Meier) Date: Tue, 22 Jul 2014 14:41:54 -0000 Subject: [pypy-issue] Issue #1822: JIT compiles tons of bridges (pypy/pypy) Message-ID: <20140722144154.540.3514@app05.ash-private.bitbucket.org> New issue 1822: JIT compiles tons of bridges https://bitbucket.org/pypy/pypy/issue/1822/jit-compiles-tons-of-bridges Remi Meier: code from http://rosettacode.org/wiki/Perlin_noise#Python see attached file Nightly pypy (pypy-c-jit-72476-dbdcc057562b-linux64) is slower with jit than with "--jit off". Also, current STM builds don't have this problem. **Look at number of bridges:** JIT summary of PyPy-STM: ``` 0# [46643b20651b8] {jit-summary 0# Tracing: 29 0.078599 0# Backend: 27 0.019512 0# TOTAL: 0.456509 0# ops: 50153 0# recorded ops: 11775 0# calls: 885 0# guards: 6755 0# opt ops: 2654 0# opt guards: 637 0# forcings: 96 0# abort: trace too long: 2 0# abort: compiling: 0 0# abort: vable escape: 0 0# abort: bad loop: 0 0# abort: force quasi-immut: 0 0# nvirtuals: 4165 0# nvholes: 614 0# nvreused: 2888 0# Total # of loops: 10 0# Total # of bridges: 18 0# Freed # of loops: 0 0# Freed # of bridges: 0 0# [46643b20f1765] jit-summary} ``` JIT summary of pypy nightly: ``` [466341fc5ad18] {jit-summary Tracing: 921 4.593343 Backend: 920 0.672270 TOTAL: 9.669084 ops: 6136322 recorded ops: 1571845 calls: 56491 guards: 196164 opt ops: 397249 opt guards: 57832 forcings: 942 abort: trace too long: 1 abort: compiling: 0 abort: vable escape: 0 abort: bad loop: 0 abort: force quasi-immut: 0 nvirtuals: 1278724 nvholes: 591642 nvreused: 556151 Total # of loops: 19 Total # of bridges: 902 Freed # of loops: 0 Freed # of bridges: 0 [466341fcecc7b] jit-summary} ``` From issues-reply at bitbucket.org Wed Jul 23 18:49:23 2014 From: issues-reply at bitbucket.org (Tapani Kiiskinen) Date: Wed, 23 Jul 2014 16:49:23 -0000 Subject: [pypy-issue] Issue #1823: curses module noutrefresh call fails when called on a pad object in pypy 2.3.1 (pypy/pypy) Message-ID: <20140723164923.22203.45039@app01.ash-private.bitbucket.org> New issue 1823: curses module noutrefresh call fails when called on a pad object in pypy 2.3.1 https://bitbucket.org/pypy/pypy/issue/1823/curses-module-noutrefresh-call-fails-when Tapani Kiiskinen: I'm doing a noutrefresh call on a pad which i've instanciated with curses.newpad: pad.noutrefresh(0, 0, y, x, y + rows - 1, x + cols - 1) which fails with error: File "/home/tappi/programs/pypy-2.3.1-linux64/lib_pypy/_curses.py", line 840, in noutrefresh return _check_ERR(lib.wnoutrefresh(self._win, *args), TypeError: 'int(*)(WINDOW *)' expects 1 arguments, got 7 I checked the _curses.py file and lib._m_ispad(self.win) returns false which results in wnoutrefresh being called instead of pnoutrefresh, where pnoutrefresh would be the right one to call when using pads. The definition of _m_ispad depends on the existence of WINDOW_HAS_FLAGS definition: int _m_ispad(WINDOW *win) { #if defined WINDOW_HAS_FLAGS return (win->_flags & _ISPAD); #else return 0; #endif } If I hack this piece of code to not check for WINDOW_HAS_FLAGS my code works. Supposedly that variable should be defined somewhere but it's not being defined. Context: the same code works with cpython. I'm running an ubuntu 13.10 PyPy version: Python 2.7.6 (32f35069a16d, Jun 06 2014, 11:20:40) [PyPy 2.3.1 with GCC 4.6.3] on linux2 From issues-reply at bitbucket.org Sat Jul 26 11:05:25 2014 From: issues-reply at bitbucket.org (Martin Matusiak) Date: Sat, 26 Jul 2014 09:05:25 -0000 Subject: [pypy-issue] Issue #1824: test_csv failing with exception message comparison (pypy/pypy) Message-ID: <20140726090525.20716.27976@app01.ash-private.bitbucket.org> New issue 1824: test_csv failing with exception message comparison https://bitbucket.org/pypy/pypy/issue/1824/test_csv-failing-with-exception-message Martin Matusiak: See http://bugs.python.org/issue22076 The csv module has an exception message with bad grammar: - delimiter" must be an 1-character string "an" should be "a" Needs to be fixed in pypy 3.3 branch for now. From issues-reply at bitbucket.org Sat Jul 26 11:09:20 2014 From: issues-reply at bitbucket.org (Ian Foote) Date: Sat, 26 Jul 2014 09:09:20 -0000 Subject: [pypy-issue] Issue #1825: function has no __qualname__ (pypy/pypy) Message-ID: <20140726090920.30313.42203@app13.ash-private.bitbucket.org> New issue 1825: function has no __qualname__ https://bitbucket.org/pypy/pypy/issue/1825/function-has-no-__qualname__ Ian Foote: Python 3.3 added the `__qualname__` attribute to functions and classes. (http://legacy.python.org/dev/peps/pep-3155/) From issues-reply at bitbucket.org Sat Jul 26 14:39:59 2014 From: issues-reply at bitbucket.org (Anselm Kruis) Date: Sat, 26 Jul 2014 12:39:59 -0000 Subject: [pypy-issue] Issue #1826: The stackless implementation of PyPy is incomplete (pypy/pypy) Message-ID: <20140726123959.24204.77279@app05.ash-private.bitbucket.org> New issue 1826: The stackless implementation of PyPy is incomplete https://bitbucket.org/pypy/pypy/issue/1826/the-stackless-implementation-of-pypy-is Anselm Kruis: Hi, the stackless implementations of PyPy and Stackless-Python differ. Stackless added quite a few new functions and properties and fixed shortcomings during the past year. These changes didn't make it to PyPy. I discussed this situation at Europython 2014 with Armin. As a first step to improve the situation, I created a test suite for the Stackless API: https://bitbucket.org/stackless-dev/stackless-testsuite/overview This test-suite is a pure Python and runs unmodified on Python 2 or 3. It tests the API that every implementation of the module "stackless" should provide. Currently, the test-suite is not yet complete. It only checks, if expected functions/methods/attributes are present, but it does not yet check the functionality. To run the test suite simply execute ``` #!sh $ hg clone https://bitbucket.org/stackless-dev/stackless-testsuite $ cd stackless-testsuite $ pypy setup.py test ``` Any comments on the test suite, the stackless API and any help to improve the situation are highly welcome. From issues-reply at bitbucket.org Sun Jul 27 12:07:24 2014 From: issues-reply at bitbucket.org (Ronan Lamy) Date: Sun, 27 Jul 2014 10:07:24 -0000 Subject: [pypy-issue] Issue #1827: py3k: implement PyCode.dump() properly (pypy/pypy) Message-ID: <20140727100724.24266.11099@app13.ash-private.bitbucket.org> New issue 1827: py3k: implement PyCode.dump() properly https://bitbucket.org/pypy/pypy/issue/1827/py3k-implement-pycodedump-properly Ronan Lamy: In py3k, `PyCode.dump()` is a hack that just calls the host (Python2) interpreter's `dis.dis`. This obviously cannot work correctly with Python3 opcodes, so we need to reimplement it in a Python3-aware way. From issues-reply at bitbucket.org Tue Jul 29 14:27:59 2014 From: issues-reply at bitbucket.org (Hyun Woo Park) Date: Tue, 29 Jul 2014 12:27:59 -0000 Subject: [pypy-issue] Issue #1828: py3k list don't have clear() method (pypy/pypy) Message-ID: <20140729122759.9286.94152@app03.ash-private.bitbucket.org> New issue 1828: py3k list don't have clear() method https://bitbucket.org/pypy/pypy/issue/1828/py3k-list-dont-have-clear-method Hyun Woo Park: >>>> a = [1, 2, 3] >>>> a.clear() Traceback (most recent call last): File "", line 1, in AttributeError: 'list' object has no attribute 'clear' From issues-reply at bitbucket.org Tue Jul 29 17:25:33 2014 From: issues-reply at bitbucket.org (Edd Barrett) Date: Tue, 29 Jul 2014 15:25:33 -0000 Subject: [pypy-issue] Issue #1829: Misleading PyPy/RPython translation error? (pypy/pypy) Message-ID: <20140729152533.7980.27305@app13.ash-private.bitbucket.org> New issue 1829: Misleading PyPy/RPython translation error? https://bitbucket.org/pypy/pypy/issue/1829/misleading-pypy-rpython-translation-error Edd Barrett: Hi, I got the following error when compiling teh pypy_bridge: ``` [translation:info] File "/home/vext01/research/pypy/rpython/rtyper/normalizec alls.py", line 96, in normalize_calltable_row_signature [translation:info] assert not shape_star, "XXX not implemented" [translation:ERROR] AssertionError: XXX not implemented ``` Some prodding: ``` (Pdb+ on Pdb++) ll 82 def normalize_calltable_row_signature(annotator, shape, row): 83 graphs = row.values() 84 assert graphs, "no graph??" 85 sig0 = graphs[0].signature 86 defaults0 = graphs[0].defaults 87 for graph in graphs[1:]: 88 if graph.signature != sig0: 89 break 90 if graph.defaults != defaults0: 91 break 92 else: 93 return False # nothing to do, all signatures already match 94 95 shape_cnt, shape_keys, shape_star = shape 96 -> assert not shape_star, "XXX not implemented" ... (Pdb+ on Pdb++) sig0 Signature(['self', 'w_dict'], None, None) (Pdb+ on Pdb++) graphs[7].signature Signature(['self', 'wpy_dict'], None, None) ``` Because the name of the argument differs, we end up breaking from the loop and fire the assertion. By renaming the `wpy_dict` argument to `w_dict` in the sources, translation succeeds. I'm not quite sure what to make of this, but if the argument names all need to match(?), then I would expect at least a better error message. Thanks From issues-reply at bitbucket.org Wed Jul 30 17:45:16 2014 From: issues-reply at bitbucket.org (Romain Guillebert) Date: Wed, 30 Jul 2014 15:45:16 -0000 Subject: [pypy-issue] Issue #1830: PyPy doesn't implement sys.{get, set}dlopenflags (pypy/pypy) Message-ID: <20140730154516.7828.14987@app11.ash-private.bitbucket.org> New issue 1830: PyPy doesn't implement sys.{get,set}dlopenflags https://bitbucket.org/pypy/pypy/issue/1830/pypy-doesnt-implement-sys-get-set Romain Guillebert: PyPy doesn't have sys.{get,set}dlopenflags which seems to be needed if we want to embed cpython to make scipy work, because CPython needs to be loaded with RTLD_GLOBAL (I tried importing sqlite and it fails if I don't specify this) and cffi relies on the host's import system in API mode. From issues-reply at bitbucket.org Wed Jul 30 20:55:00 2014 From: issues-reply at bitbucket.org (Martin Matusiak) Date: Wed, 30 Jul 2014 18:55:00 -0000 Subject: [pypy-issue] Issue #1831: py3k: incorrect parsing of kwargname in the presence of kwonlyargs (pypy/pypy) Message-ID: <20140730185500.1442.25082@app04.ash-private.bitbucket.org> New issue 1831: py3k: incorrect parsing of kwargname in the presence of kwonlyargs https://bitbucket.org/pypy/pypy/issue/1831/py3k-incorrect-parsing-of-kwargname-in-the Martin Matusiak: Without kwonly: ``` #!python (Pdb) snippet = 'def f(aaa, bbb, mmm=1, nnn=2, **kwargs): pass' (Pdb) self.compiler.compile(snippet, '', 'single', 0) Signature(['aaa', 'bbb', 'mmm', 'nnn'], None, 'kwargs', []) ``` With kwonly: ``` #!python (Pdb) snippet = 'def f(aaa, bbb, *, mmm=1, nnn=2, **kwargs): pass' (Pdb) self.compiler.compile(snippet, '', 'single', 0) Signature(['aaa', 'bbb'], None, 'mmm', ['mmm', 'nnn']) # expected: Signature(['aaa', 'bbb'], None, 'kwargs', ['mmm', 'nnn']) ``` (Here, Signature.__init__ was instrumented with: ``` #!python print self.__repr__() ``` I was trying to write a test for it: ``` #!python def test_kwonlyargs_signature(self): from pypy.interpreter.pycode import cpython_code_signature snippet = 'def f(aaa, bbb, *, mmm=1, nnn=2, **kwargs): pass' co = self.compiler.compile(snippet, '', 'single', 0) sig = cpython_code_signature(co) # assert sig == .... ``` ...but I can't figure out why the code object returned isn't the one I'm trying to compile: ``` #!python (Pdb) co.co_argcount 0 ``` Any hints?