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

2011-01-09 Thread Giampaolo Rodola'
Giampaolo Rodola' 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: open -> closed __

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

2011-01-09 Thread Teodor Georgiev
New submission from Teodor Georgiev : 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 time.time() >= self

[issue10628] Typos in 3.2 what’s new

2011-01-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: Fixed in r87899. Thanks for the patch and attention to detail. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

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

2011-01-09 Thread Craig McQueen
Craig McQueen 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. -- Added file: htt

[issue10858] Make source code links less prominent

2011-01-09 Thread Raymond Hettinger
Raymond Hettinger 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. -- resolution: -> fixed status: open

[issue10628] Typos in 3.2 what’s new

2011-01-09 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file19942/whatsnew-3.2-typos.diff ___ Python tracker ___ ___ Python-bugs-list ma

[issue10628] Typos in 3.2 what’s new

2011-01-09 Thread Éric Araujo
Éric Araujo 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 fix, very minor typ

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

2011-01-09 Thread Glenn Linderman
Glenn Linderman 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 include the equivalent

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread Éric Araujo
Éric Araujo 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 be copied.

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

2011-01-09 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

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

2011-01-09 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

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

2011-01-09 Thread Terry J. Reedy
New submission from Terry J. Reedy : 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 to open an

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread Terry J. Reedy
Terry J. Reedy 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 subset of those

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

2011-01-09 Thread Kira Erethon
Kira Erethon 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 numbers __

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

2011-01-09 Thread Kira Erethon
Changes by Kira Erethon : -- title: Zipfile crashes when zip password is set to 610 -> Zipfile crashes when zip password is set to 610/844 ___ Python tracker ___ ___

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

2011-01-09 Thread Kira Erethon
Kira Erethon 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 zip's file name\n") dictio

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

2011-01-09 Thread Eric Smith
Eric Smith 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 ___

[issue10116] Sporadic failures in test_urllibnet

2011-01-09 Thread Antoine Pitrou
Antoine Pitrou 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 (most recent c

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread SilentGhost
Changes by SilentGhost : Removed file: http://bugs.python.org/file20331/regex.rst.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread SilentGhost
SilentGhost 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 sequences refer the do

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

2011-01-09 Thread Kira Erethon
Changes by Kira Erethon : -- title: Zipfile crashes when zip password is 610 -> Zipfile crashes when zip password is set to 610 ___ Python tracker ___ __

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread Terry J. Reedy
Terry J. Reedy 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 be copied. Good

[issue10876] Zipfile crashes when zip password is 610

2011-01-09 Thread Kira Erethon
New submission from Kira Erethon : 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 extractall self.ext

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread SilentGhost
SilentGhost 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 Doc/library/re.rst May be the

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread SilentGhost
Changes by SilentGhost : Removed file: http://bugs.python.org/file20329/regex.rst.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread SilentGhost
SilentGhost 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: http://bugs.python.or

[issue10873] String formatting example invalid

2011-01-09 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file20330/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue10873] String formatting example invalid

2011-01-09 Thread Ashwin Purohit
Ashwin Purohit added the comment: Yes, apologies (I was using 2.6). On Jan 9, 2011 5:52 AM, "SilentGhost" wrote: SilentGhost added the comment: Works as advertised for me. Unless more information is added, it looks like an invalid issue. -- nosy: +SilentGhost _

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

2011-01-09 Thread Antoine Pitrou
Antoine Pitrou 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 bonus, it's also

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread SilentGhost
SilentGhost 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 ___

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread Georg Brandl
Georg Brandl added the comment: Oh right, I misread that one. Can't Windows help users right-click and select "Copy URL"? -- ___ Python tracker ___ ___

[issue10225] Fix doctest runable examples in python manual

2011-01-09 Thread Terry J. Reedy
Terry J. Reedy 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 doctest comments li

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread Éric Araujo
Éric Araujo 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 job of the Sphinx

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread Georg Brandl
Georg Brandl 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 ___ Python tracker

[issue10872] Add mode to TextIOWrapper repr

2011-01-09 Thread Antoine Pitrou
Antoine Pitrou 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 ___ Python t

[issue10872] Add mode to TextIOWrapper repr

2011-01-09 Thread Georg Brandl
Georg Brandl added the comment: LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue10875] Update Regular Expression HOWTO

2011-01-09 Thread Terry J. Reedy
New submission from Terry J. Reedy : 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 of Python came wi

[issue410547] os.statvfs support for Windows

2011-01-09 Thread David-Sarah Hopwood
David-Sarah Hopwood 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 not sure it makes sense to

[issue10872] Add mode to TextIOWrapper repr

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

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

2011-01-09 Thread David-Sarah Hopwood
David-Sarah Hopwood 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 rendeded by the font? Ye

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

2011-01-09 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: > Antoine Pitrou 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 o

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

2011-01-09 Thread Łukasz Langa
Łukasz Langa 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

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

2011-01-09 Thread Éric Araujo
Éric Araujo 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 deprecated. Senthil, I thi

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

2011-01-09 Thread SilentGhost
Changes by SilentGhost : Added file: http://bugs.python.org/file20326/test_urllib2.diff ___ Python tracker ___ ___ Python-bugs-list mailing li

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

2011-01-09 Thread SilentGhost
SilentGhost added the comment: Shouldn't that be: self.assertIs(req.type == "ftp", ftp) ? -- nosy: +SilentGhost ___ Python tracker ___

[issue8954] wininst regression: errors when building on linux

2011-01-09 Thread anatoly techtonik
Changes by anatoly techtonik : Removed file: http://bugs.python.org/file17961/suffix.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue8954] wininst regression: errors when building on linux

2011-01-09 Thread anatoly techtonik
Changes by anatoly techtonik : Added file: http://bugs.python.org/file20325/suffix.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

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

2011-01-09 Thread anatoly techtonik
Changes by anatoly techtonik : -- resolution: invalid -> out of date ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

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

2011-01-09 Thread anatoly techtonik
Changes by anatoly techtonik : -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing li

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

2011-01-09 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue8954] wininst regression: errors when building on linux

2011-01-09 Thread anatoly techtonik
anatoly techtonik 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? -- ___ Python tracker

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

2011-01-09 Thread Andreas Stührk
New submission from Andreas Stührk : 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 shouldn't use is operator f

[issue9262] IDLE: Use tabbed shell and edit windows

2011-01-09 Thread Roger Serwy
Changes by Roger Serwy : -- nosy: +serwy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

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

2011-01-09 Thread Antoine Pitrou
Antoine Pitrou 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 before anything co

[issue10872] Add mode to TextIOWrapper repr

2011-01-09 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +IO nosy: +amaury.forgeotdarc, benjamin.peterson type: -> feature request ___ Python tracker ___ _

[issue410547] os.statvfs support for Windows

2011-01-09 Thread Carsten Koch
Carsten Koch 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 == "win32": sizes = w

[issue10873] String formatting example invalid

2011-01-09 Thread Eric Smith
Eric Smith 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: open -> closed

[issue10873] String formatting example invalid

2011-01-09 Thread SilentGhost
SilentGhost added the comment: Works as advertised for me. Unless more information is added, it looks like an invalid issue. -- nosy: +SilentGhost ___ Python tracker ___ __

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

2011-01-09 Thread STINNER Victor
STINNER Victor 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 crash after the buffer overflo

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

2011-01-09 Thread Pierre Quentel
Pierre Quentel added the comment: cgi tests -- Added file: http://bugs.python.org/file20323/cgi_tests.zip ___ Python tracker ___ ___ P

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

2011-01-09 Thread Pierre Quentel
Pierre Quentel 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), an AttributeException is

[issue10873] String formatting example invalid

2011-01-09 Thread Ashwin Purohit
New submission from Ashwin Purohit : 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 knights who sa

[issue10871] argparse example use "file" instead of "open"

2011-01-09 Thread Georg Brandl
Georg Brandl added the comment: Thanks, this is now fixed in r87891. -- 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 : 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: Add mode to TextIO

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

2011-01-09 Thread Georg Brandl
Georg Brandl 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

[issue10871] argparse example use "file" instead of "open"

2011-01-09 Thread Baptiste Lepilleur
New submission from Baptiste Lepilleur : 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 temp.txt'.split())

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

2011-01-09 Thread STINNER Victor
STINNER Victor 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 tests with WriteConsoleOut

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

2011-01-09 Thread Baptiste Lepilleur
New submission from Baptiste Lepilleur : 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 making the windows larger, but s