[issue2470] Need fixer for dl (removed) - ctypes module

2008-03-24 Thread Neal Norwitz
New submission from Neal Norwitz [EMAIL PROTECTED]: r61837 removed the dl module. It needs a 2to3 fixer written to use ctypes. -- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 64394 nosy: collinwinter, nnorwitz priority: critical severity: normal

[issue2471] imp.get_magic() should return bytes, not bytearray

2008-03-24 Thread Brett Cannon
New submission from Brett Cannon [EMAIL PROTECTED]: The magic cookie as returned by imp.get_magic() should be of the bytes type, not bytearray as the magic cookie will not ever change during the execution of the interpreter. -- components: Extension Modules messages: 64395 nosy:

[issue1162363] Heap class for heapq module

2008-03-24 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Overall, I'm not in favor of the patch or the basic idea. The heapq module is somewhat usable as-is with apps typically inserting tuples linking a priority level and a record. Also, the attached code is not yet mature, nor does it

[issue1904] Add key argument to heapq functions

2008-03-24 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Rejecting the key-function patch in favor of the current typical approach of heapifying tuples that link a priority level with individual records. I've been a heavy user of the module and one of its principal maintainers. To date, I've

[issue2460] Ellipsis not copyable

2008-03-24 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Thanks for the patch. Applied in r61841. -- resolution: - accepted status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2460 __

[issue1038909] pydoc method documentation lookup enhancement

2008-03-24 Thread Andy Harrington
Andy Harrington [EMAIL PROTECTED] added the comment: Alexander, I have no idea why your patch languished. On the one hand I might have skipped this if I realized that before. On the other hand, I did add something extra, and I might not have had an open mind if I had looked at yours. Plus,

[issue1462228] custom comparison function for bisect module

2008-03-24 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Thank you for the patch but must close due the rejection of the original RFE. -- resolution: - rejected status: open - closed _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1462228

[issue1451588] bisect should support a custom comparison function

2008-03-24 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Sorry, am closing this RFE because its not the best way to use the bisect tools. The cmp function is going away in Py3.0 in favor of key functions. Yet, even those do not play nicely with bisect because the function results are not

[issue1619060] bisect on presorted list

2008-03-24 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Thanks for the thoughtful reply. Am going to close for the reasons agreed by most of the respondants. See additional explanation in the closing of issue 1451588 . That all-at-once action of sort() allows it to take advantage of a

[issue2126] BaseHTTPServer.py fails long POST from IE

2008-03-24 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Unassigning. I don't have more thoughts on this one. -- assignee: rhettinger - __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2126 __

[issue2172] Add doc-string to UserDict and DictMixin

2008-03-24 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: I'm not sure the class docstring approach is suitable for a mixin. It seems fine to me that pydoc strips the commentary on the mixin as a standalone class; instead it appropriately focuses on the client class that uses the mixin as part

[issue2354] cmp argument to list.sort()/sorted() should raise a Py3K warning

2008-03-24 Thread Raymond Hettinger
Changes by Raymond Hettinger [EMAIL PROTECTED]: -- status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2354 __ ___ Python-bugs-list mailing list

[issue1569291] Speed-up in array_repeat()

2008-03-24 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: This one is easy if someone wants to take a crack at it. -- keywords: +easy -patch _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1569291 _

[issue762920] API Functions for PyArray

2008-03-24 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Raising priority as a reminder to myself or anyone who wants to apply, test, and document. -- priority: normal - high Tracker [EMAIL PROTECTED] http://bugs.python.org/issue762920

[issue2470] Need fixer for dl (removed) - ctypes module

2008-03-24 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Is it possible to write one? I'm skeptical. -- nosy: +loewis __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2470 __

[issue1700821] audioop module - request to add a note

2008-03-24 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Fixed in r61842. -- resolution: accepted - fixed status: open - closed _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1700821 _

[issue1251748] compiler package: global a; a=5

2008-03-24 Thread Armin Rigo
Armin Rigo [EMAIL PROTECTED] added the comment: Sorry, I don't think many PyPy coders care about microoptimizations in the bytecode. To be honest we've stopped worrying about the stdlib compiler package because no one seemed to care. I'm closing the present patch as incomplete and outdated; if

[issue2472] Fixed block ordering code in compiler.pyassem

2008-03-24 Thread Antoine Pitrou
New submission from Antoine Pitrou [EMAIL PROTECTED]: This is a rewrite of the block ordering code in the compiler package (specifically, the flowgraph part). The previous code was littered with self-admitted hacks, fixups and XXX :-) They are all removed and replaced with a clean

[issue2472] Fixed block ordering code in compiler.pyassem

2008-03-24 Thread Antoine Pitrou
Changes by Antoine Pitrou [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9838/fixcompiler.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2472 __ ___

[issue2472] Fixed block ordering code in compiler.pyassem

2008-03-24 Thread Antoine Pitrou
Changes by Antoine Pitrou [EMAIL PROTECTED]: Added file: http://bugs.python.org/file9839/fixcompiler.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2472 __ ___

[issue1251748] compiler package: global a; a=5

2008-03-24 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Armin, this is not about micro-optimizations per se, but about fixing some parts of the compiler package. To make it easier, I've created a separate entry for the fixing part in #2472 :) This was the first time I was using the compiler package

[issue2472] Fixed block ordering code in compiler.pyassem

2008-03-24 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: By enabling TEST_ALL I've just run ``test_compiler.CompilerTest.testCompileLibrary`` against the whole stdlib, and there were no errors. It's a good sign :-) __ Tracker [EMAIL PROTECTED]

[issue2240] setitimer, getitimer wrapper

2008-03-24 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Thanks for the patch. Committed as r61847 and r61848 -- resolution: - accepted status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2240 __

[issue2250] rlcompleter raises Exception on bad input

2008-03-24 Thread Lorenz Quack
Lorenz Quack [EMAIL PROTECTED] added the comment: I have no idea what or who NAS is but comments are always welcome :) concerning the documentation: I´ve never done it before but there is a first time for everything, right? I´m currently on vacation so I won´t look into it for at least another

[issue2473] logging.LogRecord should know how to handle dict-like args

2008-03-24 Thread Will Maier
New submission from Will Maier [EMAIL PROTECTED]: In (at least) Python 2.5.2, logging.logRecord provides a very useful facility to interpolate formatted strings. This feature expands an *args sequence; if that sequence has only one element and that element is a dictionary, LogRecord uses the

[issue1202] zlib.crc32() and adler32() return value

2008-03-24 Thread Michael Becker
Michael Becker [EMAIL PROTECTED] added the comment: In case it isn't obvious the work around for pre 3.0 to get the right sum is something like: x=zlib.adler32(str) if x 0: x=(long(x) + 4294967296L) # 2^32, long may or may not be needed here -- nosy: +mbecker

[issue2470] Need fixer for dl (removed) - ctypes module

2008-03-24 Thread Collin Winter
Collin Winter [EMAIL PROTECTED] added the comment: Can you list the mapping you'd like to see? I've never used dl or ctypes, so I'm not immediately sure how to port from one to the other. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2470

[issue1733184] slice type is unhashable

2008-03-24 Thread L. Peter Deutsch
L. Peter Deutsch [EMAIL PROTECTED] added the comment: Having now read messages 63380 and 63384, I agree with them: I would have withdrawn my proposal if it hadn't gotten rejected first. I do have a use case, but the workaround is pretty easy. _ Tracker [EMAIL

[issue2470] Need fixer for dl (removed) - ctypes module

2008-03-24 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: In the simplest case, convert import dl libc = dl.open(libc.so.6) iconv = libc.call(iconv_open, ISO-8859-1, ISO-8859-2) print(iconv) to import ctypes libc = ctypes.CDLL(libc.so.6) iconv = libc.iconv_open(ISO-8859-1, ISO-8859-2) print(iconv)

[issue1731717] race condition in subprocess module

2008-03-24 Thread Tom Culliton
Tom Culliton [EMAIL PROTECTED] added the comment: I'm not sure what the POSIX standards say on this (and MS-Windows may go it's own contrary way), but for most real systems the PID is a running count (generally 32 bit or larger today) which would have to cycle all the way around to repeat.

[issue1731717] race condition in subprocess module

2008-03-24 Thread Jean-Paul Calderone
Jean-Paul Calderone [EMAIL PROTECTED] added the comment: Which system uses a 32 bit PID? Not Linux, or FreeBSD, or OS X - they all use 16 bit PIDs. -- nosy: +exarkun _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1731717

[issue1202] zlib.crc32() and adler32() return value

2008-03-24 Thread Gregory P. Smith
Gregory P. Smith [EMAIL PROTECTED] added the comment: The workaround I prefer to use is: x = zlib.adler32(mystr) 0xL __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1202 __

[issue2172] Add doc-string to UserDict and DictMixin

2008-03-24 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: On Mon, Mar 24, 2008 at 4:53 AM, Raymond Hettinger [EMAIL PROTECTED] wrote: I'm not sure the class docstring approach is suitable for a mixin. It seems fine to me that pydoc strips the commentary on the mixin as a standalone

[issue1731717] race condition in subprocess module

2008-03-24 Thread Tom Culliton
Tom Culliton [EMAIL PROTECTED] added the comment: AIX, HP-UX, Solaris, 64 bit Linux, ... Even in the Linux x86 header files there's a mix of int and short. The last time I had to do the math on how long it would take the PID to cycle was probably on an AIX box and it was a very long time.

[issue1733184] slice type is unhashable

2008-03-24 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: I hate to flip-flop like this, but please consider my new arguments at issue2268. In short, slices being unhashable prevents storing them in the code object's const dictionary and thus prevents optimizing code involving const slices.

[issue1731717] race condition in subprocess module

2008-03-24 Thread Jean-Paul Calderone
Jean-Paul Calderone [EMAIL PROTECTED] added the comment: PIDs cycle quite frequently. You must be thinking of something else. Even 64 bit Linux has a maximum PID of 2 ** 15 - 1. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1731717

[issue2474] fset not working

2008-03-24 Thread Ryan Sturmer
New submission from Ryan Sturmer [EMAIL PROTECTED]: Using the attached module, There's an asymmetry between fget and fset in my properties. fget works fine, but fset isn't getting called. I'm fairly sure I'm creating the property correctly. Try the following code: a =

[issue1731717] race condition in subprocess module

2008-03-24 Thread Gregory P. Smith
Gregory P. Smith [EMAIL PROTECTED] added the comment: fwiw, I see pids cycle in a reasonable amount of time on modern production linux systems today. its a fact of life, we should deal with it. :) _ Tracker [EMAIL PROTECTED]

[issue1569291] Speed-up in array_repeat()

2008-03-24 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: Looking at stringobject.c:1034: i = 0; if (i size) { Py_MEMCPY(op-ob_sval, a-ob_sval, Py_SIZE(a)); i = Py_SIZE(a); } while (i size) { j = (i = size-i) ? i : size-i;

[issue2474] fset not working

2008-03-24 Thread Paul Pogonyshev
Paul Pogonyshev [EMAIL PROTECTED] added the comment: This is caused by EWAssayParam being an old-style class. Dunno if it is a bug in Python or not. -- nosy: +_doublep __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2474

[issue2474] fset not working

2008-03-24 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: It's not a bug in Python. Properties, being descriptors, only work fully with new-style classes. -- nosy: +georg.brandl resolution: - wont fix status: open - closed __ Tracker [EMAIL PROTECTED]

[issue2271] msi installs to the incorrect location (C drive)

2008-03-24 Thread Ross
Ross [EMAIL PROTECTED] added the comment: Checking Progress. This is a big of a show-stopper as it prevents me from using a number of python dependent packages. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2271 __

[issue1569291] Speed-up in array_repeat()

2008-03-24 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: Attached patch (issue1569291.diff) reimplements the optimization by following Objects/stringobject.c logic as Raymond suggested. I see two remaining issues which in my view should be addressed separately: 1. There is no check for

[issue2271] msi installs to the incorrect location (C drive)

2008-03-24 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: No progress so far; may not proceed at all during April (IOW, I haven't even looked at the log file yet). Contributions are welcome. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2271

[issue1569291] Speed-up in array_repeat()

2008-03-24 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: I forgot to mention that I added a unit test to cover the special case of repeating a single-byte array. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1569291

[issue2271] msi installs to the incorrect location (C drive)

2008-03-24 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: As a further follow-up, I have now looked at the log file, and the problematic lines are MSI (s) (DC:40) [10:44:39:425]: Ignoring disallowed property TARGETDIR MSI (s) (DC:40) [10:44:39:425]: Ignoring disallowed property DLLDIR Try setting

[issue1736190] asyncore/asynchat patches

2008-03-24 Thread Giampaolo Rodola'
Giampaolo Rodola' [EMAIL PROTECTED] added the comment: Are there news about this issue? -- nosy: +gvanrossum _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1736190 _

[issue2271] msi installs to the incorrect location (C drive)

2008-03-24 Thread Ross
Ross [EMAIL PROTECTED] added the comment: using Orca, I modified the .msi file and python now appears to be working. I made the following change: Property - SecureCustomProperty Changed value from REMOVEOLDSNAPSHOT;REMOVEOLDVERSION to REMOVEOLDSNAPSHOT;REMOVEOLDVERSION;TARGETDIR;DLLDIR

[issue2475] Popen.poll always returns None

2008-03-24 Thread Josh Cogliati
New submission from Josh Cogliati [EMAIL PROTECTED]: I was trying to use subprocess to run multiple processes, and then wait until one was finished. I was using poll() to do this and created the following test case: #BEGIN import subprocess,os procs = [subprocess.Popen([sleep,str(x)]) for x in

[issue2469] Fix build error in unicodeobject.c UCS4

2008-03-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Oops, I made this error while correcting #2469. Thanks for catching it! committed as r61853. There is no buildbot configured with UCS4... -- nosy: +amaury.forgeotdarc resolution: - fixed status: open - closed

[issue1477] UnicodeDecodeError that cannot be caught in narrow unicode builds

2008-03-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: backported to 2.5 branch as r61854 -- status: pending - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1477 __

[issue2471] imp.get_magic() should return bytes, not bytearray

2008-03-24 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Attaching patch... -- keywords: +patch nosy: +benjamin.peterson Added file: http://bugs.python.org/file9842/get_magic_bytes.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2471

[issue1054434] automatic XMLRPC boxcarring via multicall for xmlrpclib

2008-03-24 Thread Ralf Schmitt
Ralf Schmitt [EMAIL PROTECTED] added the comment: this issue is about the threaded one. I think it should be rejected. It does not work: ~/ python2.5 xmlrpclib_multicall.py [EMAIL PROTECTED] failed 1 Traceback (most recent call last): File xmlrpclib_multicall.py, line

[issue730938] Python bsddb docs need update

2008-03-24 Thread Jesús Cea Avión
Jesús Cea Avión [EMAIL PROTECTED] added the comment: Done in the pybssdb module (the external one, not the included in python distribution). Online docs available at http://www.argo.es/~jcea/programacion/pybsddb_doc/ The source rst files should be directly usable in the stock 2.6 documentation.

[issue2159] dbmmodule inquiry function is performance prohibitive

2008-03-24 Thread Jesús Cea Avión
Changes by Jesús Cea Avión [EMAIL PROTECTED]: -- nosy: +jcea __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2159 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2413] os.strerror does not check for out of range argument

2008-03-24 Thread Ralf Schmitt
Ralf Schmitt [EMAIL PROTECTED] added the comment: The current behaviour (without your patch) seems ok to me. I just wanted to point out that the patch in its current form could break on some platforms. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2413

[issue2159] dbmmodule inquiry function is performance prohibitive

2008-03-24 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- type: resource usage - performance __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2159 __ ___ Python-bugs-list

[issue2159] dbmmodule inquiry function is performance prohibitive

2008-03-24 Thread Jesús Cea Avión
Jesús Cea Avión [EMAIL PROTECTED] added the comment: I think that -1 is a sanity check. If the count is updated in the database, but it is not transactional (or there are bugs, or the DB is updated by a not up-to-date library, and so on), the cached counter and the real data can diverge.

[issue2375] PYTHON3PATH environment variable to supersede PYTHONPATH for multi-Python environments

2008-03-24 Thread Ralf Schmitt
Ralf Schmitt [EMAIL PROTECTED] added the comment: I once even had the need for a PYTHON24PATH or PYTHON25PATH. (And I think this would be the right approach, i.e. even using the minor version number). However, now I am a happy user of virtualenv, and I do not even have to set PYTHONPATH

[issue2375] PYTHON3PATH environment variable to supersede PYTHONPATH for multi-Python environments

2008-03-24 Thread Ralf Schmitt
Ralf Schmitt [EMAIL PROTECTED] added the comment: c modules cannot be used when the minor version number changes. If I remember correctly c modules where the problem for me, when I ran python 2.4 and 2.5 in parallel. __ Tracker [EMAIL PROTECTED]

[issue2375] PYTHON3PATH environment variable to supersede PYTHONPATH for multi-Python environments

2008-03-24 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- type: - feature request __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2375 __ ___ Python-bugs-list mailing list

[issue1251748] compiler package: global a; a=5

2008-03-24 Thread Neil Schemenauer
Neil Schemenauer [EMAIL PROTECTED] added the comment: On Sun, Mar 23, 2008 at 04:17:12PM +, Antoine Pitrou wrote: Armin, if you still care about the compiler package, could you (or some other pypy coder) take a look at #2459? As part of the patch, it rewrites the flow graph block ordering

[issue2250] rlcompleter raises Exception on bad input

2008-03-24 Thread Neil Schemenauer
Neil Schemenauer [EMAIL PROTECTED] added the comment: On Thu, Mar 20, 2008 at 08:49:32PM +, Sean Reifschneider wrote: Is a straightforward patch, but I'd like NAS to comment on the change in behavior. Probably would also need a documentation change, are you up for doing that Lorenz? I

[issue762920] API Functions for PyArray

2008-03-24 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: I think this issue is largely superseded by PEP 3118 http://www.python.org/dev/peps/pep-3118, which is being backported to 2.6 (see issue2393). AFAICT, the only functionality not available from the new buffer protocol is the ability

[issue2467] gc.DEBUG_STATS reports invalid elapsed times

2008-03-24 Thread Neil Schemenauer
Neil Schemenauer [EMAIL PROTECTED] added the comment: The original code is pretty icky. I'm attaching a patch that improves it, IMO. Before the elapsed time was only shown if garbage was found. I think it should always be shown if DEBUG_STATS is set. -- nosy: +nas Added file:

[issue2448] namedtuple breaks refleak tests

2008-03-24 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: This is a duplicate of issue2223. (See msg63244.) -- nosy: +belopolsky __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2448 __

[issue2447] Python 2.6 refleak test issues

2008-03-24 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: This is a duplicate of issue2223. -- nosy: +belopolsky __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2447 __