From issues-reply at bitbucket.org Mon Oct 1 17:24:56 2018 From: issues-reply at bitbucket.org (Ronny Pfannschmidt) Date: Mon, 01 Oct 2018 21:24:56 +0000 (UTC) Subject: [pypy-issue] Issue #2898: syntax error offsets for parsing errors differ from cpython (pypy/pypy) Message-ID: <20181001212456.3670.38415@celery-worker-110.ash1.bb-inf.net> New issue 2898: syntax error offsets for parsing errors differ from cpython https://bitbucket.org/pypy/pypy/issues/2898/syntax-error-offsets-for-parsing-errors Ronny Pfannschmidt: ``` $ python -c 'abx abx' File "", line 1 abx abx ^ SyntaxError: invalid syntax $ pypy -c 'abx abx' File "", line 1 abx abx ^ SyntaxError: invalid syntax ``` as seen by the highlighted offset, the `offset` attribute of a syntaxerror seems to differ on pypy on occasion this came up again in https://github.com/pytest-dev/pytest/pull/4056/files#diff-69c85e38e7357573920b661de13d7502R132 - so i decided to open an issue about it here in order to figure if its ok for intent or not From issues-reply at bitbucket.org Wed Oct 3 15:08:00 2018 From: issues-reply at bitbucket.org (mattip) Date: Wed, 03 Oct 2018 19:08:00 +0000 (UTC) Subject: [pypy-issue] Issue #2899: LoadLibrary on win32 does not use LOAD_WITH_ALTERED_SEARCH_PATH (pypy/pypy) Message-ID: <20181003190800.26382.82519@celery-worker-112.ash1.bb-inf.net> New issue 2899: LoadLibrary on win32 does not use LOAD_WITH_ALTERED_SEARCH_PATH https://bitbucket.org/pypy/pypy/issues/2899/loadlibrary-on-win32-does-not-use mattip: There are at least two problems with `rpython/rlib/rwin32`'s `LoadLibrary`: - It does not use LOAD_WITH_ALTERED_SEARCH_PATH, which seems to be used everywhere in CPython to ensure dependent DLLs in the same directory are found. Prevents using wheels with additional DLLs, like the gohlke numpy ones, since we also have no standard place to put those DLLs. - It is mapped to `LoadLibraryA` which precludes using unicode file names From issues-reply at bitbucket.org Sat Oct 6 08:25:07 2018 From: issues-reply at bitbucket.org (Noam Meltzer) Date: Sat, 06 Oct 2018 12:25:07 +0000 (UTC) Subject: [pypy-issue] Issue #2900: High CPU usage on reading from socket during urllib.request (pypy/pypy) Message-ID: <20181006122507.25754.35205@celery-worker-106.ash1.bb-inf.net> New issue 2900: High CPU usage on reading from socket during urllib.request https://bitbucket.org/pypy/pypy/issues/2900/high-cpu-usage-on-reading-from-socket Noam Meltzer: The following code will result in 100% CPU usage on pypy3 version higher than 5.5. (with pypy3-5.5 and CPython it works properly) ```python import urllib.request import sys token = 'PUT_YOUR_TOKEN_HERE' url = 'https://api.telegram.org/bot{}/getUpdates'.format(token) req = urllib.request.Request(url, data=b'{}', headers={'Content-Type': 'application/json'}) while True: res = urllib.request.urlopen(req, timeout=100).read() print(res, file=sys.stderr) ``` The code is a client for a remote server and performs long-polling. Running strace shows that the socket is set as non-blocking and then improperly polled/read from. As you can see in strace output below, after creating the socket, `fcntl F_SETFL` is being called to set it non blocking. Following that a few other operations are performed and then the real problem begins: * `read()` is called, returning EAGAIN * `poll()` with argument `events=POLLIN|POLLOUT` is called, immediately returning as ready to write (but not read!) * `read()` is called, only to return EAGAIN. * the `poll()` & `read()` continued to be called in a loop yielding 100% cpu usage. ```strace 11191 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_TCP) = 3 11191 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) 11191 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 11191 connect(3, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("149.154.167.220")}, 16) = -1 EINPROGRESS (Operation now in progress) 11191 poll([{fd=3149.154.167.220:443]>, events=POLLOUT}], 1, 100000) = 1 ([{fd=3, revents=POLLOUT}]) 11191 getsockopt(3149.154.167.220:443]>, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 11191 setsockopt(3149.154.167.220:443]>, SOL_TCP, TCP_NODELAY, [1], 4) = 0 11191 getsockopt(3149.154.167.220:443]>, SOL_SOCKET, SO_TYPE, [1], [4]) = 0 11191 fcntl(3149.154.167.220:443]>, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK) 11191 getpeername(3149.154.167.220:443]>, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("149.154.167.220")}, [16]) = 0 11191 getpid() = 11191 11191 write(3149.154.167.220:443]>, "", 517) = 517 11191 read(3149.154.167.220:443]>, 0x11bf210, 7) = -1 EAGAIN (Resource temporarily unavailable) 11191 poll([{fd=3149.154.167.220:443]>, events=POLLIN|POLLOUT}], 1, 99999) = 1 ([{fd=3, revents=POLLOUT}]) 11191 read(3149.154.167.220:443]>, 0x11bf210, 7) = -1 EAGAIN (Resource temporarily unavailable) 11191 poll([{fd=3149.154.167.220:443]>, events=POLLIN|POLLOUT}], 1, 99998) = 1 ([{fd=3, revents=POLLOUT}]) 11191 read(3149.154.167.220:443]>, 0x11bf210, 7) = -1 EAGAIN (Resource temporarily unavailable) 11191 poll([{fd=3149.154.167.220:443]>, events=POLLIN|POLLOUT}], 1, 99998) = 1 ([{fd=3, revents=POLLOUT}]) 11191 read(3149.154.167.220:443]>, 0x11bf210, 7) = -1 EAGAIN (Resource temporarily unavailable) 11191 poll([{fd=3149.154.167.220:443]>, events=POLLIN|POLLOUT}], 1, 99997) = 1 ([{fd=3, revents=POLLOUT}]) 11191 read(3149.154.167.220:443]>, 0x11bf210, 7) = -1 EAGAIN (Resource temporarily unavailable) ... many many more poll() & read() ... 11191 poll([{fd=3149.154.167.220:443]>, events=POLLIN|POLLOUT}], 1, 99902) = 1 ([{fd=3, revents=POLLIN|POLLOUT}]) 11191 mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1e0c7bd000 11191 brk(NULL) = 0x11ea000 11191 brk(0x121b000) = 0x121b000 11191 read(3149.154.167.220:443]>, "\26\3\3\0B\2\0", 7) = 7 ... >From here on behaviour seems normal ... ``` Intuitively I would say that the socket should not be set non-blocking on the first place (the whole request is synchronous), but if this is the normal behaviour then `poll()` should be handled more delicately (Only `POLLIN` should be set for `events). NOTES: 1. I was having difficulty simulating this behaviour with a local server, so it might also be related to network delays. 2. This report follows the original bug as reported here: https://github.com/python-telegram-bot/python-telegram-bot/issues/1194 3. If you'd like to recreate the bug against Telegram servers and don't want to bother on creating, I can supply a temporary token, so feel free to contact me for that. From issues-reply at bitbucket.org Sat Oct 13 06:39:17 2018 From: issues-reply at bitbucket.org (Tinho Lee) Date: Sat, 13 Oct 2018 10:39:17 +0000 (UTC) Subject: [pypy-issue] Issue #2901: Disable inlining globally hurts performance (pypy/pypy) Message-ID: <20181013103917.16396.94760@celery-worker-108.ash1.bb-inf.net> New issue 2901: Disable inlining globally hurts performance https://bitbucket.org/pypy/pypy/issues/2901/disable-inlining-globally-hurts Tinho Lee: `call_assembler_r` is found to be a heavy function when I profile my project with the jit log, because of the parameters and result packing/unpacking. It seems that inlining would help to solve the problem, however, inlining is not work as expected sometimes. I have construct two test cases, one for recursive call, another for overwriting __getattr__. All the tests are run with environment variable PYPY_GC_MIN=20G, in order to eliminate the influence of gc. Here is the basic functions defined for the recursive call test case ``` #!python def rec(n): return 1 if n <= 1 else rec(n - 1) + n def a(): rec(1) rec(1) rec(1) rec(1) rec(1) def b(): rec(100) rec(100) rec(100) def test_a(): start = time.time() for n in xrange(10000000): a() print 'a', time.time() - start def test_b(): start = time.time() for n in xrange(100000): b() print 'b', time.time() - start ``` and the test code ``` #!python print 'warm up' test_a() test_b() print 'test' test_a() test_b() ``` The order of warm up is important in this case. Here is the result if `test_a` is called before `test_b`: ``` warm up a 0.0164198875427 b 0.196079015732 test a 0.0130050182343 b 0.189415931702 ``` And the result if `test_b` is called before `test_a`: ``` warm up b 0.198947906494 a 1.29781603813 test a 1.27277779579 b 0.186721801758 ``` The performance of function `a` is greatly hurts by the order of warm up. I have found some clues from the jit log. If `test_a` is warmed up first, `rec` would be inlined in the function `a`, everything works fine. However, when `test_b` is warmed up first, `rec` would be detected as recursive function call and inline is disabled, which also affect the performance of `a`. The implementation lies in `_opimpl_recursive_call` of pyjitpl.py. ``` #!python if count >= memmgr.max_unroll_recursion: # This function is recursive and has exceeded the # maximum number of unrollings we allow. We want to stop # inlining it further and to make sure that, if it # hasn't happened already, the function is traced # separately as soon as possible. if have_debug_prints(): loc = targetjitdriver_sd.warmstate.get_location_str(greenboxes) debug_print("recursive function (not inlined):", loc) warmrunnerstate.dont_trace_here(greenboxes) ``` And the same behavior is found for the non-recursive function call. `--jit trace_limit=300` is set as the `pypy` startup parameter to make the test easily. Here is the basic definitions ``` #!python class X(object): def __getattr__(self, name): return len(name) def a(x): return x.a + x.b + x.c def b(x): a = 1 a += 1 a += 2 a += 3 a += 4 a += 5 a += 6 a += 7 a += 8 a += 9 return x.a + x.b + x.c def test_a(x): start = time.time() for n in xrange(1000000): a(x) print 'a', time.time() - start def test_b(x): start = time.time() for n in xrange(1000000): b(x) print 'b', time.time() - start ``` and the test case ``` #!python x = X() print 'warm up' test_a(x) test_b(x) print 'test' test_a(x) test_b(x) ``` The order of warm-up also have significant influence on the result. When `test_a` is called before `test_b`, `__getattr__` is inlined for better performance. ``` warm up a 0.0307860374451 b 0.114766836166 test a 0.0264270305634 b 0.110279083252 ``` When `test_b` is called before `test_a`, `__getattr__` is disabled for inlining, which result in worse performance for `a`. ``` warm up b 0.115270137787 a 0.111267089844 test a 0.10728096962 b 0.108850002289 ``` I came up with some explanations for the behavior from the code `blackhole_if_trace_too_long` in pyjitpl.py. If `test_b` is called first, trace too long would be detected since a small trace limit is set. Then the biggest function in `b`, which is `__getattr__`, is set to be noninlineable. ``` #!python def blackhole_if_trace_too_long(self): warmrunnerstate = self.jitdriver_sd.warmstate if (self.history.length() > warmrunnerstate.trace_limit or self.history.trace_tag_overflow()): jd_sd, greenkey_of_huge_function = self.find_biggest_function() self.staticdata.stats.record_aborted(greenkey_of_huge_function) self.portal_trace_positions = None if greenkey_of_huge_function is not None: jd_sd.warmstate.disable_noninlinable_function( greenkey_of_huge_function) self.aborted_tracing_jitdriver = jd_sd self.aborted_tracing_greenkey = greenkey_of_huge_function if self.current_merge_points: jd_sd = self.jitdriver_sd greenkey = self.current_merge_points[0][0][:jd_sd.num_green_args] warmrunnerstate.JitCell.trace_next_iteration(greenkey) raise SwitchToBlackhole(Counters.ABORT_TOO_LONG) ``` It seems that the disable inlining have a global influence on all the tracing path. For the cases above, inlining should be enabled in `a` and be disabled in `b`, but the truth is inlining is disabled in both `a` and `b`. Is there any proposal could help to improve the performance? From issues-reply at bitbucket.org Thu Oct 18 13:20:55 2018 From: issues-reply at bitbucket.org (Ivan Kanakarakis) Date: Thu, 18 Oct 2018 17:20:55 +0000 (UTC) Subject: [pypy-issue] Issue #2902: missing members from PyDateTime_Time, PyDateTime_DateTime and PyDateTime_Delta (pypy/pypy) Message-ID: <20181018172055.36060.66348@celery-worker-110.ash1.bb-inf.net> New issue 2902: missing members from PyDateTime_Time, PyDateTime_DateTime and PyDateTime_Delta https://bitbucket.org/pypy/pypy/issues/2902/missing-members-from-pydatetime_time Ivan Kanakarakis: Hello, recent builds of our package started failing. This happens with ``` Python 3.5.3 (a39af0be3a22, Jun 05 2017, 20:18:00) [PyPy 5.8.0-beta0 with GCC 6.2.0 20160901] ``` The following errors are generated when building package `buscuits`: ``` biscuits.c:5928:46: error: ?PyDateTime_Time? has no member named ?hastzinfo? biscuits.c:5940:58: error: ?PyDateTime_Time? has no member named ?tzinfo? biscuits.c:6002:50: error: ?PyDateTime_DateTime? has no member named ?hastzinfo? biscuits.c:6013:65: error: ?PyDateTime_DateTime? has no member named ?tzinfo? biscuits.c:6593:44: error: ?PyDateTime_Delta? has no member named ?days? biscuits.c:6630:44: error: ?PyDateTime_Delta? has no member named ?seconds? biscuits.c:6664:44: error: ?PyDateTime_Delta? has no member named ?microseconds? ``` The complete log from the failing build: ``` Running setup.py bdist_wheel for biscuits: started Running setup.py bdist_wheel for biscuits: finished with status 'error' Complete output from command /home/travis/build/IdentityPython/pysaml2/.tox/pypy3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2j_ru_wr/biscuits/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-c_7ki815 --python-tag pp358: running bdist_wheel running build running build_ext building 'biscuits' extension creating build creating build/temp.linux-x86_64-3.5 cc -pthread -DNDEBUG -O2 -fPIC -I/opt/python/pypy3.5-5.8.0/include -c biscuits.c -o build/temp.linux-x86_64-3.5/biscuits.o -O3 biscuits.c: In function ?__pyx_f_7cpython_8datetime_time_tzinfo?: biscuits.c:5928:46: error: ?PyDateTime_Time? has no member named ?hastzinfo? __pyx_t_1 = (((PyDateTime_Time *)__pyx_v_o)->hastzinfo != 0); ^ In file included from /opt/python/pypy3.5-5.8.0/include/Python.h:86:0, from biscuits.c:4: biscuits.c:5939:61: error: ?PyDateTime_Time? has no member named ?tzinfo? __Pyx_INCREF(((PyObject *)((PyDateTime_Time *)__pyx_v_o)->tzinfo)); ^ /opt/python/pypy3.5-5.8.0/include/object.h:37:40: note: in definition of macro ?Py_INCREF? #define Py_INCREF(ob) (((PyObject *)(ob))->ob_refcnt++) ^ biscuits.c:5939:5: note: in expansion of macro ?__Pyx_INCREF? __Pyx_INCREF(((PyObject *)((PyDateTime_Time *)__pyx_v_o)->tzinfo)); ^ biscuits.c:5940:58: error: ?PyDateTime_Time? has no member named ?tzinfo? __pyx_r = ((PyObject *)((PyDateTime_Time *)__pyx_v_o)->tzinfo); ^ biscuits.c: In function ?__pyx_f_7cpython_8datetime_datetime_tzinfo?: biscuits.c:6002:50: error: ?PyDateTime_DateTime? has no member named ?hastzinfo? __pyx_t_1 = (((PyDateTime_DateTime *)__pyx_v_o)->hastzinfo != 0); ^ In file included from /opt/python/pypy3.5-5.8.0/include/Python.h:86:0, from biscuits.c:4: biscuits.c:6013:65: error: ?PyDateTime_DateTime? has no member named ?tzinfo? __Pyx_INCREF(((PyObject *)((PyDateTime_DateTime *)__pyx_v_o)->tzinfo)); ^ /opt/python/pypy3.5-5.8.0/include/object.h:37:40: note: in definition of macro ?Py_INCREF? #define Py_INCREF(ob) (((PyObject *)(ob))->ob_refcnt++) ^ biscuits.c:6013:5: note: in expansion of macro ?__Pyx_INCREF? __Pyx_INCREF(((PyObject *)((PyDateTime_DateTime *)__pyx_v_o)->tzinfo)); ^ biscuits.c:6014:62: error: ?PyDateTime_DateTime? has no member named ?tzinfo? __pyx_r = ((PyObject *)((PyDateTime_DateTime *)__pyx_v_o)->tzinfo); ^ biscuits.c: In function ?__pyx_f_7cpython_8datetime_timedelta_days?: biscuits.c:6593:44: error: ?PyDateTime_Delta? has no member named ?days? __pyx_r = ((PyDateTime_Delta *)__pyx_v_o)->days; ^ biscuits.c: In function ?__pyx_f_7cpython_8datetime_timedelta_seconds?: biscuits.c:6630:44: error: ?PyDateTime_Delta? has no member named ?seconds? __pyx_r = ((PyDateTime_Delta *)__pyx_v_o)->seconds; ^ biscuits.c: In function ?__pyx_f_7cpython_8datetime_timedelta_microseconds?: biscuits.c:6664:44: error: ?PyDateTime_Delta? has no member named ?microseconds? __pyx_r = ((PyDateTime_Delta *)__pyx_v_o)->microseconds; biscuits.c: In function ?__Pyx_PyUnicode_Substring?: biscuits.c:7767:5: warning: return makes pointer from integer without a cast [enabled by default] return PyUnicode_FromKindAndData(PyUnicode_KIND(text), ^ error: command 'cc' failed with exit status 1 ---------------------------------------- Failed building wheel for biscuits Running setup.py clean for biscuits ``` complete build-log: https://travis-ci.org/IdentityPython/pysaml2/jobs/443266333 From issues-reply at bitbucket.org Tue Oct 23 03:50:17 2018 From: issues-reply at bitbucket.org (Tinho Lee) Date: Tue, 23 Oct 2018 07:50:17 +0000 (UTC) Subject: [pypy-issue] Issue #2903: Translation error when oprofile is enabled (pypy/pypy) Message-ID: <20181023075017.16628.1310@celery-worker-108.ash1.bb-inf.net> New issue 2903: Translation error when oprofile is enabled https://bitbucket.org/pypy/pypy/issues/2903/translation-error-when-oprofile-is-enabled Tinho Lee: Some errors raised when translating with *translation-jit_profiler=oprofile* 1. *log* is undefined in rpython/jit/backend/x86/runner.py:47 2. ``` #! [translation:ERROR] Exception: 'no_release_gil' function can release the GIL: [GilAnalyzer] analyze_direct_call((rpython.rtyper.lltypesystem.rffi:3)ccall_op_close_agent__arrayPtr): True [GilAnalyzer] analyze_direct_call((rpython.jit.backend.x86.oprofile:58)OProfileAgent.shutdown): True ``` Maybe *releasegil=False* should be set for *op_open_agent*, *op_close_agent* and *op_write_native_code*. From issues-reply at bitbucket.org Tue Oct 23 06:54:47 2018 From: issues-reply at bitbucket.org (=?utf-8?q?Bj=C3=B6rn_Lindqvist?=) Date: Tue, 23 Oct 2018 10:54:47 +0000 (UTC) Subject: [pypy-issue] Issue #2904: Jit and the copy module causes miscompilation (pypy/pypy) Message-ID: <20181023105446.38167.44287@celery-worker-112.ash1.bb-inf.net> New issue 2904: Jit and the copy module causes miscompilation https://bitbucket.org/pypy/pypy/issues/2904/jit-and-the-copy-module-causes Bj?rn Lindqvist: See the following test code: ``` #!python import copy def eva(board, w): height = len(board) - 1 width = len(board[0]) eb = copy.copy(list(reversed(board[0:height]))) ch = [0]*width for c in range(width): # Works if I add the assert!!! #assert height == 20 h = height-1 while h > 0: if eb[h][c] != 0: break h -= 1 ch[c] = h + 1 return max(ch) board = [ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [4, 0, 0, 1, 1, 0, 0, 0, 0, 0], [4, 4, 4, 1, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] ] for x in range(50): print(eva(list(board), [1.0, 1.0, 5.0, 2.0, 1.0, 1.0, 1.0])) ``` When running it with pypy it correctly prints 3 for about 40 loops. Then the JIT runs and after that it prints 2 instead. Python ofc prints the right answer 3 all the time. pypy3 version 3.5.3 and python3 3.7.0. From issues-reply at bitbucket.org Thu Oct 25 11:10:07 2018 From: issues-reply at bitbucket.org (hugovk) Date: Thu, 25 Oct 2018 15:10:07 +0000 (UTC) Subject: [pypy-issue] Issue #2905: "error: release unlocked lock" (pypy/pypy) Message-ID: <20181025151006.11673.32962@celery-worker-109.ash1.bb-inf.net> New issue 2905: "error: release unlocked lock" https://bitbucket.org/pypy/pypy/issues/2905/error-release-unlocked-lock hugovk: The Pillow imaging library is tested against PyPy and PyPy3 (both 5.8) on Travis CI (Linux) and PyPy2 (6.0) on AppVeyor (Windows). Occasionally the PyPy build on AppVeyor errors. It passes after restarting the build. Here's five. Of a sequence of 19 builds, 5 failed due to this, 13 passed, one was a valid fail. This has been happening since at least July 2018. ``` Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bilinear ERROR [ 61%] =================================== ERRORS ==================================== _ ERROR at teardown of TestImagingCoreResampleAccuracy.test_enlarge_bilinear __ self = , type = None value = None, traceback = None def __exit__(self, type, value, traceback): if type is None: try: > self.gen.next() c:\pypy2-v6.0.0-win32\lib-python\2.7\contextlib.py:24: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c:\pypy2-v6.0.0-win32\lib-python\2.7\contextlib.py:24: in __exit__ self.gen.next() c:\pypy2-v6.0.0-win32\lib-python\2.7\logging\__init__.py:1331: in removeHandler _releaseLock() c:\pypy2-v6.0.0-win32\lib-python\2.7\logging\__init__.py:232: in _releaseLock _lock.release() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_RLock owner=None count=0> def release(self): """Release a lock, decrementing the recursion level. If after the decrement it is zero, reset the lock to unlocked (not owned by any thread), and if any other threads are blocked waiting for the lock to become unlocked, allow exactly one of them to proceed. If after the decrement the recursion level is still nonzero, the lock remains locked and owned by the calling thread. Only call this method when the calling thread owns the lock. A RuntimeError is raised if this method is called when the lock is unlocked. There is no return value. """ if self.__owner != _get_ident(): raise RuntimeError("cannot release un-acquired lock") self.__count = count = self.__count - 1 if not count: self.__owner = None > self.__block.release() E error: release unlocked lock c:\pypy2-v6.0.0-win32\lib-python\2.7\threading.py:208: error ``` https://ci.appveyor.com/project/Python-pillow/pillow/build/3948/job/928xtaxbx0rgbfaq#L3355 ``` Tests/test_decompression_bomb.py::TestDecompressionBomb::test_no_warning_small_file PASSED [ 5%] INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\main.py", line 178, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\main.py", line 215, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 617, in __call__ INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 222, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 216, in INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'), INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 201, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 77, in get_result INTERNALERROR> _reraise(*ex) # noqa INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 180, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\main.py", line 236, in pytest_runtestloop INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 617, in __call__ INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 222, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 216, in INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'), INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 201, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 77, in get_result INTERNALERROR> _reraise(*ex) # noqa INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 180, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\runner.py", line 65, in pytest_runtest_protocol INTERNALERROR> item.ihook.pytest_runtest_logfinish(nodeid=item.nodeid, location=item.location) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 617, in __call__ INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 222, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 216, in INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'), INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 196, in _multicall INTERNALERROR> gen.send(outcome) INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\logging.py", line 470, in pytest_runtest_logfinish INTERNALERROR> yield INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\contextlib.py", line 24, in __exit__ INTERNALERROR> self.gen.next() INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\logging.py", line 443, in _runtest_for INTERNALERROR> item.add_report_section(when, "log", log) INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\contextlib.py", line 24, in __exit__ INTERNALERROR> self.gen.next() INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\logging.py", line 188, in catching_logs INTERNALERROR> root_logger.removeHandler(handler) INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\logging\__init__.py", line 1331, in removeHandler INTERNALERROR> _releaseLock() INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\logging\__init__.py", line 232, in _releaseLock INTERNALERROR> _lock.release() INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\threading.py", line 208, in release INTERNALERROR> self.__block.release() INTERNALERROR> error: release unlocked lock ==================== 60 passed, 4 skipped in 24.66 seconds ==================== Command exited with code 3 ``` https://ci.appveyor.com/project/Python-pillow/pillow/build/3941/job/euy6n2ecsw8mvn3u#L2690 ``` Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_wrong_args FAILED [ 2%] ================================== FAILURES =================================== ____________________ TestColorLut3DCoreAPI.test_wrong_args ____________________ self = , type = None value = None, traceback = None def __exit__(self, type, value, traceback): if type is None: try: > self.gen.next() c:\pypy2-v6.0.0-win32\lib-python\2.7\contextlib.py:24: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c:\pypy2-v6.0.0-win32\lib-python\2.7\contextlib.py:24: in __exit__ self.gen.next() c:\pypy2-v6.0.0-win32\lib-python\2.7\logging\__init__.py:1331: in removeHandler _releaseLock() c:\pypy2-v6.0.0-win32\lib-python\2.7\logging\__init__.py:232: in _releaseLock _lock.release() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_RLock owner=None count=0> def release(self): """Release a lock, decrementing the recursion level. If after the decrement it is zero, reset the lock to unlocked (not owned by any thread), and if any other threads are blocked waiting for the lock to become unlocked, allow exactly one of them to proceed. If after the decrement the recursion level is still nonzero, the lock remains locked and owned by the calling thread. Only call this method when the calling thread owns the lock. A RuntimeError is raised if this method is called when the lock is unlocked. There is no return value. """ if self.__owner != _get_ident(): raise RuntimeError("cannot release un-acquired lock") self.__count = count = self.__count - 1 if not count: self.__owner = None > self.__block.release() E error: release unlocked lock c:\pypy2-v6.0.0-win32\lib-python\2.7\threading.py:208: error ``` https://ci.appveyor.com/project/Python-pillow/pillow/build/3940/job/0ufyc0d2mgd4gsa1#L2654 ``` Tests/test_image_rotate.py::TestImageRotate::test_alpha_rotate_no_fill INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\main.py", line 178, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\main.py", line 215, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 617, in __call__ INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 222, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 216, in INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'), INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 201, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 77, in get_result INTERNALERROR> _reraise(*ex) # noqa INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 180, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\main.py", line 236, in pytest_runtestloop INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 617, in __call__ INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 222, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 216, in INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'), INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 201, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 77, in get_result INTERNALERROR> _reraise(*ex) # noqa INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 180, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\runner.py", line 63, in pytest_runtest_protocol INTERNALERROR> item.ihook.pytest_runtest_logstart(nodeid=item.nodeid, location=item.location) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 617, in __call__ INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 222, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 216, in INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'), INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 196, in _multicall INTERNALERROR> gen.send(outcome) INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\logging.py", line 465, in pytest_runtest_logstart INTERNALERROR> yield INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\contextlib.py", line 24, in __exit__ INTERNALERROR> self.gen.next() INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\logging.py", line 443, in _runtest_for INTERNALERROR> item.add_report_section(when, "log", log) INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\contextlib.py", line 24, in __exit__ INTERNALERROR> self.gen.next() INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\logging.py", line 188, in catching_logs INTERNALERROR> root_logger.removeHandler(handler) INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\logging\__init__.py", line 1331, in removeHandler INTERNALERROR> _releaseLock() INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\logging\__init__.py", line 232, in _releaseLock INTERNALERROR> _lock.release() INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\threading.py", line 208, in release INTERNALERROR> self.__block.release() INTERNALERROR> error: release unlocked lock ================== 654 passed, 112 skipped in 53.98 seconds =================== Command exited with code 3 ``` https://ci.appveyor.com/project/Python-pillow/pillow/build/3934/job/pvvqg5i7h1fy34no#L3392 ``` Tests/test_file_mic.py::TestFileMic::test_n_frames SKIPPED [ 28%] INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\main.py", line 178, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\main.py", line 215, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 617, in __call__ INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 222, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 216, in INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'), INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 201, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 77, in get_result INTERNALERROR> _reraise(*ex) # noqa INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 180, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\main.py", line 236, in pytest_runtestloop INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 617, in __call__ INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 222, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 216, in INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'), INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 201, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 77, in get_result INTERNALERROR> _reraise(*ex) # noqa INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 180, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\runner.py", line 65, in pytest_runtest_protocol INTERNALERROR> item.ihook.pytest_runtest_logfinish(nodeid=item.nodeid, location=item.location) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 617, in __call__ INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 222, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\__init__.py", line 216, in INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'), INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 201, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 77, in get_result INTERNALERROR> _reraise(*ex) # noqa INTERNALERROR> File "C:\vp\pypy2\site-packages\pluggy\callers.py", line 175, in _multicall INTERNALERROR> next(gen) # first yield INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\logging.py", line 469, in pytest_runtest_logfinish INTERNALERROR> with self._runtest_for(None, "finish"): INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\contextlib.py", line 17, in __enter__ INTERNALERROR> return self.gen.next() INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\logging.py", line 420, in _runtest_for INTERNALERROR> LogCaptureHandler(), formatter=self.formatter, level=self.log_level INTERNALERROR> File "C:\vp\pypy2\site-packages\_pytest\logging.py", line 196, in __init__ INTERNALERROR> logging.StreamHandler.__init__(self, py.io.TextIO()) INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\logging\__init__.py", line 846, in __init__ INTERNALERROR> Handler.__init__(self) INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\logging\__init__.py", line 688, in __init__ INTERNALERROR> _addHandlerRef(self) INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\logging\__init__.py", line 667, in _addHandlerRef INTERNALERROR> _releaseLock() INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\logging\__init__.py", line 232, in _releaseLock INTERNALERROR> _lock.release() INTERNALERROR> File "c:\pypy2-v6.0.0-win32\lib-python\2.7\threading.py", line 208, in release INTERNALERROR> self.__block.release() INTERNALERROR> error: release unlocked lock =================== 247 passed, 90 skipped in 37.09 seconds =================== Command exited with code 3 ``` https://ci.appveyor.com/project/Python-pillow/pillow/build/3931/job/l6k406iw6o6pbnth#L2963 Here's our issue on the Pillow tracker: https://github.com/python-pillow/Pillow/issues/3239#issuecomment-433080563 Paul Ganssle just commented there: > I'm getting the same thing on several dateutil builds using pypy-5.4 on Travis, so I don't think it's related to either PyPy 6.0 or Appveyor. [Example](https://travis-ci.org/dateutil/dateutil/jobs/445799715#L1074) > > I never see it on the 3.x series of PyPy, though. Any ideas what's up? Thank you! From issues-reply at bitbucket.org Fri Oct 26 12:27:11 2018 From: issues-reply at bitbucket.org (Dmitry A. Mottl) Date: Fri, 26 Oct 2018 16:27:11 +0000 (UTC) Subject: [pypy-issue] Issue #2906: for numpy functions (pypy/pypy) Message-ID: <20181026162711.35342.64228@celery-worker-108.ash1.bb-inf.net> New issue 2906: for numpy functions https://bitbucket.org/pypy/pypy/issues/2906/for-numpy-functions Dmitry A. Mottl: Just noticed that ipython doesn't show `` for numpy functions: ```python import numpy as np np? # - shows docstring np.random.randn? # - doesn't show ``` numpy is installed from sources with `pip install numpy` From issues-reply at bitbucket.org Tue Oct 30 18:58:17 2018 From: issues-reply at bitbucket.org (Tom Booth) Date: Tue, 30 Oct 2018 22:58:17 +0000 (UTC) Subject: [pypy-issue] Issue #2907: iterator objects in PyPy3? (pypy/pypy) Message-ID: <20181030225817.30661.54637@celery-worker-111.ash1.bb-inf.net> New issue 2907: iterator objects in PyPy3? https://bitbucket.org/pypy/pypy/issues/2907/iterator-objects-in-pypy3 Tom Booth: I was evaluating mypy3 and found some issues with the bitarray project and mypy3. In particular, issues with iterator objects. ``` # example test: def test_decode_empty(self): d = {'a': bitarray('1')} a = bitarray() self.assertEqual(a.decode(d), []) self.assertEqual(d, {'a': bitarray('1')}) # test decode iterator self.assertEqual(list(a.iterdecode(d)), []) self.assertEqual(d, {'a': bitarray('1')}) self.assertEqual(len(a), 0) RPython traceback: File "pypy_interpreter.c", line 39292, in BuiltinCodePassThroughArguments1_funcrun_obj File "pypy_module_cpyext_5.c", line 56874, in generic_cpy_call__StdObjSpaceConst_funcPtr_SomeI_6 File "pypy_module_cpyext_1.c", line 35682, in from_ref File "pypy_module_cpyext_1.c", line 35661, in from_ref Error Traceback (most recent call last): File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/unittest/case.py", line 59, in testPartExecutor yield File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/unittest/case.py", line 601, in run testMethod() File "/Users/tbooth/bitarray/test_bitarray.py", line 2019, in test_decode_empty self.assertEqual(list(a.iterdecode(d)), []) File "/Users/tbooth/bitarray/bitarray/__init__.py", line 110, in iterdecode return self._iterdecode(_mk_tree(codedict)) SystemError: unexpected internal exception (please report a bug): ; internal traceback was dumped to stderr ``` https://github.com/ilanschnell/bitarray ...otherwise works fine in CPython and PyPy2 6.0.0