From issues-reply at bitbucket.org Tue Feb 4 11:18:08 2020 From: issues-reply at bitbucket.org (Eric Wieser) Date: Tue, 04 Feb 2020 16:18:08 +0000 (UTC) Subject: [pypy-issue] Issue #3165: PyPy should set `errors="surrogatepass"` when decoding numpy arrays to unicode scalars (pypy/pypy) Message-ID: <20200204161808.14898.84897@celery-worker-112.ash1.bb-inf.net> New issue 3165: PyPy should set `errors="surrogatepass"` when decoding numpy arrays to unicode scalars https://bitbucket.org/pypy/pypy/issues/3165/pypy-should-set-errors-surrogatepass-when Eric Wieser: See [https://github.com/numpy/numpy/issues/15363](https://github.com/numpy/numpy/issues/15363), where the bug was reported in numpy. The fix in numpy was to replace calls to `PyUnicode_DecodeUTF32` with calls to `PyUnicode_FromKindAndData(PyUnicode_4BYTE_KIND, ...)`. However, it seems that PyPI does not use our code there, and has their own implementation. Assuming `PyUnicode_FromKindAndData` is not available, the equivalent python code would be `some_bytes.decode('utf-32-le', errors='surrogatepass')`. From issues-reply at bitbucket.org Thu Feb 6 18:38:09 2020 From: issues-reply at bitbucket.org (Roy Williams) Date: Thu, 06 Feb 2020 23:38:09 +0000 (UTC) Subject: [pypy-issue] Issue #3166: Wrong exception when calling `str` on an `integer` with an invalid encoding (pypy/pypy) Message-ID: <20200206233809.38743.5388@celery-worker-112.ash1.bb-inf.net> New issue 3166: Wrong exception when calling `str` on an `integer` with an invalid encoding https://bitbucket.org/pypy/pypy/issues/3166/wrong-exception-when-calling-str-on-an Roy Williams: ? ``` $ pypy3 -c "str(1234, 'text')" Traceback (most recent call last): File "", line 1, in LookupError: unknown encoding: text ``` ``` $ python3 -c "str(1234, 'text')" Traceback (most recent call last): File "", line 1, in TypeError: decoding to str: need a bytes-like object, int found ``` This seems related to [https://bitbucket.org/pypy/pypy/issues/2866/36-wrong-exception-while-calling-str-on](https://bitbucket.org/pypy/pypy/issues/2866/36-wrong-exception-while-calling-str-on) This is breaking `flask_restful` with pypy - [https://github.com/flask-restful/flask-restful/blob/master/flask\_restful/reqparse.py#L147-L156](https://github.com/flask-restful/flask-restful/blob/master/flask_restful/reqparse.py#L147-L156) . If `self.type` is a `str` `flask_restful` is expecting to get a `TypeError` as it tries a variety of different ways to parse the argument. From issues-reply at bitbucket.org Fri Feb 7 05:21:21 2020 From: issues-reply at bitbucket.org (grambler1) Date: Fri, 07 Feb 2020 10:21:21 +0000 (UTC) Subject: [pypy-issue] Issue #3167: PyPy3 performance regression in string join (pypy/pypy) Message-ID: <20200207102121.18940.7003@app-161.ash1.bb-inf.net> New issue 3167: PyPy3 performance regression in string join https://bitbucket.org/pypy/pypy/issues/3167/pypy3-performance-regression-in-string grambler1: Hello. I recently experienced a regression in performance between PyPy3 and PyPy2 in the string join method. The `testjoin.py` file is attached to the issue. In the following experiments `N = 10**5` ``` $ pypy3 testjoin.py Benchmark: Time (s) (200 iterations) ' '.join(map(str, range(N))) 1.4801070280000204 ' '.join(list(map(str, range(N)))) 0.7104864799998722 ' '.join(str(i) for i in range(N)) 1.5713386769998579 ' '.join([str(i) for i in range(N)]) 0.7061686919996646 ``` ``` pypy testjoin.py Benchmark: Time (s) (200 iterations) ' '.join(map(str, range(N))) 0.537734985352 ' '.join(map(str, xrange(N))) 0.670211076736 ' '.join(list(map(str, range(N)))) 0.549700975418 ' '.join(str(i) for i in range(N)) 1.45470499992 ' '.join([str(i) for i in range(N)]) 0.542479991913 ``` PyPy3 version: ```shell $ pypy3 --version Python 3.6.9 (7.3.0+dfsg-1~ppa1~ubuntu19.04, Dec 26 2019, 11:14:16) [PyPy 7.3.0 with GCC 8.3.0] ``` PyPy2 version: ```shell $ pypy --version Python 2.7.13 (7.3.0+dfsg-1~ppa1~ubuntu19.04, Dec 26 2019, 11:10:50) [PyPy 7.3.0 with GCC 8.3.0] ``` As indicated by the version information I ran the benchmarks on an Ubuntu system. Is this a known regression? From issues-reply at bitbucket.org Sat Feb 8 09:10:39 2020 From: issues-reply at bitbucket.org (Christoph Reiter) Date: Sat, 08 Feb 2020 14:10:39 +0000 (UTC) Subject: [pypy-issue] Issue #3168: PyUnicode_FSConverter() doesn't handle os.PathLike (pypy/pypy) Message-ID: <20200208141039.34181.92209@celery-worker-108.ash1.bb-inf.net> New issue 3168: PyUnicode_FSConverter() doesn't handle os.PathLike https://bitbucket.org/pypy/pypy/issues/3168/pyunicode_fsconverter-doesnt-handle Christoph Reiter: [https://docs.python.org/3/c-api/unicode.html#c.PyUnicode\_FSConverter](https://docs.python.org/3/c-api/unicode.html#c.PyUnicode_FSConverter) When passing an object providing an `__fspath__` method PyPy3 will raise: `TypeError: Can't convert '_PathLike' object to str implicitly` ? ? From notifications-noreply at bitbucket.org Wed Feb 12 03:58:35 2020 From: notifications-noreply at bitbucket.org (mattip) Date: Wed, 12 Feb 2020 08:58:35 +0000 (UTC) Subject: [pypy-issue] [Bitbucket] Your access to pypy/pypy has changed Message-ID: <20200212085835.28340.21887@app-137.ash1.bb-inf.net> Your privileges on the repository source on pypy/pypy (https://bitbucket.org/pypy/pypy) have been changed from write to read. -- Configure email notifications from your account settings: https://bitbucket.org/account/user/pypy-issue/ Are you making the most of Bitbucket? Learn more about our premium plans: https://bitbucket.org/account/admin/plans?utm_source=bbctrns&utm_medium=email&utm_campaign=fv2&utm_content=t