[issue1131] Reference Manual: "for statement" links to "break statement"

2007-09-18 Thread Georg Brandl
Georg Brandl added the comment: There's nothing we can do here. There are three index entries for "for statement", which link to the for, break and continue pages. They can't be told apart, so we can't choose which one will be the first, the one to display "for statement", and which will be those

[issue1173] yield expressions not documented in Language Reference

2007-09-18 Thread Georg Brandl
New submission from Georg Brandl: This is fixed in SVN, you can view the docs e.g. here: http://docs.python.org/dev/reference/expressions#yield-expressions -- nosy: +georg.brandl resolution: -> out of date status: open -> closed __ Tracker <[EMAIL PROTEC

[issue1174] new generator methods not documented in Library Reference

2007-09-18 Thread Georg Brandl
Georg Brandl added the comment: This is fixed in SVN, you can view the docs e.g. here: http://docs.python.org/dev/reference/expressions#yield-expressions -- nosy: +georg.brandl resolution: -> out of date status: open -> closed __ Tracker <[EMAIL PROTECTE

[issue1175] .readline() has bug WRT nonblocking files

2007-09-18 Thread Alex Burr
New submission from Alex Burr: If you have made a file nonblocking using fcntl.fcntl, .readline() will discard the start of a line if you get EGAIN. It should attach the partial line to the exception somehow - or at least warn the user. I observe this on 2.3.5, but the same code exists in TRUNK

[issue1157] test_urllib2net fails on test_ftp

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- assignee: -> jafo components: +Tests nosy: +jafo priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ ___ P

[issue1151] "TypeError: expected string, bytes found" instead of KeyboardInterrupt

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue1161] Garbled chars in offending line of SyntaxError traceback

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- priority: -> normal resolution: -> postponed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing

[issue1083] Confusing error message when dividing timedelta using /

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue1163] Patch to make py3k/Lib/test/test_thread.py use unittest

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue1135] xview/yview of Tix.Grid is broken

2007-09-18 Thread Sean Reifschneider
Sean Reifschneider added the comment: I can verify that on Red Hat 7 Python 2.5 that the test does fail and the patch resolves it. -- nosy: +jafo priority: -> normal __ Tracker <[EMAIL PROTECTED]> __

[issue1099] Mac compile fails with pydebug and framework enabled

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue1135] xview/yview of Tix.Grid is broken

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- nosy: -jafo __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue1134] Parsing a simple script eats all of your memory

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- assignee: -> nnorwitz nosy: +nnorwitz __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Un

[issue1134] Parsing a simple script eats all of your memory

2007-09-18 Thread Sean Reifschneider
Sean Reifschneider added the comment: Confirmed problem (used 4.5GB before I killed it), and that the second patch resolved the problem. I'm uploading the inline patch as an attachment, with the directory name in it as well (from svn diff). Bumping the priority to high because the side effect

[issue1157] test_urllib2net fails on test_ftp

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- assignee: jafo -> nobody nosy: +nobody __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Un

[issue1167] gdbm/ndbm 1.8.1+ needs libgdbm_compat.so

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue1169] Option -OO doesn't remove docstrings from functions

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- assignee: -> georg.brandl nosy: +georg.brandl priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ ___ Pyth

[issue1175] .readline() has bug WRT nonblocking files

2007-09-18 Thread Sean Reifschneider
Sean Reifschneider added the comment: Doesn't the exception count as warning the user? We probably don't want to change readline to return a partial line in this case. An exception could be added for EGAIN that includes the partial line. Another option would be to just document the behavior fo

[issue1170] shlex have problems with parsing unicode

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue1171] allow subclassing of bytes type

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- assignee: -> gvanrossum keywords: +patch, py3k nosy: +gvanrossum priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ _

[issue1172] Documentation for done attribute of FieldStorage class

2007-09-18 Thread Sean Reifschneider
Sean Reifschneider added the comment: Patch looks good to me. Fred? Comments on "should I do more fixes": Just straight documentation changes are, in my experience, fairly likely to be processed quickly. Changes to the code may take quite a lot more discussion. Smaller, individual patches are

[issue1175] .readline() has bug WRT nonblocking files

2007-09-18 Thread Alex Burr
Alex Burr added the comment: The exception would count as a warning if it wasn't EGAIN. One expects to catch EGAIN and try again. The current situation is unfortunate because it *nearly* works. My scenario is: I'm driving GDB/MI via popen2.Popen3 ( gdbCommand, False,1). It works for most GDB com

[issue1175] .readline() has bug WRT nonblocking files

2007-09-18 Thread Sean Reifschneider
Sean Reifschneider added the comment: Why are you putting the file in non-blocking mode? Why not just reading in blocking mode? If you want to do other work when a line is not available, you could use select to check to see if there's data ready via a small or 0 timeout. __

[issue1175] .readline() has bug WRT nonblocking files

2007-09-18 Thread Alex Burr
Alex Burr added the comment: I don't need to change my code as I have now worked round the problem, but for an example of why someone might want nonblocking mode: It was not actually in order to do any more work, but because I was managing both input and output to gdb in one thread (for simplici

[issue1172] Documentation for done attribute of FieldStorage class

2007-09-18 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: Looks good to me too. This should be committed. -- assignee: fdrake -> jafo resolution: -> accepted versions: +Python 2.5, Python 3.0 __ Tracker <[EMAIL PROTECTED]> ___

[issue1176] str.split() takes no keyword arguments (Should this be expected?)

2007-09-18 Thread Sergio Correia
New submission from Sergio Correia: str.split() does not accept maxsplits as a keyword argument. If i want to split a string, and, say, get its first word, I do this: >>> 'SPAM eggs eggs spam spam ham'.split(None, 1)[0] 'SPAM' However, as documented on help(str.split), the separator is optiona

[issue1176] str.split() takes no keyword arguments (Should this be expected?)

2007-09-18 Thread Sergio Correia
Sergio Correia added the comment: As a side note, this is slightly related with: http://mail.python.org/pipermail/python-dev/2000-October/009694.html http://bugs.python.org/issue1123 (but check the date of the first link!) __ Tracker <[EMAIL PROTECTED]>

[issue1172] Documentation for done attribute of FieldStorage class

2007-09-18 Thread Bob Kline
Bob Kline added the comment: Thanks for the very quick follow-up. I may be shooting myself in the foot here, but Sean's encouragement about getting patches to the actual code lead me to wonder if it might be better to go straight for the optimal solution here. As I implied in my original messag

[issue1172] Documentation for done attribute of FieldStorage class

2007-09-18 Thread Bob Kline
Bob Kline added the comment: Sean Reifschneider wrote: > Assign your issue that has been ignored to me and I'll take a > look at it. I tried, but it doesn't look like I have sufficient permission to change the assignment. It's http://bugs.python.org/issue1541463 Thanks! _

[issue1082] platform system may be Windows or Microsoft since Vista

2007-09-18 Thread Pat LaVarre
Pat LaVarre added the comment: Works for me. I tried python-trunk-vistaplatform-v2.patch in one sample of 2006-11 RTM Vista plus 2.5.1 Python plus this patch. I quote: >>> import platform >>> platform.uname() ('Windows', '[redacted]', 'Vista', '6.0.6000', '', '') >>> platform.system() 'Windows

[issue1082] platform system may be Windows or Microsoft since Vista

2007-09-18 Thread Pat LaVarre
Pat LaVarre added the comment: --- USAGE: I agree we should let people in future write: if not platform.system('Windows'): rather than: if not (platform.system() in ('Microsoft', 'Windows')): now that our people can no longer rely on Python in Vista correctly understanding the plain human i

[issue1778443] robotparser.py fixes

2007-09-18 Thread Jim Jewett
Jim Jewett added the comment: On line 108 (new 104), spaces should probably be added on both sides of the comparison operator, instead of only after the ">=". The "%s" changes might end up getting changed again as part of

[issue1177] urllib* 20x responses not OK?

2007-09-18 Thread Jim Jewett
New submission from Jim Jewett : Under the http protocol, any 2xx response is OK. urllib.py and urllib2.py hardcoded only response 200 (the most common). http://bugs.python.org/issue912845 added 206 as acceptable to urlli

[issue1177] urllib* 20x responses not OK?

2007-09-18 Thread Facundo Batista
Facundo Batista added the comment: It should behave as you say, yes. I fixed the class HTTPErrorProcessor(BaseHandler) regarding this issue, to not raise an error if response is 2xx (see rev 54927). Regards, -- nosy: +facundobatista __ Tracker <[EMAIL P

[issue1082] platform system may be Windows or Microsoft since Vista

2007-09-18 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Pat, we already have system_alias() for exactly the purpose you suggested. Software relying on platform.system() reporting "Vista" will have to use Python 2.5.2 as minimum Python version system requirement - pretty much the same as with all other bug fixes.

[issue1082] platform system may be Windows or Microsoft since Vista

2007-09-18 Thread Pat LaVarre
Pat LaVarre added the comment: Thanks for the cultural education of 2.5.1 isn't supposed to work, I didn't know that. Also I'm glad to hear this is fixed for 2.5.2 already. Sorry I'm too new & ignorant to understand why you believe this is fixed. I don't see that we already have a way to say

[issue1176] str.split() takes no keyword arguments (Should this be expected?)

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue1177] urllib* 20x responses not OK?

2007-09-18 Thread Sean Reifschneider
Sean Reifschneider added the comment: Facundo: Should this be closed? -- nosy: +jafo priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1175] .readline() has bug WRT nonblocking files

2007-09-18 Thread Sean Reifschneider
Sean Reifschneider added the comment: Arguably, you should be using "select" and "read" (instead of readline) for this operation. That's what I've done in the past when doing something similar. Specifically, I believe I have looped reading into a buffer with read, and using select with a timeou

[issue1177] urllib* 20x responses not OK?

2007-09-18 Thread Jim Jewett
Jim Jewett added the comment: Jafo: His fix is great for urllib2, but the same issue applies to the original urllib. The ticket should not be closed until a similar fix is made to lines 330 and 417 of urllib.py. That i

[issue1178] IDLE - add "paste code" functionality

2007-09-18 Thread Tal Einat
New submission from Tal Einat: Patch adding a 'Paste Code' item to the 'Edit' menu, as well as hotkeys. Using 'Paste Code' instead of the normal paste will remove prompts ('>>> ' or '... ') from the code, and also remove empty lines if pasting to a shell window. This allows easily copy/pasting

[issue1178] IDLE - add "paste code" functionality

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- assignee: ronaldoussoren -> nobody nosy: +nobody __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailin

[issue1172] Documentation for done attribute of FieldStorage class

2007-09-18 Thread Sean Reifschneider
Sean Reifschneider added the comment: Committed in trunk revision 58199 Committed in 25-maint revision 58200 Committed in py3k revision 58201 -- status: open -> closed __ Tracker <[EMAIL PROTECTED]> _

[issue1178] IDLE - add "paste code" functionality

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- assignee: -> ronaldoussoren keywords: +patch nosy: +ronaldoussoren priority: -> low type: behavior -> rfe __ Tracker <[EMAIL PROTECTED]> __

[issue1745035] DoS smtpd vulnerability

2007-09-18 Thread Sean Reifschneider
Sean Reifschneider added the comment: Patch is inline above. RFC2822 says lines MUST be less than 998 bytes long, so this should be fine. What does this do when a line longer than 4096 bytes is found? Does it report an error to the SMTP client? That's my only concern. -- assignee: -

[issue1179] [CVE-2007-4965] Integer overflow in imageop module

2007-09-18 Thread Ismail Donmez
New submission from Ismail Donmez: As reported at http://lists.grok.org.uk/pipermail/full-disclosure/2007-September/065826.html . There is an integer overflow in imageop module which results in an interpreter crash. Original proof of concept code is attached. -- components: Library (Lib)

[issue1123] split(None, maxsplit) does not strip whitespace correctly

2007-09-18 Thread Brett Cannon
Brett Cannon added the comment: The algorithm is actually kind of odd:: >>> " a b".split(None, 0) ['a b'] >>> "a b ".split(None, 0) ['a b '] >>> "a b ".split(None, 1) ['a', 'b '] So trailing whitespace on the original string is stripped only if the number of splits is great enough t

[issue1179] [CVE-2007-4965] Integer overflow in imageop module

2007-09-18 Thread Sean Reifschneider
Sean Reifschneider added the comment: It's unclear if this only causes a crash or if it can inject data. Referenced mailing list post points out where one error is. -- nosy: +jafo priority: -> high __ Tracker <[EMAIL PROTECTED]>

[issue1176] str.split() takes no keyword arguments (Should this be expected?)

2007-09-18 Thread Brett Cannon
Brett Cannon added the comment: This is expected as str.split() is implemented in C and C code only has keyword arguments if someone puts in the time and effort to support them. Support could be added if so desired. But it does slow down argument passing. If you look you will notice that none

[issue1123] split(None, maxsplit) does not strip whitespace correctly

2007-09-18 Thread Sean Reifschneider
Sean Reifschneider added the comment: In looking at the current documentation: http://docs.python.org/dev/library/string.html#string.split I don't see the wording the original poster mentions. The current documentation of the separator is clear and reasonable. I'm going to call this closed, u

[issue1722225] Build on QNX

2007-09-18 Thread Vladimir Konjkov
Vladimir Konjkov added the comment: However, I don't understand this entire point: What do you mean by "using TCGETA requires that struct termio be defined"? How is TCGETA defined to produce such a dependency? TCGETA is a constant, right? --

[issue1123] split(None, maxsplit) does not strip whitespace correctly

2007-09-18 Thread Nir Soffer
Nir Soffer added the comment: I quoted str.split docs: - http://docs.python.org/lib/string-methods.html - http://docs.python.org/dev/library/stdtypes.html - http://docs.python.org/dev/3.0/library/stdtypes.html string.split doc does it explain this: >>> ' a b '.split(None, 1) ['a', 'b '] >>> '

[issue1722225] Build on QNX

2007-09-18 Thread Vladimir Konjkov
Vladimir Konjkov added the comment: addition TCGETA is a constant. That's right! under QNX4 TCGETA defined as MACRO in . That's right! in Modules/termios.c there's #include That's right too! What's problem after all? Problem is that MACRO definition of TCGETA need sizeof(struct termio), that's (

[issue971965] urllib2 raises exception with non-200 success codes.

2007-09-18 Thread Georg Brandl
Changes by Georg Brandl: -- resolution: -> duplicate status: open -> closed superseder: -> urllib* 20x responses not OK? Tracker <[EMAIL PROTECTED]> _

[issue1135] xview/yview of Tix.Grid is broken

2007-09-18 Thread Georg Brandl
Georg Brandl added the comment: IMO the patch is not complete, the xview method should rather be implemented like these in Tkinter.py. Assigning to Martin. -- assignee: -> loewis nosy: +georg.brandl, loewis __ Tracker <[EMAIL PROTECTED]>

[issue1169] Option -OO doesn't remove docstrings from functions

2007-09-18 Thread Georg Brandl
Georg Brandl added the comment: Fixed in rev. 58204, 58205 (2.5). -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __