[issue10870] Last line of argparse code samples can not be read on Windows

2011-01-09 Thread Baptiste Lepilleur
New submission from Baptiste Lepilleur b...@users.sourceforge.net: When the code samples from the CHM documentation are displayed, if the lines are too long, a scroll bar is added at the bottom which prevents reading the last line of the code sample. Usually this can be worked-around by

[issue1602] windows console doesn't print utf8 (Py30a2)

2011-01-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: It is certainly possible to write Unicode to the console successfully using WriteConsoleW Did you tried with characters not encodable to the code page and with character that cannot be rendeded by the font? See msg120414 for my

[issue10871] argparse example use file instead of open

2011-01-09 Thread Baptiste Lepilleur
New submission from Baptiste Lepilleur b...@users.sourceforge.net: In section 14.4.3.6. type of the argparse module, the following code sample is given: parser = argparse.ArgumentParser() parser.add_argument('foo', type=int) parser.add_argument('bar', type=file) parser.parse_args('2

[issue10870] Last line of argparse code samples can not be read on Windows

2011-01-09 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I've shortened the examples in r87890. I'll also investigate why the scrollbar isn't shown below the code. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker

[issue10872] Add mode to TextIOWrapper repr

2011-01-09 Thread Georg Brandl
New submission from Georg Brandl ge...@python.org: The old file type had its mode in the repr(), which I think was useful; TextIOWrapper doesn't. Can we add it back? -- assignee: pitrou messages: 125836 nosy: georg.brandl, pitrou priority: normal severity: normal status: open title:

[issue10871] argparse example use file instead of open

2011-01-09 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, this is now fixed in r87891. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10871

[issue10873] String formatting example invalid

2011-01-09 Thread Ashwin Purohit
New submission from Ashwin Purohit puro...@gmail.com: Your example on page http://docs.python.org/tutorial/inputoutput.html is outdated and won't work in Python 2.7: Basic usage of the str.format() method looks like this: print 'We are the {} who say {}!'.format('knights', 'Ni') We are the

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-09 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: Here is the diff file for the revised version of cgi.py FieldStorage tests if the stream is an instance of (a subclass of) io.TextIOBase. If true, data is read from its attribute buffer ; if it hasn't one (eg for StringIO instances),

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-09 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: cgi tests -- Added file: http://bugs.python.org/file20323/cgi_tests.zip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue10833] Replace %.100s by %s in PyErr_Format(): the arbitrary limit of 500 bytes is outdated

2011-01-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I am concerned about conditions that are impossible in a valid program. However, if you have a buffer overflow that trashes your tp_name pointer so that it suddenly resolves to a binary code section, Yes, %.100s may avoid a

[issue10873] String formatting example invalid

2011-01-09 Thread SilentGhost
SilentGhost ghost@gmail.com added the comment: Works as advertised for me. Unless more information is added, it looks like an invalid issue. -- nosy: +SilentGhost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10873

[issue10873] String formatting example invalid

2011-01-09 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: This feature was added in 2.7 (and 3.1, I think). If the numeric indices are not specified, they take the args in order. -- assignee: d...@python - eric.smith nosy: +eric.smith resolution: - invalid stage: - committed/rejected status:

[issue410547] os.statvfs support for Windows

2011-01-09 Thread Carsten Koch
Carsten Koch carstenk...@users.sourceforge.net added the comment: Here is what I am doing now: ... if sys.platform == win32: import win32file else: import statvfs ... def get_free_space(path = '.'): Determine the free space in bytes for the given path. if sys.platform

[issue10872] Add mode to TextIOWrapper repr

2011-01-09 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- components: +IO nosy: +amaury.forgeotdarc, benjamin.peterson type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10872 ___

[issue9504] signal.signal/signal.alarm not working as expected

2011-01-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Charles-François' analysis seems to be right. Note that the actual issue here is that read() always succeeds, returning a partial result (because you're executing a command, 'find /', which outputs a lot of data). If read() were interrupted

[issue9262] IDLE: Use tabbed shell and edit windows

2011-01-09 Thread Roger Serwy
Changes by Roger Serwy roger.se...@gmail.com: -- nosy: +serwy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9262 ___ ___ Python-bugs-list mailing

[issue10874] test_urllib2 shouldn't use is operator for comparing strings

2011-01-09 Thread Andreas Stührk
New submission from Andreas Stührk andy-pyt...@hammerhartes.de: See the attached patch (applies to 2.7 and 3.2). -- components: Tests files: test_urllib2.patch keywords: patch messages: 125846 nosy: Trundle, lukasz.langa priority: normal severity: normal status: open title: test_urllib2

[issue8954] wininst regression: errors when building on linux

2011-01-09 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: Fixed Ezio comments at http://codereview.appspot.com/1774043 Eric, if I understand you correctly, the mbcs issue you're experiencing is unrelated to the patch. What else do you need? -- ___

[issue5871] email.header.Header too lax with embeded newlines

2011-01-09 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5871 ___

[issue8871] --user-access-control=auto has no effect

2011-01-09 Thread anatoly techtonik
Changes by anatoly techtonik techto...@gmail.com: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8871 ___

[issue8871] --user-access-control=auto has no effect

2011-01-09 Thread anatoly techtonik
Changes by anatoly techtonik techto...@gmail.com: -- resolution: invalid - out of date ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8871 ___ ___

[issue8954] wininst regression: errors when building on linux

2011-01-09 Thread anatoly techtonik
Changes by anatoly techtonik techto...@gmail.com: Added file: http://bugs.python.org/file20325/suffix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8954 ___

[issue8954] wininst regression: errors when building on linux

2011-01-09 Thread anatoly techtonik
Changes by anatoly techtonik techto...@gmail.com: Removed file: http://bugs.python.org/file17961/suffix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8954 ___

[issue10874] test_urllib2 shouldn't use is operator for comparing strings

2011-01-09 Thread SilentGhost
SilentGhost ghost@gmail.com added the comment: Shouldn't that be: self.assertIs(req.type == ftp, ftp) ? -- nosy: +SilentGhost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10874 ___

[issue10874] test_urllib2 shouldn't use is operator for comparing strings

2011-01-09 Thread SilentGhost
Changes by SilentGhost ghost@gmail.com: Added file: http://bugs.python.org/file20326/test_urllib2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10874 ___

[issue10874] test_urllib2 shouldn't use is operator for comparing strings

2011-01-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Actually, this block of tests may be outdated. Reading the comment above the list of (URIs, is_ftp) doubles makes you see that it was testing the automatic use of FTP in some file: URIs, a very dubious behavior that is now removed or

[issue10874] test_urllib2 shouldn't use is operator for comparing strings

2011-01-09 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: Committed for py3k in r87895. Yup, could have been assertIs as well. The reason for the change is that is failed on PyPy. This should be backported to Python 2.7 as well. -- ___ Python tracker

[issue9504] signal.signal/signal.alarm not working as expected

2011-01-09 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: Antoine Pitrou pit...@free.fr added the comment: Charles-François' analysis seems to be right. Note that the actual issue here is that read() always succeeds, returning a partial result (because you're executing a command, 'find

[issue1602] windows console doesn't print utf8 (Py30a2)

2011-01-09 Thread David-Sarah Hopwood
David-Sarah Hopwood david-sa...@jacaranda.org added the comment: haypo wrote: davidsarah wrote: It is certainly possible to write Unicode to the console successfully using WriteConsoleW Did you tried with characters not encodable to the code page and with character that cannot be

[issue10872] Add mode to TextIOWrapper repr

2011-01-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file20328/textiorepr.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10872

[issue410547] os.statvfs support for Windows

2011-01-09 Thread David-Sarah Hopwood
David-Sarah Hopwood david-sa...@jacaranda.org added the comment: Don't use win32file.GetDiskFreeSpace; the underlying Windows API only supports drives up to 2 GB (http://blogs.msdn.com/b/oldnewthing/archive/2007/11/01/5807020.aspx). Use GetFreeDiskSpaceEx, as the code I linked to does. I'm

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread Terry J. Reedy
New submission from Terry J. Reedy tjre...@udel.edu: 0. Does 'Release 0.05' at the top have any useful current meaning? or could it be deleted? 1. Introduction: The history paragraph The re module was added in Python 1.5, and provides Perl-style regular expression patterns. Earlier versions

[issue10872] Add mode to TextIOWrapper repr

2011-01-09 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10872 ___ ___ Python-bugs-list mailing

[issue10872] Add mode to TextIOWrapper repr

2011-01-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Committed in r87897. Left open for backport. -- assignee: pitrou - resolution: - accepted stage: - committed/rejected type: feature request - behavior versions: +Python 2.7, Python 3.1 -Python 3.2

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Your points 1-5 all sound valid to me. Would you like to do make a patch? I don't know what to do about the release number. Probably doesn't hurt anyone to keep it. -- nosy: +georg.brandl ___

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Good points overall. The only subpoint I disagree with is this one: “Add the url '(http://kodos.sourceforge.net/)' to the text so that Windows help users can copy and paste it into a browser. (This should be a general policy.)” IMO, it’s the

[issue10225] Fix doctest runable examples in python manual

2011-01-09 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: As I understand this, your patch would fix numerous errors in the docs, but has not been applied. It would be nice to get the fixes into 3.2. What sort of feedback do you want? Proofreading of text? Recheck of doctest? Does sphinx suppress

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Oh right, I misread that one. Can't Windows help users right-click and select Copy URL? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10875

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread SilentGhost
SilentGhost ghost@gmail.com added the comment: Here is the patch implementing all but the url suggestion. Doctest still has 11 failures (changing to '0x...' didn't help). -- keywords: +patch nosy: +SilentGhost Added file: http://bugs.python.org/file20329/regex.rst.diff

[issue9504] signal.signal/signal.alarm not working as expected

2011-01-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Attached is a tentative patch: it checks for pending signals inside _bufferedreader_read_generic, fileio_readall, and rawiobase_readall. I tested quickly on regular files and on pipes, and handlers are now called on time. As a an obvious

[issue10873] String formatting example invalid

2011-01-09 Thread Ashwin Purohit
Ashwin Purohit puro...@gmail.com added the comment: Yes, apologies (I was using 2.6). On Jan 9, 2011 5:52 AM, SilentGhost rep...@bugs.python.org wrote: SilentGhost ghost@gmail.com added the comment: Works as advertised for me. Unless more information is added, it looks like an invalid

[issue10873] String formatting example invalid

2011-01-09 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file20330/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10873 ___

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread SilentGhost
SilentGhost ghost@gmail.com added the comment: A few bits and pieces fixed compared to the previous patch. doctest.testfile(/home/mischa/pydev/Doc/howto/regex.rst, module_relative = False, optionflags=doctest.ELLIPSIS) TestResults(failed=0, attempted=98) -- Added file:

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread SilentGhost
Changes by SilentGhost ghost@gmail.com: Removed file: http://bugs.python.org/file20329/regex.rst.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10875 ___

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread SilentGhost
SilentGhost ghost@gmail.com added the comment: It seems that the special sequences description in Matching Characters section need to be updated to incorporate information on unicode and bytes. I don't think, however, that it's a good idea just to copy that information from the

[issue10876] Zipfile crashes when zip password is 610

2011-01-09 Thread Kira Erethon
New submission from Kira Erethon shinjieret...@gmail.com: Was playing around with Zipfile and passwords in zip files and I noticed that when the password on zipfile.setpassword(pwd) was set 610, the program crashed with the following errors File /usr/lib/python2.6/zipfile.py, line 938, in

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I agree that the .rst should not have two copies and that any windows.chm specific fixup should be in the tool. Right now, right clicking gives a context menu with one item: Properties. Clicking that brings up a dialog box with a url that can

[issue10876] Zipfile crashes when zip password is set to 610

2011-01-09 Thread Kira Erethon
Changes by Kira Erethon shinjieret...@gmail.com: -- title: Zipfile crashes when zip password is 610 - Zipfile crashes when zip password is set to 610 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10876

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread SilentGhost
SilentGhost ghost@gmail.com added the comment: I don't know whether it would be easy to strip down py3k version to 2.7 version. Seeing how it's just a basic introduction, I would think that a single statement re unicode support might be sufficient. For exhaustive description of special

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread SilentGhost
Changes by SilentGhost ghost@gmail.com: Removed file: http://bugs.python.org/file20331/regex.rst.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10875 ___

[issue10116] Sporadic failures in test_urllibnet

2011-01-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: There are still sporadic failures: http://www.python.org/dev/buildbot/all/builders/AMD64%20Leopard%203.x/builds/684/steps/test/logs/stdio Of course, it seems to be because of stupid urllib wrapping the socket.error inside an IOError: Traceback

[issue10876] Zipfile crashes when zip password is set to 610

2011-01-09 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: What do you mean by is set to 610? Can you show us the code that caused this error? -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10876

[issue10876] Zipfile crashes when zip password is set to 610

2011-01-09 Thread Kira Erethon
Kira Erethon shinjieret...@gmail.com added the comment: Ok, I tried recreating the bug and found out that I couldn't. Originally this happened when I tried to find the password of a zip file through a dictionary attack. The code I used is this: import zipfile zfile=raw_input(Please input

[issue10876] Zipfile crashes when zip password is set to 610/844

2011-01-09 Thread Kira Erethon
Changes by Kira Erethon shinjieret...@gmail.com: -- title: Zipfile crashes when zip password is set to 610 - Zipfile crashes when zip password is set to 610/844 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10876

[issue10876] Zipfile crashes when zip password is set to 610/844/numerous other numbers

2011-01-09 Thread Kira Erethon
Kira Erethon shinjieret...@gmail.com added the comment: Update, tried this in another machine of mine, same exact code and this time it crashes at 68 -- title: Zipfile crashes when zip password is set to 610/844 - Zipfile crashes when zip password is set to 610/844/numerous other

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Since I think I know how to do it, easily, I will try to derive the 2.7 patch. In Matching Characters, I think The following predefined special sequences are available: should be expanded to The following predefined special sequences are a

[issue10877] Make Tools (and subdirs) a package (and subpackages)

2011-01-09 Thread Terry J. Reedy
New submission from Terry J. Reedy tjre...@udel.edu: Given that sys.path includes .../python32 adding the requisite empty __init__.py to Tools/ and, for instance, demo/ would allow from Tools.demo.redemo import main; main() to work (I tried it with Scripts instead of demo in b2). Now I have

[issue10877] Make Tools (and subdirs) a package (and subpackages)

2011-01-09 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10877 ___ ___ Python-bugs-list

[issue10877] Make Tools (and subdirs) a package (and subpackages)

2011-01-09 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10877 ___ ___ Python-bugs-list

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I agree that the .rst should not have two copies and that any windows.chm specific fixup should be in the tool. Right now, right clicking gives a context menu with one item: Properties. Clicking that brings up a dialog box with a url that

[issue1602] windows console doesn't print utf8 (Py30a2)

2011-01-09 Thread Glenn Linderman
Glenn Linderman v+pyt...@g.nevcal.com added the comment: I would certainly be delighted if someone would reopen this issue, and figure out how to translate unicode2.py to Python internals so that Python's console I/O on Windows would support Unicode out of the box. Otherwise, I'll have to

[issue10628] Typos in 3.2 what’s new

2011-01-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I collected typos instead of replying to python-checkins notifications, so as not to disturb Raymond’s writing process. Now that the file is nearly complete and 3.2rc at hand, here is my updated patch. It mixes real typos, one Python syntax

[issue10628] Typos in 3.2 what’s new

2011-01-09 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file19942/whatsnew-3.2-typos.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10628 ___

[issue10858] Make source code links less prominent

2011-01-09 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Removed the wordy and bright yellow boxes. Replace with single source link just below the section heading. Style modeled after that used in the Go language docs http://golang.org/pkg/container/heap/ See r87898. --

[issue9196] Improve docs for string interpolation %s re Unicode strings

2011-01-09 Thread Craig McQueen
Craig McQueen pyt...@craig.mcqueen.id.au added the comment: I'm attaching a file that I used (in Python 2.x). It's a little rough--I manually commented and uncommented various lines to see what would change under various circumstances. But at least you should be able to see what I was doing.

[issue10628] Typos in 3.2 what’s new

2011-01-09 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Fixed in r87899. Thanks for the patch and attention to detail. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue10878] asyncore does not react properly on close()

2011-01-09 Thread Teodor Georgiev
New submission from Teodor Georgiev lv_tok...@yahoo.com: I am trying to add a simple timer to each created socket and destroy it once the timer expires: class client(asyncore.dispatcher): def __init__(self,host): ... self.timeout = time.time() + 5 def readable(self): if

[issue10878] asyncore does not react properly on close()

2011-01-09 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Problem is you have to return False right after close(). There's an open issue to add a scheduler to asyncore: http://bugs.python.org/issue1641 Closing this out as invalid. -- nosy: +giampaolo.rodola resolution: - invalid status: