From tracker at bugs.pypy.org Thu Mar 1 04:31:56 2012 From: tracker at bugs.pypy.org (Victor) Date: Thu, 01 Mar 2012 03:31:56 +0000 Subject: [pypy-issue] [issue1075] Fatal RPython error: AssertionError In-Reply-To: <1330572716.45.0.854227167709.issue1075@bugs.pypy.org> Message-ID: <1330572716.45.0.854227167709.issue1075@bugs.pypy.org> New submission from Victor : pypy 1.8.1 on Ubuntu 11.10 x64. This is an Ant Colony Optimization algorithm for the Quadratic Assignment Problem. The test problem is had12.dat from the QAP Library . Any numpy functions used are compatible with pypy. When running the code, the following error is produced: RPython traceback: File "jit_metainterp_compile.c", line 19027, in send_bridge_to_backend File "jit_backend_x86_assembler.c", line 54970, in Assembler386_assemble_bridge File "jit_backend_x86_regalloc.c", line 1041, in RegAlloc__prepare File "jit_backend_x86_regalloc.c", line 4984, in RegAlloc__compute_vars_longevity Fatal RPython error: AssertionError Aborted ---------- files: pypy-assertionerror.py messages: 4035 nosy: pypy-issue, vcaligi1 priority: bug status: unread title: Fatal RPython error: AssertionError ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 1 06:25:12 2012 From: tracker at bugs.pypy.org (mikefc) Date: Thu, 01 Mar 2012 05:25:12 +0000 Subject: [pypy-issue] [issue1075] Fatal RPython error: AssertionError In-Reply-To: <1330572716.45.0.854227167709.issue1075@bugs.pypy.org> Message-ID: <1330579512.47.0.0070355829607.issue1075@bugs.pypy.org> mikefc added the comment: On latest pypy (f9f3b57f1300) on OSX I don't see this error. ---------- nosy: +mikefc status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 1 11:27:20 2012 From: tracker at bugs.pypy.org (Ronny Pfannschmidt) Date: Thu, 01 Mar 2012 10:27:20 +0000 Subject: [pypy-issue] [issue1075] Fatal RPython error: AssertionError In-Reply-To: <1330572716.45.0.854227167709.issue1075@bugs.pypy.org> Message-ID: <1330597639.95.0.578155632571.issue1075@bugs.pypy.org> Ronny Pfannschmidt added the comment: just tested on 3ea73d1d6fb1, where it works however it failed on a older nightly i tested with before so i think that issue got fixed recently ---------- nosy: +ronny ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 1 16:07:24 2012 From: tracker at bugs.pypy.org (Victor) Date: Thu, 01 Mar 2012 15:07:24 +0000 Subject: [pypy-issue] [issue1075] Fatal RPython error: AssertionError In-Reply-To: <1330572716.45.0.854227167709.issue1075@bugs.pypy.org> Message-ID: <1330614443.9.0.981538724677.issue1075@bugs.pypy.org> Victor added the comment: Fixed in 53032-f9f3b57f1300 nightly ---------- status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 1 21:46:25 2012 From: tracker at bugs.pypy.org (Hakan Ardo) Date: Thu, 01 Mar 2012 20:46:25 +0000 Subject: [pypy-issue] [issue1072] Fatal RPython error: OverflowError In-Reply-To: <1330327260.33.0.812176274841.issue1072@bugs.pypy.org> Message-ID: <1330634785.17.0.470341423131.issue1072@bugs.pypy.org> Hakan Ardo added the comment: Hi, this was hopefully fixed by 90010b41b565, but needs verification on tomorrows nigthly. ---------- nosy: +hakanardo status: chatting -> in-progress ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 2 11:14:11 2012 From: tracker at bugs.pypy.org (Tobias Oberstein) Date: Fri, 02 Mar 2012 10:14:11 +0000 Subject: [pypy-issue] [issue1076] Finish kqueue support In-Reply-To: <1330683251.67.0.917645290504.issue1076@bugs.pypy.org> Message-ID: <1330683251.67.0.917645290504.issue1076@bugs.pypy.org> New submission from Tobias Oberstein : Alex Gaynor has started with kqueue support on branch "kqueue": https://bitbucket.org/pypy/pypy/src/cc37b011ea0f https://bitbucket.org/pypy/pypy/compare/kqueue..default Finish that, make unit tests succeed, make it ready for trunk. IOW: make kqueue on PyPy and BSDish platforms officially supported. ---------- assignedto: oberstet messages: 4040 nosy: oberstet, pypy-issue priority: feature status: in-progress title: Finish kqueue support ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 2 13:49:11 2012 From: tracker at bugs.pypy.org (Tobias Oberstein) Date: Fri, 02 Mar 2012 12:49:11 +0000 Subject: [pypy-issue] [issue1076] Finish kqueue support In-Reply-To: <1330683251.67.0.917645290504.issue1076@bugs.pypy.org> Message-ID: <1330692551.04.0.923379000137.issue1076@bugs.pypy.org> Tobias Oberstein added the comment: started on https://bitbucket.org/oberstet/pypy/ branch kqueue ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 2 19:11:02 2012 From: tracker at bugs.pypy.org (Hakan Ardo) Date: Fri, 02 Mar 2012 18:11:02 +0000 Subject: [pypy-issue] [issue1072] Fatal RPython error: OverflowError In-Reply-To: <1330327260.33.0.812176274841.issue1072@bugs.pypy.org> Message-ID: <1330711862.58.0.921559815158.issue1072@bugs.pypy.org> Hakan Ardo added the comment: Hi, this no longer crashes on latest night (2881f17e1ffc). ---------- status: in-progress -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 2 19:13:11 2012 From: tracker at bugs.pypy.org (Hakan Ardo) Date: Fri, 02 Mar 2012 18:13:11 +0000 Subject: [pypy-issue] [issue1071] jit crash In-Reply-To: <1330303926.16.0.793903164103.issue1071@bugs.pypy.org> Message-ID: <1330711991.52.0.483194044861.issue1071@bugs.pypy.org> Hakan Ardo added the comment: I've now verified that this no longer crashed with latest nightly (2881f17e1ffc). ---------- status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 2 19:19:51 2012 From: tracker at bugs.pypy.org (Hakan Ardo) Date: Fri, 02 Mar 2012 18:19:51 +0000 Subject: [pypy-issue] [issue1045] Crash of the JIT In-Reply-To: <1329140443.89.0.137027286035.issue1045@bugs.pypy.org> Message-ID: <1330712391.67.0.54657686587.issue1045@bugs.pypy.org> Hakan Ardo added the comment: I've run this now several times using latest nigthly (2881f17e1ffc) and it's working just fine every time. ---------- status: in-progress -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 2 19:42:45 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Fri, 02 Mar 2012 18:42:45 +0000 Subject: [pypy-issue] [issue1045] Crash of the JIT In-Reply-To: <1329140443.89.0.137027286035.issue1045@bugs.pypy.org> Message-ID: <1330713765.43.0.501789672545.issue1045@bugs.pypy.org> Armin Rigo added the comment: Daid: for completeness: the "--jit enable_opts" option is indeed reserved for internal use, but the complete list is the one you gave plus ":unroll" at the end. The unroll optimization is precisely where this occurs :-) ---------- status: resolved -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 4 01:12:30 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Sun, 04 Mar 2012 00:12:30 +0000 Subject: [pypy-issue] [issue1077] Comparison with tuples and more In-Reply-To: <1330819950.05.0.0415056089507.issue1077@bugs.pypy.org> Message-ID: <1330819950.05.0.0415056089507.issue1077@bugs.pypy.org> New submission from Armin Rigo : A bug in the sense that PyPy (>>>>) gives a different behavior than CPython (>>>): >>> (nan,) <= (5,) False >>>> (nan,) <= (5,) True Similarly: >>> (set([6]),) <= (set([5]),) False >>>> (set([6]),) <= (set([5]),) True The issue is about "<=", which in PyPy is defined by default as "not >". This can be seen by trying this: >>>> (nan,) <= (5,) True >>>> (nan,) > (5,) False >>> (nan,) <= (5,) False >>> (nan,) > (5,) False ---------- messages: 4046 nosy: arigo, pypy-issue priority: bug status: unread title: Comparison with tuples and more ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 4 15:16:31 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Sun, 04 Mar 2012 14:16:31 +0000 Subject: [pypy-issue] [issue1069] PyThread_set_key_value and PyThread_delete_key_value missing from cpyext support In-Reply-To: <1330193098.61.0.219372830064.issue1069@bugs.pypy.org> Message-ID: <1330870591.76.0.00627472160535.issue1069@bugs.pypy.org> Amaury Forgeot d Arc added the comment: cpyext has never provided these function, but recently started to #define WITH_THREAD, which enabled the thread-aware version of some pyOpenSSL macros (MY_BEGIN_ALLOW_THREADS) ---------- nosy: +afa status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 4 17:58:38 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Sun, 04 Mar 2012 16:58:38 +0000 Subject: [pypy-issue] [issue1069] PyThread_set_key_value and PyThread_delete_key_value missing from cpyext support In-Reply-To: <1330193098.61.0.219372830064.issue1069@bugs.pypy.org> Message-ID: <1330880318.24.0.992149549516.issue1069@bugs.pypy.org> Amaury Forgeot d Arc added the comment: Added these functions in fc46fb928ddb (by copying the code from CPython), tell me if pyOpenSSL now works. ---------- status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 4 20:33:48 2012 From: tracker at bugs.pypy.org (Alex Gaynor) Date: Sun, 04 Mar 2012 19:33:48 +0000 Subject: [pypy-issue] [issue1048] pypy -m cProfile: jit bug In-Reply-To: <1329301755.34.0.765793068872.issue1048@bugs.pypy.org> Message-ID: <1330889627.99.0.174937901181.issue1048@bugs.pypy.org> Alex Gaynor added the comment: Marking as resolved ---------- nosy: +agaynor status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 5 11:57:53 2012 From: tracker at bugs.pypy.org (Daid) Date: Mon, 05 Mar 2012 10:57:53 +0000 Subject: [pypy-issue] [issue1045] Crash of the JIT In-Reply-To: <1329140443.89.0.137027286035.issue1045@bugs.pypy.org> Message-ID: <1330945073.57.0.798005441416.issue1045@bugs.pypy.org> Daid added the comment: Arigo: Thanks for the extra info. For completeness: I didn't have to chance to test it earlier, but I just tested it and I also no longer get any crashes. ---------- status: resolved -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 5 13:18:51 2012 From: tracker at bugs.pypy.org (Jean-Paul Calderone) Date: Mon, 05 Mar 2012 12:18:51 +0000 Subject: [pypy-issue] [issue1069] PyThread_set_key_value and PyThread_delete_key_value missing from cpyext support In-Reply-To: <1330193098.61.0.219372830064.issue1069@bugs.pypy.org> Message-ID: <1330949931.37.0.77051986802.issue1069@bugs.pypy.org> Jean-Paul Calderone added the comment: pyOpenSSL builds without warnings now, and imports. Thanks. However, it looks like at least one case isn't handled in the same way as on CPython. $ python -c ' import OpenSSL conn = OpenSSL.SSL.Connection(OpenSSL.SSL.Context(OpenSSL.SSL.TLSv1_METHOD), None) conn.set_connect_state() conn.do_handshake() ' Traceback (most recent call last): File "", line 5, in OpenSSL.SSL.WantReadError $ vs PyPy: $ ~/pypy-c-jit-53221-27d215507bad-linux64/bin/pypy -c ' import OpenSSL conn = OpenSSL.SSL.Connection(OpenSSL.SSL.Context(OpenSSL.SSL.TLSv1_METHOD), None) conn.set_connect_state() conn.do_handshake() ' pypy: thread.c:238: PyThread_set_key_value: Assertion `value != ((void *)0)' failed. Aborted $ You might be able to convince me that PyThread_delete key should be used instead of PyThread_set_key_value(key, NULL), but just being compatible with CPython would be easier for me (clearly ;). ---------- status: resolved -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 5 13:53:24 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Mon, 05 Mar 2012 12:53:24 +0000 Subject: [pypy-issue] [issue1069] PyThread_set_key_value and PyThread_delete_key_value missing from cpyext support In-Reply-To: <1330193098.61.0.219372830064.issue1069@bugs.pypy.org> Message-ID: <1330952004.33.0.644031317298.issue1069@bugs.pypy.org> Amaury Forgeot d Arc added the comment: Hmm, I copied the code verbatim, from CPython 2.7. Your interpreter is certainly compiled with assertions disabled. PyEval_SaveThread() always return NULL in pypy. But I don't know if there is a better value, since the GIL is always released in C code. Or we could again use an empty definition for MY_BEGIN_ALLOW_THREADS... ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 6 01:39:48 2012 From: tracker at bugs.pypy.org (Fraser Tweedale) Date: Tue, 06 Mar 2012 00:39:48 +0000 Subject: [pypy-issue] [issue1078] comparison between dictview and frozendict is wrong In-Reply-To: <1330994388.53.0.80561785434.issue1078@bugs.pypy.org> Message-ID: <1330994388.53.0.80561785434.issue1078@bugs.pypy.org> New submission from Fraser Tweedale : Comparing dictview to frozendict produces wrong result (PyPy 1.8.0). {'a':1}.viewkeys() == set(('a')) # True in CPy and PyPy {'a':1}.viewkeys() == frozenset(('a')) # True in CPy, False in PyPy ---------- messages: 4053 nosy: frasertweedale, pypy-issue priority: bug status: unread title: comparison between dictview and frozendict is wrong ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 8 23:49:36 2012 From: tracker at bugs.pypy.org (Justin Patrin) Date: Thu, 08 Mar 2012 22:49:36 +0000 Subject: [pypy-issue] [issue1080] jit errors (infinite loop and str instead of token object) In-Reply-To: <1331246976.69.0.646014776853.issue1080@bugs.pypy.org> Message-ID: <1331246976.69.0.646014776853.issue1080@bugs.pypy.org> New submission from Justin Patrin : The attached tarball has a scheme interpreter I wrote for fun and two scripts which have problems when run with pypy with a jit. If the jit is turned off they work as expected. I've narrowed the jit options down to enable_opts=intbounds:rewrite:virtualize:string:heap:unroll which cause the errors to occur. If all jit options except for unroll are specified (enable_opts=intbounds:rewrite:virtualize:string:earlyforce:pure:heap:ffi) then the issues go away, so it stands to reason that this is "unroll" related. Running str_instead_of_token.py gets an error where a 'str' object is somehow in the place of one of my 'token' objects. Running infinite_loop.py gets into an infinite loop when running the last enabled test. I have tested this with the newest version of pypy in hg: $ hg summary (jpatrin at jpatrin-mbp-lol:..ypy/translator/goal) parent: 53272:d8c92dd23635 tip (fijal, arigo) branch: default commit: 1511 unknown (clean) update: (current) built with: ./pypy-c translate.py --opt=jit --output=pypy-c.new --continuation --thread -- gc=minimark --listcompr --clever-malloc-removal --insist -- gcrootfinder=shadowstack targetpypystandalone.py ---------- files: jit_errors.tbz2 messages: 4055 nosy: papercrane, pypy-issue priority: bug status: unread title: jit errors (infinite loop and str instead of token object) ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 9 17:40:39 2012 From: tracker at bugs.pypy.org (Simon Sapin) Date: Fri, 09 Mar 2012 16:40:39 +0000 Subject: [pypy-issue] [issue1081] string.Formatter does not unescape double braces In-Reply-To: <1331311239.95.0.375206161935.issue1081@bugs.pypy.org> Message-ID: <1331311239.95.0.375206161935.issue1081@bugs.pypy.org> New submission from Simon Sapin : The Formatter class of the string module is supposed to implement the same functionality as the str.format method, but on PyPy 1.8.0 it (incorrectly) does not unescape double braces. Test case: import string; print string.Formatter().format("{{a}}", a=42) Expected (CPython) output: {a} PyPy output: {{a}} Note that str.format('{{a}}', a=42) works fine in both CPython and PyPy. The string.py stdlib module is identical in CPython 2.7.2 and PyPy 1.8.0, but it calls the str._formatter_parser() method, where the results differ: CPython: [('{', None, None, None), ('a}', None, None, None)] PyPy: [('{{a}}', None, None, None)] (This output is documented here: http://docs.python.org/release/2.7/library/string.html#string.Formatter.parse ) ---------- messages: 4056 nosy: SimonSapin, pypy-issue priority: bug status: unread title: string.Formatter does not unescape double braces ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Mar 10 22:50:41 2012 From: tracker at bugs.pypy.org (rednaks) Date: Sat, 10 Mar 2012 21:50:41 +0000 Subject: [pypy-issue] [issue1082] [PATCH]HTMLParser decode issue In-Reply-To: <1331416241.28.0.454005848678.issue1082@bugs.pypy.org> Message-ID: <1331416241.28.0.454005848678.issue1082@bugs.pypy.org> New submission from rednaks : while parsing a HTML code i got an decode Error : but this issue can be fixed by replacing the last string by s.decode() like in the diff file. I also tried to execute my script under python3.2 and it does not parsing any thing File "/usr/lib/python2.7/HTMLParser.py", line 111, in feed self.goahead(0) File "/usr/lib/python2.7/HTMLParser.py", line 155, in goahead k = self.parse_starttag(i) File "/usr/lib/python2.7/HTMLParser.py", line 260, in parse_starttag attrvalue = self.unescape(attrvalue) File "/usr/lib/python2.7/HTMLParser.py", line 410, in unescape return re.sub(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));", replaceEntities, s) File "/usr/lib/python2.7/re.py", line 151, in sub return _compile(pattern, flags).sub(repl, string, count) UnicodeDecodeError: 'ascii' codec can't decode byte 0x97 in position 1: ordinal not in range(128) ---------- files: patch.txt messages: 4057 nosy: pypy-issue, rednaks priority: bug status: unread title: [PATCH]HTMLParser decode issue ________________________________________ PyPy bug tracker ________________________________________ -------------- next part -------------- diff -ru1 old/HTMLParser.py new/HTMLParser.py --- old/HTMLParser.py 2012-03-10 23:40:16.000000000 +0100 +++ new/HTMLParser.py 2012-03-10 23:46:36.000000000 +0100 @@ -409,2 +409,2 @@ - return re.sub(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));", replaceEntities, s) + return re.sub(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));", replaceEntities, s.decode()) From tracker at bugs.pypy.org Sun Mar 11 01:28:19 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Sun, 11 Mar 2012 00:28:19 +0000 Subject: [pypy-issue] [issue1082] [PATCH]HTMLParser decode issue In-Reply-To: <1331416241.28.0.454005848678.issue1082@bugs.pypy.org> Message-ID: <1331425699.3.0.488067291686.issue1082@bugs.pypy.org> Amaury Forgeot d Arc added the comment: Hum, from the traceback it seems that you use CPython and not PyPy. I this is the case, you should report the issue to the CPython bug tracker: bugs.python.org. In any case, please provide a small test script that reproduces the problem. ---------- nosy: +afa status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 11 03:12:29 2012 From: tracker at bugs.pypy.org (Jean-Paul Calderone) Date: Sun, 11 Mar 2012 02:12:29 +0000 Subject: [pypy-issue] [issue1083] Py_buffer-related formats not really supported by cpyext's PyArg_ParseTuple In-Reply-To: <1331431949.73.0.11762789711.issue1083@bugs.pypy.org> Message-ID: <1331431949.73.0.11762789711.issue1083@bugs.pypy.org> New submission from Jean-Paul Calderone : Using the Py_buffer-filling formats with cpyext's PyArg_ParseTuple leads to random stack corruption. Overall, I think the solution to this is to rewrite getargs.c in Python (with unit tests, of course). The existing code, copied from CPython, is mega-gross, not nearly completely tested, and it would just be all around better if it were Python code instead of nasty C code. A more complete description of the way Py_buffer-usage causes stack corruption is at http://bazaar.launchpad.net/~exarkun/pyopenssl/some-fixed- segfaults/revision/173 ---------- messages: 4059 nosy: calderone, pypy-issue priority: bug status: unread title: Py_buffer-related formats not really supported by cpyext's PyArg_ParseTuple ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 11 03:19:20 2012 From: tracker at bugs.pypy.org (rednaks) Date: Sun, 11 Mar 2012 02:19:20 +0000 Subject: [pypy-issue] [issue1082] [PATCH]HTMLParser decode issue In-Reply-To: <1331416241.28.0.454005848678.issue1082@bugs.pypy.org> Message-ID: <1331432360.32.0.628661928366.issue1082@bugs.pypy.org> rednaks added the comment: Okey thank's afa, i'll report this on the CPython bug tracker ! does PyPy using standard libs of CPython ? did you ever get such issues ? ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 11 11:12:23 2012 From: tracker at bugs.pypy.org (Stefan Behnel) Date: Sun, 11 Mar 2012 10:12:23 +0000 Subject: [pypy-issue] [issue1084] Implement PyErr_GetExcInfo() and PyErr_SetExcInfo() in cpyext In-Reply-To: <1331460743.68.0.269550106582.issue1084@bugs.pypy.org> Message-ID: <1331460743.68.0.269550106582.issue1084@bugs.pypy.org> New submission from Stefan Behnel : Provide a portable way to read and write sys.get_excinfo() from C code using cpyext, to be used especially by Cython. See: http://bugs.python.org/issue14098 http://thread.gmane.org/gmane.comp.python.pypy/9507/focus=9644 ---------- messages: 4061 nosy: pypy-issue, sbehnel priority: feature status: unread title: Implement PyErr_GetExcInfo() and PyErr_SetExcInfo() in cpyext ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 11 16:08:06 2012 From: tracker at bugs.pypy.org (Stefan Behnel) Date: Sun, 11 Mar 2012 15:08:06 +0000 Subject: [pypy-issue] [issue1085] cpyext: PyString_AsString() returns bogus results for non-bytes input In-Reply-To: <1331478486.45.0.687703104839.issue1085@bugs.pypy.org> Message-ID: <1331478486.45.0.687703104839.issue1085@bugs.pypy.org> New submission from Stefan Behnel : Calling PyString_AsString(Py_None) returns 0x7 for me instead of raising an exception and returning NULL. This triggers a sure crash. Example code is in Cython's "literal_lists.pyx" test. ---------- messages: 4062 nosy: pypy-issue, sbehnel priority: bug status: unread title: cpyext: PyString_AsString() returns bogus results for non-bytes input ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 11 16:48:16 2012 From: tracker at bugs.pypy.org (Stefan Behnel) Date: Sun, 11 Mar 2012 15:48:16 +0000 Subject: [pypy-issue] [issue1086] cpyext: calling PyIter_Next() on a "dictionaryiterator" object crashes when the dict was modified In-Reply-To: <1331480896.67.0.851470392018.issue1086@bugs.pypy.org> Message-ID: <1331480896.67.0.851470392018.issue1086@bugs.pypy.org> New submission from Stefan Behnel : The iterdict.pyx test crashes in the PyPy adapted Cython. https://github.com/scoder/cython/blob/master/tests/run/iterdict.pyx#L362 cdef int count = 0 for i in d.iterkeys(): d[i+1] = 5 count += 1 if count > 5: break # safety Readable parts of the GDB stack trace: #2 0x0000000000f2afbc in PyIter_Next () #3 0x00007ffff4c6ad72 in __Pyx_dict_iter_next (dict_or_iter=0x7ffff7e45350, orig_length=140737315342408, ppos=0x7fffffffb428, pkey=0x7fffffffb418, pvalue=0x0, pitem=0x0, is_dict=0) at iterdict.c:5714 #4 0x00007ffff4c651f6 in __pyx_pf_8iterdict_40iterdict_change_size (__pyx_self=0x0, __pyx_v_d=0x7ffff7e45320) at iterdict.c:4007 #5 0x00007ffff4c65079 in __pyx_pw_8iterdict_41iterdict_change_size (__pyx_self=0x0, __pyx_v_d=0x7ffff7e45320) at iterdict.c:3929 ---------- messages: 4063 nosy: pypy-issue, sbehnel priority: bug status: unread title: cpyext: calling PyIter_Next() on a "dictionaryiterator" object crashes when the dict was modified ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 11 22:24:54 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Sun, 11 Mar 2012 21:24:54 +0000 Subject: [pypy-issue] [issue1082] [PATCH]HTMLParser decode issue In-Reply-To: <1331416241.28.0.454005848678.issue1082@bugs.pypy.org> Message-ID: <1331501094.62.0.0875917005395.issue1082@bugs.pypy.org> Amaury Forgeot d Arc added the comment: Yes, PyPy uses the same stdlib as CPython. Sometimes they are slightly modified to cope with pypy differences, but this is not the case here. I've seen that you filed http://bugs.python.org/issue14251 Closing this one -- pypy will take whatever changes are made to the CPython stdlib. ---------- status: chatting -> wontfix ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 11 22:31:53 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Sun, 11 Mar 2012 21:31:53 +0000 Subject: [pypy-issue] [issue1081] string.Formatter does not unescape double braces In-Reply-To: <1331311239.95.0.375206161935.issue1081@bugs.pypy.org> Message-ID: <1331501513.36.0.946157943631.issue1081@bugs.pypy.org> Amaury Forgeot d Arc added the comment: Fixed with 186605be5a0a, thanks for the report and the analysis! ---------- nosy: +afa status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 11 22:54:25 2012 From: tracker at bugs.pypy.org (rednaks) Date: Sun, 11 Mar 2012 21:54:25 +0000 Subject: [pypy-issue] [issue1082] [PATCH]HTMLParser decode issue In-Reply-To: <1331416241.28.0.454005848678.issue1082@bugs.pypy.org> Message-ID: <1331502865.76.0.168389135715.issue1082@bugs.pypy.org> rednaks added the comment: Okey thank's :) ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 11 23:06:41 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Sun, 11 Mar 2012 22:06:41 +0000 Subject: [pypy-issue] [issue1083] Py_buffer-related formats not really supported by cpyext's PyArg_ParseTuple In-Reply-To: <1331431949.73.0.11762789711.issue1083@bugs.pypy.org> Message-ID: <1331503601.06.0.368598196727.issue1083@bugs.pypy.org> Amaury Forgeot d Arc added the comment: I fear it won't be easy: C vararg functions are not friendly with any kind of wrapper, this is why we copied the C version from CPython. ---------- nosy: +afa status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 11 23:54:18 2012 From: tracker at bugs.pypy.org (Fijal) Date: Sun, 11 Mar 2012 22:54:18 +0000 Subject: [pypy-issue] [issue1083] Py_buffer-related formats not really supported by cpyext's PyArg_ParseTuple In-Reply-To: <1331431949.73.0.11762789711.issue1083@bugs.pypy.org> Message-ID: <1331506458.25.0.36375424332.issue1083@bugs.pypy.org> Fijal added the comment: I hate to say that but maybe we should fix C? Like copy the stringbuffer if we exit correctly or so? ---------- nosy: +fijal ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 12 14:13:11 2012 From: tracker at bugs.pypy.org (Tobias Oberstein) Date: Mon, 12 Mar 2012 13:13:11 +0000 Subject: [pypy-issue] [issue878] too many open files In-Reply-To: <1316725510.98.0.71219979546.issue878@bugs.pypy.org> Message-ID: <1331557991.45.0.754710267742.issue878@bugs.pypy.org> Tobias Oberstein added the comment: For people running into this issue, here is the recipe for Ubuntu: 1. sudo vi /etc/pam.d/su => uncomment the line: session required pam_limits.so 2. sudo vi /etc/security/limits.conf => add the following 2 lines at the end of file: * soft nofile 65535 * hard nofile 65535 3. reboot. 4. check: pypy => >>>> import resource >>>> resource.getrlimit(resource.RLIMIT_NOFILE) (65535L, 65535L) === Caveat: This will set limit to 64k for _all_ users. i.e. don't do that on a production box. ---------- nosy: +oberstet ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 12 18:13:03 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Mon, 12 Mar 2012 17:13:03 +0000 Subject: [pypy-issue] [issue1079] str.join + setdefaultencoding problem In-Reply-To: <1331220655.08.0.829278773481.issue1079@bugs.pypy.org> Message-ID: <1331572383.28.0.957232530577.issue1079@bugs.pypy.org> David Ripton added the comment: Confirmed the bug, in pypy-1.8 on x86 Linux ---------- nosy: +dripton status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 12 18:21:54 2012 From: tracker at bugs.pypy.org (Alex Gaynor) Date: Mon, 12 Mar 2012 17:21:54 +0000 Subject: [pypy-issue] [issue1078] comparison between dictview and frozendict is wrong In-Reply-To: <1330994388.53.0.80561785434.issue1078@bugs.pypy.org> Message-ID: <1331572914.74.0.680285296052.issue1078@bugs.pypy.org> Alex Gaynor added the comment: Fixed in bf600fa56140 ---------- nosy: +agaynor status: unread -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 12 18:31:48 2012 From: tracker at bugs.pypy.org (Alex Gaynor) Date: Mon, 12 Mar 2012 17:31:48 +0000 Subject: [pypy-issue] [issue1079] str.join + setdefaultencoding problem In-Reply-To: <1331220655.08.0.829278773481.issue1079@bugs.pypy.org> Message-ID: <1331573508.96.0.233548348353.issue1079@bugs.pypy.org> Alex Gaynor added the comment: Cause seems to be https://bitbucket.org/pypy/pypy/src/default/pypy/objspace/std/stringobject.py#cl- 58 (note the XXX) ---------- nosy: +agaynor ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 12 21:14:35 2012 From: tracker at bugs.pypy.org (Andrew McNabb) Date: Mon, 12 Mar 2012 20:14:35 +0000 Subject: [pypy-issue] [issue1087] Race condition when calling getattr In-Reply-To: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> Message-ID: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> New submission from Andrew McNabb : In PyPy 1.8.0, I came across a race condition when calling getattr. This race condition appears to only occur pypy; I cannot reproduce it in cPython 2.7. Specifically, in multithreaded code, I occasionally encounter the following traceback: 2012-03-12 13:56:37,004: ERROR: Traceback: Traceback (most recent call last): File "/home/amcnabb/python/mrs/http.py", line 157, in _marshaled_dispatch response = dispatch_method(method, params) File "/home/amcnabb/python/mrs/http.py", line 128, in _dispatch return self.server._dispatch(method, params, host) File "/home/amcnabb/python/mrs/http.py", line 177, in _dispatch func = getattr(self.instance, 'xmlrpc_' + method) LookupError: unknown encoding: ascii I can work around this by adding the following lines at the module level: import codecs codecs.lookup('ascii') ---------- messages: 4073 nosy: amcnabb, pypy-issue priority: bug status: unread title: Race condition when calling getattr ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 12 21:54:17 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Mon, 12 Mar 2012 20:54:17 +0000 Subject: [pypy-issue] [issue1079] str.join + setdefaultencoding problem In-Reply-To: <1331220655.08.0.829278773481.issue1079@bugs.pypy.org> Message-ID: <1331585657.45.0.687937816965.issue1079@bugs.pypy.org> David Ripton added the comment: Fix in https://bitbucket.org/pypy/pypy/pull-request/35/fix-for-issue-1079-strjoin-unicode-utf-8 ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 12 22:01:09 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Mon, 12 Mar 2012 21:01:09 +0000 Subject: [pypy-issue] [issue1087] Race condition when calling getattr In-Reply-To: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> Message-ID: <1331586069.03.0.0890534329071.issue1087@bugs.pypy.org> David Ripton added the comment: amcnabb, can you submit a minimal program that triggers the bug? ---------- nosy: +dripton status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 12 22:21:28 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Mon, 12 Mar 2012 21:21:28 +0000 Subject: [pypy-issue] [issue1087] Race condition when calling getattr In-Reply-To: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> Message-ID: <1331587288.08.0.354908199462.issue1087@bugs.pypy.org> David Ripton added the comment: My attempt to reproduce the bug is attached. It does not exhibit the bug, using PyPy 1.8 on x86 Linux. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 12 22:53:07 2012 From: tracker at bugs.pypy.org (mikefc) Date: Mon, 12 Mar 2012 21:53:07 +0000 Subject: [pypy-issue] [issue878] too many open files In-Reply-To: <1316725510.98.0.71219979546.issue878@bugs.pypy.org> Message-ID: <1331589187.58.0.897106703296.issue878@bugs.pypy.org> mikefc added the comment: I found that changing everything to the "with open() as f" syntax in pypy (rather than relying on cpython's refcounting to close a file) resolved this issue for me. ---------- nosy: +mikefc ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 12 23:13:41 2012 From: tracker at bugs.pypy.org (Andrew McNabb) Date: Mon, 12 Mar 2012 22:13:41 +0000 Subject: [pypy-issue] [issue1087] Race condition when calling getattr In-Reply-To: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> Message-ID: <1331590421.77.0.103760994318.issue1087@bugs.pypy.org> Andrew McNabb added the comment: I was able to adapt boom.py to produce the bug. I am attaching the script which triggers the bug more than 50% of the time. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 12 23:19:14 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Mon, 12 Mar 2012 22:19:14 +0000 Subject: [pypy-issue] [issue1087] Race condition when calling getattr In-Reply-To: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> Message-ID: <1331590754.78.0.509630696218.issue1087@bugs.pypy.org> David Ripton added the comment: boomboom.py won't crash for me, either. (32-bit Linux, PyPy 1.8.) I suspect we have an OS-specific or PyPy-version specific problem. What OS are you using, and what version of PyPy? ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 12 23:25:10 2012 From: tracker at bugs.pypy.org (Andrew McNabb) Date: Mon, 12 Mar 2012 22:25:10 +0000 Subject: [pypy-issue] [issue1087] Race condition when calling getattr In-Reply-To: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> Message-ID: <1331591110.87.0.842150481505.issue1087@bugs.pypy.org> Andrew McNabb added the comment: I'm on 64-bit Fedora Linux. uname -a: Linux sage.aml.cs.byu.edu 3.1.9-1.fc16.x86_64 #1 SMP Fri Jan 13 16:37:42 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux pypy --version: Python 2.7.2 (2346207d99463f299f09f3e151c9d5fa9158f71b, Feb 10 2012, 16:19:53) [PyPy 1.8.0 with GCC 4.7.0] ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 12 23:34:43 2012 From: tracker at bugs.pypy.org (Andrew McNabb) Date: Mon, 12 Mar 2012 22:34:43 +0000 Subject: [pypy-issue] [issue1087] Race condition when calling getattr In-Reply-To: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> Message-ID: <1331591683.6.0.902164753878.issue1087@bugs.pypy.org> Andrew McNabb added the comment: Another possibility might be a difference in PYTHONPATH. Mine is fairly large: PYTHONPATH="$HOME:/usr/lib/python2.7/site-packages". If the race condition has something to do with something like how long it takes to import the codecs module, then having a larger PYTHONPATH might make it easier to reproduce. Just a thought. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 12 23:38:49 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Mon, 12 Mar 2012 22:38:49 +0000 Subject: [pypy-issue] [issue1079] str.join + setdefaultencoding problem In-Reply-To: <1331220655.08.0.829278773481.issue1079@bugs.pypy.org> Message-ID: <1331591929.56.0.568167003648.issue1079@bugs.pypy.org> David Ripton added the comment: Fixed in f07d9c4d0671 ---------- status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 12 23:55:50 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Mon, 12 Mar 2012 22:55:50 +0000 Subject: [pypy-issue] [issue1047] CVE-2012-0845 SimpleXMLRPCServer DoS (excessive CPU usage) via malformed XML-RPC / HTTP POST request In-Reply-To: <1329152174.59.0.255188204929.issue1047@bugs.pypy.org> Message-ID: <1331592950.78.0.967897675852.issue1047@bugs.pypy.org> David Ripton added the comment: Fix at https://bitbucket.org/pypy/pypy/pull-request/39/update-simplexmlrpcserverpy-to-latest-from ---------- assignedto: -> dripton nosy: +dripton ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 13 00:02:50 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Mon, 12 Mar 2012 23:02:50 +0000 Subject: [pypy-issue] [issue1087] Race condition when calling getattr In-Reply-To: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> Message-ID: <1331593370.2.0.826128534807.issue1087@bugs.pypy.org> David Ripton added the comment: If your PYTHONPATH includes CPython modules that include C code, that's likely the problem. Try running with a clear PYTHONPATH. (If you need to install third-party Python code, install it inside PyPy using pip, or make a virtualenv using PyPy.) ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 13 00:13:58 2012 From: tracker at bugs.pypy.org (Andrew McNabb) Date: Mon, 12 Mar 2012 23:13:58 +0000 Subject: [pypy-issue] [issue1087] Race condition when calling getattr In-Reply-To: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> Message-ID: <1331594038.12.0.698833625525.issue1087@bugs.pypy.org> Andrew McNabb added the comment: On Fedora, the /usr/lib/python2.7 only contains pure-Python modules. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 13 00:17:55 2012 From: tracker at bugs.pypy.org (Andrew McNabb) Date: Mon, 12 Mar 2012 23:17:55 +0000 Subject: [pypy-issue] [issue1087] Race condition when calling getattr In-Reply-To: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> Message-ID: <1331594275.64.0.324502183201.issue1087@bugs.pypy.org> Andrew McNabb added the comment: On Fedora, the /usr/lib/python2.7/site-packages directory only contains pure- Python modules. And only one or two packages are actually being imported from that directory. Using pip isn't ideal because it doesn't play well with yum. Virtualenv is an option, but it really shouldn't be necessary here. In any case, there aren't any C modules on the PYTHONPATH, so that can't explain the bug. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 13 00:39:32 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Mon, 12 Mar 2012 23:39:32 +0000 Subject: [pypy-issue] [issue1087] Race condition when calling getattr In-Reply-To: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> Message-ID: <1331595572.12.0.162159758752.issue1087@bugs.pypy.org> Amaury Forgeot d Arc added the comment: boomboom.py also fails for me almost every time. It's indeed a race condition: when the first thread is executing code in encodings/ascii.py, the second thread starts to "import encoding.ascii", finds it in sys.modules, and returns it... even when the module is not complete. Because the module is incomplete, it is skipped (search for "mod.getregentry" in encodings/__init__.py), and codec lookup fails. This is a bug in pypy: the check in sys.modules should be done only with the import lock held. This will impose a speed penalty though... ---------- nosy: +afa ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 13 00:50:19 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Mon, 12 Mar 2012 23:50:19 +0000 Subject: [pypy-issue] [issue1087] Race condition when calling getattr In-Reply-To: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> Message-ID: <1331596219.01.0.270738528353.issue1087@bugs.pypy.org> David Ripton added the comment: It makes sense that failing to use the import lock results in a race. But it's interesting that I can't get this to fail at all on 32-bit Linux in dozens of attempts, while you can both see it usually fail on 64-bit Linux. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 13 01:00:45 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Tue, 13 Mar 2012 00:00:45 +0000 Subject: [pypy-issue] [issue1087] Race condition when calling getattr In-Reply-To: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> Message-ID: <1331596845.33.0.435751559213.issue1087@bugs.pypy.org> Amaury Forgeot d Arc added the comment: It's possible that encodings.ascii is already imported at startup in your 32-bit environment (because of locales, etc.). To be sure you can try to print sorted(sys.modules) before your threaded code. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 13 02:05:12 2012 From: tracker at bugs.pypy.org (Ken Watford) Date: Tue, 13 Mar 2012 01:05:12 +0000 Subject: [pypy-issue] [issue1088] numpypy array scalars do not hash nicely In-Reply-To: <1331600712.72.0.0717696928313.issue1088@bugs.pypy.org> Message-ID: <1331600712.72.0.0717696928313.issue1088@bugs.pypy.org> New submission from Ken Watford : >>>> from numpypy import int8 >>>> assert hash(int8(0)) == hash(int8(0)) Traceback (most recent call last): File "", line 1, in AssertionError Array scalars in real numpy normally hash to the same value as the equivalent python scalars. Especially since their reprs are the same. While debugging some code of mine I came across something like this: >>>> print {0: 'wtf', int8(0): 'foo', int8(0): 'bar'} {0: 'wtf', 0: 'foo', 0: 'bar'} Except with several thousand pairs. It was slightly surreal until I thought about where the supposed zeros were coming from. ---------- messages: 4090 nosy: kw, pypy-issue priority: bug status: unread title: numpypy array scalars do not hash nicely ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 13 03:18:29 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Tue, 13 Mar 2012 02:18:29 +0000 Subject: [pypy-issue] [issue1087] Race condition when calling getattr In-Reply-To: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> Message-ID: <1331605109.59.0.568889969086.issue1087@bugs.pypy.org> David Ripton added the comment: I hope it's fixed in https://bitbucket.org/pypy/pypy/pull-request/44/hold-import-lock-longer-to-fix-an-import I haven't translated this code yet (I only have a 1 GB Netbook at PyCon) so I can't say how bad the performance impact is. Most code doesn't import inside loops so probably not too bad. ---------- assignedto: -> dripton ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 13 10:07:21 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Tue, 13 Mar 2012 09:07:21 +0000 Subject: [pypy-issue] [issue1087] Race condition when calling getattr In-Reply-To: <1331583275.77.0.620668848256.issue1087@bugs.pypy.org> Message-ID: <1331629641.41.0.930500435294.issue1087@bugs.pypy.org> Amaury Forgeot d Arc added the comment: > Most code doesn't import inside loops so probably not too bad. Unfortunately this is not true, see the past discussion on IRC about the Django benchmark: http://tismerysoft.de/pypy/irc-logs/pypy/pypy.2011-04-07.log.html (search for "import lock", and "escape") ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 13 18:22:10 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Tue, 13 Mar 2012 17:22:10 +0000 Subject: [pypy-issue] [issue1085] cpyext: PyString_AsString() returns bogus results for non-bytes input In-Reply-To: <1331478486.45.0.687703104839.issue1085@bugs.pypy.org> Message-ID: <1331659330.91.0.127603854988.issue1085@bugs.pypy.org> David Ripton added the comment: My test shows that PyString_AsString(Py_None) raises TypeError as expected. See https://bitbucket.org/pypy/pypy/pull-request/50/issue1085-add-a-test-to-show-that ---------- nosy: +dripton status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 13 18:45:38 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Tue, 13 Mar 2012 17:45:38 +0000 Subject: [pypy-issue] [issue1085] cpyext: PyString_AsString() returns bogus results for non-bytes input In-Reply-To: <1331478486.45.0.687703104839.issue1085@bugs.pypy.org> Message-ID: <1331660738.47.0.32087022699.issue1085@bugs.pypy.org> David Ripton added the comment: Amaury told me in IRC that it segfaults on his machine, so it appears this depends on OS, PyPy version, phase of the moon, etc. FWIW I can't make the test fail on x86 Ubuntu with PyPy 1.8. When I get to a box where it segfaults, I'll add a fix. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 13 18:42:02 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Tue, 13 Mar 2012 17:42:02 +0000 Subject: [pypy-issue] [issue1045] Crash of the JIT In-Reply-To: <1329140443.89.0.137027286035.issue1045@bugs.pypy.org> Message-ID: <1331660522.8.0.464666333034.issue1045@bugs.pypy.org> David Ripton added the comment: Everyone seems to agree it's fixed, so closing. ---------- nosy: +dripton status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Mar 14 07:08:52 2012 From: tracker at bugs.pypy.org (Stefan Behnel) Date: Wed, 14 Mar 2012 06:08:52 +0000 Subject: [pypy-issue] [issue1084] Implement PyErr_GetExcInfo() and PyErr_SetExcInfo() in cpyext In-Reply-To: <1331460743.68.0.269550106582.issue1084@bugs.pypy.org> Message-ID: <1331705332.66.0.385819070498.issue1084@bugs.pypy.org> Stefan Behnel added the comment: I should note that this is currently a blocker for getting Cython to work on PyPy. ---------- status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Mar 14 18:38:24 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Wed, 14 Mar 2012 17:38:24 +0000 Subject: [pypy-issue] [issue1047] CVE-2012-0845 SimpleXMLRPCServer DoS (excessive CPU usage) via malformed XML-RPC / HTTP POST request In-Reply-To: <1329152174.59.0.255188204929.issue1047@bugs.pypy.org> Message-ID: <1331746703.98.0.309760659083.issue1047@bugs.pypy.org> David Ripton added the comment: Fix was merged in 452b9e9ac4b8 ---------- status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Mar 14 21:21:18 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Wed, 14 Mar 2012 20:21:18 +0000 Subject: [pypy-issue] [issue1069] PyThread_set_key_value and PyThread_delete_key_value missing from cpyext support In-Reply-To: <1330193098.61.0.219372830064.issue1069@bugs.pypy.org> Message-ID: <1331756478.4.0.361650574746.issue1069@bugs.pypy.org> Amaury Forgeot d Arc added the comment: Sorry, my previous comment is completely wrong: the GIL is not released in C code, except by the functions explicitly designed for this. Instead, the solution is for PyEval_SaveThread() to return the current thread state, and have PyThreadState_GET() do the right thing depending on the GIL being current or not. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 15 15:19:49 2012 From: tracker at bugs.pypy.org (montag451) Date: Thu, 15 Mar 2012 14:19:49 +0000 Subject: [pypy-issue] [issue1090] Can't bind packet socket In-Reply-To: <1331821189.63.0.719460787992.issue1090@bugs.pypy.org> Message-ID: <1331821189.63.0.719460787992.issue1090@bugs.pypy.org> New submission from montag451 : When I try to bind a packet socket using ETH_P_ALL as the proto, I get an "unknown address family" error. The code attached to this issue work with CPython but doesn't work with PyPy. ---------- nosy: +montag451 priority: bug -> wish status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 15 16:19:43 2012 From: tracker at bugs.pypy.org (Richard Barrell) Date: Thu, 15 Mar 2012 15:19:43 +0000 Subject: [pypy-issue] [issue1091] list(xrange) is slower in PyPy 1.8 than in CPython 2.6.5 In-Reply-To: <1331824783.12.0.608099911457.issue1091@bugs.pypy.org> Message-ID: <1331824783.12.0.608099911457.issue1091@bugs.pypy.org> New submission from Richard Barrell : I'm using the Linux 64-bit binary PyPy 1.8 from here: https://bitbucket.org/pypy/pypy/downloads/pypy- 1.8-linux64.tar.bz2 and Python 2.6.5 from the repositories on Ubuntu 10.04. The machine that I'm running on is a Core 2 Duo laptop with 4GB of RAM, running at 2.10GHz. richyb at figgy:~$ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import time; t1 = time.time(); _ = list(xrange(10000000)); print time.time() - t1 0.385615825653 >>> richyb at figgy:~$ pypy Python 2.7.2 (0e28b379d8b3, Feb 09 2012, 19:41:03) [PyPy 1.8.0 with GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: ``PyPy is Shirt Origami research'' >>>> import time; t1 = time.time(); _ = list(xrange(10000000)); print time.time() - t1 2.09597301483 >>>> ---------- messages: 4101 nosy: RichyB, pypy-issue priority: performance bug status: unread title: list(xrange) is slower in PyPy 1.8 than in CPython 2.6.5 ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 15 19:45:37 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Thu, 15 Mar 2012 18:45:37 +0000 Subject: [pypy-issue] [issue1090] Can't bind packet socket In-Reply-To: <1331821189.63.0.719460787992.issue1090@bugs.pypy.org> Message-ID: <1331837137.83.0.637738254291.issue1090@bugs.pypy.org> Amaury Forgeot d Arc added the comment: In pypy/rlib/rsocket.py, the class PacketAddress is missing a from_object() method. See http://hg.python.org/cpython/file/v2.7.2/Modules/socketmodule.c#l1422 for the equivalent implementation in CPython. ---------- nosy: +afa ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 15 21:44:50 2012 From: tracker at bugs.pypy.org (Jean-Paul Calderone) Date: Thu, 15 Mar 2012 20:44:50 +0000 Subject: [pypy-issue] [issue1069] PyThread_set_key_value and PyThread_delete_key_value missing from cpyext support In-Reply-To: <1330193098.61.0.219372830064.issue1069@bugs.pypy.org> Message-ID: <1331844290.29.0.690712847464.issue1069@bugs.pypy.org> Jean-Paul Calderone added the comment: I put some PyThreadState fixes in the branch non-null-threadstate. Anyone want to take a look and see if they're sane? They make pyOpenSSL work. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 16 02:46:16 2012 From: tracker at bugs.pypy.org (behackett) Date: Fri, 16 Mar 2012 01:46:16 +0000 Subject: [pypy-issue] [issue1092] 1.8.0 datetime.timedelta issue In-Reply-To: <1331862376.54.0.35663691756.issue1092@bugs.pypy.org> Message-ID: <1331862376.54.0.35663691756.issue1092@bugs.pypy.org> New submission from behackett : pypy 1.7.0: [PyPy 1.7.0 with GCC 4.5.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: ``"anyway, python is a vast language" (fijal)'' >>>> import datetime >>>> d = datetime.datetime.utcnow() >>>> d = d - datetime.timedelta(microseconds=d.microsecond) >>>> d datetime.datetime(2012, 3, 16, 1, 43, 51) pypy 1.8.0: [PyPy 1.8.0 with GCC 4.5.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: ``we have much more interpreters than users'' >>>> import datetime >>>> d = datetime.datetime.utcnow() >>>> d = d - datetime.timedelta(microseconds=d.microsecond) Traceback (most recent call last): File "", line 1, in File "/usr/lib64/pypy1.8/lib_pypy/datetime.py", line 1859, in __sub__ return self + -other File "/usr/lib64/pypy1.8/lib_pypy/datetime.py", line 1850, in __add__ t.microsecond, tzinfo=self._tzinfo) File "/usr/lib64/pypy1.8/lib_pypy/datetime.py", line 1451, in __new__ _check_time_fields(hour, minute, second, microsecond) File "/usr/lib64/pypy1.8/lib_pypy/datetime.py", line 286, in _check_time_fields raise TypeError('int expected') TypeError: int expected ---------- messages: 4104 nosy: behackett, pypy-issue priority: bug status: unread title: 1.8.0 datetime.timedelta issue ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 16 08:23:19 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Fri, 16 Mar 2012 07:23:19 +0000 Subject: [pypy-issue] [issue1092] 1.8.0 datetime.timedelta issue In-Reply-To: <1331862376.54.0.35663691756.issue1092@bugs.pypy.org> Message-ID: <1331882599.23.0.426743969672.issue1092@bugs.pypy.org> Amaury Forgeot d Arc added the comment: This was already fixed in 8a9843bb99ad. This part of the diff is relevant, if you want to modify your copy of datetime.py: --- a/lib_pypy/datetime.py Sun Jan 22 10:33:03 2012 +0100 +++ b/lib_pypy/datetime.py Fri Feb 10 01:19:56 2012 +0100 @@ -1520,7 +1520,7 @@ def utcfromtimestamp(cls, t): "Construct a UTC datetime from a POSIX timestamp (like time.time())." t, frac = divmod(t, 1.0) - us = round(frac * 1e6) + us = int(round(frac * 1e6)) # If timestamp is less than one microsecond smaller than a # full second, us can be rounded up to 1000000. In this case, ---------- nosy: +afa status: unread -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 16 09:49:54 2012 From: tracker at bugs.pypy.org (montag451) Date: Fri, 16 Mar 2012 08:49:54 +0000 Subject: [pypy-issue] [issue1090] Can't bind packet socket In-Reply-To: <1331821189.63.0.719460787992.issue1090@bugs.pypy.org> Message-ID: <1331887794.32.0.826451061305.issue1090@bugs.pypy.org> montag451 added the comment: So it's a bug ? ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 16 11:05:31 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Fri, 16 Mar 2012 10:05:31 +0000 Subject: [pypy-issue] [issue1090] Can't bind packet socket In-Reply-To: <1331821189.63.0.719460787992.issue1090@bugs.pypy.org> Message-ID: <1331892331.99.0.544448462126.issue1090@bugs.pypy.org> Amaury Forgeot d Arc added the comment: yes, an unimplemented feature :) ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 16 14:10:12 2012 From: tracker at bugs.pypy.org (montag451) Date: Fri, 16 Mar 2012 13:10:12 +0000 Subject: [pypy-issue] [issue1090] Can't bind packet socket In-Reply-To: <1331821189.63.0.719460787992.issue1090@bugs.pypy.org> Message-ID: <1331903412.56.0.176180130212.issue1090@bugs.pypy.org> montag451 added the comment: I changed the priority to "bug". Thanks for your replies ! ---------- priority: wish -> bug ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 16 18:49:47 2012 From: tracker at bugs.pypy.org (Andrew McNabb) Date: Fri, 16 Mar 2012 17:49:47 +0000 Subject: [pypy-issue] [issue912] ZipFile.read() leaks file handles In-Reply-To: <1318930736.76.0.381437213231.issue912@bugs.pypy.org> Message-ID: <1331920187.15.0.437311326258.issue912@bugs.pypy.org> Andrew McNabb added the comment: Shouldn't the file object eventually get garbage collected after the ZipFile is deleted? I ran into a similar problem in my own code where file descriptors were being leaked under pypy 1.8. Yes, I have now fixed the missing close on the file object, but I'm still surprised that files weren't eventually garbage collected and the file descriptors closed. Is this garbage collection behavior a bug, or am I misunderstanding something? ---------- nosy: +amcnabb ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 16 21:40:30 2012 From: tracker at bugs.pypy.org (Jean-Paul Calderone) Date: Fri, 16 Mar 2012 20:40:30 +0000 Subject: [pypy-issue] [issue1069] PyThread_set_key_value and PyThread_delete_key_value missing from cpyext support In-Reply-To: <1330193098.61.0.219372830064.issue1069@bugs.pypy.org> Message-ID: <1331930430.33.0.076045858347.issue1069@bugs.pypy.org> Jean-Paul Calderone added the comment: Merged that branch. pyOpenSSL should be happy now. ---------- status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 18 07:49:07 2012 From: tracker at bugs.pypy.org (Fijal) Date: Sun, 18 Mar 2012 06:49:07 +0000 Subject: [pypy-issue] [issue1091] list(xrange) is slower in PyPy 1.8 than in CPython 2.6.5 In-Reply-To: <1331824783.12.0.608099911457.issue1091@bugs.pypy.org> Message-ID: <1332053347.62.0.00981888947574.issue1091@bugs.pypy.org> Fijal added the comment: This is very likely due to lack of sizehint. Maybe now it's a good time to introduce it. ---------- nosy: +fijal status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 18 07:53:18 2012 From: tracker at bugs.pypy.org (Fijal) Date: Sun, 18 Mar 2012 06:53:18 +0000 Subject: [pypy-issue] [issue1090] Can't bind packet socket In-Reply-To: <1331821189.63.0.719460787992.issue1090@bugs.pypy.org> Message-ID: <1332053598.3.0.184414381229.issue1090@bugs.pypy.org> Fijal added the comment: This is maybe worth noting that this is a nice "easy" feature for a newcomer. We don't however have a way to agregate such things. ---------- nosy: +fijal ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 20 04:26:59 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Tue, 20 Mar 2012 03:26:59 +0000 Subject: [pypy-issue] [issue1085] cpyext: PyString_AsString() returns bogus results for non-bytes input In-Reply-To: <1331478486.45.0.687703104839.issue1085@bugs.pypy.org> Message-ID: <1332214018.12.0.463909805921.issue1085@bugs.pypy.org> David Ripton added the comment: Still can't make this test segfault. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 20 07:34:31 2012 From: tracker at bugs.pypy.org (raymin) Date: Tue, 20 Mar 2012 06:34:31 +0000 Subject: [pypy-issue] [issue1093] PyPy list element del insert to slow In-Reply-To: <1332225271.38.0.963212152982.issue1093@bugs.pypy.org> Message-ID: <1332225271.38.0.963212152982.issue1093@bugs.pypy.org> New submission from raymin : # testList.py L = [] i = 0 while i < 100000: L.append('k%d' % i) i += 1 i = 0 while i < 100000: if i & 1: k = L[0] del L[0] L.insert(i, k) else: k = L[i] del L[i] L.append(k) i += 1 print i, len(L) time python testList.py : 0m6.710s time pypy testList.py : 0m41.702s ---------- messages: 4114 nosy: pypy-issue, raymin priority: wish status: unread title: PyPy list element del insert to slow ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 20 07:38:27 2012 From: tracker at bugs.pypy.org (raymin) Date: Tue, 20 Mar 2012 06:38:27 +0000 Subject: [pypy-issue] [issue1093] PyPy list element del insert too slow In-Reply-To: <1332225507.83.0.0822621714333.issue1093@bugs.pypy.org> Message-ID: <1332225507.83.0.0822621714333.issue1093@bugs.pypy.org> New submission from raymin : # testList.py L = [] i = 0 while i < 100000: L.append('k%d' % i) i += 1 i = 0 while i < 100000: if i & 1: k = L[0] del L[0] L.insert(i, k) else: k = L[i] del L[i] L.append(k) i += 1 print i, len(L) time python testList.py : 0m6.710s time pypy testList.py : 0m41.702s ---------- title: PyPy list element del insert to slow -> PyPy list element del insert too slow ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 20 08:05:02 2012 From: tracker at bugs.pypy.org (Stefan Behnel) Date: Tue, 20 Mar 2012 07:05:02 +0000 Subject: [pypy-issue] [issue1085] cpyext: PyString_AsString() returns bogus results for non-bytes input In-Reply-To: <1331478486.45.0.687703104839.issue1085@bugs.pypy.org> Message-ID: <4F682AE9.3070608@behnel.de> Stefan Behnel added the comment: I'm on Linux 64bit, in case that helps. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 20 15:36:19 2012 From: tracker at bugs.pypy.org (Simon Sapin) Date: Tue, 20 Mar 2012 14:36:19 +0000 Subject: [pypy-issue] [issue1094] Non-BPM unicode literals decoded as surrogate pairs In-Reply-To: <1332254179.6.0.235268017197.issue1094@bugs.pypy.org> Message-ID: <1332254179.6.0.235268017197.issue1094@bugs.pypy.org> New submission from Simon Sapin : PyPy decodes each non-BMP character (ie. U+10000 and beyond) in unicode string literals as a surrogate pair (as used in UTF-16) instead of a single character. Test case: # coding: utf8 string1 = u'\U00010083' string2 = u'?' # should be the same as string1 codepoints1 = [ord(c) for c in string1] codepoints2 = [ord(c) for c in string2.encode('utf16').decode('utf16')] codepoints3 = [ord(c) for c in string2] assert codepoints1 == [0x10083], codepoints1 assert codepoints2 == [0x10083], codepoints2 assert codepoints3 == [0x10083], codepoints3 This test pass on CPython compiled with "wide unicode". On PyPy 1.8.0, codepoints3 is [0xd800, 0xdc83] (codepoints1 and codepoints2 are correct) ---------- messages: 4117 nosy: SimonSapin, pypy-issue priority: bug status: unread title: Non-BPM unicode literals decoded as surrogate pairs ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 15 06:29:00 2012 From: tracker at bugs.pypy.org (Andrew McNabb) Date: Thu, 15 Mar 2012 05:29:00 +0000 Subject: [pypy-issue] [issue1089] logparser.py crashes with nesting error In-Reply-To: <1331789340.11.0.0530114615506.issue1089@bugs.pypy.org> Message-ID: <1331789340.11.0.0530114615506.issue1089@bugs.pypy.org> New submission from Andrew McNabb : I encountered the following error after running pypy 1.8 with PYPYLOG=pypylog55: ../pypy/pypy/tool/logparser.py print-summary pypylog55 - 93% ................................................................... Traceback (most recent call last): File "../pypy/pypy/tool/logparser.py", line 437, in log = parse_log_file(args[0]) File "../pypy/pypy/tool/logparser.py", line 26, in parse_log_file return parse_log(lines, verbose=verbose) File "../pypy/pypy/tool/logparser.py", line 74, in parse_log record(match.group(2), time=int(match.group(1), 16)) File "/aml/home/amcnabb/c/pypy/pypy/rlib/debug.py", line 42, in debug_stop (self[i][1], category)) AssertionError: nesting error: starts with 'gc-minor' but stops with 'gc-set- nursery-size' I'm trying to think of anything unusual about my situation. The program shut down cleanly, so that rules out pypy crashing mid-write. The only slightly unusual situation I can think of is that the program creates a second process with multiprocessing.Process. One of the processes has two or three threads, including a daemon thread. ---------- files: pypylog55 messages: 4099 nosy: amcnabb, pypy-issue priority: bug status: unread title: logparser.py crashes with nesting error ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Mar 21 09:24:40 2012 From: tracker at bugs.pypy.org (Fijal) Date: Wed, 21 Mar 2012 08:24:40 +0000 Subject: [pypy-issue] [issue1089] logparser.py crashes with nesting error In-Reply-To: <1331789340.11.0.0530114615506.issue1089@bugs.pypy.org> Message-ID: <1332318280.42.0.337281063183.issue1089@bugs.pypy.org> Fijal added the comment: Uh. So indeed what happened (I think) is that the child process inherited parent env variable and started writing to the same file. Maybe we should automatically add PID to the log filename? ---------- nosy: +fijal status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Mar 21 16:50:47 2012 From: tracker at bugs.pypy.org (Andrew McNabb) Date: Wed, 21 Mar 2012 15:50:47 +0000 Subject: [pypy-issue] [issue1089] logparser.py crashes with nesting error In-Reply-To: <1331789340.11.0.0530114615506.issue1089@bugs.pypy.org> Message-ID: <1332345047.44.0.102368541936.issue1089@bugs.pypy.org> Andrew McNabb added the comment: Adding the PID to the filename sounds like an easy fix. The only drawback would be that a directory could get really big after a few runs if it's not cleaned up, but I don't think it would be a big deal. Any alternative solutions I can think of would be much more complex. ________________________________________ PyPy bug tracker ________________________________________ From amauryfa at gmail.com Wed Mar 21 16:55:35 2012 From: amauryfa at gmail.com (Amaury Forgeot d'Arc) Date: Wed, 21 Mar 2012 16:55:35 +0100 Subject: [pypy-issue] [issue1089] logparser.py crashes with nesting error In-Reply-To: <1332345047.44.0.102368541936.issue1089@bugs.pypy.org> References: <1331789340.11.0.0530114615506.issue1089@bugs.pypy.org> <1332345047.44.0.102368541936.issue1089@bugs.pypy.org> Message-ID: 2012/3/21 Andrew McNabb : > > Andrew McNabb added the comment: > > Adding the PID to the filename sounds like an easy fix. The only drawback would > be that a directory could get really big after a few runs if it's not cleaned up, > but I don't think it would be a big deal. Any alternative solutions I can think > of would be much more complex. Make it optional, then? PYPYLOG=pypylog55-PID: and have pypy replace "PID" with the actual one. -- Amaury Forgeot d'Arc From tracker at bugs.pypy.org Wed Mar 21 18:04:31 2012 From: tracker at bugs.pypy.org (Fijal) Date: Wed, 21 Mar 2012 17:04:31 +0000 Subject: [pypy-issue] [issue1089] logparser.py crashes with nesting error In-Reply-To: <1331789340.11.0.0530114615506.issue1089@bugs.pypy.org> Message-ID: <1332349471.88.0.779243450938.issue1089@bugs.pypy.org> Fijal added the comment: Optional would still end up in obscure errors, unfortunately. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 22 18:12:59 2012 From: tracker at bugs.pypy.org (Mike Auty) Date: Thu, 22 Mar 2012 17:12:59 +0000 Subject: [pypy-issue] [issue1095] __main__.UnrecognizedOperation: vmulsd In-Reply-To: <1332436379.97.0.2613513595.issue1095@bugs.pypy.org> Message-ID: <1332436379.97.0.2613513595.issue1095@bugs.pypy.org> New submission from Mike Auty : On both 1.8, and trunk (53900:4cb3a7f01438), I receive the following error: [translation:ERROR] Traceback (most recent call last): [translation:ERROR] File "/var/tmp/portage/dev-python/pypy-9999/work/pypy-9999/pypy/translator/c/gcc/trackgcroot.py", line 2013, in [translation:ERROR] tracker.process(f, g, filename=fn) [translation:ERROR] File "/var/tmp/portage/dev-python/pypy-9999/work/pypy-9999/pypy/translator/c/gcc/trackgcroot.py", line 1906, in process [translation:ERROR] tracker = parser.process_function(lines, filename) [translation:ERROR] File "/var/tmp/portage/dev-python/pypy-9999/work/pypy-9999/pypy/translator/c/gcc/trackgcroot.py", line 1421, in process_function [translation:ERROR] table = tracker.computegcmaptable(self.verbose) [translation:ERROR] File "/var/tmp/portage/dev-python/pypy-9999/work/pypy-9999/pypy/translator/c/gcc/trackgcroot.py", line 52, in computegcmaptable [translation:ERROR] self.parse_instructions() [translation:ERROR] File "/var/tmp/portage/dev-python/pypy-9999/work/pypy-9999/pypy/translator/c/gcc/trackgcroot.py", line 204, in parse_instructions [translation:ERROR] self.find_missing_visit_method(opname) [translation:ERROR] File "/var/tmp/portage/dev-python/pypy-9999/work/pypy-9999/pypy/translator/c/gcc/trackgcroot.py", line 234, in find_missing_visit_method [translation:ERROR] raise UnrecognizedOperation(opname) [translation:ERROR] __main__.UnrecognizedOperation: vmulsd I've attached the complete build log, and will include some additional information about my build system that may be of use at the end of this message. If there's any further information you need from me, or further tests you'd like me to run, please just let me know... 5:) Portage 2.2.0_alpha90 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.14.1-r2, 3.3.0 x86_64) ================================================================= System uname: Linux-3.3.0-x86_64-Intel-R-_Core-TM-_i7-2600K_CPU_ at _3.40GHz-with-gentoo-2.1 Timestamp of tree: Fri, 16 Mar 2012 08:00:01 +0000 ccache version 3.1.7 [enabled] app-shells/bash: 4.2_p24 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.2-r3, 3.2.2 dev-util/ccache: 3.1.7 dev-util/cmake: 2.8.7-r5 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1 sys-apps/openrc: 0.9.9.3 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.3 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.5.3-r2 sys-devel/gcc-config: 1.5.1-r1 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 3.2-r1 (virtual/os-headers) sys-libs/glibc: 2.14.1-r2 Repositories: gentoo autogenerated ikelos uncon personal Installed sets: ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -ggdb" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe -ggdb" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--quiet-build n" FEATURES="assume-digests binpkg-logs ccache collision-protect distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms sign splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_GB.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en en_GB" MAKEOPTS="-j9" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/overlays/autogenerated /usr/local/overlays/ikelos /usr/local/overlays/uncon /usr/local/overlays/personal" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acl amd64 apng bash-completion berkdb bluetooth bzip2 cairo cdda cli clutter consolekit cracklib crypt cups cxx dbus divx djvu dri exif fontconfig fortran fts gcj gdbm gdu git gnome gnome-keyring gnome-online-accounts gpm graphviz gstreamer gtk gtk3 gudev hwdb iconv ipv6 irc jabber jpeg libffi libnotify mmx modules mp3 msn mudflap multilib nautilus ncurses networkmanager nls nptl nptlonly opengl openmp pam pcre png policykit pppd pulseaudio python readline resolvconf session sip sqlite sse sse2 ssl subversion svg sysfs tcpd theora truetype unicode vaapi vala vorbis x264 xorg xvid zeitgeist zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ---------- files: build.log.gz messages: 4122 nosy: ikelos, pypy-issue priority: bug status: unread title: __main__.UnrecognizedOperation: vmulsd ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 22 19:20:47 2012 From: tracker at bugs.pypy.org (Fijal) Date: Thu, 22 Mar 2012 18:20:47 +0000 Subject: [pypy-issue] [issue1095] __main__.UnrecognizedOperation: vmulsd In-Reply-To: <1332436379.97.0.2613513595.issue1095@bugs.pypy.org> Message-ID: <1332440447.28.0.902177640287.issue1095@bugs.pypy.org> Fijal added the comment: should be fixed in f18c75ec9e0f ---------- nosy: +fijal status: unread -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 22 20:45:54 2012 From: tracker at bugs.pypy.org (Mike Auty) Date: Thu, 22 Mar 2012 19:45:54 +0000 Subject: [pypy-issue] [issue1095] __main__.UnrecognizedOperation: vmulsd In-Reply-To: <1332436379.97.0.2613513595.issue1095@bugs.pypy.org> Message-ID: <1332445554.27.0.70369977241.issue1095@bugs.pypy.org> Mike Auty added the comment: Thanks, I do seem to have gotten further, but am now getting: __main__.UnrecognizedOperation: vcvttsd2siq Would you like me to file a separate bug, or just keep reporting these as I run into them on this bug? ---------- status: resolved -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 22 21:44:53 2012 From: tracker at bugs.pypy.org (Fijal) Date: Thu, 22 Mar 2012 20:44:53 +0000 Subject: [pypy-issue] [issue1095] __main__.UnrecognizedOperation: vmulsd In-Reply-To: <1332436379.97.0.2613513595.issue1095@bugs.pypy.org> Message-ID: <1332449093.93.0.179084340649.issue1095@bugs.pypy.org> Fijal added the comment: If you look at f18c75ec9e0f (file pypy/translator/c/gcc/trackgcroot.py) you can see the list of ignored functions. just add them one after another. I'm not sure how to do it in gentoo, but typically you have /tmp/usession-.../testing_1 directories where you can go and type make just after you modified trackgcroot.py to have quicker turnaround times. Do you feel like providing a patch with all the things that should be ignored? Cheers, fijal ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 22 21:48:25 2012 From: tracker at bugs.pypy.org (Mike Auty) Date: Thu, 22 Mar 2012 20:48:25 +0000 Subject: [pypy-issue] [issue1095] __main__.UnrecognizedOperation: vmulsd In-Reply-To: <1332436379.97.0.2613513595.issue1095@bugs.pypy.org> Message-ID: <1332449305.46.0.788246837926.issue1095@bugs.pypy.org> Mike Auty added the comment: Yep, I'm happy to, I just wasn't sure how to decide the length of the prefix. I'll produce a patch with the complete specific operations to ignore, and then someone who knows if it'll cause problems can reduce those to a sensible prefix... ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 22 21:56:27 2012 From: tracker at bugs.pypy.org (Fijal) Date: Thu, 22 Mar 2012 20:56:27 +0000 Subject: [pypy-issue] [issue1095] __main__.UnrecognizedOperation: vmulsd In-Reply-To: <1332436379.97.0.2613513595.issue1095@bugs.pypy.org> Message-ID: <1332449787.19.0.470165253163.issue1095@bugs.pypy.org> Fijal added the comment: Sounds good to me, although prefix is to be found in intel specification of instructions. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 22 22:21:13 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Thu, 22 Mar 2012 21:21:13 +0000 Subject: [pypy-issue] [issue1050] socket attribute MSG_WAITALL under win32 In-Reply-To: <1329330388.67.0.22055127816.issue1050@bugs.pypy.org> Message-ID: <1332451273.65.0.141286551986.issue1050@bugs.pypy.org> Amaury Forgeot d Arc added the comment: It's certainly because PyPy 1.8 was compiled with VS2010, whereas CPython2.7 is still compiled with VS2008. Does this definition cause a problem? ---------- nosy: +afa status: unread -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 23 16:25:52 2012 From: tracker at bugs.pypy.org (Senyai) Date: Fri, 23 Mar 2012 15:25:52 +0000 Subject: [pypy-issue] [issue1050] socket attribute MSG_WAITALL under win32 In-Reply-To: <1329330388.67.0.22055127816.issue1050@bugs.pypy.org> Message-ID: <1332516352.36.0.941007684504.issue1050@bugs.pypy.org> Senyai added the comment: Well, Pyro4 has this code: if hasattr(socket, "MSG_WAITALL"): while True: try: data=sock.recv(size, socket.MSG_WAITALL) That fails on windows XP, but I guess should work starting with Windows 2003. ---------- status: resolved -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Fri Mar 23 16:37:39 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Fri, 23 Mar 2012 15:37:39 +0000 Subject: [pypy-issue] [issue1050] socket attribute MSG_WAITALL under win32 In-Reply-To: <1329330388.67.0.22055127816.issue1050@bugs.pypy.org> Message-ID: <1332517059.61.0.702883740434.issue1050@bugs.pypy.org> Amaury Forgeot d Arc added the comment: This test is wrong: hasattr(socket, "MSG_WAITALL") is a condition on the compiler/SDK used to compile Python; instead it should test whether the socket transport supports this option. On Windows, platform.win32_ver() could be used; alternatively, allow the operation to fail and fall back to the other behavior. (btw, CPython3.3 is likely to be compiled with VS2010 as well) ---------- status: resolved -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Mar 24 21:02:22 2012 From: tracker at bugs.pypy.org (Mike Auty) Date: Sat, 24 Mar 2012 20:02:22 +0000 Subject: [pypy-issue] [issue1095] __main__.UnrecognizedOperation: vmulsd In-Reply-To: <1332436379.97.0.2613513595.issue1095@bugs.pypy.org> Message-ID: <1332619342.86.0.632997728343.issue1095@bugs.pypy.org> Mike Auty added the comment: Ok, so it seems almost all of these are existing ignored prefixes, but starting with a v. Anyway, here's the patch/list I had to use to successfully compile pypy on my box. Hope it's of some use... Please note, I was testing this against both 1.8 and the hg tip, so I've include vmul even though that was already fixed in the hg. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Mar 24 21:19:41 2012 From: tracker at bugs.pypy.org (Fijal) Date: Sat, 24 Mar 2012 20:19:41 +0000 Subject: [pypy-issue] [issue1095] __main__.UnrecognizedOperation: vmulsd In-Reply-To: <1332436379.97.0.2613513595.issue1095@bugs.pypy.org> Message-ID: <1332620381.34.0.205581358525.issue1095@bugs.pypy.org> Fijal added the comment: If it is what I think it is (http://en.wikipedia.org/wiki/VEX_prefix), then it's safe to ignore all 'v*' instructions. should be done in 03bbbea4dbff ---------- status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 25 01:39:33 2012 From: tracker at bugs.pypy.org (hm) Date: Sun, 25 Mar 2012 00:39:33 +0000 Subject: [pypy-issue] [issue1097] data loss in file.write() In-Reply-To: <1332635973.49.0.384966847778.issue1097@bugs.pypy.org> Message-ID: <1332635973.49.0.384966847778.issue1097@bugs.pypy.org> New submission from hm : http://pypy.org/compat.html mentions that open("filename", "w").write("stuff") will not work as expected because there is no reference counting in pypy. In fact, that line can cause data loss, as demonstrated in the attached file. $ pypy pypyfile.py $ python pypyfile.py $ cat CPython-output.txt 11111 234 $ cat PyPy-output.txt 11111 # my system: $ pypy --version Python 2.7.2 (2346207d99463f299f09f3e151c9d5fa9158f71b, Feb 20 2012, 04:52:48) [PyPy 1.8.0] $ uname -mrsv Darwin 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 $ python --version Python 2.7.2 # (also ran this on linux/python2.6 with the same results) ---------- files: pypyfile.py messages: 4135 nosy: hacman, pypy-issue priority: bug status: unread title: data loss in file.write() ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 25 01:51:22 2012 From: tracker at bugs.pypy.org (hm) Date: Sun, 25 Mar 2012 00:51:22 +0000 Subject: [pypy-issue] [issue1098] sys.stdout.close() from interactive session crashes pypy and messes up terminal In-Reply-To: <1332636682.08.0.8292785494.issue1098@bugs.pypy.org> Message-ID: <1332636682.08.0.8292785494.issue1098@bugs.pypy.org> New submission from hm : Those last few $s are the result of hitting return a few times after pypy has quit. The terminal does not seem to want to print newlines anymore. This happened on a Mac using the standard terminal program, but I have observed the same behavior in using iterm and on linux as well (the crash and the lack of newlines, although this is from an ssh session initiated on the same mac--I can check from a proper linux box at some point as well). $ pypy Python 2.7.2 (2346207d99463f299f09f3e151c9d5fa9158f71b, Feb 20 2012, 04:52:48) [PyPy 1.8.0] on darwin Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: ``ECOOP is happening'' >>>> import sys >>>> sys.stdout.close() Traceback (most recent call last): File "app_main.py", line 51, in run_toplevel File "/opt/local/lib/pypy/lib_pypy/_pypy_interact.py", line 40, in interactive_console run_multiline_interactive_console(mainmodule) File "/opt/local/lib/pypy/lib_pypy/pyrepl/simple_interact.py", line 58, in run_multiline_interactive_console returns_unicode=True) File "/opt/local/lib/pypy/lib_pypy/pyrepl/readline.py", line 210, in multiline_input return reader.readline(returns_unicode=returns_unicode) File "/opt/local/lib/pypy/lib_pypy/pyrepl/reader.py", line 594, in readline self.restore() File "/opt/local/lib/pypy/lib_pypy/pyrepl/reader.py", line 494, in restore self.console.restore() File "/opt/local/lib/pypy/lib_pypy/pyrepl/unix_console.py", line 396, in restore self.flushoutput() File "/opt/local/lib/pypy/lib_pypy/pyrepl/unix_console.py", line 497, in flushoutput self.__tputs(text) File "/opt/local/lib/pypy/lib_pypy/pyrepl/unix_console.py", line 515, in __tputs os.write(self.output_fd, fmt) OSError: [Errno 9] Bad file descriptor $ $ $ $ ---------- messages: 4136 nosy: hacman, pypy-issue priority: bug status: unread title: sys.stdout.close() from interactive session crashes pypy and messes up terminal ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 25 05:29:31 2012 From: tracker at bugs.pypy.org (cactuss) Date: Sun, 25 Mar 2012 03:29:31 +0000 Subject: [pypy-issue] [issue1099] distutils not correctly using g++, cplusplus compiler In-Reply-To: <1332646171.02.0.679929203502.issue1099@bugs.pypy.org> Message-ID: <1332646171.02.0.679929203502.issue1099@bugs.pypy.org> New submission from cactuss : I have a C++ module that I am currently using in a python application. I have bindings that use Python.h and compile it through the attached setup.py file. My build process in my current cPython app simply executes python setup.py build_ext --inplace. When I compile using ./pypy setup.py build_ext --inplace the resulting compilation uses 'cc' with pypy and 'g++' with python2.7. When I compile the module to pypy using ./pypy setup.py build_ext --inplace, the resulting binary does not work because it was not compiled with a c++ compiler. When I change 'cc' to 'g++' the module is successfully imported by the pypy interpreter. tl;dr cpython seems to automatically detect through distutils that it should use a c++ compiler and pypy does not when i run python setup.py build_ext --inplace ---------- files: setup.py messages: 4137 nosy: cactuss, pypy-issue priority: feature status: unread title: distutils not correctly using g++, cplusplus compiler ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 25 15:16:26 2012 From: tracker at bugs.pypy.org (Fijal) Date: Sun, 25 Mar 2012 13:16:26 +0000 Subject: [pypy-issue] [issue1097] data loss in file.write() In-Reply-To: <1332635973.49.0.384966847778.issue1097@bugs.pypy.org> Message-ID: <1332681386.81.0.811220345561.issue1097@bugs.pypy.org> Fijal added the comment: Yes, this is documented and also acknowledged as being a reasonable implementation-detail (refcounting or no refcounting). Closing as wontfix ---------- nosy: +fijal status: unread -> wontfix ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 25 15:18:03 2012 From: tracker at bugs.pypy.org (Fijal) Date: Sun, 25 Mar 2012 13:18:03 +0000 Subject: [pypy-issue] [issue1098] sys.stdout.close() from interactive session crashes pypy and messes up terminal In-Reply-To: <1332636682.08.0.8292785494.issue1098@bugs.pypy.org> Message-ID: <1332681483.28.0.434649223343.issue1098@bugs.pypy.org> Fijal added the comment: Well, you just messed up with internals, what would be the expected behavior? I think this is also a wontfix. The real reason is that pypy uses pyrepl for repl which is a piece of python code and it uses sys.stdout and not writing to file descriptors. ---------- nosy: +fijal status: unread -> wontfix ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sun Mar 25 15:37:35 2012 From: tracker at bugs.pypy.org (Ronny Pfannschmidt) Date: Sun, 25 Mar 2012 13:37:35 +0000 Subject: [pypy-issue] [issue1098] sys.stdout.close() from interactive session crashes pypy and messes up terminal In-Reply-To: <1332636682.08.0.8292785494.issue1098@bugs.pypy.org> Message-ID: <1332682655.53.0.695888971622.issue1098@bugs.pypy.org> Ronny Pfannschmidt added the comment: the issue for that is https://bitbucket.org/pypy/pyrepl/issue/1/bad-breakage-when-sysstdout-is-closed ---------- nosy: +ronny ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 26 01:41:56 2012 From: tracker at bugs.pypy.org (hm) Date: Sun, 25 Mar 2012 23:41:56 +0000 Subject: [pypy-issue] [issue1097] data loss in file.write() In-Reply-To: <1332635973.49.0.384966847778.issue1097@bugs.pypy.org> Message-ID: <1332718916.3.0.976974456137.issue1097@bugs.pypy.org> hm added the comment: The order of the output might be considered an implementation detail (although I'd argue that it isn't), but whether output is recorded at all hardly seems an implementation detail. If each works on its own (which is the case), they should be expected to work together. If the flush of the write is delayed until garbage collection, then the seek of the file pointer for proper "append" behavior should also be delayed. Otherwise, calling open(..., 'a') is behaving like open(..., 'w'). That is the behavior I would call a bug. I can understand if this is not an urgent item for you, as I know you are busy with other issues and making pypy even more awesome, but I'd urge you to reconsider "wontfix." At least answer this, then I'll leave you alone: if someone were to submit a patch modifying this behavior without breaking or slowing anything else, would you reject it? I'm not offering at the moment, although I'd think about looking into what it would take at least, but take it as a rhetorical question for now. jython, for instance, outputs all of the data, but out of order from how it is specified in the code. I read the further explanation at http://pypy.readthedocs.org/en/latest/cpython_differences.html and I can see the point of view there, but it seems wrong in the case of appends. The following C program, for instance, outputs 234511111111111111111 #include int main() { char a1[] = "11111111111111111"; char a2[] = "2345"; FILE *f1 = fopen("bye", "a"); fwrite(a1, sizeof(a1[0]), sizeof(a1)-1, f1); FILE *f2 = fopen("bye", "a"); fwrite(a2, sizeof(a2[0]), sizeof(a2)-1, f2); fflush(f2); } Whether or not we agree on this particular issue, thanks for all the great work on the project! ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 26 09:47:31 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Mon, 26 Mar 2012 07:47:31 +0000 Subject: [pypy-issue] [issue1097] data loss in file.write() In-Reply-To: <1332635973.49.0.384966847778.issue1097@bugs.pypy.org> Message-ID: <1332748051.08.0.864085934372.issue1097@bugs.pypy.org> Amaury Forgeot d Arc added the comment: Is it because streamio.py never uses the O_APPEND flag? ---------- nosy: +afa ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 26 10:04:49 2012 From: tracker at bugs.pypy.org (Fijal) Date: Mon, 26 Mar 2012 08:04:49 +0000 Subject: [pypy-issue] [issue1097] data loss in file.write() In-Reply-To: <1332635973.49.0.384966847778.issue1097@bugs.pypy.org> Message-ID: <1332749089.2.0.946937938834.issue1097@bugs.pypy.org> Fijal added the comment: It comes from unix file semantics. You have two open files and 234 is written *before* 1111 is written. There are possible workarounds, if you want this particular usecase, but I suggest closing files is probably a better idea. As far as patches go - I think we would accept a reasonable patch, but I still consider this as a wontfix. Cheers, fijal ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Mon Mar 26 15:28:58 2012 From: tracker at bugs.pypy.org (Armin Rigo) Date: Mon, 26 Mar 2012 13:28:58 +0000 Subject: [pypy-issue] [issue1100] Dict iterators can return deleted entries In-Reply-To: <1332768538.31.0.460128219214.issue1100@bugs.pypy.org> Message-ID: <1332768538.31.0.460128219214.issue1100@bugs.pypy.org> New submission from Armin Rigo : Dict iterators (and sets in the set-strategies branch) may return deleted entries if the dict is "cleverly" mutated while iterating in a way that changes its strategy. While it's known that iterating over a mutated dict should not be done, the result can still be surprizing: >>>> d = {3:4, 6:7} >>>> it = d.iteritems() >>>> d['foo'] = 'bar' >>>> del d[6] >>>> it.next() (3, 4) >>>> it.next() (6, 7) Maybe the dict iterator should check not only that the dict size didn't change, but also that its strategy is still the same one. ---------- messages: 4144 nosy: arigo, pypy-issue priority: bug status: unread title: Dict iterators can return deleted entries ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 27 15:18:30 2012 From: tracker at bugs.pypy.org (Simon Sapin) Date: Tue, 27 Mar 2012 13:18:30 +0000 Subject: [pypy-issue] [issue1094] Non-BPM unicode literals decoded as surrogate pairs In-Reply-To: <1332254179.6.0.235268017197.issue1094@bugs.pypy.org> Message-ID: <1332854310.27.0.550301248836.issue1094@bugs.pypy.org> Simon Sapin added the comment: CPython 3.1.4 and 3.2.2 behave as described above. CPython 3.0.1 has the same bug as PyPy 1.8.0. ---------- status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 27 15:20:21 2012 From: tracker at bugs.pypy.org (Simon Sapin) Date: Tue, 27 Mar 2012 13:20:21 +0000 Subject: [pypy-issue] [issue1094] Non-BPM unicode literals decoded as surrogate pairs In-Reply-To: <1332254179.6.0.235268017197.issue1094@bugs.pypy.org> Message-ID: <1332854421.66.0.501603905834.issue1094@bugs.pypy.org> Simon Sapin added the comment: CPython 2.7.2, 3.1.4 and 3.2.2 behave as described above. CPython 2.6.7 and 3.0.1 have the same bug as PyPy 1.8.0. ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Tue Mar 27 15:33:23 2012 From: tracker at bugs.pypy.org (Simon Sapin) Date: Tue, 27 Mar 2012 13:33:23 +0000 Subject: [pypy-issue] [issue1094] Non-BPM unicode literals decoded as surrogate pairs In-Reply-To: <1332254179.6.0.235268017197.issue1094@bugs.pypy.org> Message-ID: <1332855203.73.0.942123881244.issue1094@bugs.pypy.org> Simon Sapin added the comment: Assuming UCS4 (wide unicode): CPython 2.6.7, 2.7.2, 3.1.4 and 3.2.2 behave as described above. CPython 3.0.1 has the same bug as PyPy 1.8.0: only codepoints3 fails. (Sorry for the duplicate message, I had some of my pythons in UCS2.) ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Wed Mar 28 10:33:59 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Wed, 28 Mar 2012 08:33:59 +0000 Subject: [pypy-issue] [issue1094] Non-BPM unicode literals decoded as surrogate pairs In-Reply-To: <1332254179.6.0.235268017197.issue1094@bugs.pypy.org> Message-ID: <1332923639.45.0.0777017037508.issue1094@bugs.pypy.org> Amaury Forgeot d Arc added the comment: Most probably related to CPython bug http://bugs.python.org/issue3297 which was fixed in 2.7 with changeset http://hg.python.org/cpython/rev/032d9749047d PyPy has very similar code in pypy/interpreter/pyparser/parsestring.py. ---------- nosy: +afa ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Thu Mar 29 17:36:23 2012 From: tracker at bugs.pypy.org (David Ripton) Date: Thu, 29 Mar 2012 15:36:23 +0000 Subject: [pypy-issue] [issue1085] cpyext: PyString_AsString() returns bogus results for non-bytes input In-Reply-To: <1331478486.45.0.687703104839.issue1085@bugs.pypy.org> Message-ID: <1333035383.11.0.457678926513.issue1085@bugs.pypy.org> David Ripton added the comment: I translated PyPy on 64-bit Ubuntu 11.04, and ./pypy-c pytest.py pypy/module/cpyext/test/test_stringobject.py gives errors in a bunch of app-level tests, then segfaults in TestString.test_string_resize ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Mar 31 10:18:42 2012 From: tracker at bugs.pypy.org (papaeye) Date: Sat, 31 Mar 2012 08:18:42 +0000 Subject: [pypy-issue] [issue1101] Can't use unicode string as key in __dict__ attribute In-Reply-To: <1333181922.06.0.897522719468.issue1101@bugs.pypy.org> Message-ID: <1333181922.06.0.897522719468.issue1101@bugs.pypy.org> New submission from papaeye : In PyPy 1.8 on Mac OS X 10.7.3 and nightly binary build(http://buildbot.pypy.org/nightly/trunk/pypy-c-jit-54086-4f1f458bedae- linux64.tar.bz2) on Debian 6.0.4: >>> class Foo(object): attribute = 'foo' >>> 'attribute' in Foo.__dict__ True >>> u'attribute' in Foo.__dict__ False >>> d = {'foo': 'bar'} >>> 'foo' in d True >>> u'foo' in d True In CPython 2.5.6/2.6.7/2.7.2 and Jython 2.5.2 on Mac OS X 10.7.3, all of the above return True. ---------- nosy: +papaeye status: unread -> chatting ________________________________________ PyPy bug tracker ________________________________________ From tracker at bugs.pypy.org Sat Mar 31 13:11:51 2012 From: tracker at bugs.pypy.org (Amaury Forgeot d Arc) Date: Sat, 31 Mar 2012 11:11:51 +0000 Subject: [pypy-issue] [issue1101] Can't use unicode string as key in __dict__ attribute In-Reply-To: <1333181922.06.0.897522719468.issue1101@bugs.pypy.org> Message-ID: <1333192311.12.0.943823970936.issue1101@bugs.pypy.org> Amaury Forgeot d Arc added the comment: This is now fixed (c07e2a2ba2f8) Thanks for reporting this use case! ---------- nosy: +afa status: chatting -> resolved ________________________________________ PyPy bug tracker ________________________________________