[issue10870] Last line of argparse code samples can not be read on Windows
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 making the windows larger, but some examples in the documentation of the argparse are so wide that even in full screen, the window is not wide enough. I attached a screen capture to illustrate the issue (taken from section 14.4.3.3. nargs of Python 3.2b2). This is even worth with one-liner code sample when not browsing full screen (e.g. with the index on the side). Environment: Windows XP SP3, resolution: 1024x768, python 3.2b2. I don't know if it is possible, but adding a blank line at the end of code sample that are more than 80 characters wide would likely work-around the issue. -- assignee: d...@python components: Documentation files: argparse-codesample-unreadable.png messages: 125832 nosy: blep, d...@python priority: normal severity: normal status: open title: Last line of argparse code samples can not be read on Windows versions: Python 3.2 Added file: http://bugs.python.org/file20321/argparse-codesample-unreadable.png ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10870 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print utf8 (Py30a2)
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 tests with WriteConsoleOutputW. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10871] argparse example use file instead of open
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 temp.txt'.split()) Namespace(bar=open file 'temp.txt', mode 'r' at 0x..., foo=2) The built-in file used for argument 'bar' no longer exists in python 3.2. -- assignee: d...@python components: Documentation messages: 125834 nosy: blep, d...@python priority: normal severity: normal status: open title: argparse example use file instead of open versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10870] Last line of argparse code samples can not be read on Windows
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 rep...@bugs.python.org http://bugs.python.org/issue10870 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10872] Add mode to TextIOWrapper repr
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: Add mode to TextIOWrapper repr versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10872 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10871] argparse example use file instead of open
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10873] String formatting example invalid
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 knights who say Ni! Now, all brackets have to have a numeric or keyword argument. -- assignee: d...@python components: Documentation messages: 125838 nosy: doagie, d...@python priority: normal severity: normal status: open title: String formatting example invalid type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10873 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0
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), an AttributeException is raised. Should we have a more specific exception ? If false, the stream's method read() is supposed to return bytes ; an exception will be raised if it's not the case The encoding used to decode keys and values to strings is the attribute encoding of the stream, or latin-1 if this attribute doesn't exist Besides FieldStorage, I modified the parse() function at module level, but not parse_multipart (should it be kept at all ?) I leave the code to set sys.stdin to binary on Windows for the moment, but it can be removed in the final version thanks to Victor's fix of issue 10841 I modified cgi_test.py and test_cgi.py (sent in a next post), all the tests pass with the revised version of cgi.py on my PC While testing the patch I found other related things that I suppose should be changed (but need to check again - perhaps there are already tracker issues about them) : - in http.server.CGIHTPPRequestHandler, the -u option should be removed (line 1123) - on Windows, http.server.SimpleHTTPRequestHandler.list_directory() fails with Arabic characters (mbcs encoding fails, utf-8 works) - in urllib.parse.unquote(), default encoding should be latin-1, not utf-8 (submitting a simple form with French accented characters raises a UnicodeEncodeError when trying to print the submitted value) -- Added file: http://bugs.python.org/file20322/cgi_diff_20110109.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10833] Replace %.100s by %s in PyErr_Format(): the arbitrary limit of 500 bytes is outdated
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 crash after the buffer overflow on the string formatting, but it may quickly crash on another instruction. I don't think that you should limit the error message length to protect Python against buffer overflow. A buffer overflow can corrupt everything, and we should fix the buffer overflow instead :-) you will need all help you can get to find the bug. You have debuggers like gdb for that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10873] String formatting example invalid
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10873] String formatting example invalid
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: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10873 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue410547] os.statvfs support for Windows
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 == win32: sizes = win32file.GetDiskFreeSpace(path) return sizes[0] * sizes[1] * sizes[2] else: status = os.statvfs(path) return status[statvfs.F_BAVAIL] * status[statvfs.F_FRSIZE] def get_partition_size(path = '.'): Determine the total space in bytes for the given path. if sys.platform == win32: sizes = win32file.GetDiskFreeSpace(path) return sizes[0] * sizes[1] * sizes[3] else: status = os.statvfs(path) return status[statvfs.F_BLOCKS] * status[statvfs.F_FRSIZE] -- versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue410547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10872] Add mode to TextIOWrapper repr
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9504] signal.signal/signal.alarm not working as expected
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 before anything could be read, it would return EINTR and the handler would get executed immediately. Anyone wants to propose a patch + tests? -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9504 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9262] IDLE: Use tabbed shell and edit windows
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 list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10874] test_urllib2 shouldn't use is operator for comparing strings
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 shouldn't use is operator for comparing strings versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file20324/test_urllib2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10874 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8954] wininst regression: errors when building on linux
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? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8954 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5871] email.header.Header too lax with embeded newlines
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8871] --user-access-control=auto has no effect
Changes by anatoly techtonik techto...@gmail.com: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8871] --user-access-control=auto has no effect
Changes by anatoly techtonik techto...@gmail.com: -- resolution: invalid - out of date ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8954] wininst regression: errors when building on linux
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8954] wininst regression: errors when building on linux
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10874] test_urllib2 shouldn't use is operator for comparing strings
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10874] test_urllib2 shouldn't use is operator for comparing strings
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10874] test_urllib2 shouldn't use is operator for comparing strings
É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 deprecated. Senthil, I think a little cleanup is needed. -- assignee: - orsenthil nosy: +eric.araujo, orsenthil versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10874 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10874] test_urllib2 shouldn't use is operator for comparing strings
Ł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 rep...@bugs.python.org http://bugs.python.org/issue10874 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9504] signal.signal/signal.alarm not working as expected
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 /', which outputs a lot of data). If read() were interrupted before anything could be read, it would return EINTR and the handler would get executed immediately. Anyone wants to propose a patch + tests? 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 easier to interrupt a script doing I/O with a KeyboardInterrupt (SIGINT). If nothing seems blatantly wrong about this patch, I will go ahead and try to write some tests for this. Charles -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9504 ___ -- keywords: +patch Added file: http://bugs.python.org/file20327/io_signal.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9504 ___diff -urp A/Modules/_io/bufferedio.c B/Modules/_io/bufferedio.c --- A/Modules/_io/bufferedio.c 2010-12-21 22:26:09.0 +0100 +++ B/Modules/_io/bufferedio.c 2011-01-09 18:46:01.0 +0100 @@ -1405,6 +1405,10 @@ _bufferedreader_read_generic(buffered *s } remaining -= r; written += r; +/* check pending signals */ +if (PyErr_CheckSignals() 0) { +goto error; +} } assert(remaining = self-buffer_size); self-pos = 0; @@ -1442,6 +1446,10 @@ _bufferedreader_read_generic(buffered *s } if (remaining == 0) break; +/* check pending signals */ +if (PyErr_CheckSignals() 0) { +goto error; +} } return res; diff -urp A/Modules/_io/fileio.c B/Modules/_io/fileio.c --- A/Modules/_io/fileio.c 2010-11-26 09:52:36.0 +0100 +++ B/Modules/_io/fileio.c 2011-01-09 19:26:52.0 +0100 @@ -583,6 +583,11 @@ fileio_readall(fileio *self) return NULL; } total += n; +/* check pending signals */ +if (PyErr_CheckSignals() 0) { +Py_DECREF(result); +return NULL; +} } if (PyBytes_GET_SIZE(result) total) { diff -urp A/Modules/_io/iobase.c B/Modules/_io/iobase.c --- A/Modules/_io/iobase.c 2010-09-14 20:53:07.0 +0200 +++ B/Modules/_io/iobase.c 2011-01-09 19:27:15.0 +0100 @@ -831,6 +831,11 @@ rawiobase_readall(PyObject *self, PyObje Py_DECREF(chunks); return NULL; } +/* check pending signals */ +if (PyErr_CheckSignals() 0) { +Py_DECREF(chunks); +return NULL; +} } result = _PyBytes_Join(_PyIO_empty_bytes, chunks); Py_DECREF(chunks); ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print utf8 (Py30a2)
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 rendeded by the font? Yes, characters not encodable to the code page do work (as confirmed by Glenn Linderman, since code page 437 does not include Cyrillic). Characters that cannot be rendered by the font print as missing-glyph boxes, as expected. They don't cause any other problem, and they can be cut-and-pasted to other Unicode-aware applications, showing up as the original characters. See msg120414 for my tests with WriteConsoleOutputW Even if it handled encoding correctly, WriteConsoleOutputW (http://msdn.microsoft.com/en-us/library/ms687404%28v=vs.85%29.aspx) would not be the right API to use in any case, because it prints to a rectangle of characters without scrolling. WriteConsoleW does scroll in the same way that printing to a console output stream normally would. (Redirection to a non-console stream can be detected and handled differently, as the code in unicode2.py does.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10872] Add mode to TextIOWrapper repr
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue410547] os.statvfs support for Windows
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 not sure it makes sense to provide an exact clone of os.statvfs, since some of the statvfs fields don't have equivalents that are obtainable by any Windows API as far as I know. What emwould/em make sense is a cross-platform way to get total disk space, and the space free for root/Administrator and for the current user. This would actually be somewhat easier to use on Unix as well. Anyway, here's some code for Windows that only uses ctypes (whichdir should be Unicode): from ctypes import WINFUNCTYPE, windll, POINTER, byref, c_ulonglong from ctypes.wintypes import BOOL, DWORD, LPCWSTR # http://msdn.microsoft.com/en-us/library/aa383742%28v=VS.85%29.aspx PULARGE_INTEGER = POINTER(c_ulonglong) # http://msdn.microsoft.com/en-us/library/aa364937%28VS.85%29.aspx GetDiskFreeSpaceExW = WINFUNCTYPE(BOOL, LPCWSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER)( (GetDiskFreeSpaceExW, windll.kernel32)) # http://msdn.microsoft.com/en-us/library/ms679360%28v=VS.85%29.aspx GetLastError = WINFUNCTYPE(DWORD)((GetLastError, windll.kernel32)) # (This might put up an error dialog unless # SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX) # has been called.) n_free_for_user = c_ulonglong(0) n_total = c_ulonglong(0) n_free = c_ulonglong(0) retval = GetDiskFreeSpaceExW(whichdir, byref(n_free_for_user), byref(n_total), byref(n_free)) if retval == 0: raise OSError(Windows error %d attempting to get disk statistics for %r % (GetLastError(), whichdir)) free_for_user = n_free_for_user.value total = n_total.value free = n_free.value -- versions: +Python 2.7, Python 3.3 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue410547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10875] Update Regular Expression HOWTO
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 of Python came with the regex module, which provided Emacs-style patterns. The regex module was removed completely in Python 2.5. might be eliminated in 3.x, or at least the irrelevant-for-py3 reference to regex. This is a policy decision. 2. Performing matches: If you have Tkinter available, you may also want to look at Tools/scripts/redemo.py, Change 'Tkinter' to 'tkinter' and make it a module reference. In link, change 'scripts' to 'demo' as redemo.py got moved. Phil Schwartz’s Kodos is also an interactive tool for developing and testing RE patterns. 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.) Python 2.2.2 (#1, Feb 10 2003, 12:57:01) delete _sre.SRE_Match object at 80c4f68 This is correctly updated (for late 2.x and 3.x) re.MatchObject instance at 80c9650 (7 like this) Globally replace 're.MatchObject instance' with '_sre.SRE_Match object' 3. Footnote [1] Introduced in Python 2.2.2. remove for 3.x here and wherever footnote reference is in the text. 4. Not Using re.VERBOSE This section is about *using* re.VERBOSE and the benefit thereof, not about not using it. I recommend deleting 'Not' as it gives the impression that the section is a warning about not using, the opposite of the intent. 5. Code example output and doctest: I ran doctest.testfile(C:/programs/PyDev/py32/Doc/howto/regex.rst, module_relative = False) After the 're...' to '_sre...' substitution above, all 11 failures would be due to 'at 0x###' address mismatches. I believe changing all 11 addresses to '0x...' (I took this from the doctest doc) would both fix the failures and remove irrelevant detail for human readers. The other 87 examples all passed ;-!. Is there any current doctest-related markup that should be added? -- assignee: d...@python components: Documentation messages: 125855 nosy: akuchling, d...@python, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Update Regular Expression HOWTO versions: Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10875 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10872] Add mode to TextIOWrapper repr
Georg Brandl ge...@python.org added the comment: LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10872 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10872] Add mode to TextIOWrapper repr
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10872 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10875] Update Regular Expression HOWTO
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10875 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10875] Update Regular Expression HOWTO
É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 job of the Sphinx builder to add URIs in plaintext if the format does not have hyperlinks. -1 on cluttering the source and HTML output with duplicated links. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10875 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10225] Fix doctest runable examples in python manual
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 doctest comments like #doctest: +IGNORE_EXCEPTION_DETAIL ? doctest.testfile(C:/programs/PyDev/py32/Doc/howto/sorting.rst, module_relative = False) fails 23 of 37 attempts, so improvement is needed ;-). -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10225 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10875] Update Regular Expression HOWTO
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10875] Update Regular Expression HOWTO
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10875 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9504] signal.signal/signal.alarm not working as expected
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 bonus, it's also easier to interrupt a script doing I/O with a KeyboardInterrupt (SIGINT). If nothing seems blatantly wrong about this patch, I will go ahead and try to write some tests for this. A potential downside is that the bytes which have been read simply get lost. But since a signal can happen at any moment I guess nothing can be done to protect from it in the general case, anyway. As for the tests, the SignalsTest class in test_io.py is a natural recipient. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9504 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10873] String formatting example invalid
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 issue. -- nosy: +SilentGhost ___ Python tracker rep...@bugs.python.org http://bugs.python... -- Added file: http://bugs.python.org/file20330/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10873 ___pYes, apologies (I was using 2.6)./p pblockquote type=citeOn Jan 9, 2011 5:52 AM, quot;SilentGhostquot; lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt; wrote:brbrbr SilentGhost lt;a href=mailto:ghost@gmail.com;ghost@gmail.com/agt; added the comment:br br Works as advertised for me. Unless more information is added, it looks like an invalid issue.br br --br nosy: +SilentGhostbr pfont color=#500050 ___ Python tracker lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt; lt;a href=http://bugs.python.;http://bugs.python./a../font/p/blockquote/p ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10873] String formatting example invalid
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10875] Update Regular Expression HOWTO
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: http://bugs.python.org/file20331/regex.rst.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10875 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10875] Update Regular Expression HOWTO
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10875] Update Regular Expression HOWTO
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 Doc/library/re.rst May be the section could be shortened and linked to that RE Syntax section? there aren't any deeper links available unfortunately. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10875 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10876] Zipfile crashes when zip password is 610
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 extractall self.extract(zipinfo, path, pwd) File /usr/lib/python2.6/zipfile.py, line 926, in extract return self._extract_member(member, path, pwd) File /usr/lib/python2.6/zipfile.py, line 971, in _extract_member shutil.copyfileobj(source, target) File /usr/lib/python2.6/shutil.py, line 28, in copyfileobj buf = fsrc.read(length) File /usr/lib/python2.6/zipfile.py, line 612, in read newdata = self.dc.decompress(newdata) zlib.error: Error -3 while decompressing: invalid distance too far back -- components: Extension Modules messages: 125867 nosy: Kira.Kapoios priority: normal severity: normal status: open title: Zipfile crashes when zip password is 610 type: crash versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10876 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10875] Update Regular Expression HOWTO
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 be copied. Good enough for me at the moment but not terribly obvious. A possible separate issue. Unless A Kuchling says different, I would like to remove the version number. It implies to me that this doc is in pre-alpha condition and it is far beyond that. I see that the patch already does so. -:file:`Tools/scripts/redemo.py`, a demonstration program included with the +:file:`Tools/scripts/demo.py`, a demonstration program included with the should (currently) be +:file:`Tools/demo/redemo.py`, a demonstration program included with the Other than that, the patch looks good. Thanks. I am still thinking about Matching Characters. Once the patch is fixed with possible addition, a 2.7 version can easily be made be deleting the 3.x-specific deletions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10875 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10876] Zipfile crashes when zip password is set to 610
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10875] Update Regular Expression HOWTO
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 sequences refer the docs and carry on with ascii strings. Attached patch fixes path issue. -- Added file: http://bugs.python.org/file20332/regex.rst.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10875 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10875] Update Regular Expression HOWTO
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10116] Sporadic failures in test_urllibnet
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 (most recent call last): File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/test/test_urllibnet.py, line 97, in test_getcode open_url = urllib.request.FancyURLopener().open(URL) File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/urllib/request.py, line 1516, in open raise IOError('socket error', msg).with_traceback(sys.exc_info()[2]) File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/urllib/request.py, line 1512, in open return getattr(self, name)(url) File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/urllib/request.py, line 1684, in open_http return self._open_generic_http(http.client.HTTPConnection, url, data) File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/urllib/request.py, line 1664, in _open_generic_http http_conn.request(GET, selector, headers=headers) File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py, line 962, in request self._send_request(method, url, body, headers) File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py, line 1000, in _send_request self.endheaders(body) File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py, line 958, in endheaders self._send_output(message_body) File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py, line 803, in _send_output self.send(msg) File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py, line 741, in send self.connect() File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py, line 719, in connect self.timeout, self.source_address) File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/socket.py, line 398, in create_connection raise err File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/socket.py, line 389, in create_connection sock.connect(sa) IOError: [Errno socket error] [Errno 60] Operation timed out -- resolution: fixed - stage: patch review - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10116 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10876] Zipfile crashes when zip password is set to 610
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10876] Zipfile crashes when zip password is set to 610
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 zip's file name\n) diction=raw_input(Please input dictionary\n) found = False zipf = zipfile.ZipFile( zfile, 'r' ) f = open(diction, 'r') for line in f: pswd = line pswd = pswd[:-1] zipf.setpassword(pswd) try: zipf.extractall() found = True break except RuntimeError: continue zipf.close() First time I encountered the bug was when on my dictionary I had all the numbers from 000 to 999 and saw that it crashed at 610. Now it crashes at 844.Even when I do this import zipfile zfile=raw_input(Please input zip's file name\n) zipf = zipfile.ZipFile( zfile, 'r' ) zipf.setpassword('844') zipf.extractall() zipf.close() it crashes with the error in my first post. If this is any help, i'm using python 2.6.6 on linux and the number changed from 610 to 844 when I opened a new terminal window. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10876 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10876] Zipfile crashes when zip password is set to 610/844
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10876] Zipfile crashes when zip password is set to 610/844/numerous other numbers
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 numbers ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10876 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10875] Update Regular Expression HOWTO
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 subset of those available. The equivalent classes are for bytes patterns. For a complete list of sequences and expanded class definitions for Unicode string patterns, see the end of Regular Expression Syntax. (with section reference markup). Note to myself. /bytes/byte string/ for 2.7. While the changes all look innocuous to me with respect to building the docs, I am curious if you have tried to rebuild the HOWTO (if you have the tool chain, which I do not). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10875 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10877] Make Tools (and subdirs) a package (and subpackages)
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 to open an editor window and hit F5 to run. (On Windows, the Command Prompt window is so wretched that it is much easier to work and explore within a Python shell.) Can files like __init__.py be added to the repository just by adding them to a checked-out working copy? Would there be a reason to exclude any subdirectories (that have .py files)? Can this be done for 3.2? I see that things have already been moved around within Tools since b2. If there is a policy against this, perhaps Tools/README could mention it. In any case, This directory contains a number of Python programs that are useful should be edited to This directory contains a number of subdirectories with Python programs that are useful as *every* program has been put in a subdirectory, even if by itself. -- components: Demos and Tools messages: 125875 nosy: terry.reedy priority: normal severity: normal status: open title: Make Tools (and subdirs) a package (and subpackages) type: feature request versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10877 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10877] Make Tools (and subdirs) a package (and subpackages)
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 mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10877] Make Tools (and subdirs) a package (and subpackages)
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10877 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10875] Update Regular Expression HOWTO
É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 can be copied. Good enough for me at the moment but not terribly obvious. A possible separate issue. I would argue that this is a bug in the CHM viewers, not Python :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10875 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print utf8 (Py30a2)
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 include the equivalent of unicode2.py in all my Python programs, because right now, I'm including instructions for the use to (1) choose Lucida or Consolas font if they can't figure out any other font that gets rid of the square boxes (2) chcp 65001 (3) set PYTHONIOENCODING=UTF-8 Having this capability inside Python (or my programs) will enable me to eliminate two-thirds of the geeky instructions for my users. But it seems like a very appropriate capability to have within Python, especially Python 3.x with its preference and support Unicode in so many other ways. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10628] Typos in 3.2 what’s new
É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 fix, very minor typos, markup tweaks, and some rephrasing where the previous text was unclear to me. Of course, I am not a native speaker, so you’re welcome to take my proposals merely as indications of unclarity and rephrase otherwise or ignore them altogether. If that’s more convenient, I can make one patch for certain typos and fixes, one patch for minor nitpicks, and a list of unclear wording. -- resolution: fixed - stage: - patch review status: closed - open Added file: http://bugs.python.org/file20333/whatsnew-3.2-typos.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10628 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10628] Typos in 3.2 what’s new
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10858] Make source code links less prominent
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. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10858 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9196] Improve docs for string interpolation %s re Unicode strings
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. -- Added file: http://bugs.python.org/file20334/class_str_unicode_methods.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9196 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10628] Typos in 3.2 what’s new
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 http://bugs.python.org/issue10628 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10878] asyncore does not react properly on close()
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 time.time() = self.timeout: self.close() return True When running that code, it raises an exception: asyncore.loop(timeout=0.8) File /usr/lib/python2.6/asyncore.py, line 211, in loop poll_fun(timeout) File /usr/lib/python2.6/asyncore.py, line 144, in poll raise File /usr/lib/python2.6/asyncore.py, line 141, in poll r, w, e = select.select(r, w, e, timeout) select.error: (9, 'Bad file descriptor') Although del_channel is executed properly and the socket is removed from the map, the poll function is not updated with that info and continues to keep the socket into the r,w,e. -- components: Library (Lib) messages: 125882 nosy: tgeorgiev priority: normal severity: normal status: open title: asyncore does not react properly on close() versions: Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10878 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10878] asyncore does not react properly on close()
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: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10878 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com