[issue2517] Error when printing an exception containing a Unicode string

2008-04-01 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Shouldn't it be an exception rather than a warning? The fact that an exception can be downgraded to a warning (and thus involuntarily silenced) is a bit disturbing IMHO. Another possibility would be to display the warning, and *then* to encode

[issue1631171] implement warnings module in C

2008-04-01 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: After all the threats about checking in code that break stuff, I am not about to check this in. =) I will get to the changes when I can and then commit after the alpha. -- assignee: nnorwitz - brett.cannon

[issue1700463] VC6 build patch for trunk

2008-04-01 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9044/vc6-trunk-ver4.patch _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1700463 _

[issue2526] str.format() :n format does not appear to work

2008-04-01 Thread Mark Summerfield
New submission from Mark Summerfield [EMAIL PROTECTED]: # Py30a3 import locale locale.setlocale(locale.LC_ALL, en_US.UTF8) 'en_US.UTF8' locale.format(%d, 12345, True) '12,345' {0:n}.format(12345) '12345' According to the docs the 'n' format should use the locale-dependent separator, so I

[issue2527] Pass a namespace to timeit

2008-04-01 Thread Peter Otten
New submission from Peter Otten [EMAIL PROTECTED]: I'd like to suggest a different approach than the one taken in rev. 54348 to improve timeit's scripting interface: allow passing it a namespace. Reasons: - It has smaller overhead for functions that take an argument: def f(a): pass ... #

[issue2234] cygwinccompiler.py fails for latest MinGW releases.

2008-04-01 Thread Jason Tishler
Jason Tishler [EMAIL PROTECTED] added the comment: If the version is guaranteed to be x.y or x.y.z, then the patch seems correct. Note I am not set up to test this patch and it has been years since I have looked at this part of the code base. Sorry, that I can't be more helpful.

[issue2517] Error when printing an exception containing a Unicode string

2008-04-01 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Have you looked at PyErr_Display? There are many, many possible exceptions, and it ignores them all because too many callers rely on this. So, I think all we can do is warn. I will look into encoding the message differently.

[issue1631171] implement warnings module in C

2008-04-01 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: Neal's issues are addressed in this patch. I also finally filled out warnings.h. The only thing that I didn't deal with is Neal's worry of exposing _PyWarnings_Init(). It is not explicitly exported anywhere as part of the API so I am not sure

[issue2527] Pass a namespace to timeit

2008-04-01 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- nosy: +georg.brandl __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2527 __ ___ Python-bugs-list mailing list

[issue2506] Line tracing of continue after always-taken if is incorrect

2008-04-01 Thread Ned Batchelder
Ned Batchelder [EMAIL PROTECTED] added the comment: It's hard for me to agree with your assessment that for no practical good would come from disabling the optimizer. Broadly speaking, there are two types of code execution: the vast majority of the time, you execute the code so that it can do

[issue1631171] implement warnings module in C

2008-04-01 Thread Brett Cannon
Changes by Brett Cannon [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9761/c_warnings.diff _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1631171 _ ___

[issue2528] Change os.access to check ACLs under Windows

2008-04-01 Thread Tim Golden
New submission from Tim Golden [EMAIL PROTECTED]: At present, os.access under Windows simply calls GetFileAttributes to determine the readonly attribute (ignoring directories). The patch attached combines this with the use of the AccessCheck API to compare the user's permissions with those

[issue2522] locale.format() problems with decimal separator

2008-04-01 Thread Andrii V. Mishkovskyi
Andrii V. Mishkovskyi [EMAIL PROTECTED] added the comment: I've uploaded a patch that fixes this concrete issue, though locale.format() continues to silently ignore other types of malformed strings (e.g. locale.format('%fSPAMf')). I don't think this is correct behavior. Maybe there should be

[issue2527] Pass a namespace to timeit

2008-04-01 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: A more general approach would be to add both 'locals' and 'globals' to be used by exec. At least, I would change 'ns' to 'locals'. -- nosy: +belopolsky __ Tracker [EMAIL PROTECTED]

[issue643841] New class special method lookup change

2008-04-01 Thread John Krukoff
John Krukoff [EMAIL PROTECTED] added the comment: I assume when you say that the documentation has already been updated, you mean something other than what's shown at: http://docs.python.org/dev/reference/datamodel.html#new-style-and- classic-classes or

[issue2527] Pass a namespace to timeit

2008-04-01 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: On the second thought, I actually wanted Timer to mimic eval without realizing that eval uses positional rather than keywords arguments. 'locals' is obviously a bad choice for the keyword parameter because it masks locals() builtin.

[issue2234] cygwinccompiler.py fails for latest MinGW releases.

2008-04-01 Thread Lenard Lindstrom
Lenard Lindstrom [EMAIL PROTECTED] added the comment: distutils.version.StrictVersion.parse does not handle x.y.z.n . That is why there is an exception. I have tested the patch both with binutils-2.18.50-20080109 (*), the latest version (a Technology Preview), and its predecessor

[issue2527] Pass a namespace to timeit

2008-04-01 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Generally, when I use timeit from the interpreter prompt, I use from __main__ import * as the setup code string. Then I can use all currently defined global symbols directly :) -- nosy: +pitrou __

[issue2519] Typing 'modules' in the interactive help system fails when imports fail

2008-04-01 Thread Dennis Kaarsemaker
Dennis Kaarsemaker [EMAIL PROTECTED] added the comment: pydoc.py from head actually does work around it in some places, but not all. Will send a patch. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2519 __

[issue2529] list/generator comprehension parser doesn't match spec

2008-04-01 Thread Nick Guenther
New submission from Nick Guenther [EMAIL PROTECTED]: I think I've found a bug in python's list comprehension parser. Observe: [e for i in j in ['a','b','c']] Traceback (most recent call last): File stdin, line 1, in module NameError: name 'j' is not defined Now, according to the grammar at

[issue1631171] implement warnings module in C

2008-04-01 Thread Brett Cannon
Changes by Brett Cannon [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9917/c_warnings.diff _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1631171 _ ___

[issue1631171] implement warnings module in C

2008-04-01 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: Attached should have everything, including a pure Python fallback. As soon as the next alpha is out I will apply. -- status: open - pending Added file: http://bugs.python.org/file9920/c_warnings.diff

[issue2529] list/generator comprehension parser doesn't match spec

2008-04-01 Thread Robert Lehmann
Robert Lehmann [EMAIL PROTECTED] added the comment: Your example is parsed as [e for i in (j in ['a','b','c'])] and since `j` is not defined, you get a NameError. If it was defined, you would still be iterating a boolean (which is not defined). Grammatically, this is the following (just the

[issue1068268] subprocess is not EINTR-safe

2008-04-01 Thread Ralf Schmitt
Ralf Schmitt [EMAIL PROTECTED] added the comment: Of course the signal handler may raise an exception, so my last argument isn't that good. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1068268 _

[issue2530] Document IO module

2008-04-01 Thread Benjamin Peterson
New submission from Benjamin Peterson [EMAIL PROTECTED]: The IO module currently has some docs strings but no official RST docs. I'm willing to work on this. -- assignee: benjamin.peterson components: Documentation messages: 64822 nosy: benjamin.peterson, georg.brandl priority: critical

[issue2529] list/generator comprehension parser doesn't match spec

2008-04-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Indeed; your sample is equivalent to: temp = (j in ['a','b','c'])# the contains operator [e for i in temp] # basic list comprehension Even if not meaningful, this code is syntactically correct. -- nosy:

[issue2510] Bazaar ignore file

2008-04-01 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Georg, Ralf, and Jeroen, are you ok with me checking this in now? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2510 __

[issue2513] 64bit cross compilation on windows

2008-04-01 Thread Marc-Andre Lemburg
Marc-Andre Lemburg [EMAIL PROTECTED] added the comment: Hi Mark, I hope this patch makes it into 2.6. One thing I'm curious about is the version of Visual Studio 2008 that is needed to support this kind cross-compilation and which version will be or is used to build the Python versions on

[issue2513] 64bit cross compilation on windows

2008-04-01 Thread Marc-Andre Lemburg
Marc-Andre Lemburg [EMAIL PROTECTED] added the comment: Nevermind, diving deep into the MSDN, I found the answer: http://msdn2.microsoft.com/en-us/library/hs24szh9.aspx So for cross-compilation, the Visual Studio 2008 Standard Edition is sufficient. Is the Professional Edition used for the

[issue2531] float compared to decimal is silently incorrect.

2008-04-01 Thread Jeremy Dunck
New submission from Jeremy Dunck [EMAIL PROTECTED]: Within python 2.5.2: from decimal import Decimal x = 3.0 y = Decimal('0.25') x y False (expected error, as in 2.4, or True) -- components: Library (Lib) messages: 64827 nosy: jdunck severity: normal status: open title: float

[issue1068268] subprocess is not EINTR-safe

2008-04-01 Thread Gregory P. Smith
Changes by Gregory P. Smith [EMAIL PROTECTED]: -- nosy: +gregory.p.smith _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1068268 _ ___ Python-bugs-list mailing

[issue2513] 64bit cross compilation on windows

2008-04-01 Thread Mark Hammond
Mark Hammond [EMAIL PROTECTED] added the comment: Hi Marc-Andre, The PCBuild/README.txt file has some info about compatibility with VS versions (but probably needs to say more about x64 builds). There is also talk about releasing Profile Guided Optimization built binaries, which does require

[issue2532] file that breaks 2to3 (despite being correct python)

2008-04-01 Thread Maciek Fijalkowski
New submission from Maciek Fijalkowski [EMAIL PROTECTED]: Infinite recursion problem. I know this file is obscure, but it's still pretty valid python. -- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) files: ssl.py messages: 64829 nosy: collinwinter, fijal

[issue2533] Invalid TypeError with class method decorator and class method parameter

2008-04-01 Thread Thomas Dimson
New submission from Thomas Dimson [EMAIL PROTECTED]: Having a peculiar issue (exception raised despite being valid) when defining a decorator that takes a class method as a callback. Here is a cooked example: def decorator( callback ): def inner(func): def application( *args,

[issue1631171] implement warnings module in C

2008-04-01 Thread Neal Norwitz
Neal Norwitz [EMAIL PROTECTED] added the comment: On Tue, Apr 1, 2008 at 6:14 AM, Brett Cannon [EMAIL PROTECTED] wrote: Brett Cannon [EMAIL PROTECTED] added the comment: Neal's issues are addressed in this patch. I also finally filled out warnings.h. The only thing that I didn't deal

[issue2531] float compared to decimal is silently incorrect.

2008-04-01 Thread Diego Manenti Martins
Changes by Diego Manenti Martins [EMAIL PROTECTED]: -- keywords: +patch versions: +Python 2.6 Added file: http://bugs.python.org/file9922/decimal.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2531 __

[issue1068268] subprocess is not EINTR-safe

2008-04-01 Thread Jeffrey Yasskin
Jeffrey Yasskin [EMAIL PROTECTED] added the comment: I think the proper behavior on EINTR may depend on which subprocess call we're in. For example, the user can easily loop on .wait() herself if she wants to ignore EINTR. But it's a lot harder to loop on Popen() if the read() in _execute_child

[issue2531] float compared to decimal is silently incorrect.

2008-04-01 Thread Jeremy Dunck
Changes by Jeremy Dunck [EMAIL PROTECTED]: -- type: - behavior __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2531 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2518] smtpd.py to handle huge email

2008-04-01 Thread HiroakiKawai
Changes by HiroakiKawai [EMAIL PROTECTED]: Added file: http://bugs.python.org/file9923/smtpd.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2518 __ ___ Python-bugs-list

[issue2518] smtpd.py to handle huge email

2008-04-01 Thread HiroakiKawai
Changes by HiroakiKawai [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9910/smtpd.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2518 __ ___ Python-bugs-list

[issue2510] Bazaar ignore file

2008-04-01 Thread Jeroen Ruigrok van der Werven
Jeroen Ruigrok van der Werven [EMAIL PROTECTED] added the comment: Go ahead. I'm not a committer, merely a person on the side. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2510 __

[issue2513] 64bit cross compilation on windows

2008-04-01 Thread Trent Nelson
Trent Nelson [EMAIL PROTECTED] added the comment: Hi guys, have been on holiday since PyCon ended, only getting back into the swing of things now. With regards to the x64 Windows build, indeed, PCbuild/readme.txt is definitely in need of an update, especially with the details of the slightly

[issue2513] 64bit cross compilation on windows

2008-04-01 Thread Christian Theune
Christian Theune [EMAIL PROTECTED] added the comment: Mark, I think you mixed me up with Christian Heimes, so I'm removing myself here (at least for now). __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2513 __

[issue2513] 64bit cross compilation on windows

2008-04-01 Thread Trent Nelson
Trent Nelson [EMAIL PROTECTED] added the comment: Humm, just saw the MSDN page Marc-Andre referred to, which indeed seems to indicate the Express edition doesn't support x64 cross-compilation *at all*. AFAICT the latest Platform SDK (6.1) ships with an x64 cross compilation environment, but

[issue2422] Automatically disable pymalloc when running under valgrind

2008-04-01 Thread James Henstridge
James Henstridge [EMAIL PROTECTED] added the comment: There are probably a few other performance optimisations that would be good to turn off when running under valgrind. A big one is the tuple cache: if there are tuple reference counting issues, they won't necessarily be seen by valgrind if