[issue6017] Dict fails to notice addition and deletion of keys during iteration

2009-05-13 Thread Steven D'Aprano
New submission from Steven D'Aprano : I'm not sure if this is a documentation bug or a behaviour bug, or possibly both. The documentation warns about adding or deleting items from a dict while iterating over it: "Using iteritems() while adding or deleting entries in the dictionary will raise

[issue6016] Use shipped zlib if the system version is bad

2009-05-13 Thread Daniel Diniz
Daniel Diniz added the comment: We'd be asking for trouble with this: incompatible shipped and system versions or having to build the shipped version. All that for working around the rare case where the user doesn't have a valid zlib makes no sense :) -- resolution: -> invalid stage: t

[issue6016] Use shipped zlib if the system version is bad

2009-05-13 Thread Daniel Diniz
New submission from Daniel Diniz : The attached patch makes setup.py use the shipped zlib.h in Modules/zlib/ when a bogus zlib.h is found by find_file. However, I couldn't test it (nor make it work) when a system zlib is missing (no time right now). Can we build the shipped zlib and link against

[issue1932] Cosmetic patch to supress compiler warning

2009-05-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: There is no warning now. Seems to be fixed. -- resolution: -> out of date status: open -> closed ___ Python tracker ___

[issue966625] Documentation for Descriptors in the main docs

2009-05-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll check but much of this has been done already. -- assignee: -> rhettinger status: pending -> open ___ Python tracker ___ _

[issue1739648] zipfile.testzip() using progressive file reads

2009-05-13 Thread Alan McIntyre
Alan McIntyre added the comment: It would appear that the change to testzip has already been made: http://mail.python.org/pipermail/python-checkins/2008-August/072892.html http://mail.python.org/pipermail/python-3000-checkins/2008-August/004310.html I can add some tests, though. I'll submit a

[issue966625] Documentation for Descriptors in the main docs

2009-05-13 Thread Daniel Diniz
Daniel Diniz added the comment: Maybe we should close this in favor of issue 1376292? -- nosy: +ajaksu2 stage: -> needs patch status: open -> pending ___ Python tracker ___ __

[issue1376292] Write user's version of the reference guide

2009-05-13 Thread Daniel Diniz
Changes by Daniel Diniz : -- dependencies: +Documentation for Descriptors in the main docs stage: -> needs patch versions: +Python 2.6, Python 3.1 ___ Python tracker ___ _

[issue2492] Check implementation of new buffer interface for PyString in 2.6

2009-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Uh, this was done a long time ago. -- nosy: +pitrou resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue6015] Scrollbar in Idle os x 10.5

2009-05-13 Thread Jerome
New submission from Jerome : Hi, when I try to use the scrollbar to scroll through the REPL window or through a file I'm editing with IDLE in os x 10.5 the image of the scroll bar doesn't seem to correspond to anything, it moves more or less than my mouse when I'm trying to use it, and sometim

[issue2521] ABC caches should use weak refs

2009-05-13 Thread Daniel Diniz
Daniel Diniz added the comment: Confirmed on release26-maint and trunk. -- nosy: +ajaksu2 priority: -> normal stage: -> test needed type: -> resource usage ___ Python tracker

[issue2981] confusing action of struct.pack and struct.unpack with fmt 'p'

2009-05-13 Thread Daniel Diniz
Changes by Daniel Diniz : -- priority: -> normal type: behavior -> feature request versions: +Python 2.7, Python 3.2 -Python 2.5 ___ Python tracker ___ __

[issue3070] Wrong size calculation in posix_execve

2009-05-13 Thread Daniel Diniz
Changes by Daniel Diniz : -- nosy: +haypo, loewis priority: -> normal stage: -> test needed type: -> behavior versions: +Python 3.1 -Python 3.0 ___ Python tracker ___ _

[issue1534607] IndexError: Add bad index to msg

2009-05-13 Thread Daniel Diniz
Changes by Daniel Diniz : -- stage: -> test needed versions: +Python 2.7, Python 3.2 -Python 2.6 ___ Python tracker ___ ___ Python-

[issue3180] Interrupts are lost during readline PyOS_InputHook processing

2009-05-13 Thread Daniel Diniz
Daniel Diniz added the comment: Michael, How does this interact with the fix from issue 706406? -- components: +Extension Modules -None nosy: +ajaksu2 priority: -> normal stage: -> test needed versions: +Python 2.7, Python 3.2 -Python 2.6 ___ Pytho

[issue2325] isinstance(anything, MetaclassThatDefinesInstancecheck) raises instead of returning False

2009-05-13 Thread Daniel Diniz
Daniel Diniz added the comment: This now works correctly (returns False) in release26-maint, trunk and py3k. -- nosy: +ajaksu2 resolution: -> out of date stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue2492] Check implementation of new buffer interface for PyString in 2.6

2009-05-13 Thread Daniel Diniz
Changes by Daniel Diniz : -- stage: -> test needed versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue1294] Management of KeyboardInterrupt in cmd.py

2009-05-13 Thread Daniel Diniz
Changes by Daniel Diniz : -- stage: -> test needed versions: +Python 2.7, Python 3.2 -Python 2.6 ___ Python tracker ___ ___ Python-bug

[issue1932] Cosmetic patch to supress compiler warning

2009-05-13 Thread Daniel Diniz
Changes by Daniel Diniz : -- keywords: +patch stage: -> patch review versions: +Python 2.6, Python 3.1 -Python 2.5 ___ Python tracker ___

[issue1983] Return from fork() is pid_t, not int

2009-05-13 Thread Daniel Diniz
Daniel Diniz added the comment: Is this pending for trunk and py3k too or just for 2.5 (and hence can be closed)? -- nosy: +ajaksu2 status: pending -> open ___ Python tracker ___

[issue6014] No shell prompt when a graphics window that was started from IDLE is closed

2009-05-13 Thread Ralf Seliger
Changes by Ralf Seliger : -- title: No shell prompt when a graphics that was started from IDLE is closed -> No shell prompt when a graphics window that was started from IDLE is closed ___ Python tracker ___

[issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) <= sizeof(long)

2009-05-13 Thread Daniel Diniz
Daniel Diniz added the comment: That would be issue 1983. -- dependencies: +Return from fork() is pid_t, not int nosy: +ajaksu2 ___ Python tracker ___ ___

[issue6014] No shell prompt when a graphics that was started from IDLE is closed

2009-05-13 Thread Ralf Seliger
New submission from Ralf Seliger : Platform: Ubuntu 8.10 Affected versions: Python 2.6.2, IDLE 2.6.2 and Python 2.5.4, IDLE 1.2.4 >From IDLE I run a program that opens a graphics window (e.g. using the Natural Language Toolkit: >>> import nltk followed by >>> nltk.download()). When I close th

[issue1866] const arg for PyInt_FromString

2009-05-13 Thread Daniel Diniz
Changes by Daniel Diniz : -- keywords: +patch versions: +Python 2.7, Python 3.2 -Python 2.5 ___ Python tracker ___ ___ Python-bugs-list

[issue1467201] size_t warnings on OSX 10.3

2009-05-13 Thread Daniel Diniz
Daniel Diniz added the comment: Unless someone can confirm the warnings still exist, this will be closed. -- nosy: +ajaksu2 priority: normal -> low stage: -> test needed status: pending -> open type: -> behavior versions: +Python 2.6, Python 3.1 -Python 2.5 __

[issue1783] nonexistent data items declared as exports in sysmodule.h

2009-05-13 Thread Daniel Diniz
Changes by Daniel Diniz : -- stage: -> needs patch type: -> behavior versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 ___ Python tracker ___ ___

[issue1200] Allow array.array to be parsed by the t# format unit.

2009-05-13 Thread Daniel Diniz
Daniel Diniz added the comment: PyBUF_CHARACTER is now gone, and getargs.c reads: /*TEO: This can be eliminated --- here only for backward compatibility */ case 't': { /* 8-bit character buffer, read-only access */ -- nosy: +ajaksu2, pitrou stage: -> patc

[issue1428655] Use PyOS_snprintf for static buffers

2009-05-13 Thread Daniel Diniz
Daniel Diniz added the comment: Does anyone want to adopt this one? :) -- nosy: +ajaksu2 stage: -> patch review versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker _

[issue1739648] zipfile.testzip() using progressive file reads

2009-05-13 Thread Daniel Diniz
Changes by Daniel Diniz : -- stage: -> test needed type: -> resource usage versions: +Python 2.7, Python 3.2 ___ Python tracker ___ __

[issue731991] find correct socklen_t type

2009-05-13 Thread Daniel Diniz
Changes by Daniel Diniz : -- stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.2 -Python 2.5, Python 2.6 ___ Python tracker ___ _

[issue1523] xdrlib fails to detect overflow (struct bug?)

2009-05-13 Thread Mark Dickinson
Mark Dickinson added the comment: I'll take a look. -- assignee: -> marketdickinson nosy: +marketdickinson ___ Python tracker ___ ___

[issue1523] xdrlib fails to detect overflow (struct bug?)

2009-05-13 Thread Daniel Diniz
Daniel Diniz added the comment: On trunk, I get the described struct behavior with " DeprecationWarning: struct integer overflow masking is deprecated". The xdr.py script gives: 18446744073709551615 -> -> 4294967295 On py3k, both raise "struct.error: argument out of range". Tested on

[issue1621] Do not assume signed integer overflow behavior

2009-05-13 Thread Mark Dickinson
Mark Dickinson added the comment: > [and then perform the multiplication unsigned, to silence the > warning - right?] That wasn't actually what I was thinking: I was proposing to rewrite it as: if (Py_SIZE(a) > 0 && n > PY_SSIZE_T_MAX/Py_SIZE(a)) { PyErr_SetString(PyE

[issue5956] test_distutils fails for Python 3.1b1 on MacOS X

2009-05-13 Thread Jean Brouwers
Jean Brouwers added the comment: Another attempt to attach the image. -- Added file: http://bugs.python.org/file13979/Issue5956.jpg ___ Python tracker ___ ___

[issue5956] test_distutils fails for Python 3.1b1 on MacOS X

2009-05-13 Thread Jean Brouwers
Jean Brouwers added the comment: Indeed, this is Python 3.1b1 built from source on MacOS X 10.4.1 Tiger (Intel). MacOS considers some of these win*.exe files directories. See the attached picture and below. % ls -l Python-3.1b1/Lib/distutils/command/win* -rw-r--r-- 1 jean jean 61440 Ju

[issue1621] Do not assume signed integer overflow behavior

2009-05-13 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks Ismail. I'm currently using gcc-4.4 with the -ftrapv (not -fwrapv!) option to see how much breaks. (Answer: quite a lot. :-[ ) I'm finding many overflow checks that look like: size = Py_SIZE(a) * n; if (n && size / n != Py_SIZE(a)) {

[issue4832] idle filename extension

2009-05-13 Thread Pavel Kosina
Pavel Kosina added the comment: Trying to patch the latest revision 72608 and it didnt work, here on winxp. C:\prg\Python30\Lib\idlelib>svn update Restored 'IOBinding.py' At revision 72608. C:\prg\Python30\Lib\idlelib>patch IOBinding.py defaultextension.patch --verbose Hmm... Looks like a un

[issue4832] idle filename extension

2009-05-13 Thread Daniel Diniz
Daniel Diniz added the comment: Amaury, Your patch also forces '.py' to any saved file on Linux, but using 'defaultextension = ""' it works correctly here. Does if fix things on Windows? -- ___ Python tracker _

[issue4050] inspect.findsource() returns binary data for shared library modules

2009-05-13 Thread R. David Murray
R. David Murray added the comment: Decision is not to backport. -- status: open -> closed versions: +Python 2.7, Python 3.1 -Python 3.0 ___ Python tracker ___ ___

[issue5956] test_distutils fails for Python 3.1b1 on MacOS X

2009-05-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: "Is a directory"? I suppose you are trying to install from a source tar ball? What happens when you try to "ls" this file? -- nosy: +amaury.forgeotdarc ___ Python tracker ___

[issue4050] inspect.findsource() returns binary data for shared library modules

2009-05-13 Thread R. David Murray
R. David Murray added the comment: Patches applied to 2.7 in r72605 and 3.1 in r72607, after discussion on #python-dev. Blocked on 2.6 since it represents a behavior change and doesn't actually break anything in the 2 series. The change that introduced the pydoc regression was not backported t

[issue4832] idle filename extension

2009-05-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I think I found the relevant documentation: http://wiki.tcl.tk/1842 """ On Unix, when typing a filename without extension, the first extension belonging to the currently selected filetype will be appended to the filename. On Windows, this is not the case,

[issue1621] Do not assume signed integer overflow behavior

2009-05-13 Thread Ismail Donmez
Ismail Donmez added the comment: You should be using gcc 4.4 to get the best warning behaviour. -- ___ Python tracker ___ ___ Python-b

[issue1621] Do not assume signed integer overflow behavior

2009-05-13 Thread Mark Dickinson
Mark Dickinson added the comment: > There is a lot of value in being able to compile with -Wstrict-overflow > and know that every warning omitted is something to be looked at. I agree in principle; this certainly applies to -Wall. But -Wstrict- overflow doesn't do a particularly good job of f

[issue4625] IDLE won't open anymore, .idlerc unaccessible

2009-05-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Was python installed with another user account, or a "just for me" install? -- nosy: +amaury.forgeotdarc ___ Python tracker ___ __

[issue4050] inspect.findsource() returns binary data for shared library modules

2009-05-13 Thread R. David Murray
Changes by R. David Murray : -- assignee: -> r.david.murray nosy: +r.david.murray versions: +Python 2.7 -Python 2.6 ___ Python tracker ___ ___

[issue4050] inspect.findsource() returns binary data for shared library modules

2009-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: It's true inspect.findsource() behaves likes this, but help() has only been broken very recently (and only in py3k), so I suggest these are separate bugs. -- nosy: +pitrou ___ Python tracker

[issue1621] Do not assume signed integer overflow behavior

2009-05-13 Thread Gregory P. Smith
Gregory P. Smith added the comment: """I assume these changes were made to silence warnings from -Wstrict-overflow, but I don't think that should be a goal: I'd suggest only making changes where there's a genuine possibility of overflow (even if it's a remote one), and leaving the code unchanged

[issue1621] Do not assume signed integer overflow behavior

2009-05-13 Thread Mark Dickinson
Mark Dickinson added the comment: A few comments: (1) I agree that signed overflows should be avoided where possible. (2) I think some of the changes in the latest patch (fix-overflows-final.patch) are unnecessary, and decrease readability a bit. An example is the following chunk for the x_div

[issue6012] enhance getargs O& to accept cleanup function

2009-05-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis priority: -> normal stage: -> patch review type: -> resource usage ___ Python tracker ___ _

[issue5990] Memory leak in os.rename() and other functions

2009-05-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- dependencies: +enhance getargs O& to accept cleanup function ___ Python tracker ___ ___ Python-bugs-list

[issue6013] json slower than simplejson

2009-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Given the amount of changed code between the two simplejson versions, I'm afraid there's no way the new version will be backported to release26-maint. You can probably do the backport manually in your Python install, though (or bite the bullet and use SVN trunk,

[issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values

2009-05-13 Thread Francesco Sechi
Changes by Francesco Sechi : -- nosy: -sechi_francesco ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue6013] json slower than simplejson

2009-05-13 Thread Thomas Heller
Thomas Heller added the comment: Here are the numbers from trunk (rev ) and release26-maint branch (rev ): c:\svn\release26-maint\PCbuild>python -m timeit -s "from json import loads, dumps" "loads(dumps(range(32)))" 1000 loops, best of 3: 726 usec per loop c:\svn\release26-maint\PCbuild>cd ..

[issue6013] json slower than simplejson

2009-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is probably because your simplejson is much more recent than the json version shipped with 2.6. Can you try again with trunk and post the numbers? -- nosy: +pitrou ___ Python tracker

[issue6013] json slower than simplejson

2009-05-13 Thread Thomas Heller
New submission from Thomas Heller : The json package is a lot slower than the simplejson package. Both packages have their C compiled speedup module; however: C:\>py26 -m timeit -s "from json import dumps, loads" "loads(dumps(range(32)))" 1000 loops, best of 3: 618 usec per loop C:\>py26

[issue1672568] silent error in email.message.Message.get_payload

2009-05-13 Thread Renaud Blanch
Renaud Blanch added the comment: looks very good to me. thanks daniel for your work renaud -- ___ Python tracker ___ ___ Python-bug

[issue5994] help(marshal) just gives an outline; no help text provided.

2009-05-13 Thread R. David Murray
R. David Murray added the comment: I added 'variables' and 'functions' section to module docstring parallel to the way 'time' does it, and documented 'version' there. Checked in in r72597, r72598, and in r72599, r72600. -- resolution: -> fixed stage: patch review -> committed/rejected

[issue6010] unable to retrieve latin-1 encoded data from sqlite3

2009-05-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Confirmed here, tested with python2.6 on Linux with sys.stding.encoding == 'ISO-8859-1' on Windows with sys.stdin.encoding == 'cp437' >>> import sqlite3 >>> db = sqlite3.connect(':memory:') >>> cur = db.cursor() >>> cur.execute("create table foo (x)") >>

[issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values

2009-05-13 Thread Tomalak
Changes by Tomalak : -- title: xml.dom.minidom does not escape newline characters within attribute values -> xml.dom.minidom does not escape CR, LF and TAB characters within attribute values ___ Python tracker ___

[issue5752] xml.dom.minidom does not escape newline characters within attribute values

2009-05-13 Thread Tomalak
Tomalak added the comment: I changed the patch to include support for TAB characters, which were also left unencoded before. Also I switched encoding from ' ' etc. to ' '. This is equivalent, but the spec uses the latter variant. -- ___ Python track

[issue6007] distutils tricks you into thinking you can build extensions with mingw

2009-05-13 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > Even though I still don't understand the original issue, apparently, > it is an issue only if the localtime() function is used. Extensions > that don't use it might still work fine, according to the report. I have an extension which doesn't use it and ca

[issue5752] xml.dom.minidom does not escape newline characters within attribute values

2009-05-13 Thread Tomalak
Changes by Tomalak : Added file: http://bugs.python.org/file13977/minidom.patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue5752] xml.dom.minidom does not escape newline characters within attribute values

2009-05-13 Thread Tomalak
Changes by Tomalak : Removed file: http://bugs.python.org/file13919/minidom.patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue5752] xml.dom.minidom does not escape newline characters within attribute values

2009-05-13 Thread Tomalak
Tomalak added the comment: Daniel Diniz: The proposed behaviour is correct: http://www.w3.org/TR/2000/WD-xml-c14n-2119.html#charescaping "In attribute values, the character information items TAB (#x9), newline (#xA), and carriage-return (#xD) are represented by " ", " ", and " " respect

[issue5990] Memory leak in os.rename() and other functions

2009-05-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I opened #6012 to handle O& memory leak issue. -- nosy: +ocean-city ___ Python tracker ___ ___ Py

[issue6012] enhance getargs O& to accept cleanup function

2009-05-13 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : This issue comes from #5990. Currently, O& doesn't accept general cleanup function. This causes memory leak sometimes. Here is an experimental patch to create new format O&& similar to O& but have general cleanup function. -- components: Interpret

[issue5752] xml.dom.minidom does not escape newline characters within attribute values

2009-05-13 Thread Tomalak
Tomalak added the comment: Francesco, > if you want to encode the newline character, > this should be done by both parseString and > setAttribute methods. Otherwise, the > behaviour is not symmetric. I believe you still don't see the issue. The behaviour is not symmetric *now*. You store a

[issue6011] python doesn't build if prefix contains non-ascii characters

2009-05-13 Thread Baptiste Carvello
Baptiste Carvello added the comment: And here comes the patch -- keywords: +patch Added file: http://bugs.python.org/file13975/text_file.diff ___ Python tracker ___ _

[issue6011] python doesn't build if prefix contains non-ascii characters

2009-05-13 Thread Baptiste Carvello
New submission from Baptiste Carvello : I have tried to build python (version 3.1 beta 1) on linux and install it to a non-standard prefix which contains non-ascii utf-8 characters (my locale being utf-8). The build directory's path is ascii-only. The exact configure line is given in the attached

[issue6009] optparse docs say 'default' keyword is deprecated but uses it in most examples

2009-05-13 Thread R. David Murray
R. David Murray added the comment: Pesonally I would prefer that the deprication be reversed. In most of my optparse use cases it is more convenient than calling set_defaults. In fact, I'm not sure I've ever used set_defaults, though I am glad that it exists since I can certainly envision use

[issue6010] unable to retrieve latin-1 encoded data from sqlite3

2009-05-13 Thread izarf
New submission from izarf : it is impossible to retrieve a latin-1 encoded string from sqlite3 database. How to: 1. create a new db. 2. create a new table with text field. 3. insert a row with data like "åäö" 4. select all rows from table 5. write: for data in cursor1: var = dat

[issue2813] No float formatting in PyString_FromFormat

2009-05-13 Thread Mark Dickinson
Mark Dickinson added the comment: I also think it would be good to use PyOS_double_to_string here. That does make it impossible to format long doubles, though, except by doing a possibly lossy conversion to double first. As far as I can see, Python doesn't use long double anywhere outside the

[issue4660] multiprocessing.JoinableQueue task_done() issue

2009-05-13 Thread Alvaro
Changes by Alvaro : -- nosy: +aloga ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailm