[issue7961] Py3k: decoding empty bytestring with invalid encoding throws no error

2010-02-22 Thread Marc-Andre Lemburg
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

[issue7980] time.strptime not thread safe

2010-02-22 Thread Willard
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

[issue7573] Python build issue on Ubuntu 9.10

2010-02-22 Thread Stefan Krah
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

[issue7977] I found Python 3.1 xmlrpc lib use param not properly. and i have fixed it.

2010-02-22 Thread Jelly Chen
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

[issue7980] time.strptime not thread safe

2010-02-22 Thread Eric Smith
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

[issue7980] time.strptime not thread safe

2010-02-22 Thread Eric Smith
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

[issue7794] Document zipfile and directory execution in What's New for 2.6/3.1

2010-02-22 Thread Nick Coghlan
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

[issue6625] UnicodeEncodeError on pydoc's CLI

2010-02-22 Thread Florent Xicluna
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:

[issue7928] String formatting: grammar wrongly limits [index] to integer

2010-02-22 Thread Eric Smith
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

[issue7977] I found Python 3.1 xmlrpc lib use param not properly. and i have fixed it.

2010-02-22 Thread Florent Xicluna
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

[issue7928] String formatting: grammar wrongly limits [index] to integer

2010-02-22 Thread Eric Smith
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:

[issue7049] decimal.py: Three argument power issues

2010-02-22 Thread Stefan Krah
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')

[issue7977] I found Python 3.1 xmlrpc lib use param not properly. and i have fixed it.

2010-02-22 Thread Jelly Chen
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

[issue7984] missing dependencies using cProfile

2010-02-22 Thread Mezhenin Artyom
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,

[issue5988] Delete PyOS_ascii_formatd, PyOS_ascii_strtod, and PyOS_ascii_atof

2010-02-22 Thread Eric Smith
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

[issue7985] access to infinitely recursive list

2010-02-22 Thread LukMak
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

[issue5988] Delete PyOS_ascii_formatd, PyOS_ascii_strtod, and PyOS_ascii_atof

2010-02-22 Thread Eric Smith
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. --

[issue7049] decimal.py: Three argument power issues

2010-02-22 Thread Mark Dickinson
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

[issue7310] Unhelpful __repr__() in os.environ

2010-02-22 Thread Ezio Melotti
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

[issue7980] time.strptime not thread safe

2010-02-22 Thread Brett Cannon
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

[issue4852] Cleanup old stuff from pythread.h

2010-02-22 Thread A.M. Kuchling
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

[issue7049] decimal.py: Three argument power issues

2010-02-22 Thread Mark Dickinson
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

[issue7310] Unhelpful __repr__() in os.environ

2010-02-22 Thread R. David Murray
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

[issue7977] I found Python 3.1 xmlrpc lib use param not properly. and i have fixed it.

2010-02-22 Thread Florent Xicluna
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

[issue7038] test_curses fails on os x 10.6

2010-02-22 Thread A.M. Kuchling
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

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-22 Thread Alexander Belopolsky
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.

[issue7986] Python 3 cannot recognize url like: https://sinojellycn:123...@storage.msn.com

2010-02-22 Thread Jelly Chen
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'}

[issue7977] I found Python 3.1 xmlrpc lib use param not properly. and i have fixed it.

2010-02-22 Thread Florent Xicluna
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

[issue7232] Support of 'with' statement fo TarFile class

2010-02-22 Thread Brian Curtin
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

[issue1657] [patch] epoll and kqueue wrappers for the select module

2010-02-22 Thread A.M. Kuchling
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

[issue7987] Python 3.1's http.client doesn't support HTTPS

2010-02-22 Thread Jelly Chen
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,

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-22 Thread Alexander Belopolsky
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:

[issue7980] time.strptime not thread safe

2010-02-22 Thread R. David Murray
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

[issue7987] Python 3.1's http.client doesn't support HTTPS

2010-02-22 Thread Florent Xicluna
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

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-22 Thread Ronald Oussoren
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

[issue7989] Transition time/datetime C modules to Python

2010-02-22 Thread Brian Curtin
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

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-22 Thread Alexander Belopolsky
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

[issue4331] Can't use _functools.partial() created function as method

2010-02-22 Thread Jack Diederich
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')

[issue6243] getkey() can segfault in combination with curses.ungetch()

2010-02-22 Thread A.M. Kuchling
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 ___

[issue4174] Performance optimization for min() and max() over lists

2010-02-22 Thread A.M. Kuchling
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

[issue7850] platform.system() should be macosx instead of Darwin on OSX

2010-02-22 Thread Jack Diederich
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

[issue4174] Performance optimization for min() and max() over lists

2010-02-22 Thread Mark Dickinson
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: -

[issue4174] Performance optimization for min() and max() over lists

2010-02-22 Thread Antoine Pitrou
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

[issue6312] httplib fails with HEAD requests to pages with transfer-encoding: chunked

2010-02-22 Thread Michal Božoň
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

[issue7399] Possible bug in Python Tutorial

2010-02-22 Thread Senthil Kumaran
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

[issue5368] curses patch add color_set and wcolor_set , and addchstr family of functions

2010-02-22 Thread A.M. Kuchling
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

[issue7989] Transition time/datetime C modules to Python

2010-02-22 Thread Brian Curtin
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

[issue7980] time.strptime not thread safe

2010-02-22 Thread Eric Smith
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

[issue7980] time.strptime not thread safe

2010-02-22 Thread R. David Murray
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

[issue5584] json.loads(u'3.14') fails unexpectedly (minor scanner bug)

2010-02-22 Thread Joel Pearson
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,

[issue7627] mailbox.MH.remove() lock handling is broken

2010-02-22 Thread A.M. Kuchling
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

[issue7649] u'%c' % char broken for chars in range '\x80'-'\xFF'

2010-02-22 Thread Ezio Melotti
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

[issue1669349] make install fails if no previous Python installation

2010-02-22 Thread Gael
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

[issue4331] Can't use _functools.partial() created function as method

2010-02-22 Thread R. David Murray
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

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-02-22 Thread Antoine Pitrou
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

[issue7988] complex.__format__ has incorrect default alignment

2010-02-22 Thread Eric Smith
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

[issue6857] float().__format__() default alignment

2010-02-22 Thread Eric Smith
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 ___

[issue7920] urllib2.HTTPRedirectHandler incorrect redirect

2010-02-22 Thread Senthil Kumaran
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.

[issue7049] decimal.py: Three argument power issues

2010-02-22 Thread Stefan Krah
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.

[issue7647] Add statvfs flags to the posix module

2010-02-22 Thread A.M. Kuchling
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

[issue1708316] doctest work with Windows PyReadline

2010-02-22 Thread A.M. Kuchling
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

[issue7646] test_telnetlib fails in Windows XP

2010-02-22 Thread Jack Diederich
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

[issue7646] test_telnetlib fails in Windows XP

2010-02-22 Thread Austin English
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 ___

[issue7049] decimal.py: Three argument power issues

2010-02-22 Thread Mark Dickinson
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

[issue1514] missing constants in socket module

2010-02-22 Thread A.M. Kuchling
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

[issue6871] decimal.py: more format issues

2010-02-22 Thread Eric Smith
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

[issue5584] json.loads(u'3.14') fails unexpectedly (minor scanner bug)

2010-02-22 Thread Ezio Melotti
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:

[issue7975] dbshelve.py throws exception: AttributeError: 'DB' object has no attribute '__iter__'

2010-02-22 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: +1 -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7975 ___

[issue7463] PyDateTime_IMPORT() causes compiler warnings

2010-02-22 Thread Jack Diederich
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

[issue6871] decimal.py: more format issues

2010-02-22 Thread Stefan Krah
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]

[issue6871] decimal.py: more format issues

2010-02-22 Thread Stefan Krah
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. --

[issue1097797] Encoding for Code Page 273 used by EBCDIC Germany Austria

2010-02-22 Thread A.M. Kuchling
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

[issue6871] decimal.py: more format issues

2010-02-22 Thread Eric Smith
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

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-02-22 Thread David Beazley
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

[issue7994] object.__format__ should reject format strings

2010-02-22 Thread Eric Smith
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

[issue1097797] Encoding for Code Page 273 used by EBCDIC Germany Austria

2010-02-22 Thread Marc-Andre Lemburg
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

[issue6902] Built-in types format incorrectly with 0 padding.

2010-02-22 Thread Eric Smith
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

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-02-22 Thread Justin Cappos
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

[issue7850] platform.system() should be macosx instead of Darwin on OSX

2010-02-22 Thread Justin Cappos
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

Re: [issue4617] SyntaxError when free variable name is also an exception target

2010-02-22 Thread Jeremy Hylton
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

[issue7649] u'%c' % char broken for chars in range '\x80'-'\xFF'

2010-02-22 Thread Eric Smith
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.

[issue7366] weakref module example relies on behaviour not guaranteed by id()

2010-02-22 Thread Jack Diederich
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 -

[issue7850] platform.system() should be macosx instead of Darwin on OSX

2010-02-22 Thread Marc-Andre Lemburg
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

[issue216285] Unicode encoders don't report errors properly

2010-02-22 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: remind - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue216285 ___ ___

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-22 Thread Alexander Belopolsky
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

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-22 Thread Vlastimil Brom
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

[issue1180002] locale.format question

2010-02-22 Thread R. David Murray
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. --

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-22 Thread Alexander Belopolsky
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):

[issue7796] No way to find out if an object is an instance of a namedtuple

2010-02-22 Thread Raymond Hettinger
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

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-22 Thread Matthew Barnett
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

[issue7196] Clarify str.split() behavior

2010-02-22 Thread Jack Diederich
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

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-02-22 Thread Antoine Pitrou
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

[issue1517495] memory leak threading or socketserver module

2010-02-22 Thread A.M. Kuchling
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.

[issue4617] SyntaxError when free variable name is also an exception target

2010-02-22 Thread Guido van Rossum
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

[issue6886] cgi.py runs python, not python3

2010-02-22 Thread Jack Diederich
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

[issue7996] concurrency problem in regrtest -jX

2010-02-22 Thread Antoine Pitrou
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

[issue4617] SyntaxError when free variable name is also an exception target

2010-02-22 Thread Jeremy Hylton
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

[issue7196] Clarify str.split() behavior

2010-02-22 Thread Raymond Hettinger
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

[issue7997] http://www.python.org/dev/faq/ doesn't seem to explain how to regenerate configure

2010-02-22 Thread Dave Malcolm
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

[issue6931] dreadful performance in difflib: ndiff and HtmlDiff

2010-02-22 Thread Jack Diederich
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

  1   2   >