[issue2690] Precompute range length

2008-04-26 Thread Nick Coghlan
Nick Coghlan [EMAIL PROTECTED] added the comment: Given that range() produced a list in the 2.x series (hence limited to available memory), and xrange() uses int internally for its values (and hence couldn't even cope with short ranges with values greater than sys.maxint). So my preference is

[issue2695] Ignore case when checking algorithm in urllib2

2008-04-26 Thread david reid
New submission from david reid [EMAIL PROTECTED]: Small change to allow get_algorithm_impls to correctly detect when lower case algorithm strings are passed. I recently ran into a server that sent 'md5' and so this function failed without this small change. def get_algorithm_impls(self,

[issue2696] unicode string does not get freed -- memory leak?

2008-04-26 Thread ThurnerRupert
New submission from ThurnerRupert [EMAIL PROTECTED]: is it possible that str and unicode str are treated differently, i.e. unicode str does not give memory back? jonas borgström noticed the following behaviour: resident_size() 3780 a = [%i % i for i in xrange(2**22)] resident_size() 239580

[issue2684] Logging Module still failing for %(filename)s, __init__

2008-04-26 Thread Vinay Sajip
Vinay Sajip [EMAIL PROTECTED] added the comment: This is not a logging bug, but rather due to the circumstance that .pyc/.pyo files do not correctly point to the source files that produced them. There is another issue about this (#1180193) . Closing this, as it's not a logging issue.

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

2008-04-26 Thread Jeffrey C. Jacobs
Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment: Thank you and Merci Antoine! That is a good point. It is clearly specific to the compiler whether a switch-case will be turned into a series of conditional branches or simply creating an internal jump table with lookup. And it is true

[issue2694] msilib file names check too strict ?

2008-04-26 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Indeed, the primary keys in many tables must be Identifiers, see http://msdn2.microsoft.com/en-us/library/aa369212(VS.85).aspx make_id tries to synthesize an identifier from a file name, and fails for your file names. -- nosy:

[issue2697] Logging ancestors ignored after configuration

2008-04-26 Thread andrew cooke
New submission from andrew cooke [EMAIL PROTECTED]: I am seeing some odd behaviour with logging which would be explained if loggers that are not defined explicitly (but which are controlled via their ancestors) must be created after the logging system is configured via fileConfig(). That's a

[issue2603] Make range __eq__ work

2008-04-26 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: Added file: http://bugs.python.org/file10116/range_eq8_normalize4.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2603 __

[issue2694] msilib file names check too strict ?

2008-04-26 Thread Cournapeau David
Cournapeau David [EMAIL PROTECTED] added the comment: Ok, thanks for the information. It may good to have a bit more informative error, though, such as saying which characters are allowed when checking against a regex ? __ Tracker [EMAIL PROTECTED]

[issue2694] msilib file names check too strict ?

2008-04-26 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Actually, the algorithm should be fixed to generate a valid identifier for any input. Would you like to work on a fix? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2694

[issue2694] msilib file names check too strict ?

2008-04-26 Thread Cournapeau David
Cournapeau David [EMAIL PROTECTED] added the comment: It's not that I don't want to work on it, but I don't know anything about msi, except that some windows users of my packages request it :) So I would need some indication on what to fix exactly Do I understand right that dist_msi builds a

[issue2694] msilib file names check too strict ?

2008-04-26 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Do I understand right that dist_msi builds a database of the files, and that the identifiers could be named differently than the filenames themselves, as long as they are unique ? Correct. As a design objective, I try to use identifiers

[issue2622] Import errors in email.message.py

2008-04-26 Thread Mads Kiilerich
Mads Kiilerich [EMAIL PROTECTED] added the comment: Testing that email.message doesn't use the wrong casing email.Generator isn't enough. That would just test that this patch has been applied. It must also be tested that no other modules uses the wrong casing of email.Generator. Or other email

[issue2487] ldexp(x,n) misbehaves when abs(n) is large

2008-04-26 Thread Mark Dickinson
Mark Dickinson [EMAIL PROTECTED] added the comment: Here's a patch that should fix ldexp(x, large_int), as follows: ldexp(x, n) = x if x is a NaN, zero or infinity ldexp(x, n) = copysign(0., x) for x finite and nonzero, n large and -ve ldexp(x, n) - OverflowError for x finite and nonzero, n

[issue2603] Make range __eq__ work

2008-04-26 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: Added file: http://bugs.python.org/file10117/range_eq8_normalize5.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2603 __

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2008-04-26 Thread Lenard Lindstrom
New submission from Lenard Lindstrom [EMAIL PROTECTED]: Python 2.6a2 on Windows XP Distutils fails to build an extension module for MinGW. Even though mingw32 is specified as the compiler distutils.msvc9compiler is still loaded and it cannot find vcvarsall.bat. Here is an example: Microsoft

[issue2677] Argument rules for callables do not apply when function implementation uses PyArg_ParseTuple

2008-04-26 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: I'd love to add to the documentation, but I can't seem to find a proper location - except the Tutorial? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2677 __

[issue2691] Document size_t related long object APIs

2008-04-26 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Thanks, committed as r62513. -- resolution: - accepted status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2691 __

[issue2668] apply() documentation is slightly incorrect

2008-04-26 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Fixed in r62511. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2668 __

[issue2584] numeric overflow in IDLE

2008-04-26 Thread Kurt B. Kaiser
Changes by Kurt B. Kaiser [EMAIL PROTECTED]: -- assignee: - kbk nosy: +kbk priority: - normal __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2584 __ ___

[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-04-26 Thread Phillip J. Eby
Phillip J. Eby [EMAIL PROTECTED] added the comment: Both versions of the patch have a problem, in that the Distribution object is looking for an option directly in sys.argv. At the very least, this should be looking at the 'script_args' attribute of the Distribution instead (if not actually

[issue2699] Exception name improperly indented

2008-04-26 Thread Brett Cannon
New submission from Brett Cannon [EMAIL PROTECTED]: The new warnings implementation tweaks how tracebacks are printed. This introduced a bug where the exception name is indented when it shouldn't be: e.g., ``raise KeyError`` should look like:: Traceback (most recent call last): File

[issue2699] Exception name improperly indented

2008-04-26 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: Forgot to mention this is probably from Python/traceback.c:tb_displayline(). __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2699 __

[issue2699] Exception name improperly indented

2008-04-26 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: It looks like you can just remove the offending line like so: Index: Python/traceback.c === --- Python/traceback.c (revision 62515) +++ Python/traceback.c (working copy) @@

[issue2337] Backport oct() and hex() to use __index__

2008-04-26 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: This is what I'd like to do: In builtin oct/hex check if the special method is declared. If it is, Py3k warn and use it. If not, check if we can do it the Py3k way (with PyNumber_ToBase). Sound good? -- nosy: +benjamin.peterson

[issue2700] document PyNumber_ToBase

2008-04-26 Thread Benjamin Peterson
New submission from Benjamin Peterson [EMAIL PROTECTED]: Including a patch. -- assignee: georg.brandl components: Documentation files: tobase_doc.patch keywords: patch messages: 65860 nosy: benjamin.peterson, georg.brandl severity: normal status: open title: document PyNumber_ToBase

[issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString.

2008-04-26 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: So, any comment on the latest patch? If everything is all right, I would like to commit the patch to py3k. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1950 __

[issue1338] pickling bytes?

2008-04-26 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: Guido fixed this issue in r61467. Closing. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1338 __

[issue2337] Backport oct() and hex() to use __index__

2008-04-26 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: @Georg: That is a possibility. Would need to add the proper Py3K warning to the current builtins, though. @Benjamin: You don't want to warn if it will work for Py3K, so don't warn if __index__ is used. __

[issue2699] Exception name improperly indented

2008-04-26 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: Yep. I already did that and ran the unit test suite to verify. Now I am just trying to figure out how to best test it. It seems it only comes up for printing a traceback. That would mean either using subprocess to run another interpreter and

[issue2337] Backport oct() and hex() to use __index__

2008-04-26 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: I meant not to. Sorry, that wasn't clear. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2337 __ ___ Python-bugs-list

[issue2671] PyErr_WarnPy3k

2008-04-26 Thread Guido van Rossum
Guido van Rossum [EMAIL PROTECTED] added the comment: Looks good. Go ahead. Make sure to block the CL (and any follow-up CLs that use this) from integration into 3.0. -- assignee: - benjamin.peterson nosy: +gvanrossum resolution: - accepted __ Tracker

[issue558238] Pickling bound methods

2008-04-26 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: Personally, I don't see how adding this feature would create a security hole (or more properly said, grow the giant hole that are the GLOBAL and REDUCE opcodes). I don't see either why this should be included in the standard library.

[issue558238] Pickling bound methods

2008-04-26 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti [EMAIL PROTECTED]: -- status: open - pending Tracker [EMAIL PROTECTED] http://bugs.python.org/issue558238 ___ Python-bugs-list mailing

[issue1637926] Empty class 'Object'

2008-04-26 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: This has almost no-chance to get included in the standard library. Also, Python 2.6 will include ``namedtuple`` (see http://docs.python.org/dev/library/collections.html#collections.namedtuple), which provides similar functionally.

[issue2671] PyErr_WarnPy3k

2008-04-26 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Committed in r62517. -- status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2671 __ ___

[issue2480] pickling of large recursive structures fails

2008-04-26 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: Bob Kline wrote: I just ran into this behavior with an attempt to pickle a dom tree for an XML document whose nesting level never got deeper than nine child nodes, and indeed it crashed the interpreter. Pickling recursive

[issue2701] csv.reader accepts string instead of file object (duck typing gone bad)

2008-04-26 Thread Roy Smith
New submission from Roy Smith [EMAIL PROTECTED]: If you pass csv.reader() a filename as its first argument: csv.reader('filename') instead of a file object like you're supposed to, you don't get an error. You instead get a reader object which returns the characters which make up the

[issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString.

2008-04-26 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: The patch looks good. Just a question: I thought the strings returned by PyUnicode_AsStringAndSize are 0-terminated, while your patch at several places attempts to explicitly 0-terminate a copy of such string. Are you sure this is

[issue2693] IDLE doesn't work with Tk 8.5

2008-04-26 Thread Greg Couch
Greg Couch [EMAIL PROTECTED] added the comment: I wish I could be as cavalier about Tk 8.5. The last version of Tk 8.4 just came out and it really shows its age, especially on Mac OS X, and those are ~25% of our application's downloads. Since Python 2.6a2 is not suitable for production use,