From issues-reply at bitbucket.org Wed Jan 2 09:17:22 2019 From: issues-reply at bitbucket.org (situchenqi) Date: Wed, 02 Jan 2019 14:17:22 +0000 (UTC) Subject: [pypy-issue] Issue #2935: unable to install numpy for pypy3.5 on windows (pypy/pypy) Message-ID: <20190102141722.15655.47690@celery-worker-111.ash1.bb-inf.net> New issue 2935: unable to install numpy for pypy3.5 on windows https://bitbucket.org/pypy/pypy/issues/2935/unable-to-install-numpy-for-pypy35-on situchenqi: pip 18.1 windows 10 numpy 1.15 From issues-reply at bitbucket.org Wed Jan 2 22:45:44 2019 From: issues-reply at bitbucket.org (Weikang Jin) Date: Thu, 03 Jan 2019 03:45:44 +0000 (UTC) Subject: [pypy-issue] Issue #2936: coredump generated when OOM in PYPY (pypy/pypy) Message-ID: <20190103034543.24545.7935@celery-worker-111.ash1.bb-inf.net> New issue 2936: coredump generated when OOM in PYPY https://bitbucket.org/pypy/pypy/issues/2936/coredump-generated-when-oom-in-pypy Weikang Jin: Python version: pypy-6.0.0-linux_x86_64-portable Operating System: CentOS Linux release 7.6.1810 ### CODE ### ``` #!python from gevent import monkey monkey.patch_all() import bottle from bottle import route, run import sys, random, string PYPY = hasattr(sys, 'pypy_version_info') # test cpython if not PYPY: import resource def limit_memory(maxsize): soft, hard = resource.getrlimit(resource.RLIMIT_AS) resource.setrlimit(resource.RLIMIT_AS, (maxsize, hard)) limit_memory(200 * 1000 * 1000 * 2) @route('/') def index(): buf = [] for _ in range(1000): buf.append(random.choice(string.letters) * 10**6) return "ok" if __name__ == "__main__": run(host='localhost', port=8000) else: app = bottle.default_app() ``` ### RUN ### $ PYPY_GC_MIN=300MB PYPY_GC_MAX=400MB PYPYLOG=gc:- pypy app.py $ http :8000 ### LOG ### [596869e8b3584] gc-collect-step} return self.wsgi(environ, start_response) File "/root/workspace/pypy-6.0.0-linux_x86_64-portable/site-packages/bottle.py", line 954, in wsgi out = self._cast(self._handle(environ)) File "/root/workspace/pypy-6.0.0-linux_x86_64-portable/site-packages/bottle.py", line 862, in _handle return route.call(**args) File "/root/workspace/pypy-6.0.0-linux_x86_64-portable/site-packages/bottle.py", line 1740, in wrapper rv = callback(*a, **ka) File "app.py", line 22, in index buf.append(random.choice(string.letters) * 10**6) MemoryError 127.0.0.1 - - [03/Jan/2019 11:40:55] "GET / HTTP/1.1" 500 59 ... [5968a410c163e] gc-minor} [5968a410c4338] {gc-collect-step starting gc state: SWEEPING [5968a4133cc50] {gc-collect-done arenas: 12 => 12 bytes used in arenas: 5108344 bytes raw-malloced: 439381936 => 439382032 [5968a41350048] gc-collect-done} RPython traceback: File "pypy_interpreter_1.c", line 19837, in Method_descr_method_getattribute File "pypy_interpreter.c", line 36849, in BuiltinCode2_fastcall_2 File "pypy_objspace.c", line 23854, in descr__getattribute__ using too much memory, aborting [1] 2728 abort (core dumped) PYPY_GC_MIN=300MB PYPY_GC_MAX=400MB PYPYLOG=gc:- pypy app.py MemoryError raised but the memory does not collect: bytes raw-malloced: 439381936 => 439382032 but cpython works expected, the processor is still alived and memory is normal state. From issues-reply at bitbucket.org Sun Jan 6 05:32:41 2019 From: issues-reply at bitbucket.org (Creation Elemental) Date: Sun, 06 Jan 2019 10:32:41 +0000 (UTC) Subject: [pypy-issue] Issue #2937: os functions return '??' for unicode characters in paths on windows (pypy/pypy) Message-ID: <20190106103240.10687.83351@celery-worker-110.ash1.bb-inf.net> New issue 2937: os functions return '??' for unicode characters in paths on windows https://bitbucket.org/pypy/pypy/issues/2937/os-functions-return-for-unicode-characters Creation Elemental: I have a few files that contain emojis in their names, and also a folder that has such. Commands like `os.getcwd`, `os.listdir`, `os.path.realpath`, etc. will cause this to happen. This is also a problem with pure windows installations of python2. ( https://bugs.python.org/issue35670?@ok_message=msg%20333100%20created%0Aissue%2035670%20created&@template=item ) I have not yet been able to test if this happens on non-windows installations of pypy2. For example, say you have a folder simply called '?'. If you run python inside of it and run `os.getcwd()` you will simply get `'??'` as the result. This breaks MANY of my programs that depend on knowing exactly where they are, and knowing the contents of a directory to pass to other functions. From issues-reply at bitbucket.org Sun Jan 13 15:32:17 2019 From: issues-reply at bitbucket.org (Jon Dufresne) Date: Sun, 13 Jan 2019 20:32:17 +0000 (UTC) Subject: [pypy-issue] Issue #2938: pypy3: time.strptime(): UnicodeDecodeError: 'utf8' codec can't decode byte 0xb6 in position 0: invalid start byte (pypy/pypy) Message-ID: <20190113203217.35052.21929@celery-worker-111.ash1.bb-inf.net> New issue 2938: pypy3: time.strptime(): UnicodeDecodeError: 'utf8' codec can't decode byte 0xb6 in position 0: invalid start byte https://bitbucket.org/pypy/pypy/issues/2938/pypy3-timestrptime-unicodedecodeerror-utf8 Jon Dufresne: ``` $ pypy3 --version Python 3.5.3 (7cafdf4fca72, Aug 27 2018, 22:02:53) [PyPy 6.0.0 with GCC 8.2.1 20180801 (Red Hat 8.2.1-2)] ``` When running the Pillow test suite with pypy3, I receive the error: ``` UnicodeDecodeError: 'utf8' codec can't decode byte 0xb6 in position 0: invalid start byte ``` I do not receive this error with CPython or pypy2. Steps to reproduce: ``` git clone git at github.com:python-pillow/Pillow.git cd Pillow git checkout b62ff510aa90663bbc76ed4d6309b0774875b973 # The latest revision as of today tox -e pypy3 ``` Result: ``` ==================================================================================================== FAILURES ===================================================================================================== ___________________________________________________________________________________________ TestPdfParser.test_parsing ____________________________________________________________________________________________ self = def test_parsing(self): self.assertEqual(PdfParser.interpret_name(b"Name#23Hash"), b"Name#Hash") self.assertEqual(PdfParser.interpret_name( b"Name#23Hash", as_text=True ), "Name#Hash") self.assertEqual(PdfParser.get_value(b"1 2 R ", 0), (IndirectReference(1, 2), 5)) self.assertEqual(PdfParser.get_value(b"true[", 0), (True, 4)) self.assertEqual(PdfParser.get_value(b"false%", 0), (False, 5)) self.assertEqual(PdfParser.get_value(b"null<", 0), (None, 4)) self.assertEqual(PdfParser.get_value(b"%cmt\n %cmt\n 123\n", 0), (123, 15)) self.assertEqual(PdfParser.get_value(b"<901FA3>", 0), (b"\x90\x1F\xA3", 8)) self.assertEqual(PdfParser.get_value(b"asd < 9 0 1 f A > qwe", 3), (b"\x90\x1F\xA0", 17)) self.assertEqual(PdfParser.get_value(b"(asd)", 0), (b"asd", 5)) self.assertEqual(PdfParser.get_value(b"(asd(qwe)zxc)zzz(aaa)", 0), (b"asd(qwe)zxc", 13)) self.assertEqual(PdfParser.get_value(b"(Two \\\nwords.)", 0), (b"Two words.", 14)) self.assertEqual(PdfParser.get_value(b"(Two\nlines.)", 0), (b"Two\nlines.", 12)) self.assertEqual(PdfParser.get_value(b"(Two\r\nlines.)", 0), (b"Two\nlines.", 13)) self.assertEqual(PdfParser.get_value(b"(Two\\nlines.)", 0), (b"Two\nlines.", 13)) self.assertEqual(PdfParser.get_value(b"(One\\(paren).", 0), (b"One(paren", 12)) self.assertEqual(PdfParser.get_value(b"(One\\)paren).", 0), (b"One)paren", 12)) self.assertEqual(PdfParser.get_value(b"(\\0053)", 0), (b"\x053", 7)) self.assertEqual(PdfParser.get_value(b"(\\053)", 0), (b"\x2B", 6)) self.assertEqual(PdfParser.get_value(b"(\\53)", 0), (b"\x2B", 5)) self.assertEqual(PdfParser.get_value(b"(\\53a)", 0), (b"\x2Ba", 6)) self.assertEqual(PdfParser.get_value(b"(\\1111)", 0), (b"\x491", 7)) self.assertEqual(PdfParser.get_value(b" 123 (", 0), (123, 4)) self.assertAlmostEqual(PdfParser.get_value(b" 123.4 %", 0)[0], 123.4) self.assertEqual(PdfParser.get_value(b" 123.4 %", 0)[1], 6) self.assertRaises(PdfFormatError, PdfParser.get_value, b"]", 0) d = PdfParser.get_value(b"<>", 0)[0] self.assertIsInstance(d, PdfDict) self.assertEqual(len(d), 2) self.assertEqual(d.Name, "value") self.assertEqual(d[b"Name"], b"value") self.assertEqual(d.N, PdfName("V")) a = PdfParser.get_value(b"[/Name (value) /N /V]", 0)[0] self.assertIsInstance(a, list) self.assertEqual(len(a), 4) self.assertEqual(a[0], PdfName("Name")) s = PdfParser.get_value( b"<>\nstream\nabcde\nendstream<<...", 0 )[0] self.assertIsInstance(s, PdfStream) self.assertEqual(s.dictionary.Name, "value") self.assertEqual(s.decode(), b"abcde") for name in ["CreationDate", "ModDate"]: for date, value in { b"20180729214124": "20180729214124", b"D:20180729214124": "20180729214124", b"D:2018072921": "20180729210000", b"D:20180729214124Z": "20180729214124", b"D:20180729214124+08'00'": "20180729134124", b"D:20180729214124-05'00'": "20180730024124" }.items(): d = PdfParser.get_value( b"<>", 0)[0] self.assertEqual( > time.strftime("%Y%m%d%H%M%S", getattr(d, name)), value) Tests/test_pdfparser.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/pypy3/site-packages/PIL/PdfParser.py:298: in __getattr__ value = time.strptime(value[:len(format)+2], format) /usr/lib64/pypy3-6.0/lib-python/3/_strptime.py:504: in _strptime_time tt = _strptime(data_string, format)[0] /usr/lib64/pypy3-6.0/lib-python/3/_strptime.py:318: in _strptime _TimeRE_cache = TimeRE() /usr/lib64/pypy3-6.0/lib-python/3/_strptime.py:194: in __init__ self.locale_time = LocaleTime() /usr/lib64/pypy3-6.0/lib-python/3/_strptime.py:73: in __init__ self.__calc_weekday() /usr/lib64/pypy3-6.0/lib-python/3/_strptime.py:95: in __calc_weekday a_weekday = [calendar.day_abbr[i].lower() for i in range(7)] /usr/lib64/pypy3-6.0/lib-python/3/_strptime.py:95: in a_weekday = [calendar.day_abbr[i].lower() for i in range(7)] /usr/lib64/pypy3-6.0/lib-python/3/calendar.py:80: in __getitem__ return funcs(self.format) /usr/lib64/pypy3-6.0/lib-python/3/datetime.py:754: in strftime return _wrap_strftime(self, format, self.timetuple()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ object = datetime.date(2001, 1, 3), format = '%a', timetuple = time.struct_time(tm_year=2001, tm_mon=1, tm_mday=3, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=2, tm_yday=3, tm_isdst=-1) def _wrap_strftime(object, format, timetuple): # Don't call utcoffset() or tzname() unless actually needed. freplace = None # the string to use for %f zreplace = None # the string to use for %z Zreplace = None # the string to use for %Z # Scan format for %z and %Z escapes, replacing as needed. newformat = [] push = newformat.append i, n = 0, len(format) while i < n: ch = format[i] i += 1 if ch == '%': if i < n: ch = format[i] i += 1 if ch == 'f': if freplace is None: freplace = '%06d' % getattr(object, 'microsecond', 0) newformat.append(freplace) elif ch == 'z': if zreplace is None: zreplace = "" if hasattr(object, "utcoffset"): offset = object.utcoffset() if offset is not None: sign = '+' if offset.days < 0: offset = -offset sign = '-' h, m = divmod(offset, timedelta(hours=1)) assert not m % timedelta(minutes=1), "whole minute" m //= timedelta(minutes=1) zreplace = '%c%02d%02d' % (sign, h, m) assert '%' not in zreplace newformat.append(zreplace) elif ch == 'Z': if Zreplace is None: Zreplace = "" if hasattr(object, "tzname"): s = object.tzname() if s is not None: # strftime is going to have at this: escape % Zreplace = s.replace('%', '%%') newformat.append(Zreplace) else: push('%') push(ch) else: push('%') else: push(ch) newformat = "".join(newformat) > return _time.strftime(newformat, timetuple) E UnicodeDecodeError: 'utf8' codec can't decode byte 0xb6 in position 0: invalid start byte /usr/lib64/pypy3-6.0/lib-python/3/datetime.py:221: UnicodeDecodeError ``` From issues-reply at bitbucket.org Sat Jan 19 10:38:47 2019 From: issues-reply at bitbucket.org (KOLANICH) Date: Sat, 19 Jan 2019 15:38:47 +0000 (UTC) Subject: [pypy-issue] Issue #2939: Buildbot is not available via TLS (pypy/pypy) Message-ID: <20190119153847.32183.38541@celery-worker-110.ash1.bb-inf.net> New issue 2939: Buildbot is not available via TLS https://bitbucket.org/pypy/pypy/issues/2939/buildbot-is-not-available-via-tls KOLANICH: Binaries built with a buildbot are not authenticated, so an adversary can inject malware into them. And users have to use them since the releases are very rare and there are no packages for popular distros. 1. Setup TLS securely. 2. Generate an OpenPGP keypair for buildbot. 3. Setup signing. From issues-reply at bitbucket.org Sat Jan 19 10:45:29 2019 From: issues-reply at bitbucket.org (KOLANICH) Date: Sat, 19 Jan 2019 15:45:29 +0000 (UTC) Subject: [pypy-issue] Issue #2940: Allow downloading the latest build using `latest` as version number. (pypy/pypy) Message-ID: <20190119154529.36885.72175@celery-worker-110.ash1.bb-inf.net> New issue 2940: Allow downloading the latest build using `latest` as version number. https://bitbucket.org/pypy/pypy/issues/2940/allow-downloading-the-latest-build-using KOLANICH: Both in BitBucket downloads and buildbot. From issues-reply at bitbucket.org Sat Jan 19 11:09:40 2019 From: issues-reply at bitbucket.org (KOLANICH) Date: Sat, 19 Jan 2019 16:09:40 +0000 (UTC) Subject: [pypy-issue] Issue #2941: Move from BitBucked to GitLab / GitHub / Trac (pypy/pypy) Message-ID: <20190119160940.15422.86935@celery-worker-111.ash1.bb-inf.net> New issue 2941: Move from BitBucked to GitLab / GitHub / Trac https://bitbucket.org/pypy/pypy/issues/2941/move-from-bitbucked-to-gitlab-github-trac KOLANICH: BitBucket is extremily slow, eats a lot of memory and drains battery. While writing this issue battery charge level has dropped from 97% to 71%. This service is shit which should not be used. GitLab has CI (with publishing build artifacts) and Docker registry. From issues-reply at bitbucket.org Sun Jan 20 09:57:43 2019 From: issues-reply at bitbucket.org (hunch) Date: Sun, 20 Jan 2019 14:57:43 +0000 (UTC) Subject: [pypy-issue] Issue #2942: Unable to install numpy with pypy3 on MacOS (pypy/pypy) Message-ID: <20190120145743.34438.70424@app-137.ash1.bb-inf.net> New issue 2942: Unable to install numpy with pypy3 on MacOS https://bitbucket.org/pypy/pypy/issues/2942/unable-to-install-numpy-with-pypy3-on hunch: Hi, I am trying to install numpy with pip_pypy3, but I am getting this lengthy error. The last section of the error is ``` ... ... compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/local/Cellar/pypy3/6.0.0/libexec/include -c' cc: _configtest.c cc -pthread -arch x86_64 _configtest.o -o _configtest ld: library not found for -lgcc_s.10.4 clang: error: linker command failed with exit code 1 (use -v to see invocation) failure. removing: _configtest.c _configtest.o _configtest.o.d Traceback (most recent call last): File "", line 1, in File "/private/var/folders/22/cp1phkbd42q8dj21sdk2z7m80000gn/T/pip-install-w4eoqdu5/numpy/setup.py", line 415, in setup_package() File "/private/var/folders/22/cp1phkbd42q8dj21sdk2z7m80000gn/T/pip-install-w4eoqdu5/numpy/setup.py", line 407, in setup_package setup(**metadata) File "/private/var/folders/22/cp1phkbd42q8dj21sdk2z7m80000gn/T/pip-install-w4eoqdu5/numpy/numpy/distutils/core.py", line 171, in setup return old_setup(**new_attr) File "/usr/local/Cellar/pypy3/6.0.0/libexec/site-packages/setuptools/__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/private/var/folders/22/cp1phkbd42q8dj21sdk2z7m80000gn/T/pip-install-w4eoqdu5/numpy/numpy/distutils/command/install.py", line 62, in run r = self.setuptools_run() File "/private/var/folders/22/cp1phkbd42q8dj21sdk2z7m80000gn/T/pip-install-w4eoqdu5/numpy/numpy/distutils/command/install.py", line 36, in setuptools_run return distutils_install.run(self) File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/distutils/command/install.py", line 549, in run self.run_command('build') File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/private/var/folders/22/cp1phkbd42q8dj21sdk2z7m80000gn/T/pip-install-w4eoqdu5/numpy/numpy/distutils/command/build.py", line 47, in run old_build.run(self) File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/private/var/folders/22/cp1phkbd42q8dj21sdk2z7m80000gn/T/pip-install-w4eoqdu5/numpy/numpy/distutils/command/build_src.py", line 148, in run self.build_sources() File "/private/var/folders/22/cp1phkbd42q8dj21sdk2z7m80000gn/T/pip-install-w4eoqdu5/numpy/numpy/distutils/command/build_src.py", line 159, in build_sources self.build_library_sources(*libname_info) File "/private/var/folders/22/cp1phkbd42q8dj21sdk2z7m80000gn/T/pip-install-w4eoqdu5/numpy/numpy/distutils/command/build_src.py", line 292, in build_library_sources sources = self.generate_sources(sources, (lib_name, build_info)) File "/private/var/folders/22/cp1phkbd42q8dj21sdk2z7m80000gn/T/pip-install-w4eoqdu5/numpy/numpy/distutils/command/build_src.py", line 375, in generate_sources source = func(extension, build_dir) File "numpy/core/setup.py", line 667, in get_mathlib_info raise RuntimeError("Broken toolchain: cannot link a simple C program") RuntimeError: Broken toolchain: cannot link a simple C program ---------------------------------------- Command "/usr/local/Cellar/pypy3/6.0.0/bin/pypy3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/22/cp1phkbd42q8dj21sdk2z7m80000gn/T/pip-install-w4eoqdu5/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/22/cp1phkbd42q8dj21sdk2z7m80000gn/T/pip-record-kycren62/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/22/cp1phkbd42q8dj21sdk2z7m80000gn/T/pip-install-w4eoqdu5/numpy/ ``` System version: MacOS 10.14.2; pip-18.1; setuptools-40.6.3; pypy3(6.0.0). I can install cython successfully. Any help would be great. Thanks. From issues-reply at bitbucket.org Tue Jan 22 04:41:24 2019 From: issues-reply at bitbucket.org (Nathaniel Smith) Date: Tue, 22 Jan 2019 09:41:24 +0000 (UTC) Subject: [pypy-issue] Issue #2943: coverage.py broken on py3.6 branch (pypy/pypy) Message-ID: <20190122094123.13645.34438@app-137.ash1.bb-inf.net> New issue 2943: coverage.py broken on py3.6 branch https://bitbucket.org/pypy/pypy/issues/2943/coveragepy-broken-on-py36-branch Nathaniel Smith: I don't currently have a minimal reproducer, but here's a coverage report for trio: https://codecov.io/gh/python-trio/trio/src/25ee5cac243395cc51e75782e03b8ef53035f9b2/trio/tests/test_ssl.py If you look at line 47 or 56, you'll notice that there is no actual code there, but it is still marked red for "missing coverage". This report aggregates coverage info from a bunch of different CI runs. If you scroll up to the top, and click on the `pypy_nightly_py3_6` button, then this toggles the inclusion of our pypy nightly py3.6 branch CI. If we toggle it off, the anomalous red lines disappear. I conclude from this that coverage.py on the py3.6 branch is producing junk results. I don't know if this is a pypy bug or a coverage.py bug, but I figured I'd at least open an issue so it doesn't get lost. I speculate (but haven't confirmed) that you could reproduce this by using the py3.6 branch to run: ``` git clone https://github.com/python-trio/trio cd trio pip install -r test-requirements.txt pytest --cov=trio --cov-report=html ``` From issues-reply at bitbucket.org Sun Jan 27 20:30:12 2019 From: issues-reply at bitbucket.org (Anthony Sottile) Date: Mon, 28 Jan 2019 01:30:12 +0000 (UTC) Subject: [pypy-issue] Issue #2944: origin for several "builtin" modules references build directory (pypy/pypy) Message-ID: <20190128013012.13869.37851@celery-worker-111.ash1.bb-inf.net> New issue 2944: origin for several "builtin" modules references build directory https://bitbucket.org/pypy/pypy/issues/2944/origin-for-several-builtin-modules Anthony Sottile: For example ``` $ pypy3 -c 'import importlib.util; print(importlib.util.find_spec("abc"))' ModuleSpec(name='abc', loader=<_frozen_importlib_external.SourceFileLoader object at 0x00007f717f943e20>, origin='/extra1/home/buildslave/buildslave/pypy-c-jit-linux-x86-64/build/lib-python/3/abc.py') ``` Compare a non-builtin pure-python module: ``` $ pypy3 -c 'import importlib.util; print(importlib.util.find_spec("os"))' ModuleSpec(name='os', loader=<_frozen_importlib_external.SourceFileLoader object at 0x00007f636b735a28>, origin='/home/asottile/opt/pypy3-v6.0.0-linux64/lib-python/3/os.py') ``` Or a builtin module: ``` $ pypy3 -c 'import importlib.util; print(importlib.util.find_spec("sys"))' ModuleSpec(name='sys', loader=) ``` --- wondering if this is a bug or if this is intentional -- we're attempting to replace the deprecated `imp.find_module` which returns different values in `virtualenv`: ```pycon >>>> imp.find_module('abc')[1] '/home/asottile/opt/pypy3-v6.0.0-linux64/lib-python/3/abc.py' >>>> imp.find_module('os')[1] '/home/asottile/opt/pypy3-v6.0.0-linux64/lib-python/3/os.py' >>>> imp.find_module('sys')[1] >>>> ``` The PR for that is here: https://github.com/pypa/virtualenv/pull/1293 From issues-reply at bitbucket.org Wed Jan 30 19:21:42 2019 From: issues-reply at bitbucket.org (=?utf-8?b?WXV4dWFuIOKAnGZpc2h54oCdIFdhbmc=?=) Date: Thu, 31 Jan 2019 00:21:42 +0000 (UTC) Subject: [pypy-issue] Issue #2945: Build with debug info and continuation support, got "'no_collect' function can trigger collection" error (pypy/pypy) Message-ID: <20190131002142.36614.11036@celery-worker-111.ash1.bb-inf.net> New issue 2945: Build with debug info and continuation support, got "'no_collect' function can trigger collection" error https://bitbucket.org/pypy/pypy/issues/2945/build-with-debug-info-and-continuation Yuxuan ?fishy? Wang: I was trying to build pypy3.5 (from tag `release-pypy3.5-v6.0.0`) with debug info (`-O0`) and continuation support (because that's required by greenlet), this is the command line I used for building: ``` pypy ../../rpython/bin/rpython -O0 --continuation --gc incminimark targetpypystandalone --withmod-_continuation ``` But I got this error after 99%: ``` !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [CollectAnalyzer] v3737 = malloc((GcStruct tuple4), ({'flavor': 'gc'})): True [CollectAnalyzer] analyze_direct_call((rpython.rlib.rsiphash:206)_half_round): True [CollectAnalyzer] analyze_direct_call((rpython.rlib.rsiphash:215)_double_round): True [152ad] translation-task} [Timer] Timings: [Timer] annotate --- 272.0 s [Timer] rtype_lltype --- 402.3 s [Timer] backendopt_lltype --- 15.9 s [Timer] stackcheckinsertion_lltype --- 128.8 s [Timer] database_c --- 31.4 s [Timer] ========================================== [Timer] Total: --- 850.4 s [translation:info] Error: File "/home/vagrant/pypy/rpython/translator/goal/translate.py", line 318, in main drv.proceed(goals) File "/home/vagrant/pypy/rpython/translator/driver.py", line 554, in proceed result = self._execute(goals, task_skip = self._maybe_skip()) File "/home/vagrant/pypy/rpython/translator/tool/taskengine.py", line 114, in _execute res = self._do(goal, taskcallable, *args, **kwds) File "/home/vagrant/pypy/rpython/translator/driver.py", line 278, in _do res = func() File "/home/vagrant/pypy/rpython/translator/driver.py", line 435, in task_database_c database = cbuilder.build_database() File "/home/vagrant/pypy/rpython/translator/c/genc.py", line 127, in build_database db.complete() File "/home/vagrant/pypy/rpython/translator/c/database.py", line 306, in complete add_dependencies(node.enum_dependencies(), node) File "/home/vagrant/pypy/rpython/translator/c/database.py", line 294, in add_dependencies self.get(value, parent and parent._funccodegen_owner) File "/home/vagrant/pypy/rpython/translator/c/database.py", line 224, in get node = self.getcontainernode(container) File "/home/vagrant/pypy/rpython/translator/c/database.py", line 158, in getcontainernode node = nodefactory(self, T, container, **buildkwds) File "/home/vagrant/pypy/rpython/translator/c/node.py", line 898, in new_funcnode return FuncNode(db, T, obj, name) File "/home/vagrant/pypy/rpython/translator/c/node.py", line 803, in __init__ self.funcgen = make_funcgen(obj.graph, db, exception_policy, ptrname) File "/home/vagrant/pypy/rpython/translator/c/funcgen.py", line 28, in make_funcgen db.gctransformer.transform_graph(graph) File "/home/vagrant/pypy/rpython/memory/gctransform/framework.py", line 754, in transform_graph " %s" % func) [translation:ERROR] Exception: 'no_collect' function can trigger collection: ``` Can someone advise?