[issue7961] Py3k: decoding empty bytestring with invalid encoding throws no error
Marc-Andre Lemburg m...@egenix.com added the comment: I think it's better to close the ticket as won't fix. -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7961 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7980] time.strptime not thread safe
New submission from Willard cptnwill...@gmail.com: The following script raises several _strptime_time AttributeErrors (on OS X 10.4 at least). If time.strptime is used before starting the threads, then no exception is raised (the issue may thus come from strptime.py not being imported in a thread safe manner). import time import thread def f(): for m in xrange(1, 13): for d in xrange(1,29): time.strptime(2010%02d%02d%(m,d),%Y%m%d) for _ in xrange(10): thread.start_new_thread(f, ()) time.sleep(3) Traceback (most recent call last): File [...]/test.py, line 75, in f time.strptime(2010%02d%02d%(m,d),%Y%m%d) AttributeError: _strptime_time -- components: Library (Lib) messages: 99718 nosy: cptnwillard severity: normal status: open title: time.strptime not thread safe type: crash versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7980 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7573] Python build issue on Ubuntu 9.10
Stefan Krah stefan-use...@bytereef.org added the comment: This is documented, so I'd recommend to close this issue. http://docs.python.org/3.1/c-api/intro.html#include-files -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7573 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7977] I found Python 3.1 xmlrpc lib use param not properly. and i have fixed it.
Jelly Chen sinoje...@gmail.com added the comment: I can't modify the issue. so i replay this email. The old xmlrpc lib don't use param surround a param. please take a look at wrong.xml and right.xml. 2010/2/22 Mark Dickinson rep...@bugs.python.org Mark Dickinson dicki...@gmail.com added the comment: Please could you generate and upload a patch against the Python source? (For Windows, you can do this using the WinMerge tool, amongst others.) I'm unable to open the file you attached on my machine: No application knows how to open ... xmlrpc.client.modify.rar. If you could explain how param is being used improperly, that might also help. -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7977 ___ -- keywords: +patch Added file: http://bugs.python.org/file16292/unnamed Added file: http://bugs.python.org/file16293/xmlrpc.patch Added file: http://bugs.python.org/file16294/wrong.xml Added file: http://bugs.python.org/file16295/right.xml ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7977 ___I can#39;t modify the issue. so i replay this email.divThe old xmlrpc lib don#39;t use lt;paramgt;nbsp;surround a param. please take a look at wrong.xml and right.xml.brbrdiv class=gmail_quote2010/2/22 Mark Dickinson span dir=ltrlt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/spanbr blockquote class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;br Mark Dickinson lt;a href=mailto:dicki...@gmail.com;dicki...@gmail.com/agt; added the comment:br br Please could you generate and upload a patch against the Python source? nbsp;(For Windows, you can do this using the WinMerge tool, amongst others.) nbsp;I#39;m unable to open the file you attached on my machine:br br quot;quot;quot;No application knows how to open ... xmlrpc.client.modify.rar.quot;quot;quot;br br If you could explain how quot;lt;paramgt;quot; is being used improperly, that might also help.br br --br nosy: +mark.dickinsonbr divdiv/divdiv class=h5br ___br Python tracker lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br lt;a href=http://bugs.python.org/issue7977; target=_blankhttp://bugs.python.org/issue7977/agt;br ___br /div/div/blockquote/divbrbr clear=allbr-- brContact me: nbsp;brQQ: 2578717brMSN: a href=mailto:sinoje...@msn.cn;sinoje...@msn.cn/abræ°æµªå¾®åï¼a href=http://t.sina.com.cn/sinojelly;http://t.sina.com.cn/sinojelly/abr æçå客ï¼a href=http://sinojelly.20x.cc;http://sinojelly.20x.cc/abrbrbr /div diff -Nur xmlrpc\client.py modify\xmlrpc\client.py --- xmlrpc\client.pyThu Jun 04 17:11:52 2009 +++ modify\xmlrpc\client.py Mon Feb 22 19:13:37 2010 @@ -49,6 +49,7 @@ # 2003-07-12 gp Correct marshalling of Faults # 2003-10-31 mvl Add multicall support # 2004-08-20 mvl Bump minimum supported Python version to 2.1 +# 2010-02-22 cgd Reorganize xmlrpc request message format (Chenguodong email:sinoje...@gmail.com) # # Copyright (c) 1999-2002 by Secret Labs AB. # Copyright (c) 1999-2002 by Fredrik Lundh. @@ -508,9 +509,7 @@ # is for now. See @XMLRPC3 for more information. /F write(params\n) for v in values: -write(param\n) dump(v, write) -write(/param\n) write(/params\n) result = .join(out) return result @@ -588,13 +587,25 @@ raise TypeError(cannot marshal recursive sequences) self.memo[i] = None dump = self.__dump +for v in value: +write(param\n) +dump(v, write) +write(/param\n) +del self.memo[i] +dispatch[tuple] = dump_array + +def dump_list(self, value, write): +i = id(value) +if i in self.memo: +raise TypeError(cannot marshal recursive sequences) +self.memo[i] = None +dump = self.__dump write(valuearraydata\n) for v in value: dump(v, write) write(/data/array/value\n) del self.memo[i] -dispatch[tuple] = dump_array -dispatch[list] = dump_array +dispatch[list] = dump_list def dump_struct(self, value, write, escape=escape): i = id(value) ?xml version='1.0'? methodCall methodNamemetaWeblog.newPost/methodName params param valuedata valueint1/int/value valuestringsinojelly/string/value valuestring123456/string/value valuestruct member namedescription/name valuestringTest description4/string/value /member member nametitle/name valuestringTest article3/string/value /member /struct/value valueboolean1/boolean/value /data/value /param /params /methodCall ?xml version=1.0 encoding=gb2312? methodCall
[issue7980] time.strptime not thread safe
Eric Smith e...@trueblade.com added the comment: With 10.6's stock python, I've had this test either work or crash Python. On trunk, I get it to either work or give the same error as the original report. Unfortunately I've been unable to get it to crash again in a debugger so I can get a stack trace. But I'm still trying. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7980 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7980] time.strptime not thread safe
Eric Smith e...@trueblade.com added the comment: Oops, sorry for not specifying that. It's: Python 2.6.4 (r264:75706, Jan 27 2010, 12:09:19) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7980 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7794] Document zipfile and directory execution in What's New for 2.6/3.1
Nick Coghlan ncogh...@gmail.com added the comment: As RDM said, it is AMK's What's New that is missing a description of this new feature. A lot of Python developers just read that document rather than trawling through the whole NEWS file for each major release. I actually thought I had got AMK to add this before the 2.6 release, but it obviously slipped through the cracks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7794 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6625] UnicodeEncodeError on pydoc's CLI
Florent Xicluna la...@yahoo.fr added the comment: Patch with same tests as the previous one, but using better heuristic for output encoding (like Christoph patch). Added the replace error handling, if the output encoding cannot encode all characters. -- Added file: http://bugs.python.org/file16296/issue6625_pydoc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7928] String formatting: grammar wrongly limits [index] to integer
Eric Smith e...@trueblade.com added the comment: I'm not exactly sure what wording to use here. element_index: `integer` | `identifier` is not exactly correct, because it can be a non-identifier (as the example that eddy quotes points out. It's really any sequence of characters except ']'. Any ideas on the best way to express that? Maybe taking a clue from string literals, this would be: element_index: `integer` | index_string index_string: any source character except ] + -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7928 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7977] I found Python 3.1 xmlrpc lib use param not properly. and i have fixed it.
Florent Xicluna la...@yahoo.fr added the comment: The patch causes failures in test_xmlrpc, using Py3k branch. -- nosy: +flox priority: - normal stage: - test needed versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7977 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7928] String formatting: grammar wrongly limits [index] to integer
Eric Smith e...@trueblade.com added the comment: Proposed patch attached. The rest of the documentation in the following 2 paragraphs looks correct. It refers to __getitem__, which is how either strings or integers is looked up. -- keywords: +patch stage: - patch review Added file: http://bugs.python.org/file16302/issue7928.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7928 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7049] decimal.py: Three argument power issues
Stefan Krah stefan-use...@bytereef.org added the comment: This is a very loosely related issue, but I think it fits in here. To be consistent with the documentation, the three argument power should use the ideal exponent: c = getcontext() c.prec = 400 Decimal('1E400') % Decimal('1123123E5') Decimal('8.45074E+10') pow(Decimal('1E400'), 1, (Decimal('1123123E5'))) Decimal('8450740') -- title: decimal.py: NaN result in pow(x, y, z) with prec 1 - decimal.py: Three argument power issues ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7049 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7977] I found Python 3.1 xmlrpc lib use param not properly. and i have fixed it.
Jelly Chen sinoje...@gmail.com added the comment: Can i have a look at the failure testsï¼ I just check out code at http://svn.python.org/projects/python/branches/py3k It's very slow. and i'm afraid that i don't know how to run the tests. The param tag use improperly is very clear. the wrong case: very ugly, there is no difference between param and params. params param valuedata valueint1/int/value valuestringsinojelly/string/value valuestring123456/string/value valuestruct member namedescription/name valuestringTest description4/string/value /member member nametitle/name valuestringTest article3/string/value /member /struct/value valueboolean1/boolean/value /data/value /param /params the right one: there is a param around every parameter. params param value string479153/string /value /param param value stringsinojelly/string /value /param param value string123456/string /value /param param value struct member nametitle/name value stringJust Test./string /value /member member namedescription/name value stringlt;pgt;Just Test wlw post.lt;/pgt;/string /value /member member namecategories/name value array data / /array /value /member /struct /value /param param value boolean1/boolean /value /param /params 2010/2/22 Florent Xicluna rep...@bugs.python.org Florent Xicluna la...@yahoo.fr added the comment: The patch causes failures in test_xmlrpc, using Py3k branch. -- nosy: +flox priority: - normal stage: - test needed versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7977 ___ -- Added file: http://bugs.python.org/file16303/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7977 ___Can i have a look at the failure testsï¼divI just check out code atnbsp;span class=Apple-style-span style=font-family: Arial, Verdana, Geneva, #39;Bitstream Vera Sans#39;, Helvetica, sans-serif; font-size: 15px; line-height: 17px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; a class=reference external href=http://svn.python.org/projects/python/branches/py3k; style=color: rgb(0, 0, 170); text-decoration: none; http://svn.python.org/projects/python/branches/py3k/a/spanbr It#39;s very slow. and i#39;m afraid that i don#39;t know how to run the tests./divdivbr/divdivThe lt;paramgt; tag use improperly is very clear./divdivbr/divdivthe wrong case: very ugly, there is no difference between lt;paramgt; and lt;paramsgt;./div divdivlt;paramsgt;/divdivlt;paramgt;/divdivlt;valuegt;lt;datagt;/divdivlt;valuegt;lt;intgt;1lt;/intgt;lt;/valuegt;/divdivlt;valuegt;lt;stringgt;sinojellylt;/stringgt;lt;/valuegt;/div divlt;valuegt;lt;stringgt;123456lt;/stringgt;lt;/valuegt;/divdivlt;valuegt;lt;structgt;/divdivlt;membergt;/divdivlt;namegt;descriptionlt;/namegt;/divdivlt;valuegt;lt;stringgt;Test description4lt;/stringgt;lt;/valuegt;/div divlt;/membergt;/divdivlt;membergt;/divdivlt;namegt;titlelt;/namegt;/divdivlt;valuegt;lt;stringgt;Test article3lt;/stringgt;lt;/valuegt;/divdivlt;/membergt;/divdivlt;/structgt;lt;/valuegt;/div divlt;valuegt;lt;booleangt;1lt;/booleangt;lt;/valuegt;/divdivlt;/datagt;lt;/valuegt;/divdivlt;/paramgt;/divdivlt;/paramsgt;/div/divdivbr/divdivthe right one: there is a lt;paramgt; around every parameter./div divdivnbsp;lt;paramsgt;/divdivnbsp;nbsp;lt;paramgt;/divdivnbsp;nbsp; lt;valuegt;/divdivnbsp;nbsp; nbsp;lt;stringgt;479153lt;/stringgt;/divdivnbsp;nbsp; lt;/valuegt;/divdivnbsp;nbsp;lt;/paramgt;/divdivnbsp;nbsp;lt;paramgt;/divdivnbsp;nbsp; lt;valuegt;/div divnbsp;nbsp; nbsp;lt;stringgt;sinojellylt;/stringgt;/divdivnbsp;nbsp; lt;/valuegt;/divdivnbsp;nbsp;lt;/paramgt;/divdivnbsp;nbsp;lt;paramgt;/divdivnbsp;nbsp; lt;valuegt;/divdivnbsp;nbsp; nbsp;lt;stringgt;123456lt;/stringgt;/divdivnbsp;nbsp; lt;/valuegt;/div divnbsp;nbsp;lt;/paramgt;/divdivnbsp;nbsp;lt;paramgt;/divdivnbsp;nbsp; lt;valuegt;/divdivnbsp;nbsp; nbsp;lt;structgt;/divdivnbsp;nbsp; nbsp; lt;membergt;/divdivnbsp;nbsp; nbsp; nbsp;lt;namegt;titlelt;/namegt;/divdivnbsp;nbsp; nbsp; nbsp;lt;valuegt;/divdiv nbsp;nbsp; nbsp; nbsp; lt;stringgt;Just Test.lt;/stringgt;/divdivnbsp;nbsp; nbsp; nbsp;lt;/valuegt;/divdivnbsp;nbsp; nbsp; lt;/membergt;/divdivnbsp;nbsp; nbsp; lt;membergt;/divdivnbsp;nbsp; nbsp; nbsp;lt;namegt;descriptionlt;/namegt;/divdivnbsp;nbsp; nbsp; nbsp;lt;valuegt;/div divnbsp;nbsp; nbsp; nbsp; lt;stringgt;amp;lt;pamp;gt;Just Test wlw post.amp;lt;/pamp;gt;lt;/stringgt;/divdivnbsp;nbsp; nbsp; nbsp;lt;/valuegt;/divdivnbsp;nbsp; nbsp; lt;/membergt;/divdivnbsp;nbsp; nbsp; lt;membergt;/divdivnbsp;nbsp; nbsp; nbsp;lt;namegt;categorieslt;/namegt;/div
[issue7984] missing dependencies using cProfile
New submission from Mezhenin Artyom a.mezhe...@gmail.com: 1) I have ubuntu 9.10 and python2.6 (and 2.5 too). 2) execution code like that: if __name__ == __main__: import cProfile cProfile.run('main()') gives me traceback: Traceback (most recent call last): File ./scribo.py, line 60, in module cProfile.run('main()') File /usr/lib/python2.6/cProfile.py, line 36, in run result = prof.print_stats(sort) File /usr/lib/python2.6/cProfile.py, line 80, in print_stats import pstats ImportError: No module named pstats so I had to install python-profiler package manually -- components: None messages: 99739 nosy: artech severity: normal status: open title: missing dependencies using cProfile type: crash versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7984 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5988] Delete PyOS_ascii_formatd, PyOS_ascii_strtod, and PyOS_ascii_atof
Eric Smith e...@trueblade.com added the comment: These were originally deprecated in issue 5835. Removed them from py3k in r78306. -- resolution: - accepted stage: - committed/rejected status: open - closed superseder: - Deprecate PyOS_ascii_formatd ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7985] access to infinitely recursive list
New submission from LukMak lmako...@volt.iem.pw.edu.pl: Execution: l=[] l.append(l) l [[...]] l[0] [[...]] l[0][0][0] [[...]] eval('l'+'[0]'*10) [[...]] eval('l'+'[0]'*666) [[...]] eval('l'+'[0]'*99) Segmentation fault Environment: 2.6.24-27-generic #1 SMP, Ubuntu 8.04.4 LTS, Both Python 2.5.2 from distro repo and Python 3.1.1 compiled by me. But crash seems to be platform and version independent. Comment: Should throw RuntimeError: maximum recursion depth exceeded instead of SIGSEGV? -- components: Interpreter Core messages: 99742 nosy: LukMak severity: normal status: open title: access to infinitely recursive list type: crash versions: Python 2.5, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7985 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5988] Delete PyOS_ascii_formatd, PyOS_ascii_strtod, and PyOS_ascii_atof
Eric Smith e...@trueblade.com added the comment: I closed this even though the functions remain in 2.7. They would not be removed until 2.8, and since 2.8 seems unlikely I'll close this. Even if there is a 2.8, then these functions will still be present but do no harm. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7049] decimal.py: Three argument power issues
Mark Dickinson dicki...@gmail.com added the comment: The ideal exponent for three-argument pow should definitely be zero. You're returning what's essentially an integer, loosely disguised as a decimal instance. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7049 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7310] Unhelpful __repr__() in os.environ
Ezio Melotti ezio.melo...@gmail.com added the comment: Do you have any preference about the text that should appear in the repr? There have been some discussion on #python-dev about it, and the two main proposal were: 1) _Environ({...}) - the right class name but kind of ugly and probably unnecessary (if no one cares about the name of the real class); 2) environ({...}) - non-existing name, but enough to clarify that it's not a plain dict and less ugly name; -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7310 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7980] time.strptime not thread safe
Brett Cannon br...@python.org added the comment: Lib/_strptime.py itself should be thread-safe. I am guessing that it has something to do with the way the C code in time.c imports _strptime.py. A possible solution if it is the C code's import stuff is to create a time.py that imports a _time.c, but that's a total guess as to whether that will solve anything. -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7980 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4852] Cleanup old stuff from pythread.h
A.M. Kuchling li...@amk.ca added the comment: The patch seems obviously correct to me; there's no way a user of pythread.h can make NO_EXIT_PROG be undefined. The patch no long applies cleanly to thread_nt.h -- one hunk is rejected -- but it looks like the change in that hunk has already been applied (though I can't try compiling on Windows to verify that everything still works). I did try applying the patch and re-compiling on Linux. I think you can just apply it; if you're cautious, you could ask someone to try it on Windows first. -- nosy: +akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7049] decimal.py: Three argument power issues
Mark Dickinson dicki...@gmail.com added the comment: I've fixed the docs to accurately describe three-argument pow results (the exponent in particular) in r78312 through r78315. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7049 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7310] Unhelpful __repr__() in os.environ
R. David Murray rdmur...@bitdance.com added the comment: I like (2). If someone tries to use the repr to recreate the object, it will fail with a message that mentions _Environ. So no information is lost, I think, by using (2). -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7310 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7977] I found Python 3.1 xmlrpc lib use param not properly. and i have fixed it.
Florent Xicluna la...@yahoo.fr added the comment: I didn't look at this issue in details. I'm not a specialist of xmlrpc. But it is unlikely that the patch will be accepted, if it fails the regression tests. Could you investigate this failure and provide a patch which fixes the tests? You could add a specific test related to this issue, too. Command to run the tests (on linux): python -m test.regrtest test_xmlrpc I've tested with 3.1 branch, and test_xmlrpc fails too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7977 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7038] test_curses fails on os x 10.6
A.M. Kuchling li...@amk.ca added the comment: Closing this bug is fine with me. -- nosy: +akuchling resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7038 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7900] posix.getgroups() failure on Mac OS X
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: Here is another interesting fact: Mac OS 10.6 comes with python 2.5 and 2.6 preinstalled: $ python2.5 -V Python 2.5.3c1 $ python2.6 -V Python 2.6.1 Neither of these exhibit the same bug, but both are broken in some way. Given $ cat tg.py import os g = os.getgroups() print g os.setgroups(g[:5]) print os.getgroups() $ sudo python2.5 tg.py [0, 101, 204, 100, 98, 80, 61, 29, 20, 12, 9, 8, 5, 4, 3, 2] [0, 101, 204, 100, 98] $ sudo python2.6 tg.py [0, 101, 204, 100, 98, 80, 61, 29, 20, 12, 9, 8, 5, 4, 3, 2, 1, 401] [0, 101, 204, 100, 98, 80, 61, 29, 20, 12, 9, 8, 5, 4, 3, 2, 1, 401] Note that python2.5 truncates the group list which is $ sudo id -G 0 101 204 100 98 80 61 29 20 12 9 8 5 4 3 2 1 401 but setgroups works as expected. In contrast, python2.6 reports all groups correctly, but setgroups has no effect. -- Added file: http://bugs.python.org/file16306/tg.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7986] Python 3 cannot recognize url like: https://sinojellycn:123...@storage.msn.com
New submission from Jelly Chen sinoje...@gmail.com: posturl='https://sinojellycn:123...@storage.msn.com/storageservice/MetaWeblog.rpc' username=sinojellycn password=123456 blog = pyblog.WordPress(posturl, username, password) content = {description:'Test description6', title:'Test article6'} blog.new_post(content, blogid = 1) Traceback (most recent call last): File C:\Python31\Lib\http\client.py, line 664, in _set_hostport port = int(host[i+1:]) ValueError: invalid literal for int() with base 10: '123...@storage.msn.com' During handling of the above exception, another exception occurred: Traceback (most recent call last): File string, line 248, in run_nodebug File D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\BlogPost.py, line 384, in module blog = pyblog.WordPress(posturl, username, password) File D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\pyblog.py, line 266, in __init__ MetaWeblog.__init__(self, serverapi, username, password, encoding) File D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\pyblog.py, line 167, in __init__ Blog.__init__(self, serverapi, username, password, encoding, appkey) File D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\pyblog.py, line 57, in __init__ if not checkURL(serverapi): File D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\pyblog.py, line 19, in checkURL try: urllib.request.urlopen(url) File C:\Python31\Lib\urllib\request.py, line 119, in urlopen return _opener.open(url, data, timeout) File C:\Python31\Lib\urllib\request.py, line 347, in open response = self._open(req, data) File C:\Python31\Lib\urllib\request.py, line 365, in _open '_open', req) File C:\Python31\Lib\urllib\request.py, line 325, in _call_chain result = func(*args) File C:\Python31\Lib\urllib\request.py, line 1080, in https_open return self.do_open(http.client.HTTPSConnection, req) File C:\Python31\Lib\urllib\request.py, line 1034, in do_open h = http_class(host, timeout=req.timeout) # will parse host:port File C:\Python31\Lib\http\client.py, line 1027, in __init__ HTTPConnection.__init__(self, host, port, strict, timeout) File C:\Python31\Lib\http\client.py, line 650, in __init__ self._set_hostport(host, port) File C:\Python31\Lib\http\client.py, line 666, in _set_hostport raise InvalidURL(nonnumeric port: '%s' % host[i+1:]) http.client.InvalidURL: nonnumeric port: '123...@storage.msn.com' -- components: Library (Lib) messages: 99760 nosy: Jelly.Chen severity: normal status: open title: Python 3 cannot recognize url like: https://sinojellycn:123...@storage.msn.com type: behavior versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7986 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7977] I found Python 3.1 xmlrpc lib use param not properly. and i have fixed it.
Florent Xicluna la...@yahoo.fr added the comment: Attached, the output of the test with -v test_xmlrpc. -- Added file: http://bugs.python.org/file16308/issue7977_test_xmlrpc.log ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7977 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7232] Support of 'with' statement fo TarFile class
Brian Curtin cur...@acm.org added the comment: The last patch does more than it should for this issue. Here is a minimal patch with the change, test, and doc updates. -- Added file: http://bugs.python.org/file16307/issue7232.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7232 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1657] [patch] epoll and kqueue wrappers for the select module
A.M. Kuchling li...@amk.ca added the comment: What exactly needs to be finished in the documentation? There are sections for the epoll and kqueue objects, and the epoll section looks fine, if brief. Is the problem that the kqueue section says things like 'filter-specific data' with no explanation? -- nosy: +akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1657 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7987] Python 3.1's http.client doesn't support HTTPS
New submission from Jelly Chen sinoje...@gmail.com: posturl='https://storage.msn.com/storageservice/MetaWeblog.rpc' username=sinojellycn password=123456 blog = pyblog.WordPress(posturl, username, password) content = {description:'Test description6', title:'Test article6'} blog.new_post(content, blogid = 1) Traceback (most recent call last): File string, line 248, in run_nodebug File D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\BlogPost.py, line 385, in module blog = pyblog.WordPress(posturl, username, password) File D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\pyblog.py, line 266, in __init__ MetaWeblog.__init__(self, serverapi, username, password, encoding) File D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\pyblog.py, line 167, in __init__ Blog.__init__(self, serverapi, username, password, encoding, appkey) File D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\pyblog.py, line 63, in __init__ self.list_methods2() File D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\pyblog.py, line 87, in list_methods2 self.methods = self.server.system.listMethods() File C:\Python31\Lib\xmlrpc\client.py, line 1039, in __call__ return self.__send(self.__name, args) File C:\Python31\Lib\xmlrpc\client.py, line 1281, in __request verbose=self.__verbose File C:\Python31\Lib\xmlrpc\client.py, line 1068, in request http_conn = self.send_request(host, handler, request_body, verbose) File C:\Python31\Lib\xmlrpc\client.py, line 1193, in send_request your version of http.client doesn't support HTTPS) NotImplementedError: your version of http.client doesn't support HTTPS -- components: Library (Lib) messages: 99765 nosy: Jelly.Chen severity: normal status: open title: Python 3.1's http.client doesn't support HTTPS type: behavior versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7987 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7900] posix.getgroups() failure on Mac OS X
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: Apparently, Apple patches posix_[gs]etgroups functions as follows: for 2.5: http://www.opensource.apple.com/source/python/python-44/2.5/fix/posixmodule.c.ed for 2.6: http://www.opensource.apple.com/source/python/python-44/2.6/fix/posixmodule.c.ed -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7980] time.strptime not thread safe
R. David Murray rdmur...@bitdance.com added the comment: FYI there's been a proposal to create a time.py module anyway in order to add some pure python functions not worth writing in c. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7980 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7987] Python 3.1's http.client doesn't support HTTPS
Florent Xicluna la...@yahoo.fr added the comment: Duplicate of #6494: This is not a bug in Python. You need to build Python with SSL support for this to work. -- nosy: +flox priority: - low resolution: - duplicate status: open - closed superseder: - xmlrpc client does not support HTTPS ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7987 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7900] posix.getgroups() failure on Mac OS X
Ronald Oussoren ronaldousso...@mac.com added the comment: And as usual they can't be bothered to describe what the patch does, or even use regular universal diffs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7989] Transition time/datetime C modules to Python
New submission from Brian Curtin cur...@acm.org: After discussion on numerous issues, python-dev, and here at the PyCon sprints, it seems to be a good idea to move timemodule.c to _timemodule.c and convert as much as possible into pure Python. The same change seems good for datetime.c as well. -- components: Library (Lib) messages: 99774 nosy: brian.curtin priority: normal severity: normal stage: needs patch status: open title: Transition time/datetime C modules to Python type: behavior versions: Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7989 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7900] posix.getgroups() failure on Mac OS X
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: I've converted apple patches to unified diffs, but I cannot reproduce 2.5 behavior. -- Added file: http://bugs.python.org/file16309/apple-2.5-fix-posixmodule.c.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4331] Can't use _functools.partial() created function as method
Jack Diederich jackd...@gmail.com added the comment: I'm having some trouble wrapping my head around this one. It isn't obvious to me that my_method(*args): print(args) class A(): meth = partial(my_method, 'argA') ob = A() ob.meth('argB') should print (A object at 0x1234, 'argA', 'argB') and not ('argA', A object at 0x1234, 'argB') The patch seems to prefer the first form but if you are using a partial shouldn't you expect 'argA' to always be the first argument to the partial-ized function? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6243] getkey() can segfault in combination with curses.ungetch()
A.M. Kuchling li...@amk.ca added the comment: Backported to 2.6-maint in commit 78324. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6243 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4174] Performance optimization for min() and max() over lists
A.M. Kuchling li...@amk.ca added the comment: Should this patch just be rejected, then? Or is the more general locking suggested in msg88021 of interest? -- nosy: +akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4174 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7850] platform.system() should be macosx instead of Darwin on OSX
Jack Diederich jackd...@gmail.com added the comment: -1, my Ubuntu laptop says linux2 and not ubuntu. This would also be an incompatible change that would cause headaches with little benefit to balance it out. -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4174] Performance optimization for min() and max() over lists
Mark Dickinson dicki...@gmail.com added the comment: I agree that the performance improvement isn't worth the extra code, or the risk of introducing bugs (the comments so far show that it's not trivial to get this right). Closing as rejected. -- nosy: +mark.dickinson resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4174 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4174] Performance optimization for min() and max() over lists
Antoine Pitrou pit...@free.fr added the comment: I think the patch should just be rejected. Workloads where min() / max() performance is a bottleneck have to be very rare. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4174 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6312] httplib fails with HEAD requests to pages with transfer-encoding: chunked
Michal Božoň michal.bo...@gmail.com added the comment: i confirm.. in my case, the bug manifestated when calling HEAD method on a different server with chunked transfer encoding (http://obrazky.cz) my workaround is to call response.read() always, except from cases when method == 'HEAD' and resp.getheader('transfer-encoding') == 'chunked -- nosy: +mykhal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6312 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7399] Possible bug in Python Tutorial
Senthil Kumaran orsent...@gmail.com added the comment: Fixed in r78325, r78326. -- assignee: georg.brandl - orsenthil nosy: +orsenthil resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7399 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5368] curses patch add color_set and wcolor_set , and addchstr family of functions
A.M. Kuchling li...@amk.ca added the comment: Thanks for the patches! Two comments on the addchstr change: * I think that, instead of checking for a list, the method should accept any Python sequence; a tuple is perfectly reasonable, for example, and if the code is changed to use PyCurses_ConvertToChType() instead of PyInt_Check(), it will accept a list of integers, a mixed list of ints and character strings, and even just strings. * the documentation and error messages currently try to paper over all of the curses variants of addchstr(), waddchstr(), mvwaddchstr(), ..., covering them all up under the addchstr name. This means that your submitted documentation patch is too detailed; it should look more like the insnstr() docs, which has [y,x,] as optional, and the text says something like Moves to y,x if specified, and then ...'. The color_set() changes look OK; I'm going to try to break them out into a separate patch and commit them on their own. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5368 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7989] Transition time/datetime C modules to Python
Brian Curtin cur...@acm.org added the comment: Correct, your wording is better than mine. I'll ask around and see where that datetime module may be and what it's state is. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7989 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7980] time.strptime not thread safe
Eric Smith e...@trueblade.com added the comment: I just tried it again under gdb on MacOS 10.6, the supplied python 2.6.4 and got this backtrace: Program received signal SIGTRAP, Trace/breakpoint trap. [Switching to process 61133] 0x7fff87a4b790 in __CFInitialize () (gdb) bt #0 0x7fff87a4b790 in __CFInitialize () #1 0x7fff5fc0d5ce in __dyld__ZN16ImageLoaderMachO11doImageInitERKN11ImageLoader11LinkContextE () #2 0x7fff5fc0d607 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE () #3 0x7fff5fc0bcec in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj () #4 0x7fff5fc0bc9d in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj () #5 0x7fff5fc0bc9d in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj () #6 0x7fff5fc0bda6 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextE () #7 0x7fff5fc08fbb in __dyld_dlopen () #8 0x7fff8276fe00 in dlopen () #9 0x0001000e876f in _PyImport_GetDynLoadFunc () #10 0x0001000d2ce4 in _PyImport_LoadDynamicModule () #11 0x0001000d0fbf in import_submodule () #12 0x0001000d14da in load_next () #13 0x0001000d17ec in PyImport_ImportModuleLevel () #14 0x0001000aeeb3 in builtin___import__ () #15 0x0001c092 in PyObject_Call () #16 0x0001000b00e7 in PyEval_CallObjectWithKeywords () #17 0x0001000b43ae in PyEval_EvalFrameEx () #18 0x0001000b8fd0 in PyEval_EvalCodeEx () #19 0x0001000b90b6 in PyEval_EvalCode () #20 0x0001000cdeb0 in PyImport_ExecCodeModuleEx () #21 0x0001000cf112 in load_source_module () #22 0x0001000d0fbf in import_submodule () #23 0x0001000d14da in load_next () #24 0x0001000d17ec in PyImport_ImportModuleLevel () #25 0x0001000aeeb3 in builtin___import__ () #26 0x0001c092 in PyObject_Call () #27 0x0001000b00e7 in PyEval_CallObjectWithKeywords () #28 0x0001000b43ae in PyEval_EvalFrameEx () #29 0x0001000b8fd0 in PyEval_EvalCodeEx () #30 0x0001000b90b6 in PyEval_EvalCode () #31 0x0001000cdeb0 in PyImport_ExecCodeModuleEx () #32 0x0001000cf112 in load_source_module () #33 0x0001000d0fbf in import_submodule () #34 0x0001000d14da in load_next () #35 0x0001000d17ec in PyImport_ImportModuleLevel () #36 0x0001000aeeb3 in builtin___import__ () #37 0x0001c092 in PyObject_Call () #38 0x0001fbe5 in PyObject_CallFunction () #39 0x0001000d1f9b in PyImport_Import () #40 0x0001000d250f in PyImport_ImportModuleNoBlock () #41 0x000100515733 in time_strptime () #42 0x0001000b8278 in PyEval_EvalFrameEx () #43 0x0001000b8fd0 in PyEval_EvalCodeEx () #44 0x00010003b355 in function_call () #45 0x0001c092 in PyObject_Call () #46 0x0001000b00e7 in PyEval_CallObjectWithKeywords () #47 0x0001000ef7ae in t_bootstrap () #48 0x7fff827a2f8e in _pthread_start () #49 0x7fff827a2e41 in thread_start () (gdb) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7980 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7980] time.strptime not thread safe
R. David Murray rdmur...@bitdance.com added the comment: Attribute error confirmed on linux on trunk and py3k. -- priority: - normal stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7980 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5584] json.loads(u'3.14') fails unexpectedly (minor scanner bug)
Joel Pearson j...@pythonica.com added the comment: The fix for this bug was included in r72194. I verified that the fix is included in trunk, the release31-maint branch, and the py3k branch. I also verified that json.loads(u'3.14') works in 2.7a3, and that json.loads('3.14') works in 3.1.1, so I believe that this bug can be closed. -- nosy: +joel.pearson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7627] mailbox.MH.remove() lock handling is broken
A.M. Kuchling li...@amk.ca added the comment: Thanks for your bug report! Unfortunately, the fix isn't quite right, because on Windows you can't delete files that are open. I think an even simpler fix is just to remove that locking; if self._locked is true, this process presumably has exclusive access to the mailbox and can just go ahead and remove the file. I've committed this to 2.7 trunk as rev78332. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7627 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7649] u'%c' % char broken for chars in range '\x80'-'\xFF'
Ezio Melotti ezio.melo...@gmail.com added the comment: New patch (issue7649v2.diff) with refleak fixed and improved unittests. -- keywords: +needs review Added file: http://bugs.python.org/file16314/issue7649v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1669349] make install fails if no previous Python installation
Gael gael.peglia...@makina-corpus.com added the comment: I have the same issue on Sun Solaris while compiling Python 2.4.5 on a Python-less system. I was using GNU tools (tar, zlib, libgcc and bash). I have noticed that the error appears while using --prefix=/something/ending/with/Python-2.4 But if I use --prefix=/something/ending/with/SomethingElse, like --prefix=/something/ending/with/Python-24 or --prefix=/something/ending/with/PythonTest Everything goes well and make install no more fails. It looks like a fail regex or a hard coded path error. Hope this can help. Best regards, Gaël, -- nosy: +gael ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1669349 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4331] Can't use _functools.partial() created function as method
R. David Murray rdmur...@bitdance.com added the comment: I would expect the second and would view the first as a bug. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7946] Convoy effect with I/O bound threads and New GIL
Antoine Pitrou pit...@free.fr added the comment: And here is an experimental patch which enables the priority requests mechanism which was in the original new GIL patch. Experimental because it only enables them on a couple of socket methods (enough to affect the benchmarks). Here are the UDP benchmark results (with 2 background threads): * 2.x trunk (old GIL): 11.379 seconds (921515.168 bytes/sec) * vanilla py3k (new GIL): 27.400 seconds (382689.529 bytes/sec) * patched py3k (new GIL + priority requests): 1.828 seconds (5737130.676 bytes/sec) And here's patched py3k with 8 background threads: 3.058 seconds (3429136.193 bytes/sec) (benchmarks run on a 8-core Linux machine) -- keywords: +patch Added file: http://bugs.python.org/file16317/gilprio.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7946 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7988] complex.__format__ has incorrect default alignment
Eric Smith e...@trueblade.com added the comment: Checked in: trunk r78329 py3k r78333 release31-maint r78334 -- priority: - low resolution: - accepted stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6857] float().__format__() default alignment
Eric Smith e...@trueblade.com added the comment: With the fixes for complex in issue 7988, I believe this issue is completed. -- priority: - normal resolution: - accepted stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7920] urllib2.HTTPRedirectHandler incorrect redirect
Senthil Kumaran orsent...@gmail.com added the comment: I disagree with this bug report. First the responsibility of checking if something is not malicious URL lies at the application/client end, urllib in its redirection never urlopen()'s the redirected url, so you are not harmed in anyway. If you wanted to be extra careful of the BAD Server, you can always subclass the redirection methods and use those handlers. Closing this bug as won't fix. -- assignee: - orsenthil resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7920 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7049] decimal.py: Three argument power issues
Stefan Krah stefan-use...@bytereef.org added the comment: I've tried to pinpoint exactly what I don't like about the current behavior, and the main reason is that it violates my mental model of how the functions in the specification generally behave: 1) Functions take arbitrary precision input. 2) Functions try to preserve as much of the exponent information of the input as possible. With these in mind, it's easy to specify powmod() as: (a ** b) % c, calculated with unlimited precision. Raises if the final result does not fit in the current precision. It is not totally clear to me why the result should have exponent 0 because it is an integer. Decimal(1E3).to_integral() also preserves the exponent information. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7049 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7647] Add statvfs flags to the posix module
A.M. Kuchling li...@amk.ca added the comment: Here's a patch that updates the 2.7 docs. Adam, have you submitted a contributor agreement (http://www.python.org/psf/contrib/)? -- nosy: +akuchling Added file: http://bugs.python.org/file16318/posix-statvfs-flag-docs.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7647 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1708316] doctest work with Windows PyReadline
A.M. Kuchling li...@amk.ca added the comment: Does the attached, slightly simpler patch, also fix it? The patch just sets the .encoding attribute after creating it with _SpoofOut(). The revised patch doesn't seem to break anything on MacOS; I don't have access to Windows to test whether it still fixes the bug. -- nosy: +akuchling Added file: http://bugs.python.org/file16319/doctest-patch.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1708316 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7646] test_telnetlib fails in Windows XP
Jack Diederich jackd...@gmail.com added the comment: I was mistaken, the tests were backported to 3.1.x maint (In fact I was the one who did it). So this is fixed in the next point release of 3.1.x. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7646 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7646] test_telnetlib fails in Windows XP
Austin English austinenglish+pyt...@gmail.com added the comment: Okay, thanks for the information. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7646 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7049] decimal.py: Three argument power issues
Mark Dickinson dicki...@gmail.com added the comment: Well, the real problem is that powmod doesn't really belong in the decimal module at all. It's not a natural primitive arithmetic operation; it's certainly not naturally a floating-point operation; nothing like this appears in any floating-point standard that I'm aware of; and its (few) use cases are very different from typical decimal use cases. I'd like to bet that it currently has precisely 0 users. Trying to shoehorn powmod into the decimal module and make its semantics fit with the rest of the module seems a little pointless to me. Really, what's the point of making any sort of attempt to preserve exponents in 3-argument pow? Having the result exponent be 0 is clean, simple to understand, simple to implement (which your proposal is not), and matches the use-cases. The restriction on the modulus also matches the use-cases: typically, the modulus m is fixed, and you won't have any expectations about the output of powmod(a, b, m) except that you'll know the result is an integer in the range 0 = x m. Having powmod reject m's for which only part of this range is representable avoids hard-to-find bugs where powmod(a, b, m) works for most values of a but then unexpectedly fails for some particular value of a because the result is just larger than can be represented. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7049 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1514] missing constants in socket module
A.M. Kuchling li...@amk.ca added the comment: The original problem has been fixed since 2007. Improving the #if condition doesn't seem very important to anyone, so I'll just close this bug. -- nosy: +akuchling resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1514 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6871] decimal.py: more format issues
Eric Smith e...@trueblade.com added the comment: I think there are no remaining issues here that don't have their own issue. I'm going to close this unless one of you think otherwise. -- assignee: - eric.smith resolution: - out of date status: open - pending type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5584] json.loads(u'3.14') fails unexpectedly (minor scanner bug)
Ezio Melotti ezio.melo...@gmail.com added the comment: I tried json.loads(u'3.14') on trunk and release26-maint and it worked fine, on py3k and release31-maint json.loads('3.14') works too, so I'm closing this issue. -- nosy: +ezio.melotti resolution: accepted - out of date stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7975] dbshelve.py throws exception: AttributeError: 'DB' object has no attribute '__iter__'
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: +1 -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7463] PyDateTime_IMPORT() causes compiler warnings
Jack Diederich jackd...@gmail.com added the comment: changing the definition to (const char *) seems like the right thing to do - a quick grep of the Python source and a search on google codesearch only shows uses with either string literals or string literals cast to (char *) in order to silence a warning. I tried changing it on the 2.x trunk and it compiles with no warnings. +1, any other opinions? -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7463 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6871] decimal.py: more format issues
Stefan Krah stefan-use...@bytereef.org added the comment: I couldn't find other issues where #1 and #2 are addressed. This is from py3k: #1: format(float('nan'), '+08.4') '+nan' [70141 refs] format(Decimal('nan'), '+08.4') '+NaN' #2: format(float(123), 00) '123.0' [70141 refs] format(Decimal(123), 00) Traceback (most recent call last): File stdin, line 1, in module File /home/stefan/svn/py3k/Lib/decimal.py, line 3633, in __format__ spec = _parse_format_specifier(specifier, _localeconv=_localeconv) File /home/stefan/svn/py3k/Lib/decimal.py, line 5915, in _parse_format_specifier raise ValueError(Invalid format specifier: + format_spec) ValueError: Invalid format specifier: 00 [70141 refs] -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6871] decimal.py: more format issues
Stefan Krah stefan-use...@bytereef.org added the comment: [The tracker apparently set the status to 'open' without my intervention.] To sum up what I said earlier about #1 and #2, I think that the C standard and gcc's warning behavior support the way of Decimal. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1097797] Encoding for Code Page 273 used by EBCDIC Germany Austria
A.M. Kuchling li...@amk.ca added the comment: I tried figuring out to rebuild the codecs using the scripts in Tools/unicode/ but failed. Is the use of that directory documented anywhere? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1097797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6871] decimal.py: more format issues
Eric Smith e...@trueblade.com added the comment: [If the status is pending, any comment turns it back to open, by design.] I'd rather float.__format__ agree with %-formatting for floats than with anything else. '%+08.4f' % float('nan') '+nan' %00f % float('123') '123.00' (Not sure about the precision being displayed on that last one, I'll have to think about it.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7946] Convoy effect with I/O bound threads and New GIL
David Beazley d...@dabeaz.com added the comment: I posted some details about the priority GIL modifications I showed during my PyCON open-space session here: http://www.dabeaz.com/blog/2010/02/revisiting-thread-priorities-and-new.html I am attaching the .tar.gz file with modifications if anyone wants to look at them. Note: I would not consider this to be solid enough to be any kind of official patch. People should only look at it for the purposes of experimentation and for coming up with something better. -- Added file: http://bugs.python.org/file16324/prioritygil.tar.gz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7946 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7994] object.__format__ should reject format strings
New submission from Eric Smith e...@trueblade.com: Background: format(obj, fmt) eventually calls object.__format__(obj, fmt) if obj (or one of its bases) does not implement __format__. The behavior of object.__format__ is basically: def __format__(self, fmt): return str(self).__format__(fmt) So the caller of format() thought they were passing in a format string specific to obj, but it is interpreted as a format string for str. This is not correct, or at least confusing. The format string is supposed to be type specific. However in this case the object is being changed (to type str), but the format string which was to be applied to its original type is now being passed to str. This is an actual problem that occurred in the migration from 3.0 - 3.1 and from 2.6 - 2.7 with complex. In the earlier versions, complex did not have a __format__ method, but it does in the latter versions. So this code: format(1+1j, '10s') '(1+1j)' worked in 2.6 and 3.0, but gives an error in 2.7 and 3.1: format(1+1j, '10s') Traceback (most recent call last): File stdin, line 1, in module ValueError: Unknown format code 's' for object of type 'complex' Proposal: object.__format__ should give an error if a non-empty format string is specified. In 2.7 and 3.2 make this a PendingDeprecationWarning, in 3.3 make it a DeprecationWarning, and in 3.4 make it an error. Modify the documentation to make this behavior clear, and let the user know that if they want this behavior they should say: format(str(obj), '10s') or the equivalent: {0!s:10}.format(obj) That is, the conversion to str should be explicit. -- assignee: eric.smith components: Interpreter Core messages: 99847 nosy: eric.smith priority: normal severity: normal stage: needs patch status: open title: object.__format__ should reject format strings type: behavior versions: Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7994 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1097797] Encoding for Code Page 273 used by EBCDIC Germany Austria
Marc-Andre Lemburg m...@egenix.com added the comment: A.M. Kuchling wrote: A.M. Kuchling li...@amk.ca added the comment: I tried figuring out to rebuild the codecs using the scripts in Tools/unicode/ but failed. Is the use of that directory documented anywhere? See the Makefile in that directory - that's what I use to build the codecs. If you just want to create a single codec, have a look at the gencodec.py module doc-string. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1097797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6902] Built-in types format incorrectly with 0 padding.
Eric Smith e...@trueblade.com added the comment: The root of this problem is an interaction with ',' formatting that was introduced in 2.7 and 3.1. I'm still trying to figure out how to implement it. I'm changing the priority to low because I can't imagine this is a problem in practice. If anyone thinks otherwise, please comment and give a use case. -- priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags
New submission from Justin Cappos justincap...@gmail.com: Suppose there is a program that has a listening socket that calls accept to obtain new sockets for client connections. socketmodule.c assumes that these client sockets have timeouts / blocking in the default state for new sockets (which on most systems means the sockets will block). However, socketmodule.c does not verify the state of the socket object that is returned by the system call accept. From http://linux.die.net/man/2/accept : On Linux, the new socket returned by accept() does not inherit file status flags such as O_NONBLOCK and O_ASYNC from the listening socket. This behaviour differs from the canonical BSD sockets implementation. Portable programs should not rely on inheritance or non-inheritance of file status flags and always explicitly set all required flags on the socket returned from accept(). socketmodule.c does not explicitly set or check these flags for sockets returned by accept. The attached program will print the following on Linux regardless of whether the settimeout line for s exists or not: a has timeout: None O_NONBLOCK is set: False received: hi On Mac / BSD, the program will produce the following output when the timeout is set on the listening socket: a has timeout: None O_NONBLOCK is set: True Traceback (most recent call last): File python-nonportable.py, line 39, in module message = a.recv(1024) socket.error: (35, 'Resource temporarily unavailable') When the timeout is removed, the behavior is the same as linux: a has timeout: None O_NONBLOCK is set: False received: hi Note that the file descriptor problem crops up in odd ways on Mac systems. It's possible that issue 5154 may be due to this bug. I am aware of other problems with the socketmodule on Mac and will report them in other tickets. I believe that this problem can be easily mitigated by always calling fcntl to unset the O_NONBLOCK flag after accept (O_ASYNC should be unset too, for correctness). I would recommend adding the below code snippet at line 1653 in socketmodule.c (r78335). The resulting code would look something like this (with '+' in front of the added lines): ''' #ifdef MS_WINDOWS if (newfd == INVALID_SOCKET) #else if (newfd 0) #endif return s-errorhandler(); +#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) +int starting_flag; +// Unset O_NONBLOCK an O_ASYNC if they are inherited. +starting_flag = fcntl(newfd, F_GETFL, 0); +starting_flag = ~(O_NONBLOCK | O_ASYNC); +fcntl(newfd, F_SETFL, starting_flag); +#endif /* Create the new object with unspecified family, to avoid calls to bind() etc. on it. */ sock = (PyObject *) new_sockobject(newfd, s-sock_family, s-sock_type, s-sock_proto); ''' I've tested this patch on my Mac and Linux systems and it seems to work fine. I haven't had a chance to test on BSD. Also, I did not test for this problem in Python 3, but I assume it exists there as well and the same fix should be applied. -- assignee: ronaldoussoren components: Library (Lib), Macintosh files: python-nonportable.py messages: 99852 nosy: Justin.Cappos, bbangert, giampaolo.rodola, loewis, nicdumz, ronaldoussoren severity: normal status: open title: On Mac / BSD sockets returned by accept inherit the parent's FD flags type: behavior versions: Python 2.5, Python 2.6, Python 2.7 Added file: http://bugs.python.org/file16325/python-nonportable.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7995 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7850] platform.system() should be macosx instead of Darwin on OSX
Justin Cappos justincap...@gmail.com added the comment: Perhaps the right way to fix the problem without breaking code would be to propose a new function for platform which would return a 'newbie readable' string of the system type? -- nosy: +Justin.Cappos ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: [issue4617] SyntaxError when free variable name is also an exception target
It's an interesting bug. Maybe the compiler shouldn't allow you to use such a variable as a free variable in a nested function? On Thu, Feb 11, 2010 at 9:09 PM, Craig McQueen rep...@bugs.python.org wrote: Craig McQueen pyt...@craig.mcqueen.id.au added the comment: There's also this one which caught me out: def outer(): x = 0 y = (x for i in range(10)) del x # SyntaxError -- nosy: +cmcqueen1975 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4617 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/jeremy%40alum.mit.edu ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7649] u'%c' % char broken for chars in range '\x80'-'\xFF'
Eric Smith e...@trueblade.com added the comment: Could you add a comment on why you're calling PyUnicode_FromString and then throwing away the result? I believe it's so you'll get the same error checking as PyUnicode_FromString, but it's sufficiently tricky that I think it deserves a comment. Now that I think about it, having done the conversion in PyUnicode_FromString, why not use: buf[0] = PyUnicode_AS_UNICODE(s)[0]; ? This way you skip the cast and you know for a fact you're using the same interpretation as PyUnicode_FromString, having used its output. Also, since you know the size you may as well call PyUnicode_FromStringAndSize. It's trivially faster and makes the intent clearer, I think. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7366] weakref module example relies on behaviour not guaranteed by id()
Jack Diederich jackd...@gmail.com added the comment: This is true but /any/ key in the WeakValueDictionary could be reused and result in similar behavior, not just the id() of the inserted value. I'm closing at won't fix -- nosy: +jackdied resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7366 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7850] platform.system() should be macosx instead of Darwin on OSX
Marc-Andre Lemburg m...@egenix.com added the comment: platform.system() is a direct interface to platform.uname() which in return is an interface to the platform's uname() API, so the reasoning is much the same as for sys.platform on those platforms that do expose a uname() function (and command). On Mac OS X, uname returns Darwin. What we can do, is add a new function parameter ''aliased'' (just like we have for platform.platform()) which then enables applying some aliasing to the returned uname() values. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue216285] Unicode encoders don't report errors properly
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: remind - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue216285 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7900] posix.getgroups() failure on Mac OS X
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: After some head-scratching, I figured out how to reproduce stock python2.5 behavior. It turns out that defining _DARWIN_C_SOURCE not only allows getgroups() output to exceed NGROUPS_MAX (as documented), but also effectively disables setgroups() which is not documented. With no-darwin-ext.diff patch and previously attached tg.py, I see $ cat tg.py import os g = os.getgroups() print(g) os.setgroups(g[:5]) print(os.getgroups()) $ sudo ./python.exe tg.py [0, 101, 204, 100, 98, 80, 61, 29, 20, 12, 9, 8, 5, 4, 3, 2] [0, 101, 204, 100, 98] which is the same as with stock python2.5: $ sudo python2.5 tg.py [0, 101, 204, 100, 98, 80, 61, 29, 20, 12, 9, 8, 5, 4, 3, 2] [0, 101, 204, 100, 98] Note that root is a member of 18 groups on my system, but the last two are truncated by os.getgroups(). It is tempting to adopt no-darwin-ext.diff as a solution to this issue because allowing more than NGROUPS_MAX (or sysconf(_SC_NGROUPS_MAX) which should be the same) groups is really a Mac OS bug. In order to have both working os.setgroups() and os.getgroups() supporting more than NGROUPS_MAX results, it appears that the two functions should be compiled in separate compilation units which is probably too big of a price to pay for the functionality. Also, my issue7900.diff, while likely to work in most practical situation is vulnerable to a race condition if group membership is expanded between two calls to getgroups. -- Added file: http://bugs.python.org/file16326/no-darwin-ext.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.7 (modifications to current re 2.2.2)
Vlastimil Brom vlastimil.b...@gmail.com added the comment: Is the issue2636-20100222.zip archive supposed to be complete? I can't find not only the rst or html features, but more importantly the py and pyd files for the particular versions. Anyway, I just skimmed through the regular-expressions.info documentation and found, that most features, which I missed in the builtin re version seems to be present in the regex module; a few possibly notable exceptions being some unicode features: http://www.regular-expressions.info/unicode.html support for unicode script properties might be needlessly complex (maybe unless http://bugs.python.org/issue6331 is implemented) On the other hand \X for matching any single grapheme might be useful, according to the mentioned page, the currently working equivalent would be \P{M}\p{M}* However, I am not sure about the compatibility concerns; it is possible, that the modifier characters as a part of graphemes might cause some discrepancies in the text indices etc. A feature, where i personally (currently) can't find a usecase is \G and continuing matches (but no doubt, there would be some some cases for this). regards vbr -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1180002] locale.format question
R. David Murray rdmur...@bitdance.com added the comment: The last comment set this issue to 'remind' in case someone wanted to fix it in the future...it's pretty much fixed now. format_string was added in 2.5, and in 2.6 format only accepts a string containing just a format code. -- nosy: +r.david.murray resolution: remind - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1180002 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7900] posix.getgroups() failure on Mac OS X
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: I am reclassifying this as a crash because os.getgroups() crashes the interpreter when python is running as root on an unmodified system: $ sudo ./python.exe -c import os; os.getgroups() Traceback (most recent call last): File string, line 1, in module OSError: [Errno 22] Invalid argument This is also a regression apparently introduced in r63955. -- type: behavior - crash versions: +Python 2.6, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7796] No way to find out if an object is an instance of a namedtuple
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Discussed this with GvR. Here's a recap: For 2.6 and 3.1 which are already released, check for the _fields attribute. This is a guaranteed part of the API is not fragile. For the C structures, check for the n_fields attribute. In the future, the C API needs to grow to match the namedtuple() API and we should add an abstract base class describing the common API. Then you'll be able to write: if isinstance(obj, abc_namedtuple). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7796 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.7 (modifications to current re 2.2.2)
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: I don't know what happened there. I didn't notice that the zip file was way too small. Here's a replacement (still called issue2636-20100222.zip). Unicode script properties are already included, at least those whose definitions at http://www.regular-expressions.info/unicode.html I haven't notice \X before. I'll have a look at it. As for \G, .findall performs searches normally, but when using \G it effectively performs contiguous matches only, which can be useful when you need it! -- Added file: http://bugs.python.org/file16327/issue2636-20100222.zip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7196] Clarify str.split() behavior
Jack Diederich jackd...@gmail.com added the comment: I suggest this be closed WONTFIX. The str.split() documentation accurately describes str.split() but doesn't happen to do what the OP wanted which was list(filter(None, '00010001'.split('0'))) Instead split(sep) is the reciprocal of sep.join(), that is txt == sep.join(txt.split(sep)) -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7196 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7946] Convoy effect with I/O bound threads and New GIL
Antoine Pitrou pit...@free.fr added the comment: Here is another patch based on a slightly different approach. Instead of being explicitly triggered in I/O methods, priority requests are decided based on the computed interactiveness of a thread. Interactiveness itself is a simple saturated counter (incremented when the GIL is dropped without request, decremented when the GIL is dropped after a request). Benchmark numbers are basically the same as with gilprio2.patch. -- Added file: http://bugs.python.org/file16328/gilinter.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7946 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1517495] memory leak threading or socketserver module
A.M. Kuchling li...@amk.ca added the comment: I can no longer confirm this bug, either; trying the scripts with the current trunk doesn't seem to leak. Backing out Jeffrey's r61011 didn't bring the problem back, so I'll just conclude that the problem has gotten fixed along the way somehow. -- resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1517495 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4617] SyntaxError when free variable name is also an exception target
Guido van Rossum gu...@python.org added the comment: All examples so far (*) have to do with our inability to have properly nested blocks. If we did, I'd make the except clause a block, and I'd issue a syntax warning or error if a nested block shadowed a variable referenced outside it. Ditto for generator expressions and comprehensions. As long as we don't have nested blocks, I think it's okay to see the limitation on (implicit or explicit) del of a cell variable as a compiler deficiency and fix that deficiency. __ (*) However there's also this example: def f(): ... try: 1/0 ... except Exception as a: ... def g(): return a ... return g ... SyntaxError: can not delete variable 'a' referenced in nested scope -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4617 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6886] cgi.py runs python, not python3
Jack Diederich jackd...@gmail.com added the comment: +0 I'm ambivalent. The script uses a reasonable default and pyhton3 is a reasonable default for the 3k branch. That said most people will have to edit the file anyway to use it: I had to chmod a+x the file and change the bang path to /usr/bin/python to get it to work on my machine. -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6886 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7996] concurrency problem in regrtest -jX
New submission from Antoine Pitrou pit...@free.fr: While testing GIL changes I ran against an interesting bug in regrtest when run with -jbig number. It turns out that we can't consume a generator from two threads simultaneously. Exception in thread Thread-8: Traceback (most recent call last): File /home/antoine/py3k/gilprio/Lib/threading.py, line 521, in _bootstrap_inner self.run() File /home/antoine/py3k/gilprio/Lib/threading.py, line 474, in run self._target(*self._args, **self._kwargs) File /home/antoine/py3k/gilprio/Lib/test/regrtest.py, line 523, in work test, args_tuple = next(pending) ValueError: generator already executing -- components: Tests messages: 99879 nosy: pitrou, r.david.murray priority: normal severity: normal stage: needs patch status: open title: concurrency problem in regrtest -jX type: behavior versions: Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7996 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4617] SyntaxError when free variable name is also an exception target
Jeremy Hylton jer...@alum.mit.edu added the comment: On Mon, Feb 22, 2010 at 6:10 PM, Guido van Rossum rep...@bugs.python.org wrote: Guido van Rossum gu...@python.org added the comment: All examples so far (*) have to do with our inability to have properly nested blocks. If we did, I'd make the except clause a block, and I'd issue a syntax warning or error if a nested block shadowed a variable referenced outside it. Ditto for generator expressions and comprehensions. There's no reason we couldn't revise the language spec to explain that except clauses and comprehensions are block statements, i.e. statements that introduce a new block. For the except case, there would be some weird effects. y = 10 try: ... except SomeError as err: y = 12 print y # prints 10 In the example above, y would be a local variable in the scope of the except handler that shadows the local variable in the block that contains the try/except. It might be confusing that you couldn't assign to a local variable in the except handler without using a nonlocal statement. As long as we don't have nested blocks, I think it's okay to see the limitation on (implicit or explicit) del of a cell variable as a compiler deficiency and fix that deficiency. The general request here is to remove all the SyntaxErrors about deleting cell variables, right? Instead, you'd get a NameError at runtime saying that the variable is currently undefined. You'd want that change regardless of whether we change the language as described above. hoping-for-some-bdfl-pronouncements-ly y'rs, Jeremy __ (*) However there's also this example: def f(): ... try: 1/0 ... except Exception as a: ... def g(): return a ... return g ... SyntaxError: can not delete variable 'a' referenced in nested scope -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4617 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4617 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7196] Clarify str.split() behavior
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Agreed. Thanks Jack. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7196 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7997] http://www.python.org/dev/faq/ doesn't seem to explain how to regenerate configure
New submission from Dave Malcolm dmalc...@redhat.com: http://www.python.org/dev/faq/ doesn't seem to explain how to regenerate configure Here's an attempt at answering that question; I hope the following is appropriate and factually correct: How to regenerate the configure script (e.g. to add a new configuration parameter) Python's configure script is generated from configure.in from autoconf. Do not edit configure; instead, edit configure.in and run autoreconf. You should run ./configure --help to verify that your changes are documented as expected. Python's configure.in script typically requires a specific version of autoconf. At the moment, this reads: version_required(2.61) If the system copy of autoconf does not match this version, you will need to install your own copy of autoconf and use this. 1. Go to http://ftp.gnu.org/gnu/autoconf/ and download the version of autoconf matching the one in configure.in For example: $ wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.bz2 2. Unpack the tarball: $ tar -jxf autoconf-2.61.tar.bz2 3. Build the specified version of autoconf and install it to a writable location (e.g. within your home directory): $ pushd autoconf-2.61.tar.bz2 $ ./configure --prefix=$HOME/autoconf-2.6.1 $ make ; make install This drops a copy of the appropriate version of autoconf into ~/autoconf-2.6.1 4. Go back to the python source and rerun autoconf, pointing PATH at the specific copy of autoconf: $ popd $ PATH=~/autoconf-2.6.1/bin:$PATH autoreconf 5. autoconf should now have updated your local copy of configure to reflect your changes. 6. Run ./configure --help to verify that your changes have been applied -- assignee: georg.brandl components: Documentation messages: 99882 nosy: dmalcolm, georg.brandl severity: normal status: open title: http://www.python.org/dev/faq/ doesn't seem to explain how to regenerate configure ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7997 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6931] dreadful performance in difflib: ndiff and HtmlDiff
Jack Diederich jackd...@gmail.com added the comment: Here is a profile run of the 200 line case, run on the 3.x trunk, and with all the trivial functions removed. quick_ratio and __contains__ dominate the time. The process was CPU bound, memory usage stayed low. 17083154 function calls (17066360 primitive calls) in 248.779 CPU seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 10660375 70.5160.000 70.5160.000 :0(__contains__) 1144821.0480.0001.0480.000 :0(append) 4434776 29.2540.000 29.2540.000 :0(get) 685047/6850424.4000.0004.4000.000 :0(len) 1973491.5120.0001.5120.000 :0(min) 1971331.4520.0001.4520.000 difflib.py:228(set_seq1) 25001.6320.0013.0920.001 difflib.py:299(__chain_b) 10822.5200.0024.7680.004 difflib.py:350(find_longest_match) 3391432.5800.0002.5800.000 difflib.py:40(_calculate_ratio) 141727 120.5990.001 220.9700.002 difflib.py:661(quick_ratio) 1967366.9560.000 12.5490.000 difflib.py:690(real_quick_ratio) 8974/7945.0520.001 248.4310.313 difflib.py:945(_fancy_replace) -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6931 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com