From report at bugs.python.org Mon Nov 1 00:11:18 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 31 Oct 2010 23:11:18 +0000 Subject: [issue10254] unicodedata.normalize('NFC', s) regression In-Reply-To: <1288453334.74.0.770473212932.issue10254@psf.upfronthosting.co.za> Message-ID: <1288566678.68.0.614164140528.issue10254@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 00:12:46 2010 From: report at bugs.python.org (Ned Deily) Date: Sun, 31 Oct 2010 23:12:46 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288566766.72.0.953372226026.issue10263@psf.upfronthosting.co.za> Ned Deily added the comment: For me, python2.6 exhibits the same behavior as python2.7, using either Distribute 0.6.14 or 0.6.10 for both (this is on OS X with a stock framework build but that should not be significant). Perhaps you have a file permissions problem with your 2.6 site-packages or sys.path isn't what you expect? Try adding a print in the distribute site.py to verify whether it is being executed at startup time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 00:21:54 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 23:21:54 +0000 Subject: [issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input In-Reply-To: <1288416372.65.0.387803067469.issue10242@psf.upfronthosting.co.za> Message-ID: <1288567314.87.0.829144467176.issue10242@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'll fix this in 2.7. For 3.2, may remove the method entirely (for the reasons discussed on python-dev). ---------- assignee: michael.foord -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 01:00:41 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Nov 2010 00:00:41 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288569641.92.0.283107571638.issue7061@psf.upfronthosting.co.za> ?ric Araujo added the comment: ?Python? is lower-cased only when referring to the executable (as a file) itself. When talking about the language, the implementation or the VM in an abstract way (not a file), It think it?s always ?Python?. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 01:01:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Nov 2010 00:01:35 +0000 Subject: [issue775964] fix test_grp failing when NIS entries present Message-ID: <1288569695.19.0.525305880351.issue775964@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 01:02:10 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Nov 2010 00:02:10 +0000 Subject: [issue9977] TestCase.assertItemsEqual's description of differences In-Reply-To: <1285704922.32.0.659854668668.issue9977@psf.upfronthosting.co.za> Message-ID: <1288569730.09.0.531150812342.issue9977@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 01:13:42 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 01 Nov 2010 00:13:42 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> New submission from Raymond Hettinger : * Dedocument assertSetEqual, assertDictEqual, assertListEqual, and assertTupleEqual. These are all automatically dispatched from assertEqual. The user need not call any of these directly. These methods should not have been exposed in the docs. * Add new names and dedocument old names for assertLess, assertLessEqual, assertGreater, assertGreaterEqual. The new names are modeled after the gt, le, lt convention used elsewhere in the language. This avoids to problems remembering the current spelling quirks (dropping the Than in LessEqual, pluralization, camel casing, being too long, etc). New names will be assertLE, assertLT, assertGE, and assertGT. * Add news names and dedocument assertRegexpMatches and assertNotRegexpMatches. These names haves have multiple issues (they actually do a re.search not a re.match, they are long, the pluralization is inconsistent with the assertEqual convention, they don't agree with the names used in other unittest implementations such as PHPunit and Junit). The new names will be assertRegexp and assertNotRegexp. * Remove the assertItemsEqual method (which is new in 3.2). Its semantics are not obvious from its name (i.e. duplicates matter, order does not matter, expects elements not items, has O(n**2) behavior after an impending bug fix, uses on equality for matching not hashing or ordering). In most common cases, it is more explicit and flexible to use assertEqual after casting to a set, a list, or sorted list. Also note that other unittest implementations such as PHPunit and JUnit do not have this method. See http://mail.python.org/pipermail/python-dev/2010-October/105073.html * Recombine the package into a single file. See http://mail.python.org/pipermail/python-dev/2010-October/105025.html and http://mail.python.org/pipermail/python-dev/2010-October/104887.html * We need to review the camel cased spelling on two methods that are new in 3.2. Should it be assertIsinstance or assertIsInstance? assert ---------- assignee: rhettinger messages: 120100 nosy: rhettinger priority: normal severity: normal status: open title: Clean-up Unittest API versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 01:15:16 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Nov 2010 00:15:16 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288570516.17.0.380727686507.issue10273@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 01:18:10 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Nov 2010 00:18:10 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288570690.28.0.638277176384.issue10273@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I would prefer assertRegex to assertRegexp. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 01:31:07 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Nov 2010 00:31:07 +0000 Subject: [issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input In-Reply-To: <1288416372.65.0.387803067469.issue10242@psf.upfronthosting.co.za> Message-ID: <1288571467.02.0.410161462729.issue10242@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 02:16:34 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 01 Nov 2010 01:16:34 +0000 Subject: [issue7059] 'checking getaddrinfo bug' doesn't output the result during ./configure In-Reply-To: <1254703921.37.0.174838855875.issue7059@psf.upfronthosting.co.za> Message-ID: <1288574194.61.0.58472903893.issue7059@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: The attached patch fixes output of `configure`. ---------- keywords: +patch nosy: +Arfrever, benjamin.peterson Added file: http://bugs.python.org/file19452/python-configure-getaddrinfo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 02:44:47 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 01 Nov 2010 01:44:47 +0000 Subject: [issue7059] 'checking getaddrinfo bug' doesn't output the result during ./configure In-Reply-To: <1254703921.37.0.174838855875.issue7059@psf.upfronthosting.co.za> Message-ID: <1288575887.2.0.711630900341.issue7059@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r86075 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 03:52:17 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 01 Nov 2010 02:52:17 +0000 Subject: [issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input In-Reply-To: <1288416372.65.0.387803067469.issue10242@psf.upfronthosting.co.za> Message-ID: <1288579937.65.0.456085172657.issue10242@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- assignee: rhettinger -> michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 03:56:57 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 01 Nov 2010 02:56:57 +0000 Subject: [issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input In-Reply-To: <1288416372.65.0.387803067469.issue10242@psf.upfronthosting.co.za> Message-ID: <1288580217.57.0.209916082582.issue10242@psf.upfronthosting.co.za> Michael Foord added the comment: As this has been released in 2.7 (and unittest2) I don't think it can be just removed in 3.2 - it would make porting code from Python 2 to 3 more painful. Very happy for you to fix in Python 2.7. Please let me know when it goes in so that I can keep unittest2 up to date. ---------- assignee: michael.foord -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 04:13:21 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 01 Nov 2010 03:13:21 +0000 Subject: [issue10164] Add an assertBytesEqual to unittest and use it for bytes assertEqual In-Reply-To: <1287665297.21.0.48545376383.issue10164@psf.upfronthosting.co.za> Message-ID: <1288581201.09.0.360156829262.issue10164@psf.upfronthosting.co.za> Michael Foord added the comment: David - would you get a good approximation of what you want simply with: self.assertEqual(ascii(first), ascii(second)) (This actually returns "b'first'" "b'second'" so you may want a convenience function that chops the leading and trailing b'/') As ascii returns unicode it would automatically delegate to assertMultilineEqual. The obvious way to hook this up by default for assertEqual is having the split-character as '\n'. This would not be meaningful for using assertEqual to compare bytes that *aren't* text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 04:32:34 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 01 Nov 2010 03:32:34 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288582354.76.0.203918274668.issue10273@psf.upfronthosting.co.za> Michael Foord added the comment: In general *none* of this should be done until there is clear consensus on Python-dev and it isn't clear that this is the case. * On the deocumenting: barry warsaw objects to public apis that aren't documented and gregory smith asserts (natch) that it *can* be useful to call these methods directly for the explicit type checking they do. Let's see how this discussion pans out. * For the greater / less comparison methods (etc) they would have to be new names as Python 2.7, 3.1 and unittest2 have the old names. This makes the TestCase even *bigger*. Let's see if we can get any consensus on this on Python-dev. Like Antoine I prefer assertRegex to assertRegexp. * Note that assertItemsEqual is not new in 3.2 it is new in 2.7. If we remove it we make porting code using Python 2.7 (or earlier with unittest2) unnecessarily hard. The functionality is still useful but I agree that making the slow path more efficient would be good. * Recombining the package into a single file *will not* happen without a BDFL pronouncement. unittest is massively easier to maintain now. * Review the camel casing on assertIsInstance - isn't this just bike shedding? ---------- assignee: rhettinger -> michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 04:45:45 2010 From: report at bugs.python.org (david) Date: Mon, 01 Nov 2010 03:45:45 +0000 Subject: [issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate In-Reply-To: <1197387663.32.0.0598513497038.issue1589@psf.upfronthosting.co.za> Message-ID: <1288583145.3.0.287732339061.issue1589@psf.upfronthosting.co.za> david added the comment: So I know the current patch doesn't support IP addresses but I thought I would link to what mozilla considered a security problem(just for future reference): CVE-2010-3170: http://www.mozilla.org/security/announce/2010/mfsa2010-70.html "Security researcher Richard Moore reported that when an SSL certificate was created with a common name containing a wildcard followed by a partial IP address a valid SSL connection could be established with a server whose IP address matched the wildcard range by browsing directly to the IP address. It is extremely unlikely that such a certificate would be issued by a Certificate Authority." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 04:55:33 2010 From: report at bugs.python.org (david) Date: Mon, 01 Nov 2010 03:55:33 +0000 Subject: [issue10274] imaplib should provide a means to validate a remote server ssl certificate(s) In-Reply-To: <1288583733.85.0.123923377362.issue10274@psf.upfronthosting.co.za> Message-ID: <1288583733.85.0.123923377362.issue10274@psf.upfronthosting.co.za> New submission from david : imaplib should provide a means to validate a remote server ssl certificate(s). So currently imaplib allows you to do the following: import imaplib conn = imaplib.IMAP4_SSL("imap.gmail.com") #the following should fail conn = imaplib.IMAP4_SSL("74.125.39.109") conn = imaplib.IMAP4_SSL("i.broke.the.internet.and.all.i.got.was.this.t-shirt.phreedom.org", 443) conn = imaplib.IMAP4_SSL("insert_self_signed_imap_server_here") However, only the first call("imap.gmail.com") should *NOT* result in an error being raised (if the certificate is being checked :) ). I wasn't able to find a way to get imaplib.IMAP4_SSL to take the certificate for the remote server without wanting a private cert (which wasn't / isn't desired ). If an option is added / method added that takes in an optional parameter to validate the remote IMAP's ssl certificate has been signed by a trusted certificate authority this would be a good solution. ---------- components: None messages: 120108 nosy: db priority: normal severity: normal status: open title: imaplib should provide a means to validate a remote server ssl certificate(s) type: security versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 05:32:56 2010 From: report at bugs.python.org (py.user) Date: Mon, 01 Nov 2010 04:32:56 +0000 Subject: [issue8555] tkinter doesn't see _tkinter In-Reply-To: <1272419255.64.0.530413038247.issue8555@psf.upfronthosting.co.za> Message-ID: <1288585976.72.0.857364473898.issue8555@psf.upfronthosting.co.za> Changes by py.user : ---------- resolution: invalid -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 05:41:35 2010 From: report at bugs.python.org (py.user) Date: Mon, 01 Nov 2010 04:41:35 +0000 Subject: [issue10275] how to know that a module is a module, a function is a function ? In-Reply-To: <1288586495.6.0.985445158981.issue10275@psf.upfronthosting.co.za> Message-ID: <1288586495.6.0.985445158981.issue10275@psf.upfronthosting.co.za> New submission from py.user : >>> import os >>> m = os >>> type(m) >>> isinstance(m, module) Traceback (most recent call last): File "", line 1, in NameError: name 'module' is not defined >>> n = 1 >>> type(n) >>> isinstance(1, int) True >>> ---------- components: Interpreter Core messages: 120109 nosy: py.user priority: normal severity: normal status: open title: how to know that a module is a module, a function is a function ? type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 05:45:53 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 01 Nov 2010 04:45:53 +0000 Subject: [issue10275] how to know that a module is a module, a function is a function ? In-Reply-To: <1288586495.6.0.985445158981.issue10275@psf.upfronthosting.co.za> Message-ID: <1288586753.09.0.190164565222.issue10275@psf.upfronthosting.co.za> Brian Curtin added the comment: See the "types" module, specifically types.ModuleType. Compare that to your "type(os)" result. This is not a support channel. Please see python-list for these types of questions. ---------- nosy: +brian.curtin resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 05:46:13 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 01 Nov 2010 04:46:13 +0000 Subject: [issue8555] tkinter doesn't see _tkinter In-Reply-To: <1272419255.64.0.530413038247.issue8555@psf.upfronthosting.co.za> Message-ID: <1288586773.42.0.190321274481.issue8555@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Not sure, why changed the resolution. It is an invalid bug report. You could have resolved it by a little research or by asking around. ---------- resolution: fixed -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 09:30:16 2010 From: report at bugs.python.org (py.user) Date: Mon, 01 Nov 2010 08:30:16 +0000 Subject: [issue8555] tkinter doesn't see _tkinter In-Reply-To: <1272419255.64.0.530413038247.issue8555@psf.upfronthosting.co.za> Message-ID: <1288600216.51.0.703885183499.issue8555@psf.upfronthosting.co.za> py.user added the comment: I thought this will put the topic from unresolved to resolved Now I see this is for bugs only ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 10:18:17 2010 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 01 Nov 2010 09:18:17 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1288603097.61.0.165840188122.issue10227@psf.upfronthosting.co.za> Stefan Behnel added the comment: I find it a lot easier to appreciate patches that implement a single change than those that mix different changes. There are three different things in your patch, which I would like to see in at least three different commits. I'd be happy if you could separate the changes into more readable feature patches. That makes it easier to accept them. I'm generally happy about the slice changes, but you will have to benchmark the equivalent changes in Py3.2 to prove that they are similarly worth applying there. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 10:46:05 2010 From: report at bugs.python.org (Nadeem Vawda) Date: Mon, 01 Nov 2010 09:46:05 +0000 Subject: [issue10276] zlib crc32/adler32 buffer length truncation (64-bit) In-Reply-To: <1288604765.69.0.684600327936.issue10276@psf.upfronthosting.co.za> Message-ID: <1288604765.69.0.684600327936.issue10276@psf.upfronthosting.co.za> New submission from Nadeem Vawda : zlib.crc32() and zlib.adler32() in Modules/zlibmodule.c don't handle buffers of >=4GB correctly. The length of a Py_buffer is of type Py_ssize_t, while the C zlib functions take length as an unsigned integer. This means that on a 64-bit build, the buffer length gets silently truncated to 32 bits, which results in incorrect output for large inputs. Attached is a patch that fixes this by computing the checksum incrementally, using small-enough chunks of the buffer. A better fix might be to have Modules/zlib/crc32.c use 64-bit lengths. I tried this, but I couldn't get it to work. It seems that if the system already has zlib installed, Python will link against the existing version instead of compiling its own. Testing this might be a bit tricky. Allocating a 4+GB regular buffer isn't practical. Using a memory-mapped file would work, but I'm not sure having a unit test create a multi-gigabyte file is a great thing to do. ---------- components: Library (Lib) files: zlib-checksum-truncation.diff keywords: patch messages: 120114 nosy: nvawda priority: normal severity: normal status: open title: zlib crc32/adler32 buffer length truncation (64-bit) type: behavior versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file19453/zlib-checksum-truncation.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 10:51:05 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 01 Nov 2010 09:51:05 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1288605065.1.0.992352753127.issue10227@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: The benchmarks are from 3.2 Also, I'll do a more relevant profiling session for 3.2. This patch is based on profiling results from 2.7 so there might be more relevant optimization cases in 3.2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 10:51:45 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 01 Nov 2010 09:51:45 +0000 Subject: [issue10276] zlib crc32/adler32 buffer length truncation (64-bit) In-Reply-To: <1288604765.69.0.684600327936.issue10276@psf.upfronthosting.co.za> Message-ID: <1288605105.64.0.416534470635.issue10276@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I find your approach fine; there isn't a need (IMO) to have the underlying functions change. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 10:52:06 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 01 Nov 2010 09:52:06 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1288605126.04.0.269916104105.issue10227@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: In case I'm not clear enough: The patch is for 3.2, the benchmarks are 3.2, but it was created based on 2.7 results, which may not fully apply for 3.2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 12:05:42 2010 From: report at bugs.python.org (Brian Brazil) Date: Mon, 01 Nov 2010 11:05:42 +0000 Subject: [issue10277] sax leaks a fd if source is a filename In-Reply-To: <1288609541.61.0.0926473508051.issue10277@psf.upfronthosting.co.za> Message-ID: <1288609541.61.0.0926473508051.issue10277@psf.upfronthosting.co.za> New submission from Brian Brazil : If saxutils.prepare_input_source is passed a filename or url, it'll end up leaking an fd via IncrementalParser.parse and ExpatParser.parse. This can be seen by enabling resource warnings and running test_sax. This should be fixed. ---------- components: Library (Lib) messages: 120118 nosy: bbrazil priority: normal severity: normal status: open title: sax leaks a fd if source is a filename versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 12:10:55 2010 From: report at bugs.python.org (qpatata) Date: Mon, 01 Nov 2010 11:10:55 +0000 Subject: [issue9919] gdbinit lineno result is one line in excess In-Reply-To: <1285151676.58.0.234965887204.issue9919@psf.upfronthosting.co.za> Message-ID: <1288609855.62.0.0201300444784.issue9919@psf.upfronthosting.co.za> qpatata added the comment: Hi, Thanks for the fix. I'm wondering if it is valid to add a "\n" in the "lineno" print. This macro is called by other ones, like pyframe, that have their own format specifiers. Kind regards. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 13:12:11 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 01 Nov 2010 12:12:11 +0000 Subject: [issue9919] gdbinit lineno result is one line in excess In-Reply-To: <1285151676.58.0.234965887204.issue9919@psf.upfronthosting.co.za> Message-ID: <1288613531.61.0.0508761879535.issue9919@psf.upfronthosting.co.za> Georg Brandl added the comment: If you look at the commit, you'll see that I already added that newline. Thanks anyway :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 13:46:30 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 01 Nov 2010 12:46:30 +0000 Subject: [issue10277] sax leaks a fd if source is a filename In-Reply-To: <1288609541.61.0.0926473508051.issue10277@psf.upfronthosting.co.za> Message-ID: <1288615590.0.0.263038153377.issue10277@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It is now. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 13:46:37 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 01 Nov 2010 12:46:37 +0000 Subject: [issue10277] sax leaks a fd if source is a filename In-Reply-To: <1288609541.61.0.0926473508051.issue10277@psf.upfronthosting.co.za> Message-ID: <1288615597.51.0.335262431788.issue10277@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: fixed -> out of date status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 14:07:05 2010 From: report at bugs.python.org (Mads Kiilerich) Date: Mon, 01 Nov 2010 13:07:05 +0000 Subject: [issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate In-Reply-To: <1288583145.3.0.287732339061.issue1589@psf.upfronthosting.co.za> Message-ID: <4CCEBB70.9050303@kiilerich.com> Mads Kiilerich added the comment: > So I know the current patch doesn't support IP addresses Not exactly. The committed patch do not consider IP addresses - especially not iPAddress entries in subjectAltName. But Python only distinguishes resolvable names from IP addresses at a very low level. At the ssl module level the name and IP is considered the same, so we actually do support IP addresses if specified in commonName or subjectAltName DNS. We are thus "vulnerable" to this issue. (AFAIK AFAICS) (It seems like IP in commonName isn't permitted by the RFCs, but I think it is quite common, especially for self-signed certificates.) > CVE-2010-3170: http://www.mozilla.org/security/announce/2010/mfsa2010-70.html For reference, the actual report can be found on http://www.securityfocus.com/archive/1/513396 FWIW, I don't think it is critical at all. Granted, it is a deviation from the specification, and that is not good in a security critical part. But we do not claim to implement the full specification, so I don't think this deviation makes any difference. Further, this issue will only have relevance if one the trusted CAs create invalid certificates. But if the trusted CAs create invalid certificates the user has lost anyway and things can't get much worse. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 14:13:21 2010 From: report at bugs.python.org (David Joy) Date: Mon, 01 Nov 2010 13:13:21 +0000 Subject: [issue4431] Distutils MSVC doesn't create manifest file (with fix) In-Reply-To: <1227644194.32.0.230924221438.issue4431@psf.upfronthosting.co.za> Message-ID: <1288617201.96.0.596169409449.issue4431@psf.upfronthosting.co.za> David Joy added the comment: Hi Marc, Well, I fried my original server install trying to trace this. My new fresh install can still reproduce the problem with mysql-python, but I can't recreate the issue with PyOpenSSL anymore. Grabbing packages at random from PyPi hasn't given me a single issue so far, so I'm going to say this is an issue with mysql-python only and redirect my efforts there. Thanks for your help, -David ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 14:21:50 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Nov 2010 13:21:50 +0000 Subject: [issue9796] Add summary tables for unittest API In-Reply-To: <1283906621.68.0.367606257735.issue9796@psf.upfronthosting.co.za> Message-ID: <1288617710.03.0.407109661236.issue9796@psf.upfronthosting.co.za> Ezio Melotti added the comment: The attached patch adds a table with the most common assert* methods and their explanation at the top of the doc. There are however a few things that should imho be changed, but that will require some re-organization in the unittest doc: 1) now the table is on the third "screen" and it's necessary to scroll down to reach it. It would be better to move it in an higher position or add a link at the top of the doc to the assert* methods section with the tables; 2) all the assert methods should be in a table. More tables can be used, e.g.: * one with the common methods (the ones in the patch); * one with other "comparison" methods like assertLess and friends, assert[Not]AlmostEqual (these could be included in the first table though); * one for exceptions and warnings (assertRaises, assertWarn, assertRaisesRegexp, ...); * one for "advanced" methods (assertItemsEqual, assertDictContainsSubset, assertSequenceEqual, ...); * one for the type-specific methods used by assertEqual (assertSetEqual, assertListEqual, ...), saying that they are used automatically by assertEqual and possibly that they shouldn't be used directly. 3) the doc of the methods should be right after the table that lists them; 4) other non-assert methods shouldn't be mixed with the assert* methods -- the assert* methods should have their own section; 5) other methods could be grouped in tables too (setUp, tearDown, ...; skip*); ---------- keywords: +patch type: -> feature request Added file: http://bugs.python.org/file19454/issue9796.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 14:25:30 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 01 Nov 2010 13:25:30 +0000 Subject: [issue9981] let make_buildinfo use a temporary directory on windows In-Reply-To: <1285741718.07.0.0571419018875.issue9981@psf.upfronthosting.co.za> Message-ID: <1288617930.8.0.615126895806.issue9981@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Yes, I took the liberty of removing the superfluous build configuration as well, thereby simplifying the .sln and the build dependency graph. The patch is for python 2.7. Even though it's technically not a python patch but a build patch, I'll rework it for 3.2 and submit it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 14:54:13 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 01 Nov 2010 13:54:13 +0000 Subject: [issue10260] Add a threading.Condition.wait_for() method In-Reply-To: <1288500409.32.0.639501337625.issue10260@psf.upfronthosting.co.za> Message-ID: <1288619653.62.0.00608557304492.issue10260@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: The wait_for() method is basically a distillation of the Semaphore.acquire() method, which tries to intelligently handle a non-trivial timeout. With this method it is now possible to simplify Semaphore.acquire, although I didn't want to do so in this patch to keep its scope smaller. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 15:01:21 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Nov 2010 14:01:21 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288620081.44.0.928647349583.issue10273@psf.upfronthosting.co.za> Ezio Melotti added the comment: * I would leave assertEqual documented and specify that they should be called directly only if the type should be checked, otherwise (if the type doesn't matter or it's already tested elsewhere) using assertEqual is enough (see also the suggestions in msg120124). -0.5 about dedocumenting, +1 on better documentation, possibly in an "advanced" section of the doc (I also find useful to know how assertEqual works and that I can register new functions like assertEqual). * assertLT and friends wouldn't match with assertEqual and assertNotEqual (assertEQ, assertNE?). Also these names don't seem more obvious or readable than assertLess, and will just add confusion and duplication of names, so -1. * FWIW I like 'Regex' more than 'Regexp' too, assuming that it's worth renaming these methods and deprecate the old names (they are already in 2.7). Having a 'Match' or 'Search' suffix might clarify what the method does -- if it does what it says. +0 on the renaming (and +1 to 'Regex' if the rename happens). * as I said on IRC, assertItemsEqual provides an useful functionality, and even if the name is not 100% clear, I'd rather double-check the doc than having to reimplement the functionality myself (or having a clumsy long-but-clear name). -1 on the removal, +1 on better documentation/performance. * I think assertIsInstance is fine, however I wonder why the opposite is not assertIsNotInstance. Anyway it's probably not worth creating more confusion and adding new names just to change the spelling (they are in 2.7 too). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 15:01:24 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Nov 2010 14:01:24 +0000 Subject: [issue10260] Add a threading.Condition.wait_for() method In-Reply-To: <1288500409.32.0.639501337625.issue10260@psf.upfronthosting.co.za> Message-ID: <1288620084.91.0.923201953926.issue10260@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This looks useful indeed. ---------- nosy: +jyasskin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 15:22:39 2010 From: report at bugs.python.org (Steven Bethard) Date: Mon, 01 Nov 2010 14:22:39 +0000 Subject: [issue9553] test_argparse.py: 80 failures if COLUMNS env var set to a value other than 80 In-Reply-To: <1281405802.56.0.0746900619959.issue9553@psf.upfronthosting.co.za> Message-ID: <1288621359.85.0.47699509334.issue9553@psf.upfronthosting.co.za> Steven Bethard added the comment: Fixed with a variant of Denver's last patch in r86080 for 3.X and r86083 for 2.7. ---------- assignee: -> bethard resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 16:00:13 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Nov 2010 15:00:13 +0000 Subject: [issue9754] assertWarns and assertWarnsRegexp In-Reply-To: <1283511017.36.0.0507272422338.issue9754@psf.upfronthosting.co.za> Message-ID: <1288623613.35.0.608023757451.issue9754@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 16:10:10 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 01 Nov 2010 15:10:10 +0000 Subject: [issue10278] add time.wallclock() method In-Reply-To: <1288624210.23.0.0497533122542.issue10278@psf.upfronthosting.co.za> Message-ID: <1288624210.23.0.0497533122542.issue10278@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : If measuring time across blocking calls, such as thread synchronization, one currently must time.time(). This is because time.clock() measures cpu seconds on unix. On windows, however, time.clock() would be more appropriate because it measures wall-clock time. To avoid having to put platform clauses everywhere, this patch adds time.wallclock(). The current implementation is a simple alias to time.clock on windows and time.time otherwise. Future improvements may add a better implementation on those non-windows platforms that support it. ---------- components: Interpreter Core files: wallclock.patch keywords: patch messages: 120130 nosy: krisvale priority: normal severity: normal status: open title: add time.wallclock() method type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file19455/wallclock.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 16:11:52 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 01 Nov 2010 15:11:52 +0000 Subject: [issue10278] add time.wallclock() method In-Reply-To: <1288624210.23.0.0497533122542.issue10278@psf.upfronthosting.co.za> Message-ID: <1288624312.65.0.145449780726.issue10278@psf.upfronthosting.co.za> Michael Foord added the comment: +1 ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 16:17:20 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Nov 2010 15:17:20 +0000 Subject: [issue9669] regexp: zero-width matches in MIN_UNTIL In-Reply-To: <1282655524.54.0.725053060384.issue9669@psf.upfronthosting.co.za> Message-ID: <1288624640.21.0.473365369084.issue9669@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 16:19:38 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 01 Nov 2010 15:19:38 +0000 Subject: [issue6706] asyncore's accept() is broken In-Reply-To: <1250291017.2.0.719693187742.issue6706@psf.upfronthosting.co.za> Message-ID: <1288624778.24.0.422058722528.issue6706@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Fixed in r86084 (2.7) and r86085 (3.1). ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: behavior -> security versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 16:22:51 2010 From: report at bugs.python.org (Jeffrey Yasskin) Date: Mon, 01 Nov 2010 15:22:51 +0000 Subject: [issue10260] Add a threading.Condition.wait_for() method In-Reply-To: <1288500409.32.0.639501337625.issue10260@psf.upfronthosting.co.za> Message-ID: <1288624971.7.0.093072983961.issue10260@psf.upfronthosting.co.za> Jeffrey Yasskin added the comment: * This method will confuse some people who will think that cond.wait(pred) will wake up when pred becomes true regardless of whether they call cond.notifyAll(). You should warn them about this in the documentation. (This confusion happens inside Google, despite our documentation, but the method's worth having even though not everyone will read the docs.) You should also mention that 'predicate' runs with the Condition acquired. Then +1 whether or not you do anything in response to the below comments. * There's a small risk of confusion with C++0x's wait_for method, which behaves like the current Condition.wait (waiting for a timeout). They used "wait_for" because they also have a "wait_until" that waits until a deadline. I don't think this potential confusion is a big deal. * This expands the interface needed to duck-type as a Condition. Maybe you could also add a threading.wait_for(Condition, predicate, timeout) that implements the same thing using just the Condition's .wait() method? I'm not certain that'll be the best name as a threading method, but I don't have a better proposal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 16:26:52 2010 From: report at bugs.python.org (Steven Bethard) Date: Mon, 01 Nov 2010 15:26:52 +0000 Subject: [issue9353] argparse __all__ is incomplete In-Reply-To: <1279895111.13.0.483513856318.issue9353@psf.upfronthosting.co.za> Message-ID: <1288625212.22.0.0776670665929.issue9353@psf.upfronthosting.co.za> Steven Bethard added the comment: Fixed in 3.X in r86086 and in 2.7 in r86087. ---------- assignee: -> bethard resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 16:28:02 2010 From: report at bugs.python.org (Steven Bethard) Date: Mon, 01 Nov 2010 15:28:02 +0000 Subject: =?utf-8?q?=5Bissue4640=5D_optparse_doesn=E2=80=99t_disallow_adding_one-da?= =?utf-8?b?c2ggbG9uZyBvcHRpb25zICjigJwtb3B0aW9u4oCdKQ==?= In-Reply-To: <1229091283.09.0.553967635356.issue4640@psf.upfronthosting.co.za> Message-ID: <1288625282.75.0.368816666365.issue4640@psf.upfronthosting.co.za> Changes by Steven Bethard : ---------- nosy: -bethard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 17:01:01 2010 From: report at bugs.python.org (Steven Bethard) Date: Mon, 01 Nov 2010 16:01:01 +0000 Subject: [issue9352] argparse eats characters when parsing multiple merged short options In-Reply-To: <1279894704.35.0.264649777176.issue9352@psf.upfronthosting.co.za> Message-ID: <1288627261.56.0.139162625146.issue9352@psf.upfronthosting.co.za> Steven Bethard added the comment: Patches applied in r86090 (3.X) and r86091 (2.7). Thanks for your help Catherine, and sorry it took me so long to apply these. ---------- assignee: -> bethard resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 17:31:23 2010 From: report at bugs.python.org (Steven Bethard) Date: Mon, 01 Nov 2010 16:31:23 +0000 Subject: [issue9355] argparse add_mutually_exclusive_group more than once has incorrectly formatted help In-Reply-To: <1279895728.08.0.860550350605.issue9355@psf.upfronthosting.co.za> Message-ID: <1288629083.78.0.847007425874.issue9355@psf.upfronthosting.co.za> Steven Bethard added the comment: Committed in r86092 (3.X) and r86093 (2.7). Thanks for the patches! ---------- assignee: -> bethard resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 17:34:05 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 01 Nov 2010 16:34:05 +0000 Subject: [issue10279] test_gc failure on Windows x64 In-Reply-To: <1288629245.88.0.812868116264.issue10279@psf.upfronthosting.co.za> Message-ID: <1288629245.88.0.812868116264.issue10279@psf.upfronthosting.co.za> New submission from Brian Curtin : ====================================================================== FAIL: test_garbage_at_shutdown (test.test_gc.GCTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\python-dev\py3k\lib\test\test_gc.py", line 500, in test_garbage_at_shutdown b"shutdown; use", stderr) AssertionError: b'ResourceWarning: gc: 2 uncollectable objects at shutdown; use' not found in b'sys:1: ResourceWarning: gc: %Id uncollectable objects at shutdow n; use gc.set_debug(gc.DEBUG_UNCOLLECTABLE) to list them' %Id isn't being replaced with the number in the format string. I only briefly looked into it, not sure why it would be Windows x64 specific (this doesn't happen on Win 32-bit or any *nix buildbots). ---------- messages: 120137 nosy: brian.curtin priority: normal severity: normal stage: needs patch status: open title: test_gc failure on Windows x64 type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 17:38:07 2010 From: report at bugs.python.org (Steven Bethard) Date: Mon, 01 Nov 2010 16:38:07 +0000 Subject: [issue9779] argparse.ArgumentParser not support unicode in print help In-Reply-To: <1283672170.42.0.322683308746.issue9779@psf.upfronthosting.co.za> Message-ID: <1288629487.04.0.121295102447.issue9779@psf.upfronthosting.co.za> Steven Bethard added the comment: Closing as invalid, as to me this looks like a classic terminal encoding issue and not an argparse issue, and there was no response from the user who filed the issue. If someone still thinks this is an argparse issue, please provide a test and reopen the issue. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 17:48:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 01 Nov 2010 16:48:09 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288204661.42.0.184844735996.issue10199@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Wed, Oct 27, 2010 at 2:37 PM, Gregor Lingl wrote: .. > Imho it is very important to clarify the name convention for demoscripts to be added to the demo before committing > (or at least before the apperance of beta1). It decides about adding scripts to the Examples Menu of the viewer. > I would rather separate move under Lib and any other changes. However since files are moved anyways, we can use this opportunity for name changes. > We all know, that things once they have found their way into Lib cannot be changed easily afterwards. Guido's > argument on backwards compatibility applies. So now is the only point in time to decide about this. > I don't really expect people to import turtledemo.xyz modules in their programs. These are designed as stand-alone scripts and I am not proposing to change that. We can further warn users about that in the documentation, but I think it is obvious that demo scripts are not supposed to be used as production components. > Should we > - stick with the tdemo_ prefix or > - change to another pre- or postfix (like eg. bytedesign_demo) > - or should we allow for arbitrary *.py filenames with some exception (e.g. filenames that contain an underscore) > to mark files that are not meant as demos for the viewer? > In the long run, I would like to add a separate template that will determine the choice of modules for the viewer and allow menu choices to be different from module names and the order to be different from alphabetical. For not, however, I am going to allow any name except those starting with an underscore or "two_canvases". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 17:53:20 2010 From: report at bugs.python.org (Doug Hellmann) Date: Mon, 01 Nov 2010 16:53:20 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288630400.32.0.289364647183.issue10263@psf.upfronthosting.co.za> Doug Hellmann added the comment: Adding a print to the site.py in Distribute's egg shows it is being run when I use 'python -m site'. However, when I run 'python -c "import site; print site.__file__"' I get the version from the stdlib, as expected. I guess the module finding mechanism for -m is different from the import code? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 17:54:41 2010 From: report at bugs.python.org (Doug Hellmann) Date: Mon, 01 Nov 2010 16:54:41 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288630481.49.0.805642508898.issue10263@psf.upfronthosting.co.za> Changes by Doug Hellmann : ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 18:03:16 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 01 Nov 2010 17:03:16 +0000 Subject: [issue10278] add time.wallclock() method In-Reply-To: <1288624210.23.0.0497533122542.issue10278@psf.upfronthosting.co.za> Message-ID: <1288630996.63.0.375428953014.issue10278@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 18:12:07 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 01 Nov 2010 17:12:07 +0000 Subject: [issue10278] add time.wallclock() method In-Reply-To: <1288624210.23.0.0497533122542.issue10278@psf.upfronthosting.co.za> Message-ID: <1288631527.45.0.336530086946.issue10278@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Why does this need to be in stdlib? AFAICT, the proposed patch is just: if : wallclock = time.clock else: wallclock = time.time which is easy enough to stick in your measuring code or a project's utilities module. If others really want to see this in stdlib, I would prefer to place it in a more specialized module such as profile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 18:24:34 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Nov 2010 17:24:34 +0000 Subject: [issue10276] zlib crc32/adler32 buffer length truncation (64-bit) In-Reply-To: <1288604765.69.0.684600327936.issue10276@psf.upfronthosting.co.za> Message-ID: <1288632274.97.0.0500155049266.issue10276@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Extension Modules -Library (Lib) versions: -Python 2.5, Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 18:24:55 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Nov 2010 17:24:55 +0000 Subject: [issue10274] imaplib should provide a means to validate a remote server ssl certificate(s) In-Reply-To: <1288583733.85.0.123923377362.issue10274@psf.upfronthosting.co.za> Message-ID: <1288632295.91.0.876598772434.issue10274@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 18:31:22 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Nov 2010 17:31:22 +0000 Subject: [issue10278] add time.wallclock() method In-Reply-To: <1288624210.23.0.0497533122542.issue10278@psf.upfronthosting.co.za> Message-ID: <1288632682.95.0.947787733968.issue10278@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 18:31:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Nov 2010 17:31:47 +0000 Subject: [issue10274] imaplib should provide a means to validate a remote server ssl certificate(s) In-Reply-To: <1288583733.85.0.123923377362.issue10274@psf.upfronthosting.co.za> Message-ID: <1288632707.5.0.114703163306.issue10274@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Right, IMAP_SSL should first accept an additional context argument as noted in issue10274. Then it can be patched to optionally call ssl.match_hostname on the server certificate. That second part can mimick what is done by HTTPSConnection: http://code.python.org/hg/branches/py3k/file/tip/Lib/http/client.py#l1052 ---------- dependencies: +imaplib should provide a means to validate a remote server ssl certificate(s) stage: -> needs patch type: security -> feature request versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 18:32:54 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Nov 2010 17:32:54 +0000 Subject: [issue10274] imaplib should provide a means to validate a remote server ssl certificate(s) In-Reply-To: <1288583733.85.0.123923377362.issue10274@psf.upfronthosting.co.za> Message-ID: <1288632774.24.0.73980968518.issue10274@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sorry, the actual issue number is issue8808. ---------- dependencies: +imaplib should support SSL contexts -imaplib should provide a means to validate a remote server ssl certificate(s) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 18:43:18 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Nov 2010 17:43:18 +0000 Subject: [issue10278] add time.wallclock() method In-Reply-To: <1288624210.23.0.0497533122542.issue10278@psf.upfronthosting.co.za> Message-ID: <1288633398.27.0.455727731436.issue10278@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, the problem is that the "appropriate test" is not easy to guess a priori, so it would be useful for the stdlib to provide the right tool for the job. As for where it should live, I have no strong opinion, but it's true that the time module looks appropriate. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 18:43:30 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 01 Nov 2010 17:43:30 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> Message-ID: <1288633410.25.0.261405481976.issue10199@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in revision 86095. I included only those demo scripts that are described in the current manual. I am open to making further improvements prior to bata 1, and will open separate issues to track those. ---------- stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 18:50:27 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Nov 2010 17:50:27 +0000 Subject: [issue10262] Add --disable-abi-flags option to `configure` In-Reply-To: <1288526843.14.0.55690735161.issue10262@psf.upfronthosting.co.za> Message-ID: <1288633827.92.0.843660917278.issue10262@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 18:55:44 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 01 Nov 2010 17:55:44 +0000 Subject: [issue10278] add time.wallclock() method In-Reply-To: <1288633398.27.0.455727731436.issue10278@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Nov 1, 2010 at 1:43 PM, Antoine Pitrou wrote: .. > Well, the problem is that the "appropriate test" is not easy to guess a priori, so it would > be useful for the stdlib to provide the right tool for the job. This sounds like an argument against this feature, not for it. If it is hard for the application code to implement an appropriate test "a priori", what is the chance to get it right in stdlib? > As for where it should live, I have no strong opinion, but it's true that the time module looks appropriate. Having time.time and time.clock is already confusing enough. Having the third function which is either the first or the second depending on some unspecified criterion does not strike me as a clean design. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 19:00:16 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 01 Nov 2010 18:00:16 +0000 Subject: [issue10221] {}.pop('a') raises non-standard KeyError exception In-Reply-To: <1288272402.21.0.117850725041.issue10221@psf.upfronthosting.co.za> Message-ID: <1288634416.41.0.9245857293.issue10221@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Raymond, Did you mean to exclude unit test additions from your commit? See issue10221-with-tests.diff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 19:03:10 2010 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Nov 2010 18:03:10 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288634590.45.0.481462414565.issue10263@psf.upfronthosting.co.za> Ned Deily added the comment: Nick is the authority on -m so perhaps he can confirm this but I believe the execution of -m is carried out by the runpy standard library module and the runpy module essentially goes through the process of finding a module from scratch by searching through the modules in sys.path, thus bypassing the altered sys.path which the setuptools/Distribute site module "bootstrapped" and removed itself from. So runpy will always find the setuptools/Distribute site module first since it is first on sys.path (until it executes and removes itself from sys.path). It seems you've found one case where the sys.path manipulations of setuptools/Distributes make a difference: when trying to run site itself. You can see which site module is found by runpy by trying: import runpy runpy.run_module("site") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 19:09:52 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Nov 2010 18:09:52 +0000 Subject: [issue10278] add time.wallclock() method In-Reply-To: Message-ID: <1288634987.11453.9.camel@localhost.localdomain> Antoine Pitrou added the comment: > > Well, the problem is that the "appropriate test" is not easy to guess a priori, so it would > > be useful for the stdlib to provide the right tool for the job. > > This sounds like an argument against this feature, not for it. If it > is hard for the application code to implement an appropriate test "a > priori", what is the chance to get it right in stdlib? The point of a standard library is to bring together competence and experience to build a common ground of useful functions. If we restricted ourselves to easy things then 75% of the stdlib should be ripped out. > > As for where it should live, I have no strong opinion, but it's true that the time module looks appropriate. > > Having time.time and time.clock is already confusing enough. Having > the third function which is either the first or the second depending > on some unspecified criterion does not strike me as a clean design. The problem is time.clock(), since it does two wildly different things depending on the OS. I would suggest to deprecate time.clock() at the same time as we add time.wallclock(). For the Unix-specific definition of time.clock(), there is already os.times() (which gives even richer information). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 19:13:23 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 01 Nov 2010 18:13:23 +0000 Subject: [issue10221] {}.pop('a') raises non-standard KeyError exception In-Reply-To: <1288272402.21.0.117850725041.issue10221@psf.upfronthosting.co.za> Message-ID: <1288635203.3.0.260095333734.issue10221@psf.upfronthosting.co.za> Raymond Hettinger added the comment: We don't usually test the content of error messages because they are not a guaranteed behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 19:23:04 2010 From: report at bugs.python.org (Ivan Razumov) Date: Mon, 01 Nov 2010 18:23:04 +0000 Subject: [issue10259] Entry text not set if all of 'Font', 'Foreground' and 'Justify' are set In-Reply-To: <1288491057.47.0.0560000338786.issue10259@psf.upfronthosting.co.za> Message-ID: <1288635784.57.0.619649575272.issue10259@psf.upfronthosting.co.za> Ivan Razumov added the comment: The bug doesn't seem to be Windows-specific - tested on Ubuntu 10.10 (Python 2.6.6) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 19:29:21 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 01 Nov 2010 18:29:21 +0000 Subject: [issue10221] {}.pop('a') raises non-standard KeyError exception In-Reply-To: <1288635203.3.0.260095333734.issue10221@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Nov 1, 2010 at 2:13 PM, Raymond Hettinger wrote: .. > > We don't usually test the content of error messages because they are not a guaranteed behavior. > I recall that when I asked about this on #python-dev, someone pointed to places where content of error messages is tested in python unit tests. I also asked whether such tests should be marked as cpython details, and the answer was know. Unfortunately I don't remember who was telling me that, but it sounded reasonable enough that I submitted the tests. I think if testing error messages is a grey area, in this case it is reasonable to have a test for at least two reasons: 1. It was reported as a bug, so users already expect this behavior. 2. There is no prose in the error message, just the key, so it is not as arbitrary as other error messages. Note that in my tests I deliberately tested only e.args[0] and not str(e) or e.args[1:]. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 19:32:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 01 Nov 2010 18:32:40 +0000 Subject: [issue10278] add time.wallclock() method In-Reply-To: <1288634987.11453.9.camel@localhost.localdomain> Message-ID: Alexander Belopolsky added the comment: On Mon, Nov 1, 2010 at 2:09 PM, Antoine Pitrou wrote: .. >> > Well, the problem is that the "appropriate test" is not easy to guess a priori, so it would >> > be useful for the stdlib to provide the right tool for the job. >> >> This sounds like an argument against this feature, not for it. ?If it >> is hard for the application code to implement an appropriate test "a >> priori", what is the chance to get it right in stdlib? > > The point of a standard library is to bring together competence and > experience to build a common ground of useful functions. If we > restricted ourselves to easy things then 75% of the stdlib should be > ripped out. > It looks like I misunderstood what you said. I thought "a priory" meant without knowing the details of the application rather than "by a novice." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 19:55:37 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 01 Nov 2010 18:55:37 +0000 Subject: [issue10278] add time.wallclock() method In-Reply-To: <1288634987.11453.9.camel@localhost.localdomain> Message-ID: Alexander Belopolsky added the comment: On Mon, Nov 1, 2010 at 2:09 PM, Antoine Pitrou wrote: .. > The problem is time.clock(), since it does two wildly different things > depending on the OS. > I would suggest to deprecate time.clock() at the same time as we add > time.wallclock(). For the Unix-specific definition of time.clock(), > there is already os.times() (which gives even richer information). +1, but doing something like that should be discussed on python-ideas first. We should also weigh this against other proposals such as exposing gettimeofday. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 20:39:48 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Nov 2010 19:39:48 +0000 Subject: [issue10252] Fix resource warnings in distutils In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1288640388.76.0.330268441154.issue10252@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the patch, I?ll review it and commit it soon. ---------- assignee: tarek -> eric.araujo status: open -> pending title: Fix resource warnings in distutil tests -> Fix resource warnings in distutils _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 20:53:15 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Mon, 01 Nov 2010 19:53:15 +0000 Subject: [issue10280] nntp_version set to the most recent advertised version In-Reply-To: <1288641195.29.0.702249344241.issue10280@psf.upfronthosting.co.za> Message-ID: <1288641195.29.0.702249344241.issue10280@psf.upfronthosting.co.za> New submission from Julien ?LIE : The NNTP version is currently defined as follows in the source code: self.nntp_version = int(caps['VERSION'][0]) However, Section 3.3.2 of RFC 3977 mentions: VERSION This capability MUST be advertised by all servers and MUST be the first capability in the capability list; it indicates the version(s) of NNTP that the server supports. There must be at least one argument; each argument is a decimal number and MUST NOT have a leading zero. Version numbers are assigned only in RFCs that update or replace this specification; servers MUST NOT create their own version numbers. There can be more than one version. See the example in Section 5.2.3: [S] VERSION 2 3 I believe the best thing to do would be to take the max of the numbers, that is to say: self.nntp_version = max(map(int, caps['VERSION'])) ---------- components: Extension Modules messages: 120156 nosy: jelie priority: normal severity: normal status: open title: nntp_version set to the most recent advertised version type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 20:55:13 2010 From: report at bugs.python.org (Robert Lerche) Date: Mon, 01 Nov 2010 19:55:13 +0000 Subject: [issue10232] Tkinter issues with Scrollbar and custom widget list In-Reply-To: <1288366788.46.0.695886030233.issue10232@psf.upfronthosting.co.za> Message-ID: <1288641313.54.0.538832216052.issue10232@psf.upfronthosting.co.za> Robert Lerche added the comment: Terry, I tried posting to python-list and all I got was "why are you doing that? Use Tix instead." Maybe it's good advice but it doesn't address the issue. And Tix is yet one more component I'd have to build (the Python distribution comes with Tix interface code but Tix itself is yet another .dll). I haven't decided how to proceed yet but if you have any suggestions please let me know. Thanks again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 20:58:24 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Mon, 01 Nov 2010 19:58:24 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> Message-ID: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> New submission from Julien ?LIE : Following the first example of the documentation: import nntplib s = nntplib.NNTP('news.trigofacile.com') resp, count, first, last, name = s.group('fr.comp.lang.python') print('Group', name, 'has', count, 'articles, range', first, 'to', last) resp, overviews = s.over((last - 9, last)) for id, over in overviews: print(id, nntplib.decode_header(over['subject'])) s.quit() An exception is raised: "OVER/XOVER response doesn't include names of additional headers" I believe the issue comes from the fact that the source code does not handle the case described in Section 8.3.2 of RFC 3977: For all fields, the value is processed by first removing all CRLF pairs (that is, undoing any folding and removing the terminating CRLF) and then replacing each TAB with a single space. If there is no such header in the article, no such metadata item, or no header or item stored in the database for that article, the corresponding field MUST be empty. Example of a successful retrieval of overview information for a range of articles: [C] GROUP misc.test [S] 211 1234 3000234 3002322 misc.test [C] OVER 3000234-3000240 [S] 224 Overview information follows [S] 3000234|I am just a test article|"Demo User" |6 Oct 1998 04:38:40 -0500| <45223423 at example.com>|<45454 at example.net>|1234| 17|Xref: news.example.com misc.test:3000363 [S] 3000235|Another test article|nobody at nowhere.to (Demo User)|6 Oct 1998 04:38:45 -0500|<45223425 at to.to>|| 4818|37||Distribution: fi [S] 3000238|Re: I am just a test article|somebody at elsewhere.to| 7 Oct 1998 11:38:40 +1200|| <45223423 at to.to>|9234|51 [S] . Note the missing "References" and Xref headers in the second line, the missing trailing fields in the first and last lines, and that there are only results for those articles that still exist. Also please note that nntplib should also work in case the database is not consistent. Some news servers might be broken and do not follow the MUST NOT... The LIST OVERVIEW.FMT command SHOULD list all the fields for which the database is consistent at that moment. It MAY omit such fields (for example, if it is not known whether the database is consistent or inconsistent). It MUST NOT include fields for which the database is inconsistent or that are not stored in the database. Therefore, if a header appears in the LIST OVERVIEW.FMT output but not in the OVER output for a given article, that header does not appear in the article (similarly for metadata items). ---------- components: Extension Modules messages: 120158 nosy: jelie priority: normal severity: normal status: open title: Exception raised when an NNTP overview field is absent type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:02:43 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Nov 2010 20:02:43 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> Message-ID: <1288641763.19.0.171394420598.issue10281@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:03:24 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Nov 2010 20:03:24 +0000 Subject: [issue10280] nntp_version set to the most recent advertised version In-Reply-To: <1288641195.29.0.702249344241.issue10280@psf.upfronthosting.co.za> Message-ID: <1288641804.72.0.575825174732.issue10280@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:16:07 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Mon, 01 Nov 2010 20:16:07 +0000 Subject: [issue10282] IMPLEMENTATION token differently delt with in NNTP capability In-Reply-To: <1288642567.32.0.7785411032.issue10282@psf.upfronthosting.co.za> Message-ID: <1288642567.32.0.7785411032.issue10282@psf.upfronthosting.co.za> New submission from Julien ?LIE : I believe the case of "IMPLEMENTATION" should be treated differently. It is not helpful at all to split the argument. It is meant to be a text string and ['INN', '2.6.0', '(20101101', 'prelease)'] does not have much meaning... Suggestion: if line.startswith("IMPLEMENTATION"): name, *tokens = line.split(None, 1) else: name, *tokens = line.split() or something else, though I do not believe another keyword will begin with "IMPLEMENTATION"... Besides, shouldn't it be checked that the line is not empty, before splitting it? ---------- components: Extension Modules messages: 120159 nosy: jelie priority: normal severity: normal status: open title: IMPLEMENTATION token differently delt with in NNTP capability type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:21:04 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Mon, 01 Nov 2010 20:21:04 +0000 Subject: [issue10283] New parameter for an NNTP newsgroup pattern in LIST ACTIVE In-Reply-To: <1288642864.21.0.311033761057.issue10283@psf.upfronthosting.co.za> Message-ID: <1288642864.21.0.311033761057.issue10283@psf.upfronthosting.co.za> New submission from Julien ?LIE : NNTP.list(*, file=None) Couldn't a "grouppattern" argument be added? LIST ACTIVE handles a newsgroup pattern (and it would then answer less groups -- also useful for the test suite of nntplib) Something like that: --- nntplib.py.OLD 2010-11-01 19:04:10.000000000 +0100 +++ nntplib.py 2010-11-01 19:57:50.000000000 +0100 @@ -568,14 +568,18 @@ cmd = 'NEWNEWS {0} {1} {2}'.format(group, date_str, time_str) return self._longcmdstring(cmd, file) - def list(self, *, file=None): + def list(self, *, group_pattern=None, file=None): """Process a LIST command. Argument: - file: Filename string or file object to store the result in Returns: - resp: server response if successful - list: list of (group, last, first, flag) (strings) """ - resp, lines = self._longcmdstring('LIST', file) + if group_pattern is not None: + command = 'LIST ACTIVE ' + group_pattern + else: + command = 'LIST' + resp, lines = self._longcmdstring(command, file) return resp, self._grouplist(lines) def _getdescriptions(self, group_pattern, return_all): Then, you could perhaps re-activate the LIST test in the test suite... # Disabled with gmane as it produces too much data test_list = None In the documentation: - .. method:: NNTP.list(*, file=None) + .. method:: NNTP.list(*, grouppattern=None, file=None) and describe it the same way grouppattern is described in the following command (LIST NEWSGROUPS). ---------- components: Extension Modules messages: 120160 nosy: jelie priority: normal severity: normal status: open title: New parameter for an NNTP newsgroup pattern in LIST ACTIVE type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:22:40 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Mon, 01 Nov 2010 20:22:40 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> New submission from Julien ?LIE : > +# - all commands are encoded as UTF-8 data (using the "surrogateescape" > +# error handler), except for raw message data (POST, IHAVE) > +# - all responses are decoded as UTF-8 data (using the "surrogateescape" > +# error handler), except for raw message data (ARTICLE, HEAD, BODY) It does not seem to work on my news server (news.trigofacile.com): print(s.descriptions('*')) Exception raised with an UnicodeEncodeError. I do not know what is happening. The same command works fine with Python 2.7 and 3.0. Also, for AUTHINFO, be careful that nntplib should not send an UTF-8 string but a byte string. (I have not tested.) The username and the password are byte strings. ---------- components: Extension Modules messages: 120161 nosy: jelie priority: normal severity: normal status: open title: Exception raised when decoding NNTP newsgroup descriptions type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:25:23 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Mon, 01 Nov 2010 20:25:23 +0000 Subject: [issue10285] Other status field flags in documentation for NNTP LIST command In-Reply-To: <1288643123.11.0.762395184057.issue10285@psf.upfronthosting.co.za> Message-ID: <1288643123.11.0.762395184057.issue10285@psf.upfronthosting.co.za> New submission from Julien ?LIE : > +.. method:: NNTP.list(*, file=None) > + > + Send a ``LIST`` command. Return a pair ``(response, list)`` where *list* is a > + list of tuples representing all the groups available from this NNTP server. > + Each tuple has the form ``(group, last, first, flag)``, where > + *group* is a group name, *last* and *first* are the last and first article > + numbers, and *flag* is ``'y'`` if posting is allowed, ``'n'`` if not, > + and ``'m'`` if the newsgroup is moderated. (Note the ordering: *last*, *first*.) There are other values: 'x', 'j', and '=' followed by the name of a newsgroup (alias). I believe the best would be to use what INN mentions in its documentation! (Or otherwise, RFC 3977 and RFC 6048.) http://www.eyrie.org/~eagle/software/inn/docs/active.html It would then give: ------------------------------------------------------------------------------------- ... and *flag* usually takes one of these values: y Local postings and articles from peers are allowed. m The group is moderated and all postings must be approved. n No local postings are allowed, only articles from peers. j Articles from peers are filed in the junk group instead. x No local postings, and articles from peers are ignored. =foo.bar Articles are filed in the group foo.bar instead. If *flag* has another value, then the status of the newsgroup should be considered to be unknown. ------------------------------------------------------------------------------------- Can a bullet list be used in the documentation, to properly indent the flag values? ---------- assignee: docs at python components: Documentation, Extension Modules messages: 120162 nosy: docs at python, jelie priority: normal severity: normal status: open title: Other status field flags in documentation for NNTP LIST command type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:25:49 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Mon, 01 Nov 2010 20:25:49 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288643149.62.0.457757332266.issue10284@psf.upfronthosting.co.za> Changes by Julien ?LIE : ---------- components: +Unicode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:26:56 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Nov 2010 20:26:56 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288643216.86.0.694294182137.issue10284@psf.upfronthosting.co.za> R. David Murray added the comment: What's the exception? If there were any escaped bytes in the string returned by descriptions, you would get an error when you try to print them. This could be a design problem. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:28:26 2010 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 01 Nov 2010 20:28:26 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1288643306.98.0.821731043696.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-20101101.zip is a new version of the regex module. I hope it's finally fixed this time! :-) ---------- Added file: http://bugs.python.org/file19456/issue2636-20101101.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:28:55 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Nov 2010 20:28:55 +0000 Subject: [issue10286] URLOpener => URLopener x2 in fix_urllib.py In-Reply-To: <1288643335.41.0.951306369167.issue10286@psf.upfronthosting.co.za> Message-ID: <1288643335.41.0.951306369167.issue10286@psf.upfronthosting.co.za> New submission from Terry J. Reedy : Lib/lib2to3/fixes/fix_urllib.py, near the top, has ''' MAPPING = {'urllib': [ ('urllib.request', ['URLOpener', 'FancyURLOpener', 'urlretrieve', ''' 'Opener' should by 'opener' in BOTH cases. Non-fix of URLopener reported on python-list by Chris McDonald. ---------- components: 2to3 (2.x to 3.0 conversion tool) keywords: easy messages: 120165 nosy: benjamin.peterson, terry.reedy priority: normal severity: normal stage: needs patch status: open title: URLOpener => URLopener x2 in fix_urllib.py type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:30:10 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Mon, 01 Nov 2010 20:30:10 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1288643410.83.0.589736191962.issue1926@psf.upfronthosting.co.za> Julien ?LIE added the comment: Regarding these two possibilities, please note that the first one is discouraged (per RFC 4642). STARTTLS is the preferrable way to start a TLS session. In some existing implementations, TCP port 563 has been dedicated to NNTP over TLS. These implementations begin the TLS negotiation immediately upon connection and then continue with the initial steps of an NNTP session. This use of TLS on a separate port is discouraged for the reasons documented in Section 7 of "Using TLS with IMAP, POP3 and ACAP" [TLS-IMAPPOP]. ---------- nosy: +jelie _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:46:50 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Nov 2010 20:46:50 +0000 Subject: [issue10232] Tkinter issues with Scrollbar and custom widget list In-Reply-To: <1288366788.46.0.695886030233.issue10232@psf.upfronthosting.co.za> Message-ID: <1288644410.45.0.276578343868.issue10232@psf.upfronthosting.co.za> Terry J. Reedy added the comment: For me, with a standard Python install, 'use tix' would be a good answer. After thanking the respondent, you could try answering 'why' ('I am using a custom build.'). Just remember that python-list and mirrors are like the Wild West: you may get a mix of bullets and beans. I am adding gpolo to nosy in case he can say something. ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:50:12 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Mon, 01 Nov 2010 20:50:12 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288644612.25.0.575505223196.issue10284@psf.upfronthosting.co.za> Julien ?LIE added the comment: Traceback (most recent call last): File "nntplib-test.py", line 10, in print(s.descriptions('*')) File "C:\Program Files\Python32\lib\encodings\cp850.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_map)[0] UnicodeEncodeError: 'charmap' codec can't encode characters in position 3285-3287: character maps to The code was previously working fine with Python 3.1. Looking more in details: (resp, descs) = s.descriptions('*') clefs = list(descs.keys()) clefs.sort() for clef in clefs: print(clef), print(b[clef]) Traceback (most recent call last): File "nntplib-test.py", line 14, in print(clef), print(b[clef]) File "C:\Program Files\Python32\lib\encodings\cp850.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_map)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u0152' in position 0: character maps to That is another error. It corresponds to a description containing ?????, yet in UTF-8. So you mean the issue comes from the MS-DOS console I am using. Well, that seems right. No problem in the Python IDLE! Maybe this issue should be closed then? (Yet, something changed because print() worked fine with the previous version...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:52:02 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Nov 2010 20:52:02 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288644722.38.0.0367202204483.issue10284@psf.upfronthosting.co.za> ?ric Araujo added the comment: FTR, a UTF-8 string *is* a byte string. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:58:20 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Mon, 01 Nov 2010 20:58:20 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288645100.64.0.513264190287.issue10284@psf.upfronthosting.co.za> Julien ?LIE added the comment: Yes, you're right. I meant to say that AUTHINFO is not expecting a UTF-8-encoded string. For instance: AUTHINFO USER ?ric is valid and should not always be transformed by nntplib to: AUTHINFO USER ??ric News servers do a byte-string comparison (as specified in RFC 4643). So if ???ric?? is the expected user name, then it is this very name that is expected! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:00:02 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Nov 2010 21:00:02 +0000 Subject: [issue8805] urllib should support SSL contexts In-Reply-To: <1274717044.09.0.580152326927.issue8805@psf.upfronthosting.co.za> Message-ID: <1288645202.39.0.0698756562208.issue8805@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In #10050 you suggest deprecating *URLopener (not *Opener, the misspelling also in fix_urllib.py #10286) and other stuff. Which do you actually prefer, upgrade or degrade? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:00:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Nov 2010 21:00:12 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288645212.05.0.297761811486.issue10284@psf.upfronthosting.co.za> ?ric Araujo added the comment: But ? cannot be transferred as is. It needs to be encoded to bytes using some encoding. What encoding is correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:01:35 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Nov 2010 21:01:35 +0000 Subject: [issue10184] tarfile touches directories twice In-Reply-To: <1287860800.8.0.977653393639.issue10184@psf.upfronthosting.co.za> Message-ID: <1288645295.91.0.942975266342.issue10184@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:01:45 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Nov 2010 21:01:45 +0000 Subject: [issue10050] urllib.request still has old 2.x urllib primitives In-Reply-To: <1286536471.26.0.454336144311.issue10050@psf.upfronthosting.co.za> Message-ID: <1288645305.73.0.35025801839.issue10050@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:05:57 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Nov 2010 21:05:57 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288645557.53.0.853779009347.issue10284@psf.upfronthosting.co.za> R. David Murray added the comment: ?ric: UTF-8 (IIUC the RFC says "SHOULD be UTF-8"). Julien: yes, there are differences in the way printing to the console works between 2.x and 3.x, and this has caused some surprises for Windows users, where the default console codec is a bit limited. So yes I'm going to close this issue. Reopen it if you find it is not a windows console problem. ---------- components: +Library (Lib) -Extension Modules, Unicode resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:14:09 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 01 Nov 2010 21:14:09 +0000 Subject: [issue9635] Add Py_BREAKPOINT and sys.breakpoint hooks In-Reply-To: <1282175005.37.0.905894818052.issue9635@psf.upfronthosting.co.za> Message-ID: <1288646049.17.0.895490980864.issue9635@psf.upfronthosting.co.za> Dave Malcolm added the comment: Adding updated version of patch, which adds documentation to sys.rst and adds a unit test. I'm a little wary of this: it seems useful but also too much like a self-destruct button for my taste. ---------- Added file: http://bugs.python.org/file19457/py3k-add-breakpoint-2010-11-01-001.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:15:03 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 01 Nov 2010 21:15:03 +0000 Subject: [issue9635] Add Py_BREAKPOINT and sys._breakpoint hooks In-Reply-To: <1282175005.37.0.905894818052.issue9635@psf.upfronthosting.co.za> Message-ID: <1288646103.51.0.978988377987.issue9635@psf.upfronthosting.co.za> Dave Malcolm added the comment: I renamed it from sys.breakpoint to sys._breakpoint, since this is CPython-specific ---------- title: Add Py_BREAKPOINT and sys.breakpoint hooks -> Add Py_BREAKPOINT and sys._breakpoint hooks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:16:49 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 01 Nov 2010 21:16:49 +0000 Subject: [issue9926] Wrapped TestSuite subclass does not get __call__ executed In-Reply-To: <1285252368.31.0.189981048833.issue9926@psf.upfronthosting.co.za> Message-ID: <1288646209.34.0.313078725192.issue9926@psf.upfronthosting.co.za> Michael Foord added the comment: Committed to py3k in revision 86101. Needs porting to Python 2.7 (and unittest2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:18:27 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Mon, 01 Nov 2010 21:18:27 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288646306.99.0.777709989379.issue10284@psf.upfronthosting.co.za> Julien ?LIE added the comment: David: no, the RFC does not mention UTF-8 about AUTHINFO. Please note the subtlety: command =/ authinfo-sasl-command / authinfo-user-command / authinfo-pass-command authinfo-sasl-command = "AUTHINFO" WS "SASL" WS mechanism [WS initial-response] authinfo-user-command = "AUTHINFO" WS "USER" WS username authinfo-pass-command = "AUTHINFO" WS "PASS" WS password initial-response = base64-opt username = 1*user-pass-char password = 1*user-pass-char user-pass-char = B-CHAR ; U- means based on UTF-8, excluding NUL CR and LF ; B- means based on bytes, excluding NUL CR and LF U-CHAR = CTRL / TAB / SP / A-CHAR / UTF8-non-ascii B-CHAR = CTRL / TAB / SP / %x21-FF That is not for nothing that B-CHAR are explicitly mentioned. And *not* U-CHAR. That is why I insist on that fact, and I fear the new nntplib implementation using UTF-8 is breaking the NNTP protocol at some places... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:22:18 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Nov 2010 21:22:18 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1288646538.49.0.783891079831.issue6011@psf.upfronthosting.co.za> STINNER Victor added the comment: I reproduced the problem with the following commands: cd py3k export LANG=C export LC_ALL=C make distclean ./configure --with-pydebug --prefix=/home/haypo/tmp/py3k? make It looks like the problem is that srcdir environment variable of Makefile.pre is ".". In this case, VPATH environment variable is not set and so calculate_path() fails to retrieve the source code directory. configure script contains a strange comment (whereas i cannot find "VPATH" in configure.in): # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:28:29 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Mon, 01 Nov 2010 21:28:29 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288646909.66.0.445791226319.issue10284@psf.upfronthosting.co.za> Julien ?LIE added the comment: ?ric: there is no notion of encoding in a few NNTP commands. Regarding AUTHINFO, the real string that I should have written is: AUTHINFO USER \xC9ric 7-bit bytes are considered to be encoded in ASCII. 8-bit bytes are just 8-bit bytes. No encoding. The news client and the news server have to agree on the setting. Authentification occurs between them. I can imagine the news client in ISO-8859-1 and the news server in ISO-8859-15, and a password with a ????? sign in. Then the password will not be the "same" (when entered on the keyboard), but will match in bytes! I hope my explanation was clear enough now. No encoding, just byte strings here! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:29:54 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Nov 2010 21:29:54 +0000 Subject: [issue9796] Add summary tables for unittest API In-Reply-To: <1283906621.68.0.367606257735.issue9796@psf.upfronthosting.co.za> Message-ID: <1288646994.3.0.694037737501.issue9796@psf.upfronthosting.co.za> Ezio Melotti added the comment: I implemented 2) and 3) in issue9796-2.diff. ---------- assignee: eric.araujo -> ezio.melotti Added file: http://bugs.python.org/file19458/issue9796-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:37:36 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Mon, 01 Nov 2010 21:37:36 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288647456.7.0.65162701785.issue10284@psf.upfronthosting.co.za> Julien ?LIE added the comment: Maybe the bug should be reopened -- or the subject changed -- because the real issue is when I read: # Incompatible changes from the 2.x nntplib: # - all commands are encoded as UTF-8 data (using the "surrogateescape" # error handler), except for raw message data (POST, IHAVE) # - all responses are decoded as UTF-8 data (using the "surrogateescape" # error handler), except for raw message data (ARTICLE, HEAD, BODY) # UTF-8 is the character set for all NNTP commands and responses: they # are automatically encoded (when sending) and decoded (and receiving) # by this class. That is not true. What for XOVER/OVER answers? They contain raw message data. Why aren't they excluded? And XHDR/HDR answers? (As I see that HEAD is excluded, then so should OVER and HDR...) And AUTHINFO, as I have just explained in the comments here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:39:41 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 01 Nov 2010 21:39:41 +0000 Subject: [issue10184] tarfile touches directories twice In-Reply-To: <1287860800.8.0.977653393639.issue10184@psf.upfronthosting.co.za> Message-ID: <1288647581.1.0.431926068139.issue10184@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is now committed as r86102. I opted to call the parameter set_attrs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:39:48 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 01 Nov 2010 21:39:48 +0000 Subject: [issue10184] tarfile touches directories twice In-Reply-To: <1287860800.8.0.977653393639.issue10184@psf.upfronthosting.co.za> Message-ID: <1288647588.84.0.651646165488.issue10184@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:56:32 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Mon, 01 Nov 2010 21:56:32 +0000 Subject: [issue10287] NNTP authentication should check capabilities In-Reply-To: <1288648592.72.0.261739190945.issue10287@psf.upfronthosting.co.za> Message-ID: <1288648592.72.0.261739190945.issue10287@psf.upfronthosting.co.za> New submission from Julien ?LIE : RFC 4643: The server MAY list the AUTHINFO capability with no arguments, which indicates that it complies with this specification and does not permit any authentication commands in its current state. In this case, the client MUST NOT attempt to utilize any AUTHINFO commands, even if it contains logic that might otherwise cause it to do so (e.g., for backward compatibility with servers that are not compliant with this specification). Yet, nntplib attempts to authenticate. self.capabilities() should be sent at startup. If "READER" is advertised, no need to send a "MODE READER" command at all... If "MODE-READER" is advertised, then "MODE READER" (if wanted) can be sent. Then, self.capabilities() should be sent again. Capabilities changed! Then authentication if "AUTHINFO USER" is advertised with NNTP version >=2. If "AUTHINFO" without "USER", no authentication at all. And after authentication, self.capabilities() should be sent again. Please note that the readermode_afterauth variable I see in the source code should normally not be used by a client... RFC 4643 mentions: o the MODE READER command MUST NOT be used in the same session following successful authentication. ---------- components: Library (Lib) messages: 120183 nosy: jelie priority: normal severity: normal status: open title: NNTP authentication should check capabilities versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 23:12:45 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 01 Nov 2010 22:12:45 +0000 Subject: [issue9926] Wrapped TestSuite subclass does not get __call__ executed In-Reply-To: <1285252368.31.0.189981048833.issue9926@psf.upfronthosting.co.za> Message-ID: <1288649565.92.0.592144597519.issue9926@psf.upfronthosting.co.za> Michael Foord added the comment: Committed to release27-maint in revision 86104. ---------- resolution: -> accepted stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 23:41:47 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 01 Nov 2010 22:41:47 +0000 Subject: [issue10288] Remove In-Reply-To: <1288651306.95.0.100885156034.issue10288@psf.upfronthosting.co.za> Message-ID: <1288651306.95.0.100885156034.issue10288@psf.upfronthosting.co.za> New submission from Dave Malcolm : Issue 5793 rationalized all usage of C "character" handling to use "Py_"-prefixed locale-unaware macros, at the "char" level. In particular, this comment was added in two places to Include/bytes_methods.h in r72044: http://svn.python.org/view/python/branches/py3k/Include/bytes_methods.h?view=diff&r1=72043&r2=72044 /* These are left in for backward compatibility and will be removed in 2.8/3.2 */ Given that 3.2 is coming soon, is it time to remove these? (also, the reference to "2.8" caught my eye) Attached is a patch to py3k which removes them, and fixes up various users that were still in the source tree. Am I right in thinking that the undef and redefinition of the various lower-case macros from was already intended to be removed? (given that this messes about with a standard C library) ---------- files: py3k-remove-old-char-compat-macros.patch keywords: patch messages: 120185 nosy: dmalcolm, eric.smith, mark.dickinson priority: normal severity: normal stage: patch review status: open title: Remove versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file19459/py3k-remove-old-char-compat-macros.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 23:42:11 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 01 Nov 2010 22:42:11 +0000 Subject: [issue10288] Remove deprecated C "character" handling macros ISUPPER() etc In-Reply-To: <1288651306.95.0.100885156034.issue10288@psf.upfronthosting.co.za> Message-ID: <1288651331.36.0.173923832876.issue10288@psf.upfronthosting.co.za> Changes by Dave Malcolm : ---------- title: Remove -> Remove deprecated C "character" handling macros ISUPPER() etc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 00:03:35 2010 From: report at bugs.python.org (py.user) Date: Mon, 01 Nov 2010 23:03:35 +0000 Subject: [issue10275] how to know that a module is a module, a function is a function ? In-Reply-To: <1288586495.6.0.985445158981.issue10275@psf.upfronthosting.co.za> Message-ID: <1288652615.84.0.086761573252.issue10275@psf.upfronthosting.co.za> py.user added the comment: Ok, thanks, I thought this is some kind of a bug ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 00:05:20 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Nov 2010 23:05:20 +0000 Subject: [issue8805] urllib should support SSL contexts In-Reply-To: <1274717044.09.0.580152326927.issue8805@psf.upfronthosting.co.za> Message-ID: <1288652720.62.0.892113005545.issue8805@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Degrade; this old implementation (urllib vs urllib2) shoud be phased out IMO. This issue shows that I was myself fooled by the urllib.request documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 00:06:28 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Nov 2010 23:06:28 +0000 Subject: [issue10287] NNTP authentication should check capabilities In-Reply-To: <1288648592.72.0.261739190945.issue10287@psf.upfronthosting.co.za> Message-ID: <1288652788.98.0.59223148383.issue10287@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 00:34:02 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Nov 2010 23:34:02 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288654442.42.0.114502418368.issue10273@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Just my 2 cents: - I think dedocumenting the type-specific methods is fine (it doesn't mean removing them, though); or perhaps relegate them to some advanced section - It's unfortunate that the renaming suggestion comes so late; I'm not sure it's a good idea to rename lots of things after they were introduced (although I really don't like assertRegexpMatches) - assertIsInstance looks more natural to me than the alternative - I don't think there's any point in undoing the package splitting, since it makes Michael's work easier and other people didn't object (not people who actively contribute to unittest, that is) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 00:54:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Nov 2010 23:54:57 +0000 Subject: [issue10289] Document magic methods called by built-in functions In-Reply-To: <1288655696.94.0.809001507215.issue10289@psf.upfronthosting.co.za> Message-ID: <1288655696.94.0.809001507215.issue10289@psf.upfronthosting.co.za> New submission from ?ric Araujo : At the top of Doc/library/functions.rst, which documents built-in functions like abs, getattr or hash, a comment reads ?document all delegations to __special__ methods?. Some functions are already good: enumerate for instance does link to the definition of iterator and hints about the __next__ method, format points to __format__, etc. They can serve as example for how to add links (in plain text and in the global index). ---------- assignee: docs at python components: Documentation messages: 120189 nosy: docs at python, eric.araujo priority: normal severity: normal stage: needs patch status: open title: Document magic methods called by built-in functions versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:01:59 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Nov 2010 00:01:59 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288656119.19.0.693347733571.issue10284@psf.upfronthosting.co.za> R. David Murray added the comment: That's not what you opened the bug about, though, according to the title. I discussed the headers-in-things-other-than HEAD/ARTICLE, and Antoine was of the opinion that they were "supposed" to be utf-8 and that in any case using surrogate escape was good enough in context. (Headers could also, of course, be MIME transfer encoded, but in that case the header decode will turn them into the correct unicode, assuming they were encoded correctly). Perhaps this design decision needs to be revisited, but if so you'll need a different example of a problem, and so I think this ticket should remain closed and you should open a new one. Two new ones, actually, since AUTHINFO is yet a different problem. And given that the standard you quote specifies bytes without an encoding, there may be *no* solution that works (that is, the standard appears to be broken, since most people expect to be able to use text strings for passwords). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:03:10 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 02 Nov 2010 00:03:10 +0000 Subject: [issue10289] Document magic methods called by built-in functions In-Reply-To: <1288655696.94.0.809001507215.issue10289@psf.upfronthosting.co.za> Message-ID: <1288656190.53.0.0933186272062.issue10289@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: ?ric, I just wanted to link to a related discussion we had under issue 8983. See msg107689. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:05:33 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 02 Nov 2010 00:05:33 +0000 Subject: [issue10278] add time.wallclock() method In-Reply-To: <1288624210.23.0.0497533122542.issue10278@psf.upfronthosting.co.za> Message-ID: <1288656333.86.0.348093042163.issue10278@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Certainly. I was going to put this simple code in time.py when I realized that time was a C module. The main point, as Antoine points out, is that time.clock() means two seriously different things on the two main platforms, and time.clock() is potentially inadequate on one of them. I put in the patch since it was quick to do, but I'll provoke a discussion on python-ideas for now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:18:58 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 02 Nov 2010 00:18:58 +0000 Subject: [issue10278] add time.wallclock() method In-Reply-To: <1288656333.86.0.348093042163.issue10278@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: 2010/11/1 Kristj?n Valur J?nsson : .. > I put in the patch since it was quick to do, but I'll provoke a discussion > on python-ideas for now. I am looking forward to it. You may find reviewing the following issues helpful for your case: #9079, #2736, and #9528. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:22:24 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Nov 2010 00:22:24 +0000 Subject: [issue10282] IMPLEMENTATION token differently delt with in NNTP capability In-Reply-To: <1288642567.32.0.7785411032.issue10282@psf.upfronthosting.co.za> Message-ID: <1288657344.12.0.82582749656.issue10282@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:24:16 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Nov 2010 00:24:16 +0000 Subject: [issue10283] New parameter for an NNTP newsgroup pattern in LIST ACTIVE In-Reply-To: <1288642864.21.0.311033761057.issue10283@psf.upfronthosting.co.za> Message-ID: <1288657456.58.0.00793927515472.issue10283@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:25:02 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Nov 2010 00:25:02 +0000 Subject: [issue10285] Other status field flags in documentation for NNTP LIST command In-Reply-To: <1288643123.11.0.762395184057.issue10285@psf.upfronthosting.co.za> Message-ID: <1288657502.13.0.0423600215779.issue10285@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:28:59 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Nov 2010 00:28:59 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288657739.43.0.106896228103.issue10273@psf.upfronthosting.co.za> Raymond Hettinger added the comment: [Antoine] > I would prefer assertRegex to assertRegexp That makes sense. It is the name used in other unittest implementations, it matches what the re module used to be called in Python, and it avoids issues with camel casing (i.e. Regexp vs RegExp). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:29:13 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 02 Nov 2010 00:29:13 +0000 Subject: [issue10260] Add a threading.Condition.wait_for() method In-Reply-To: <1288500409.32.0.639501337625.issue10260@psf.upfronthosting.co.za> Message-ID: <1288657753.33.0.884410299435.issue10260@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Good points, Jeffrey. Documentation can be improved and cond.wait_for(pred) is indeed not guaranteed to wake up when predicate is true unless someone calls notifyAll. I spent some time thinking of a name. I tried wait_predicate and predicate_wait, but wait_for seemed natural. Any other ideas? How about wait_until_true? My original method had this as a free function, but I moved it into the Condition because I could see no other kind of primitive that would use it. I agree that it is unfortunate to pull what is essentially a utility function into the Condition variable, so I am leaning towards keeping it a module function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:29:17 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Nov 2010 00:29:17 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288657757.43.0.589890082692.issue10273@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: michael.foord -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:51:39 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 02 Nov 2010 00:51:39 +0000 Subject: [issue10290] Fix resource warnings in distutils In-Reply-To: <1288659099.71.0.79415360493.issue10290@psf.upfronthosting.co.za> Message-ID: <1288659099.71.0.79415360493.issue10290@psf.upfronthosting.co.za> New submission from Brian Curtin : The attached patch cleans up the numerous ResourceWarning messages that distutils test runs generate. The changes basically just close all open files - some in the test suite, some in the library code. No context managers were used since distutils appears in PEP 291 as requiring 2.3 support. ---------- assignee: tarek components: Distutils, Library (Lib), Tests messages: 120196 nosy: brian.curtin, eric.araujo, tarek priority: normal severity: normal stage: patch review status: open title: Fix resource warnings in distutils type: resource usage versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:52:43 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 02 Nov 2010 00:52:43 +0000 Subject: [issue10290] Fix resource warnings in distutils In-Reply-To: <1288659099.71.0.79415360493.issue10290@psf.upfronthosting.co.za> Message-ID: <1288659163.22.0.628782122702.issue10290@psf.upfronthosting.co.za> Brian Curtin added the comment: Wow, I should open my eyes. Dupe of #10252 ---------- assignee: tarek -> resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 02:01:13 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 02 Nov 2010 01:01:13 +0000 Subject: [issue10252] Fix resource warnings in distutils In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1288659673.4.0.374910174587.issue10252@psf.upfronthosting.co.za> Brian Curtin added the comment: The patch shouldn't use context managers, as distutils claims to support 2.3. #10290 contains a similar patch which doesn't use 'with'. (Sorry to duplicate efforts here, forgot to search...) ---------- nosy: +brian.curtin status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 02:40:18 2010 From: report at bugs.python.org (Michael Foord) Date: Tue, 02 Nov 2010 01:40:18 +0000 Subject: [issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input In-Reply-To: <1288416372.65.0.387803067469.issue10242@psf.upfronthosting.co.za> Message-ID: <1288662018.68.0.386196482119.issue10242@psf.upfronthosting.co.za> Michael Foord added the comment: On Python-dev Nick Coghlan suggests a fix for the fast-path that would allow us to keep it whilst fixing this bug (not tested yet but adding this note not to lose it). The issue of the name of this method is in 10273. Looking at assertItemsEqual, I'd be inclined to insert a check that falls back to the "unorderable_list_difference" approach in the case where "expected != sorted(reversed(expected))". As far as I can tell, that check is a valid partial ordering detector for any sequence that contains one or more pairs of items for which LT, EQ and GE are all False: >>> seq = [{1}, {2}] >>> seq[0] < seq[1] False >>> seq[0] == seq[1] False >>> seq[0] > seq[1] False >>> sorted(seq) [{1}, {2}] >>> sorted(reversed(sorted(seq))) [{2}, {1}] Obviously, if the sequence doesn't contain any such items (e.g. all subsets of each other), then it will look like a total ordering and use the fast path. I see that as an upside :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 03:03:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 02 Nov 2010 02:03:32 +0000 Subject: [issue10291] Clean-up turtledemo in-package documentation In-Reply-To: <1288663412.18.0.821423720263.issue10291@psf.upfronthosting.co.za> Message-ID: <1288663412.18.0.821423720263.issue10291@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Since after closing of issue #10199, docstrings in demo scripts are accessible to pydoc, it is important to bring them up to date. For example, turtledemo.wikipedia docstring contains a reference to nonexistent wikipedia1 and calls itself tdemo_wikipedia3.py. In addition, the turtledemo package contains three text files: Lib/turtledemo/about_turtle.txt, Lib/turtledemo/about_turtledemo.txt, and Lib/turtledemo/demohelp.txt. The contents of these files should be moved to appropriate (doc)strings inside appropriate .py files. ---------- assignee: belopolsky components: Demos and Tools, Documentation keywords: easy messages: 120200 nosy: belopolsky, eric.araujo, georg.brandl, glingl, gregorlingl, gvanrossum, ned.deily, r.david.murray, rhettinger, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Clean-up turtledemo in-package documentation versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 03:39:42 2010 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 Nov 2010 02:39:42 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288665582.06.0.352086480713.issue10273@psf.upfronthosting.co.za> Brett Cannon added the comment: Just sent an email to python-dev, but since this issue sparked it, I might as well comment here: unittest shouldn't be made back into a single module. Ignoring the fact that the file structure has nothing to do with the public API and so is orthogonal to the main thrust of this issue, changing it back will break imports in code from Python 2.7 that uses the more modular structure that now underlies unittest. Considering how much whining we get about code breakage any time Michael tries to fix anything in the module I think this is the last thing anyone wants to have happen. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 03:49:47 2010 From: report at bugs.python.org (Jacques Grove) Date: Tue, 02 Nov 2010 02:49:47 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1288666187.24.0.0719987410046.issue2636@psf.upfronthosting.co.za> Jacques Grove added the comment: OK, I think this might be the last one I will find for the moment: $ cat test.py import re, regex text = "test?" regexp = "test\?" sub_value = "result\?" print repr(re.sub(regexp, sub_value, text)) print repr(regex.sub(regexp, sub_value, text)) $ python test.py 'result\\?' 'result?' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 04:51:36 2010 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 02 Nov 2010 03:51:36 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1288669896.09.0.540564558078.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-20101102.zip is a new version of the regex module. ---------- Added file: http://bugs.python.org/file19460/issue2636-20101102.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 05:08:02 2010 From: report at bugs.python.org (Jacques Grove) Date: Tue, 02 Nov 2010 04:08:02 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1288670882.84.0.0142930399135.issue2636@psf.upfronthosting.co.za> Jacques Grove added the comment: Spoke too soon, although this might be a valid divergence in behavior: $ cat test.py import re, regex text = "test: 2" print regex.sub('(test)\W+(\d+)(?:\W+(TEST)\W+(\d))?', '\\2 \\1, \\4 \\3', text) print re.sub('(test)\W+(\d+)(?:\W+(TEST)\W+(\d))?', '\\2 \\1, \\4 \\3', text) $ python test.py 2 test, Traceback (most recent call last): File "test.py", line 6, in print re.sub('(test)\W+(\d+)(?:\W+(TEST)\W+(\d))?', '\\2 \\1, \\4 \\3', text) File "/usr/lib64/python2.7/re.py", line 151, in sub return _compile(pattern, flags).sub(repl, string, count) File "/usr/lib64/python2.7/re.py", line 278, in filter return sre_parse.expand_template(template, match) File "/usr/lib64/python2.7/sre_parse.py", line 787, in expand_template raise error, "unmatched group" sre_constants.error: unmatched group ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 05:38:02 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Nov 2010 04:38:02 +0000 Subject: [issue10278] add time.wallclock() method In-Reply-To: <1288624210.23.0.0497533122542.issue10278@psf.upfronthosting.co.za> Message-ID: <1288672682.28.0.289967377517.issue10278@psf.upfronthosting.co.za> STINNER Victor added the comment: I would also be nice to have a "monotonic" clock in Python. See monotonic.py for an example. But I don't know if it solves the same problem than time.wallclock() or not. I need a monotonic clock for a server on which NTP is sometimes called to resynchronize the system clock (and the NTP server may be change by the user). ---------- nosy: +haypo Added file: http://bugs.python.org/file19461/monotonic.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 05:52:20 2010 From: report at bugs.python.org (Jacques Grove) Date: Tue, 02 Nov 2010 04:52:20 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1288673540.59.0.224029022463.issue2636@psf.upfronthosting.co.za> Jacques Grove added the comment: Another, with backreferences: import re, regex text = "TEST, BEST; LEST ; Lest 123 Test, Best" regexp = "(?i)(.{1,40}?),(.{1,40}?)(?:;)+(.{1,80}).{1,40}?\\3(\ |;)+(.{1,80}?)\\1" print re.findall(regexp, text) print regex.findall(regexp, text) $ python test.py [('TEST', ' BEST', ' LEST', ' ', '123 ')] [('T', ' BEST', ' ', ' ', 'Lest 123 ')] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 05:54:46 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 02 Nov 2010 04:54:46 +0000 Subject: [issue10278] add time.wallclock() method In-Reply-To: <1288624210.23.0.0497533122542.issue10278@psf.upfronthosting.co.za> Message-ID: <1288673686.1.0.319456699072.issue10278@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Well, that is sort of what I'm trying to achieve. Note that you probably want to use QueryPerformaceCounter on windows (or simply time.clock()) or at least GetTickCount64 which doesn't wrap around after 50 days :). Also, I'm trying to get the highest resolution possible... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 06:58:12 2010 From: report at bugs.python.org (JP St. Pierre) Date: Tue, 02 Nov 2010 05:58:12 +0000 Subject: [issue10292] tarinfo should use relative symlinks In-Reply-To: <1288677491.56.0.490634807811.issue10292@psf.upfronthosting.co.za> Message-ID: <1288677491.56.0.490634807811.issue10292@psf.upfronthosting.co.za> New submission from JP St. Pierre : With all the tools I've used, the target of a symlink appears to be relative to the actual symlink entry. Fix this. ---------- components: Library (Lib) messages: 120208 nosy: magcius priority: normal severity: normal status: open title: tarinfo should use relative symlinks versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 06:59:07 2010 From: report at bugs.python.org (JP St. Pierre) Date: Tue, 02 Nov 2010 05:59:07 +0000 Subject: [issue10292] tarinfo should use relative symlinks In-Reply-To: <1288677491.56.0.490634807811.issue10292@psf.upfronthosting.co.za> Message-ID: <1288677547.99.0.890838003162.issue10292@psf.upfronthosting.co.za> Changes by JP St. Pierre : ---------- keywords: +patch Added file: http://bugs.python.org/file19462/tarinfo-10292.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 07:44:05 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 02 Nov 2010 06:44:05 +0000 Subject: [issue10292] tarinfo should use relative symlinks In-Reply-To: <1288677491.56.0.490634807811.issue10292@psf.upfronthosting.co.za> Message-ID: <1288680245.27.0.21933204998.issue10292@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- assignee: -> lars.gustaebel nosy: +lars.gustaebel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 09:38:34 2010 From: report at bugs.python.org (Andrew Vant) Date: Tue, 02 Nov 2010 08:38:34 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1288687114.88.0.948001871059.issue1926@psf.upfronthosting.co.za> Andrew Vant added the comment: At Antoine's suggestion I've written a new patch for this for 3.2, adding support for both SSL on 563 and STARTTLS on a normal connection. A NNTP_SSL class supports the former and a NNTP.starttls() method supports the latter. As a side effect of getting starttls working I had to add a NNTP.login() method as well. (see below) The patch updates nntplib.py, test_nntplib.py, nntplib.rst, and Misc/NEWS. Some implementation notes: By default, NNTP objects attempt to log in during initialization,and there didn't seem to be any support for logging in later. This was a problem as STARTTLS has to be issued before logging in. In order to get around this and handle a STARTTLS nuance involving CAPABILITIES, I moved the authentication part of _NNTPBase.__init__ into a method of its own, NNTP.login(), and another piece of it into NNTP.getcapabilities(). This doesn't affect the observable behavior of NNTP() or the existing methods. As a side note, IMHO NNTP shouldn't attempt to log in at initialization at all. The user, password, and usenetrc args should not be part of the constructors and the program using the library should be able to choose when or if to log in after connecting. I couldn't think of any way to do this without breaking existing programs, though. At the very least I think usenetrc should default to False, but that would break programs that rely on the default behavior too, I think. I updated the test cases, with a caveat. They use gmane to perform the tests. Gmane doesn't support starttls. Therefor the tests currently only check for correct failure rather than correct success. There's test code for the starttls() method but it never runs. I checked the functionality against eternal-september to be sure it does, in fact, correctly succeed as well, but I'm not about to put my login details in the automatic test script. ;-) The NNTPS-on-563 test, OTOH, works exactly like the existing NNTP test and seems to work fine. It was a hell of a lot easier to implement that part too. Hope I didn't miss anything. First time doing this for a public project. Apparently the personal-itch theory is correct. ---------- nosy: +ajvant Added file: http://bugs.python.org/file19463/python_nntp_ssl_patch1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 09:43:47 2010 From: report at bugs.python.org (Andrew Vant) Date: Tue, 02 Nov 2010 08:43:47 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1288687427.67.0.76985031712.issue1926@psf.upfronthosting.co.za> Andrew Vant added the comment: Also, Julien: Thanks for mentioning the 563-discouraged thing. I added a note about it to the new documentation before submitting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 10:26:36 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 02 Nov 2010 09:26:36 +0000 Subject: [issue10293] PyMemoryView object has obsolete members In-Reply-To: <1288689996.27.0.790374524403.issue10293@psf.upfronthosting.co.za> Message-ID: <1288689996.27.0.790374524403.issue10293@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : The PyMemoryObject has a "base" member which appears to be obsolete. Furthermore, the function do_release() attempt to perform some obsolete-looking woodo with base if it happens to be a tuple. Looks dangerous. ---------- components: Interpreter Core messages: 120211 nosy: krisvale priority: normal severity: normal status: open title: PyMemoryView object has obsolete members type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 10:50:24 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 02 Nov 2010 09:50:24 +0000 Subject: [issue10288] Remove In-Reply-To: <1288651306.95.0.100885156034.issue10288@psf.upfronthosting.co.za> Message-ID: <4CCFDEDB.2020804@egenix.com> Marc-Andre Lemburg added the comment: Dave Malcolm wrote: > > New submission from Dave Malcolm : > > Issue 5793 rationalized all usage of C "character" handling to use "Py_"-prefixed locale-unaware macros, at the "char" level. > > In particular, this comment was added in two places to Include/bytes_methods.h in r72044: > http://svn.python.org/view/python/branches/py3k/Include/bytes_methods.h?view=diff&r1=72043&r2=72044 > > /* These are left in for backward compatibility and will be removed > in 2.8/3.2 */ > > Given that 3.2 is coming soon, is it time to remove these? (also, the reference to "2.8" caught my eye) +1 > Attached is a patch to py3k which removes them, and fixes up various users that were still in the source tree. > > Am I right in thinking that the undef and redefinition of the various lower-case macros from was already intended to be removed? (given that this messes about with a standard C library) Please remove those as well. I suppose those were mainly used to find instances of islower() et al. in the source code. ---------- nosy: +lemburg title: Remove deprecated C "character" handling macros ISUPPER() etc -> Remove _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 11:28:34 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Tue, 02 Nov 2010 10:28:34 +0000 Subject: [issue10086] test_sysconfig failure with site-packages In-Reply-To: <1287422116.51.0.705691169894.issue10086@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: ,AC?ric Araujo writes: > Attaching a patch with your two suggestions. > Added file: http://bugs.python.org/file19264/fix10086.diff Not quite, since I suggested global_path.startswith(os.path.join(base, "")) instead of global_path.startswith(base) I should have mentioned, the join appends a directory terminator to base. Not sure if that's the correct way to do it. Anyway, your patch does not catch a similar failure (if this can happen): base = "/site" global_path = "/site-nonsense/..." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 11:32:45 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 02 Nov 2010 10:32:45 +0000 Subject: [issue10288] Remove deprecated C "character" handling macros ISUPPER() etc In-Reply-To: <1288651306.95.0.100885156034.issue10288@psf.upfronthosting.co.za> Message-ID: <1288693965.56.0.600754215918.issue10288@psf.upfronthosting.co.za> Changes by Marc-Andre Lemburg : ---------- title: Remove -> Remove deprecated C "character" handling macros ISUPPER() etc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 12:29:04 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 11:29:04 +0000 Subject: [issue10260] Add a threading.Condition.wait_for() method In-Reply-To: <1288657753.33.0.884410299435.issue10260@psf.upfronthosting.co.za> Message-ID: <1288697339.3549.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > I spent some time thinking of a name. I tried wait_predicate and > predicate_wait, but wait_for seemed natural. Any other ideas? > How about wait_until_true? wait_for is ok IMO. > My original method had this as a free function, but I moved it into > the Condition because I could see no other kind of primitive that > would use it. I agree that it is unfortunate to pull what is > essentially a utility function into the Condition variable, so I am > leaning towards keeping it a module function. I'm not sure I see the point. It's an operation on a Condition variable, so it's natural to have it as a Condition method. A module function would feel rather weird. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 12:56:07 2010 From: report at bugs.python.org (Vlastimil Brom) Date: Tue, 02 Nov 2010 11:56:07 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1288698967.27.0.673022040104.issue2636@psf.upfronthosting.co.za> Vlastimil Brom added the comment: There seems to be a bug in the handling of numbered backreferences in sub() in issue2636-20101102.zip I believe, it would be a fairly new regression, as it would be noticed rather soon. (tested on Python 2.7; winXP) >>> re.sub("([xy])", "-\\1-", "abxc") 'ab-x-c' >>> regex.sub("([xy])", "-\\1-", "abxc") Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\regex.py", line 176, in sub return _compile(pattern, flags).sub(repl, string, count, pos, endpos) File "C:\Python27\lib\regex.py", line 375, in _compile_replacement compiled.extend(items) TypeError: 'int' object is not iterable >>> vbr ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 13:08:15 2010 From: report at bugs.python.org (Vlastimil Brom) Date: Tue, 02 Nov 2010 12:08:15 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1288699695.04.0.504912510142.issue2636@psf.upfronthosting.co.za> Vlastimil Brom added the comment: Sorry for the noise, please, forgot my previous msg120215; I somehow managed to keep an older version of _regex_core.py along with the new regex.py in the Lib directory, which are obviously incompatible. After updating the files correctly, the mentioned examples work correctly. vbr ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 13:42:43 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Nov 2010 12:42:43 +0000 Subject: [issue4510] ValueError for list.remove() not very helpful In-Reply-To: <1228347518.63.0.0108612017272.issue4510@psf.upfronthosting.co.za> Message-ID: <1288701763.57.0.107334568799.issue4510@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This has already been implemented. ---------- nosy: +benjamin.peterson resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 13:43:30 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Nov 2010 12:43:30 +0000 Subject: [issue7266] test_lib2to3 failure under Windows In-Reply-To: <1257433591.14.0.555852020916.issue7266@psf.upfronthosting.co.za> Message-ID: <1288701810.38.0.543663115815.issue7266@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 13:45:47 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Nov 2010 12:45:47 +0000 Subject: [issue9796] Add summary tables for unittest API In-Reply-To: <1283906621.68.0.367606257735.issue9796@psf.upfronthosting.co.za> Message-ID: <1288701947.21.0.399941688156.issue9796@psf.upfronthosting.co.za> Ezio Melotti added the comment: issue9796-3.diff improves the rendering of the HTML tables. (Note: the patch just adds the tables, short paragraphs before them and moves a few methods around to match the division and the order of the tables, without changing their content.) ---------- components: +Tests Added file: http://bugs.python.org/file19464/issue9796-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 13:51:09 2010 From: report at bugs.python.org (Steven Bethard) Date: Tue, 02 Nov 2010 12:51:09 +0000 Subject: [issue9340] argparse parse_known_args does not work with subparsers In-Reply-To: <1279886405.92.0.918578525345.issue9340@psf.upfronthosting.co.za> Message-ID: <1288702269.43.0.0953130765205.issue9340@psf.upfronthosting.co.za> Steven Bethard added the comment: Fixed with a variant of Catherine's patch (following R. David Murray's suggestion of inlining the two methods) in r86111 (3.X) and r86112 (2.7). Also added one more test to make sure that the order of the extra arguments is consistent (extra arguments from main parser before extra arguments from subparser). ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 14:11:39 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Nov 2010 13:11:39 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288703499.42.0.049258156035.issue10273@psf.upfronthosting.co.za> Ezio Melotti added the comment: FWIW in addition to assertRegexpMatches and assertNotRegexpMatches there are 2 more methods that use "Regexp": assertRaisesRegexp and the newly introduced assertWarnsRegexp. ---------- components: +Tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 14:14:54 2010 From: report at bugs.python.org (Michael Foord) Date: Tue, 02 Nov 2010 13:14:54 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288703694.89.0.823920882445.issue10273@psf.upfronthosting.co.za> Michael Foord added the comment: @Ezio Good catch. Even though several of us (including myself) prefer assertRegex over assertRegexp it is probably better to have consistent APIs otherwise people will never remember which methods have the 'p' and which don't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 14:17:35 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Nov 2010 13:17:35 +0000 Subject: [issue7826] support caching for 2to3 In-Reply-To: <1264985952.93.0.779639488883.issue7826@psf.upfronthosting.co.za> Message-ID: <1288703855.81.0.660244632762.issue7826@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm going to reject this for now. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 14:51:11 2010 From: report at bugs.python.org (Eric Smith) Date: Tue, 02 Nov 2010 13:51:11 +0000 Subject: [issue10288] Remove deprecated C "character" handling macros ISUPPER() etc In-Reply-To: <1288651306.95.0.100885156034.issue10288@psf.upfronthosting.co.za> Message-ID: <1288705871.11.0.269106444809.issue10288@psf.upfronthosting.co.za> Eric Smith added the comment: +1 I agree on removing the lowercase versions. It's sort of handy having them around to prevent accidental uses. But the same could be said for other similar macros/functions. Plus they wouldn't work if the isXXX symbols were really functions, not macros (not that I know if that's even allowed by the standard). The patch looks okay to me, although I didn't actually compile and run the tests. You'll find out soon enough! The issue number in the NEWS entry needs to be fixed, of course. Thanks for doing this, Dave. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:18:26 2010 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Tue, 02 Nov 2010 14:18:26 +0000 Subject: [issue10292] tarinfo should use relative symlinks In-Reply-To: <1288677491.56.0.490634807811.issue10292@psf.upfronthosting.co.za> Message-ID: <1288707506.17.0.186573919193.issue10292@psf.upfronthosting.co.za> Lars Gust?bel added the comment: Apparently you were in quite a hurry when you filed this bug report. - What is the exact problem and how does it manifest itself? - Any helpful details (tracebacks, output)? - Is there a testcase or example code you can provide? - Which other tools are you talking about? - Your patch is faulty (upperdir is undefined). - The patch does not apply to neither r27 tag nor release27-maint branch although you claim that 2.7 is affected. - Which exact Python version are you using on what platform? - Oh, and a little more politeness wouldn't hurt. Okay, so please ask again. I am curious to see what you've found. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:36:14 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 02 Nov 2010 14:36:14 +0000 Subject: [issue7292] Multiprocessing Joinable race condition? In-Reply-To: <1257748286.94.0.346139031927.issue7292@psf.upfronthosting.co.za> Message-ID: <1288708574.55.0.000473496104026.issue7292@psf.upfronthosting.co.za> Changes by Ask Solem : ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:37:27 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 02 Nov 2010 14:37:27 +0000 Subject: [issue5930] Transient error in multiprocessing (test_number_of_objects) In-Reply-To: <1241472804.71.0.981647805709.issue5930@psf.upfronthosting.co.za> Message-ID: <1288708647.28.0.677337556277.issue5930@psf.upfronthosting.co.za> Changes by Ask Solem : ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:37:51 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 02 Nov 2010 14:37:51 +0000 Subject: [issue10267] test_ttk_guionly leaks many references In-Reply-To: <1288542306.75.0.249495592657.issue10267@psf.upfronthosting.co.za> Message-ID: <1288708671.01.0.606327103531.issue10267@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: It seems this issue can be fixed by attached patch. ---------- keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file19465/py3k_fix_test_ttk_guionly_refleak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:41:52 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 02 Nov 2010 14:41:52 +0000 Subject: [issue9733] Can't iterate over multiprocessing.managers.DictProxy In-Reply-To: <1283349080.83.0.871806054056.issue9733@psf.upfronthosting.co.za> Message-ID: <1288708912.24.0.680893033077.issue9733@psf.upfronthosting.co.za> Changes by Ask Solem : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:44:06 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 02 Nov 2010 14:44:06 +0000 Subject: [issue3876] multiprocessing does not compile on systems which do not define sem_timedwait In-Reply-To: <1221541852.59.0.453473189868.issue3876@psf.upfronthosting.co.za> Message-ID: <1288709046.36.0.024550286526.issue3876@psf.upfronthosting.co.za> Ask Solem added the comment: What is the status of this issue? There are several platform listed here, which I unfortunately don't have access to. ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:51:19 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 02 Nov 2010 14:51:19 +0000 Subject: [issue9955] multiprocessing.Pipe segmentation fault when recv of unpicklable object In-Reply-To: <1285527695.71.0.573625122377.issue9955@psf.upfronthosting.co.za> Message-ID: <1288709479.59.0.758166881831.issue9955@psf.upfronthosting.co.za> Ask Solem added the comment: Can't reproduce on Python 2.7, but can indeed reproduce on 2.6. Issue fixed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:57:35 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 02 Nov 2010 14:57:35 +0000 Subject: [issue10133] multiprocessing: conn_recv_string() broken error handling In-Reply-To: <1287346495.15.0.809946654619.issue10133@psf.upfronthosting.co.za> Message-ID: <1288709855.2.0.17132932594.issue10133@psf.upfronthosting.co.za> Changes by Ask Solem : ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:59:30 2010 From: report at bugs.python.org (Jasper St. Pierre) Date: Tue, 02 Nov 2010 14:59:30 +0000 Subject: [issue10292] tarinfo should use relative symlinks In-Reply-To: <1288677491.56.0.490634807811.issue10292@psf.upfronthosting.co.za> Message-ID: <1288709970.4.0.0407902568175.issue10292@psf.upfronthosting.co.za> Jasper St. Pierre added the comment: Oh man, attaching the wrong diff and getting the diff wrong. The issue I found with Python 2.7: when creating a simple link in tar: $ mkdir tar_test $ cd tar_test $ touch one $ ln -s one two $ cd .. $ tar czf tar_test.tgz tar_test It seems obvious that there would be a relative link in the tar file: -rwxrwxrwx jstpierre/me 2010-11-02 10:57:15 tar_test/two -> one Unfortunately, as far as I can tell, tarfile treats this as an absolute path, and fails when extracting: >>> tf.extractfile("tar_test/two") Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/tarfile.py", line 2122, in extractfile tarinfo)) File "/usr/lib/python2.6/tarfile.py", line 2105, in extractfile if tarinfo.isreg(): AttributeError: 'NoneType' object has no attribute 'isreg' I was trying to fix that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:16:14 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 02 Nov 2010 15:16:14 +0000 Subject: [issue8028] self.terminate() from a multiprocessing.Process raises AttributeError exception In-Reply-To: <1267300713.42.0.457825051385.issue8028@psf.upfronthosting.co.za> Message-ID: <1288710974.23.0.602971353125.issue8028@psf.upfronthosting.co.za> Ask Solem added the comment: It seems that Process.terminate is not meant to be used by the child, but only the parent. >From the documentation: "Note that the start(), join(), is_alive() and exit_code methods should only be called by the process that created the process object." Either terminate() should be added to this list, or terminate should be patch to call sys.exit in a child process. I vote for the former, so I attached a doc patch. ---------- keywords: +patch Added file: http://bugs.python.org/file19466/i8028.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:28:10 2010 From: report at bugs.python.org (Jasper St. Pierre) Date: Tue, 02 Nov 2010 15:28:10 +0000 Subject: [issue10292] tarinfo should use relative symlinks In-Reply-To: <1288677491.56.0.490634807811.issue10292@psf.upfronthosting.co.za> Message-ID: <1288711690.86.0.0124783063088.issue10292@psf.upfronthosting.co.za> Jasper St. Pierre added the comment: Uh, I just noticed the "python2.6" in the traceback. Looks like I *was* using 2.6 because Cygwin decided to downgrade for some reason. Uh, sorry about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:33:07 2010 From: report at bugs.python.org (Nik Tautenhahn) Date: Tue, 02 Nov 2010 15:33:07 +0000 Subject: [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288711987.81.0.567678697514.issue10038@psf.upfronthosting.co.za> Nik Tautenhahn added the comment: There is even more inconsistency here. As already mentioned, we have this: >>> import json >>> json.loads(json.dumps("abc")) 'abc' If, however, I am evil and hide _json.so (which is the C-part of the json module for speedup), the JSON code falls back to its python implementation and voila: >>> import json >>> json.loads(json.dumps("abc")) u'abc' Not so neat, if your fallback is not a fallback but shows such different behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:33:31 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 02 Nov 2010 15:33:31 +0000 Subject: [issue5573] multiprocessing Pipe poll() and recv() semantics. In-Reply-To: <1238096312.97.0.564685442594.issue5573@psf.upfronthosting.co.za> Message-ID: <1288712011.77.0.385540622735.issue5573@psf.upfronthosting.co.za> Changes by Ask Solem : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:40:19 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 02 Nov 2010 15:40:19 +0000 Subject: [issue8037] multiprocessing.Queue's put() not atomic thread wise In-Reply-To: <1267482006.55.0.281200221208.issue8037@psf.upfronthosting.co.za> Message-ID: <1288712419.08.0.832685055582.issue8037@psf.upfronthosting.co.za> Ask Solem added the comment: Pickling on put makes sense to me. I can't think of cases where this could break existing code either. I think this may also resolve issue 8323 ---------- stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:41:45 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Tue, 02 Nov 2010 15:41:45 +0000 Subject: [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1288711987.81.0.567678697514.issue10038@psf.upfronthosting.co.za> Message-ID: Fred L. Drake, Jr. added the comment: Alternately, the Python implementation may be thought of as definitive and the optimizations are broken. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:42:58 2010 From: report at bugs.python.org (qpatata) Date: Tue, 02 Nov 2010 15:42:58 +0000 Subject: [issue9919] gdbinit lineno result is one line in excess In-Reply-To: <1285151676.58.0.234965887204.issue9919@psf.upfronthosting.co.za> Message-ID: <1288712578.13.0.256686759013.issue9919@psf.upfronthosting.co.za> qpatata added the comment: I'm sorry, I've not explained correctly. I'm wondering if the addition of the \n is ok or not, taken into account that it breaks the format of the "pyframe" macro output. It could be better to keep the older version (without the \n"). Kind regards. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:05:16 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Nov 2010 16:05:16 +0000 Subject: [issue9796] Add summary tables for unittest API In-Reply-To: <1283906621.68.0.367606257735.issue9796@psf.upfronthosting.co.za> Message-ID: <1288713916.92.0.647060271403.issue9796@psf.upfronthosting.co.za> Ezio Melotti added the comment: Updated patch after the changes made in r86118. ---------- Added file: http://bugs.python.org/file19467/issue9796-4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:09:49 2010 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 02 Nov 2010 16:09:49 +0000 Subject: [issue10294] Lib/test/test_unicode_file.py contains dead code In-Reply-To: <1288714188.98.0.557257896773.issue10294@psf.upfronthosting.co.za> Message-ID: <1288714188.98.0.557257896773.issue10294@psf.upfronthosting.co.za> New submission from Stefan Behnel : Lib/test/test_unicode_file.py contains dead code: def _test_equivalent(self, filename1, filename2): remove_if_exists(filename1) self.assertTrue(not os.path.exists(filename2)) f = file(filename1, "w") f.close() try: self._do_equivalent(filename1, filename2) finally: os.unlink(filename1) Note how this refers to the now-gone "file()". The method is never used in the test code. Similarly, the "_do_equivalent()" method that it calls appears otherwise unused. ---------- components: Tests messages: 120236 nosy: scoder priority: normal severity: normal status: open title: Lib/test/test_unicode_file.py contains dead code versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:15:10 2010 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Tue, 02 Nov 2010 16:15:10 +0000 Subject: [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288714510.61.0.056228589077.issue10038@psf.upfronthosting.co.za> Walter D?rwald added the comment: The following patch (against the release27-maint branch) seems to fix the problem. ---------- keywords: +patch nosy: +doerwalter Added file: http://bugs.python.org/file19468/json.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:17:57 2010 From: report at bugs.python.org (Ron Adam) Date: Tue, 02 Nov 2010 16:17:57 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1288714677.92.0.380160207566.issue2001@psf.upfronthosting.co.za> Ron Adam added the comment: Nick, I can update the patch and move the server back into pydoc.py if that will help you get this into 3.2 beta. I can also changed the docstrings of the new parts to # comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 18:05:39 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 17:05:39 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1288717539.98.0.790128608117.issue1926@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Andrew, thank you for posting a patch. I have a couple of comments: * the command-line option for the SSLContext won't work, since a context is a custom object, not a string; I would rework this part anyway, since I don't think separate options for the "SSL host" are useful (I'd rather add a SSL-enabling flag; also, STARTTLS can be queried from the capabilities) * on a stylistic note, there are a couple of places where you use tabs for indentation; also, comments should have a space after the '#' ('# xxx' and not '#xxx') * not moving methods around (such as getwelcome) would make it easier to review the real changes * in test_starttls, I would clearly report that the server doesn't support STARTTLS, e.g.: except nntplib.NNTPPermanentError: self.skip("STARTTLS not supported by server") * starttls() should probably test the `tls_on` attribute first and raise a ValueError if True (as you point out, a client mustn't attempt to start a new TLS session if one is already active). All in all, it looks good though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 18:20:36 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 17:20:36 +0000 Subject: [issue10267] test_ttk_guionly leaks many references In-Reply-To: <1288542306.75.0.249495592657.issue10267@psf.upfronthosting.co.za> Message-ID: <1288718436.65.0.615595417982.issue10267@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hirokazu's patch works for me. ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 18:21:28 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 17:21:28 +0000 Subject: [issue10294] Lib/test/test_unicode_file.py contains dead code In-Reply-To: <1288714188.98.0.557257896773.issue10294@psf.upfronthosting.co.za> Message-ID: <1288718488.36.0.0823926959862.issue10294@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 18:25:39 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 17:25:39 +0000 Subject: [issue9635] Add Py_BREAKPOINT and sys._breakpoint hooks In-Reply-To: <1282175005.37.0.905894818052.issue9635@psf.upfronthosting.co.za> Message-ID: <1288718739.38.0.817340636805.issue9635@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I would rename Py_BREAKPOINT to _Py_BREAKPOINT since we don't really want to support this. Also, why do you allow any arguments to sys._breakpoint()? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 19:26:29 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Tue, 02 Nov 2010 18:26:29 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1288722389.16.0.719629877823.issue1926@psf.upfronthosting.co.za> Julien ?LIE added the comment: Thanks a lot for having implemented STARTTLS, Andrew! That's great news! + Since the order in which certain operations need to be done varies + between normal, SSL, and STARTTLS connections varies, some + initialization must be done in the subclasses. One "varies" is enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:02:18 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 19:02:18 +0000 Subject: [issue10240] dict.update.__doc__ is misleading In-Reply-To: <1288406048.13.0.615215732385.issue10240@psf.upfronthosting.co.za> Message-ID: <1288724538.7.0.107431131451.issue10240@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo versions: -Python 2.5, Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:12:14 2010 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 02 Nov 2010 19:12:14 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1288725134.59.0.887517688955.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-20101102a.zip is a new version of the regex module. msg120204 relates to issue #1519638 "Unmatched group in replacement". In 'regex' an unmatched group is treated as an empty string in a replacement template. This behaviour is more in keeping with regex implementations in other languages. msg120206 was caused by not all group references being made case-insensitive when they should be. ---------- Added file: http://bugs.python.org/file19469/issue2636-20101102a.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:19:54 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 02 Nov 2010 19:19:54 +0000 Subject: [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288725594.76.0.792081299268.issue10038@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: The fact that the C and Python versions are not fully tested (afaict) is not good. I'm not sure that's worth fixing for 2.7 and it's probably worth a separate bug report for Python 3.2 on that. In the meantime, I'll test Walter's patch and add a unit test for this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:20:20 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 19:20:20 +0000 Subject: [issue1500504] Alternate RFC 3986 compliant URI parsing module Message-ID: <1288725620.43.0.993447868312.issue1500504@psf.upfronthosting.co.za> ?ric Araujo added the comment: Is this still relevant? Can?t the improvements make it into urllib.parse? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:21:40 2010 From: report at bugs.python.org (Rafe Kettler) Date: Tue, 02 Nov 2010 19:21:40 +0000 Subject: [issue10171] Ugly buttons in some Tkinter objects in Windows In-Reply-To: <1287714866.92.0.753573590678.issue10171@psf.upfronthosting.co.za> Message-ID: <1288725700.39.0.943075824683.issue10171@psf.upfronthosting.co.za> Rafe Kettler added the comment: I've tested how these dialogs display in regular Tcl/Tk, and it appears the problem resides in the Tcl implementation, not the Python binding. You can see for yourself by running this Tcl script: package require Tk tk_messageBox tk_chooseColor Since this is not a Tkinter or Python issue, I think the issue should be closed and a bug (if it doesn't exist already) should be filed with the Tcl/Tk developers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:27:16 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Tue, 02 Nov 2010 19:27:16 +0000 Subject: [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288726036.02.0.223144996929.issue10038@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: The incomplete testing and C/Python implementation mismatch are covered by issue 5723 and issue 9233. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:28:56 2010 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 Nov 2010 19:28:56 +0000 Subject: [issue10294] Lib/test/test_unicode_file.py contains dead code In-Reply-To: <1288714188.98.0.557257896773.issue10294@psf.upfronthosting.co.za> Message-ID: <1288726136.61.0.535632330355.issue10294@psf.upfronthosting.co.za> Brett Cannon added the comment: Committed in r86125 ---------- assignee: -> brett.cannon nosy: +brett.cannon resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:29:40 2010 From: report at bugs.python.org (Brian Brazil) Date: Tue, 02 Nov 2010 19:29:40 +0000 Subject: [issue10252] Fix resource warnings in distutils In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1288726180.36.0.283833635967.issue10252@psf.upfronthosting.co.za> Brian Brazil added the comment: I don't see your patch on the other bug, so I've updated mine not to use with. ---------- Added file: http://bugs.python.org/file19470/distutils_fd_leak_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:36:38 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 19:36:38 +0000 Subject: [issue5843] Normalization error in urlunparse In-Reply-To: <1240686759.57.0.0410680082249.issue5843@psf.upfronthosting.co.za> Message-ID: <1288726598.46.0.211498077315.issue5843@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Library (Lib) title: Possible normalization error in urlparse.urlunparse -> Normalization error in urlunparse versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:44:38 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 19:44:38 +0000 Subject: [issue10215] Mac Python 3.1 installer does less than earlier installers In-Reply-To: <1288211894.49.0.439153814714.issue10215@psf.upfronthosting.co.za> Message-ID: <1288727078.93.0.331704216984.issue10215@psf.upfronthosting.co.za> ?ric Araujo added the comment: Does 3.2 install into a Python3.framework? In other words, is the conception that 2.x and 3.x are two different languages ported over to Mac? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:45:28 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 19:45:28 +0000 Subject: [issue10215] Mac Python 3.1 installer does less than earlier installers In-Reply-To: <1288211894.49.0.439153814714.issue10215@psf.upfronthosting.co.za> Message-ID: <1288727128.02.0.510262615685.issue10215@psf.upfronthosting.co.za> ?ric Araujo added the comment: Without typos: Does 3.1 install into a Python3.framework directory? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:47:23 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 19:47:23 +0000 Subject: [issue10206] python program starting with unmatched quote spews spaces to stdout In-Reply-To: <1288123288.86.0.422520379457.issue10206@psf.upfronthosting.co.za> Message-ID: <1288727243.71.0.383163580727.issue10206@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:58:12 2010 From: report at bugs.python.org (Torsten Landschoff) Date: Tue, 02 Nov 2010 19:58:12 +0000 Subject: [issue8994] pydoc does not support non-ascii docstrings In-Reply-To: <1276506836.98.0.338188119331.issue8994@psf.upfronthosting.co.za> Message-ID: <1288727892.31.0.341030913521.issue8994@psf.upfronthosting.co.za> Torsten Landschoff added the comment: You are right, this is a duplicate of #6625. And in fact I should have known since I commented on that bug... ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:59:19 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 19:59:19 +0000 Subject: [issue10198] wave module writes corrupt wav file for zero-length writeframes In-Reply-To: <1288107337.09.0.986719080657.issue10198@psf.upfronthosting.co.za> Message-ID: <1288727959.17.0.261420613739.issue10198@psf.upfronthosting.co.za> ?ric Araujo added the comment: That revision is actually an edit to re.rst. Is the patch irrelevant for other branches? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 21:02:51 2010 From: report at bugs.python.org (Torsten Landschoff) Date: Tue, 02 Nov 2010 20:02:51 +0000 Subject: [issue8488] Docstrings of non-data descriptors "ignored" In-Reply-To: <1271874309.07.0.567011993617.issue8488@psf.upfronthosting.co.za> Message-ID: <1288728171.54.0.988914027711.issue8488@psf.upfronthosting.co.za> Torsten Landschoff added the comment: FYI, this still applies to r86094 of py3k. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 21:35:47 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Nov 2010 20:35:47 +0000 Subject: [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288730147.66.0.0404222266806.issue10038@psf.upfronthosting.co.za> Raymond Hettinger added the comment: To mitigate possible negative impacts from changing the return type, consider adding a parse_string hook that lets users control the return type: json.loads(f, parse_int=decimal.Decimal, parse_string=repr) ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 21:36:51 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Nov 2010 20:36:51 +0000 Subject: [issue6625] UnicodeEncodeError on pydoc's CLI In-Reply-To: <1249218048.23.0.0483172452601.issue6625@psf.upfronthosting.co.za> Message-ID: <1288730211.88.0.271071618616.issue6625@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 21:40:22 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 02 Nov 2010 20:40:22 +0000 Subject: [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288730422.01.0.480379872702.issue10038@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Adding that argument to Python 2.7 seems like new feature territory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 21:55:45 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Nov 2010 20:55:45 +0000 Subject: [issue8488] Docstrings of non-data descriptors "ignored" In-Reply-To: <1271874309.07.0.567011993617.issue8488@psf.upfronthosting.co.za> Message-ID: <1288731345.91.0.799892849483.issue8488@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 21:57:39 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 02 Nov 2010 20:57:39 +0000 Subject: [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288731459.08.0.115697320596.issue10038@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: @doerwalter: patch looks good. I've added a test and will commit momentarily. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 22:04:29 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 02 Nov 2010 21:04:29 +0000 Subject: [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288731869.49.0.802177206349.issue10038@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: r86126 ---------- assignee: bob.ippolito -> barry resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 22:08:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 21:08:07 +0000 Subject: [issue9999] test_shutil cross-file-system tests are fragile (may not test what they purport to test) In-Reply-To: <1285860550.74.0.246130427134.issue9999@psf.upfronthosting.co.za> Message-ID: <1288732087.42.0.707931335821.issue9999@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo title: test_shutil cross-file-system tests are fragile (may not test what they pruport to test) -> test_shutil cross-file-system tests are fragile (may not test what they purport to test) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 22:26:41 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Nov 2010 21:26:41 +0000 Subject: [issue8488] Docstrings of non-data descriptors "ignored" In-Reply-To: <1271874309.07.0.567011993617.issue8488@psf.upfronthosting.co.za> Message-ID: <1288733201.37.0.495386942292.issue8488@psf.upfronthosting.co.za> Benjamin Peterson added the comment: pydoc should probably be adapted to look at a type for descrs. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 22:30:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 21:30:35 +0000 Subject: [issue10181] get_shape0 in memoryobject.c not checked for error return In-Reply-To: <1287858158.95.0.0752296181045.issue10181@psf.upfronthosting.co.za> Message-ID: <1288733435.37.0.795220024524.issue10181@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 22:41:32 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 21:41:32 +0000 Subject: [issue9849] Argparse needs better error handling for nargs In-Reply-To: <1284420312.86.0.187137843637.issue9849@psf.upfronthosting.co.za> Message-ID: <1288734092.3.0.764816829559.issue9849@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 22:47:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 21:47:15 +0000 Subject: [issue9846] ZipExtFile provides no mechanism for closing the underlying file object In-Reply-To: <1284394640.99.0.715812735205.issue9846@psf.upfronthosting.co.za> Message-ID: <1288734435.47.0.151019237353.issue9846@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 22:55:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 21:55:07 +0000 Subject: [issue9736] doctest.DocTestSuite doesn't handle test globs correctly In-Reply-To: <1283367674.32.0.228375766546.issue9736@psf.upfronthosting.co.za> Message-ID: <1288734907.64.0.754040790751.issue9736@psf.upfronthosting.co.za> ?ric Araujo added the comment: Would you like to work on a patch? (Setting the versions field to versions that are open for bug fixes.) ---------- nosy: +eric.araujo stage: -> needs patch type: -> behavior versions: +Python 3.2 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 22:56:49 2010 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 02 Nov 2010 21:56:49 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288735009.59.0.799405234619.issue10263@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yeah, because the internal import system isn't fully exposed, runpy and a couple of other tools in the standard library rely on the emulation in pkgutil instead. I know there are some differences between the emulation and the builtin mechanism on Windows in terms of search order, but I thought they were the same on OS X. Manipulating sys.path and the various caches in sys should affect both import mechanisms though - just what are setuptools/distribute doing? I'm also curious as to which version of the module importlib finds ("import importlib; print(importlib.import_module("site").__file__)" will tell you that for both 2.7 and 3.x) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:01:00 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 22:01:00 +0000 Subject: [issue9625] argparse: Problem with defaults for variable nargs In-Reply-To: <1282036744.37.0.964764969496.issue9625@psf.upfronthosting.co.za> Message-ID: <1288735261.0.0.639065708123.issue9625@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:02:51 2010 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 02 Nov 2010 22:02:51 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1288714677.92.0.380160207566.issue2001@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: On Wed, Nov 3, 2010 at 2:17 AM, Ron Adam wrote: > > Ron Adam added the comment: > > Nick, I can update the patch and move the server back into pydoc.py if that will help you get this into 3.2 beta. Yep, probably the best option 3.2 - then make a new issue about making those public in the standard library (since they aren't really pydoc-specific). > I can also changed the docstrings of the new parts to # comments. Just mark the various names with an underscore so people know the current names aren't final. There's no harm in leaving the docstrings in place if you do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:06:10 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Tue, 02 Nov 2010 22:06:10 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288735570.3.0.458362390151.issue10284@psf.upfronthosting.co.za> Julien ?LIE added the comment: David, the headers are not at all supposed to be "utf-8" encoded. For instance, have a look at the cn.bbs.comp.lang.python newsgroup: http://groups.google.fr/group/cn.bbs.comp.lang.python If you look at the source of the articles, you will for instance see that the Subject: header field is not MIME-encoded. It is directly written in gb2312. That's how news works in the wild. Please do not break nntplib in Python 3.2! Regarding AUTHINFO, the specification is not broken at all. Bytes are expected, not strings in a particular encoding. Well, most people are in fact confused when they speak about encodings -- me included :-) The specification is pretty clear: NNTP expects bytes. And my text string is "\xC9ric", that's all. Please also do not break nntplib when providing such strings on class instantiation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:06:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 22:06:13 +0000 Subject: [issue9587] unittest.assertRaises() return the raised exception In-Reply-To: <1281711464.19.0.685530938413.issue9587@psf.upfronthosting.co.za> Message-ID: <1288735573.64.0.141156378964.issue9587@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:09:22 2010 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 02 Nov 2010 22:09:22 +0000 Subject: [issue1500504] Alternate RFC 3986 compliant URI parsing module Message-ID: <1288735762.81.0.935892929979.issue1500504@psf.upfronthosting.co.za> Nick Coghlan added the comment: I still like the higher level API concept, although I might not do it exactly as presented here any more. Independently of introducing a new parsing API, it would be worthwhile extracting the parsing tests from the attached module to make sure the *existing* parser can handle them all correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:10:20 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 22:10:20 +0000 Subject: [issue670664] HTMLParser.py - more robust SCRIPT tag parsing Message-ID: <1288735820.19.0.496205319093.issue670664@psf.upfronthosting.co.za> ?ric Araujo added the comment: Would it be reasonable to add knowledge to html.parser to make it recognize script elements as CDATA and handle it correctly (that is let ? _______________________________________ From report at bugs.python.org Tue Nov 2 23:14:27 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 22:14:27 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288736067.75.0.46823280161.issue10284@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > And my text string is "\xC9ric", that's all. You mean b"\xC9ric", right? > If you look at the source of the articles, you will for instance see > that the Subject: header field is not MIME-encoded. It is directly > written in gb2312. How is an NNTP client supposed to guess the encoding? Either a header is MIME-encoded, or it follows the RFC 3977 recommendation of UTF-8 (?The content of a header SHOULD be in UTF-8?), or it's unreadable. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:16:20 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 22:16:20 +0000 Subject: [issue10181] get_shape0 in memoryobject.c not checked for error return In-Reply-To: <1287858158.95.0.0752296181045.issue10181@psf.upfronthosting.co.za> Message-ID: <1288736180.43.0.062939536799.issue10181@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, there are probably many holes like this. I've done what I could to make the simple cases (builtin types) to work, but the spec is rotten from the start. Blame the numpy people, sorry. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:30:04 2010 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 02 Nov 2010 22:30:04 +0000 Subject: [issue10181] get_shape0 in memoryobject.c not checked for error return In-Reply-To: <1287858158.95.0.0752296181045.issue10181@psf.upfronthosting.co.za> Message-ID: <1288737004.38.0.369323365897.issue10181@psf.upfronthosting.co.za> Nick Coghlan added the comment: As far as I know, PEP 3118 serves its purpose of allowing extension modules like numpy and PIL to share data without needing to copy it around all the time. It's just that memoryview wasn't really part of that purpose (since all the affected third party libraries have their own objects for looking at memory), and it shows :P Our near term goal should be to get memoryview in a good place for handling 1D contiguous data and throw exceptions (rather than crashing) for everything else. I think Antoine has achieved the former, but it sounds like there is still some work to do on the latter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:32:56 2010 From: report at bugs.python.org (Tom Pinckney) Date: Tue, 02 Nov 2010 22:32:56 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1288737176.85.0.300662371126.issue2927@psf.upfronthosting.co.za> Tom Pinckney added the comment: I don't think Django includes an HTML unescape. I'm not familiar with other frameworks. So I'd still find this useful to include in the stdlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:34:59 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 22:34:59 +0000 Subject: [issue10181] get_shape0 in memoryobject.c not checked for error return In-Reply-To: <1288737004.38.0.369323365897.issue10181@psf.upfronthosting.co.za> Message-ID: <1288737292.3541.5.camel@localhost.localdomain> Antoine Pitrou added the comment: > As far as I know, PEP 3118 serves its purpose of allowing extension > modules like numpy and PIL to share data without needing to copy it > around all the time. It's just that memoryview wasn't really part of > that purpose (since all the affected third party libraries have their > own objects for looking at memory), and it shows :P The deeper issue is that there are no ownership or lifetime rules for dynamically allocated fields in Py_buffer (such as strides and shape), which itself isn't a PyObject. For very simple objects (such as bytes or bytearray) it isn't really a problem, but it is in more complicated situations; and there's no possible solution without a clear spec.. (and I'm not even talking of the issue of making slices of memoryviews, since the buffer API itself doesn't handle slicing, which means the memoryview object has to modify its inner Py_buffer...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:35:40 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 22:35:40 +0000 Subject: [issue10280] nntp_version set to the most recent advertised version In-Reply-To: <1288641195.29.0.702249344241.issue10280@psf.upfronthosting.co.za> Message-ID: <1288737340.73.0.379330524335.issue10280@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've fixed it according to your suggestion (take the max of the advertised version) in r86129. Thank you! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:41:27 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 22:41:27 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> Message-ID: <1288737687.07.0.321115032489.issue10281@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I am wondering how to return the corresponding information. Should the field be totally absent from the returned dictionary, should it map to the empty string, or should it map to None? I'm leaning towards the latter (map to None), but perhaps the empty string is better? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:43:16 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Tue, 02 Nov 2010 22:43:16 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288737796.7.0.968299484534.issue10284@psf.upfronthosting.co.za> Julien ?LIE added the comment: Antoine, a news client could guess it because of the Content-Type: header field (in this example, it mentions charset="gb2312"). Yet, articles without a Content-Type: header field exist in the wild... There is no way to always make the right guess, unfortunately. News clients try to do their best :-) Yes, I mean b"\xC9ric". 4 bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:44:45 2010 From: report at bugs.python.org (Bruce Sherwood) Date: Tue, 02 Nov 2010 22:44:45 +0000 Subject: [issue10215] Mac Python 3.1 installer does less than earlier installers In-Reply-To: <1288727128.02.0.510262615685.issue10215@psf.upfronthosting.co.za> Message-ID: Bruce Sherwood added the comment: Yes. After installation, you'll see that Python 3.1 is in /Library/Frameworks/Python.framework/Versions/3.1 Bruce Sherwood On Tue, Nov 2, 2010 at 1:45 PM, ?ric Araujo wrote: > > ?ric Araujo added the comment: > > Without typos: Does 3.1 install into a Python3.framework directory? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:45:11 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Tue, 02 Nov 2010 22:45:11 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> Message-ID: <1288737911.86.0.563854897207.issue10281@psf.upfronthosting.co.za> Julien ?LIE added the comment: The empty string would mean the header exists, and is empty (though not RFC-compliant). For instance: "User-Agent: \r\n" I believe None is better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:48:21 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 22:48:21 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288737796.7.0.968299484534.issue10284@psf.upfronthosting.co.za> Message-ID: <1288738096.3541.7.camel@localhost.localdomain> Antoine Pitrou added the comment: > Antoine, a news client could guess it because of the Content-Type: > header field (in this example, it mentions charset="gb2312"). > Yet, articles without a Content-Type: header field exist in the > wild... Unless I'm mistaken, Content-Type should only apply to the body, not the headers. Either the headers use UTF-8 (RFC 3977), or they should be MIME-encoded. Everything else is undecodable. > There is no way to always make the right guess, unfortunately. > News clients try to do their best :-) Well, a news client built on nntplib could also try to do its best :) > Yes, I mean b"\xC9ric". 4 bytes. Ok, perhaps we should allow bytes username and password. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:52:32 2010 From: report at bugs.python.org (Jim Fulton) Date: Tue, 02 Nov 2010 22:52:32 +0000 Subject: [issue9736] doctest.DocTestSuite doesn't handle test globs correctly In-Reply-To: <1288734907.64.0.754040790751.issue9736@psf.upfronthosting.co.za> Message-ID: Jim Fulton added the comment: On Tue, Nov 2, 2010 at 5:55 PM, ?ric Araujo wrote: > > ?ric Araujo added the comment: > > Would you like to work on a patch? Sure. Jim ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:52:34 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 22:52:34 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> Message-ID: <1288738354.87.0.709300793102.issue10281@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch for returning None on absent fields. (works with trigofacile.com) ---------- keywords: +patch Added file: http://bugs.python.org/file19471/nntpover.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:56:23 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Tue, 02 Nov 2010 22:56:23 +0000 Subject: [issue10284] Exception raised when decoding NNTP newsgroup descriptions In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288738583.25.0.147008491692.issue10284@psf.upfronthosting.co.za> Julien ?LIE added the comment: > Unless I'm mistaken, Content-Type should only apply to the body, not the > headers. Either the headers use UTF-8 (RFC 3977), or they should be > MIME-encoded. Everything else is undecodable. Yes, of course. Such articles are not RFC-compliant. You're not mistaken when you mention that the Content-Type: header field applies to the body. I was just answering about how the encoding could be guessed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:57:09 2010 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 02 Nov 2010 22:57:09 +0000 Subject: [issue10181] get_shape0 in memoryobject.c not checked for error return In-Reply-To: <1287858158.95.0.0752296181045.issue10181@psf.upfronthosting.co.za> Message-ID: <1288738629.35.0.53407341178.issue10181@psf.upfronthosting.co.za> Nick Coghlan added the comment: Read the "Releasing the buffer" section in PEP 3118 again. Unless I'm misunderstanding you completely, the rules you're asking for are already in place: those fields are entirely the responsibility of the exporting object, and it needs to ensure they remain valid until the buffer is released. Now, it may be that we haven't *implemented* this correctly or consistently in the builtin objects, in which case we should do something about it. But the rules are there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 00:01:14 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 23:01:14 +0000 Subject: [issue10181] get_shape0 in memoryobject.c not checked for error return In-Reply-To: <1288738629.35.0.53407341178.issue10181@psf.upfronthosting.co.za> Message-ID: <1288738868.3541.14.camel@localhost.localdomain> Antoine Pitrou added the comment: > Read the "Releasing the buffer" section in PEP 3118 again. Unless I'm > misunderstanding you completely, the rules you're asking for are > already in place: those fields are entirely the responsibility of the > exporting object, and it needs to ensure they remain valid until the > buffer is released. In practice, though, we copy Py_buffer structs around and there's no way for the original object to know about that. That's the fundamental difference with a PyObject where you would only increase a refcount instead of copying the structure's contents. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 00:05:10 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Tue, 02 Nov 2010 23:05:10 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> Message-ID: <1288739110.07.0.890731125422.issue10281@psf.upfronthosting.co.za> Julien ?LIE added the comment: OK, thanks. By the way, why is the token stripped? token = token[len(h):].lstrip(" ") "X-Header: test \r\n" in an header is kept in the overview as-is. I do not see why " test " should not be the value returned. Also, with: token = token or None "X-Header: \r\n" becomes None if I understand how the source code works... Yet, it is a real '', not None. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 00:08:41 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 23:08:41 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288739110.07.0.890731125422.issue10281@psf.upfronthosting.co.za> Message-ID: <1288739314.3541.17.camel@localhost.localdomain> Antoine Pitrou added the comment: > OK, thanks. > By the way, why is the token stripped? > token = token[len(h):].lstrip(" ") > > "X-Header: test \r\n" in an header is kept in the overview as-is. > I do not see why " test " should not be the value returned. It's a simple way of handling "Xref: foo" and returning "foo" rather than " foo". If spaces are supposed to be significant I can just strip the first one, though. > Also, with: > token = token or None > > "X-Header: \r\n" becomes None if I understand how the source code > works... Yet, it is a real '', not None. Er, so you're disagreeing with your previous message? Or am I missing something? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 00:08:48 2010 From: report at bugs.python.org (Vilnis Termanis) Date: Tue, 02 Nov 2010 23:08:48 +0000 Subject: [issue8037] multiprocessing.Queue's put() not atomic thread wise In-Reply-To: <1267482006.55.0.281200221208.issue8037@psf.upfronthosting.co.za> Message-ID: <1288739328.05.0.906819634571.issue8037@psf.upfronthosting.co.za> Vilnis Termanis added the comment: Please find attached an updated patch (including unit test) for the release27-maint branch. I've run the test_multiprocessing suite against svn revision 86129 of said branch. ---------- Added file: http://bugs.python.org/file19472/patch_27maint.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 00:18:41 2010 From: report at bugs.python.org (Andrew Vant) Date: Tue, 02 Nov 2010 23:18:41 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1288717539.98.0.790128608117.issue1926@psf.upfronthosting.co.za> Message-ID: <4CD09C4E.3058.AC5AA3B@ajvant.gmail.com> Andrew Vant added the comment: On 2 Nov 2010 at 17:05, Antoine Pitrou wrote: > * the command-line option for the SSLContext won't work, since a > context is a custom object, not a string; I would rework this part > anyway, since I don't think separate options for the "SSL host" are > useful (I'd rather add a SSL-enabling flag; also, STARTTLS can be > queried from the capabilities) I'm not sure I understand which part you're talking about here....the tests don't take a context for anything that I can see, and the mechanism I use in nntplib (a context as a named argument) is the same one used in smtplib and poplib for _SSL. (if you can suggest a method-of-use that breaks it, that may enlighten me better) > * on a stylistic note, there are a couple of places where you use tabs > for indentation; also, comments should have a space after the '#' ('# > xxx' and not '#xxx') Meh. My editor wasn't set up properly when I started. I thought I'd eliminated all the tabs. Guess not. There's probably a way to grep for lines that have tabs in them, I'll fix it. > * not moving methods around (such as getwelcome) would make it easier > to review the real changes I'll see what I can do. Some amount of that was necessary to fit STARTTLS in. (because init assumed you wanted to log in right away and never again) > * in test_starttls, I would clearly report that the server doesn't > support STARTTLS, e.g.: Can do. I didn't know about self.skip; I don't really understand the testing framework, I was just working by comparison to the other tests. > * starttls() should probably test the `tls_on` attribute first and > raise a ValueError if True (as you point out, a client mustn't attempt > to start a new TLS session if one is already active). ...I actually meant to do exactly that, but forgot to put the check in. Thank you. -- Andrew. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 00:18:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 23:18:47 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> Message-ID: <1288739927.82.0.173654774084.issue10281@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch trying to better handle whitespace. Would it be ok for you? ---------- Added file: http://bugs.python.org/file19473/nntpover2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 00:19:20 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 23:19:20 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> Message-ID: <1288739960.88.0.957970648922.issue10281@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file19473/nntpover2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 00:19:34 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 23:19:34 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> Message-ID: <1288739974.31.0.197276933738.issue10281@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Oops, sorry. ---------- Added file: http://bugs.python.org/file19474/nntpover2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 00:20:53 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 23:20:53 +0000 Subject: [issue10215] Mac Python 3.1 installer does less than earlier installers In-Reply-To: <1288211894.49.0.439153814714.issue10215@psf.upfronthosting.co.za> Message-ID: <1288740053.45.0.904084260083.issue10215@psf.upfronthosting.co.za> ?ric Araujo added the comment: So your answer is actually *no*, it does not install into Python3.framework :) If there had been separate Python.framework and Python3.framework, the answer to this bug would be obvious. But since 2.x and 3.x Pythons are installed as versions of the same framework, it sort of makes sense that Versions/Current can point to a 3.x version. Do I make sense? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 00:22:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 23:22:47 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <4CD09C4E.3058.AC5AA3B@ajvant.gmail.com> Message-ID: <1288740162.3541.20.camel@localhost.localdomain> Antoine Pitrou added the comment: > > * the command-line option for the SSLContext won't work, since a > > context is a custom object, not a string; I would rework this part > > anyway, since I don't think separate options for the "SSL host" are > > useful (I'd rather add a SSL-enabling flag; also, STARTTLS can be > > queried from the capabilities) > > I'm not sure I understand which part you're talking about here....the > tests don't take a context for anything that I can see, and the > mechanism I use in nntplib (a context as a named argument) is the > same one used in smtplib and poplib for _SSL. I'm talking about the code under "if __name__ == '__main__'". Specifically the "-c" option for specifying an SSL context. > > * in test_starttls, I would clearly report that the server doesn't > > support STARTTLS, e.g.: > > Can do. I didn't know about self.skip; I don't really understand the > testing framework, I was just working by comparison to the other > tests. Well, actually it's "self.skipTest(...)". My bad. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 00:37:52 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2010 23:37:52 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288741072.94.0.247653460111.issue10263@psf.upfronthosting.co.za> Ned Deily added the comment: The issue here is not unique to OS X. I see the same behavior on Linux with a built-from-source Python 3.2a3 and Distribute 0.6.14. (As I noted earlier, Debian and presumably various other distributors package a patched version of setuptools / Distribute which does not do the "bootstrap" manipulations so you likely wouldn't see the problem.) importlib.import_module('site') finds the standard library version whether s/D is installed or not. But that is to be expected. This problem is unique to the site module because the path manipulation stuff happens first and in the normal environment (not -m), sys.modules['site'] will always be pointing to the standard lib version; the s/D bootstrap erases its tracks so to speak. Just to be clear, I don't think there is any Python problem here. It's all due to how s/D tries to manage import order. The only way around it is for s/D to recognize and support the -m site case. Here's what is in easy_install.pth, with my {} annotations: import sys; sys.__plen = len(sys.path) {... an entry for the first easy_installed distribution ... } ./appscript-0.21.1-py2.7-macosx-10.3-fat.egg {... and entries here for any other easy_installed distributions ...} {... ending with this last one for distribute or setuptools itself ...} ./distribute-0.6.8-py2.7.egg [ ... which creates the _egginsert attribute used here } import sys; new=sys.path[_sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; s ys.__egginsert = p+len(new) The distribute egg contains a site.py at the top level. If you are interested in looking at it, it's probably best to just install distribute and look at what happens in site-packages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 00:49:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 02 Nov 2010 23:49:31 +0000 Subject: [issue10171] Ugly buttons in some Tkinter objects in Windows In-Reply-To: <1287714866.92.0.753573590678.issue10171@psf.upfronthosting.co.za> Message-ID: <1288741771.32.0.863597459631.issue10171@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for hunting that down. Agreed about closing. I have no inkling about the Tcl development process. Can you report the bug to them? ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 00:52:52 2010 From: report at bugs.python.org (Rafe Kettler) Date: Tue, 02 Nov 2010 23:52:52 +0000 Subject: [issue10171] Ugly buttons in some Tkinter objects in Windows In-Reply-To: <1287714866.92.0.753573590678.issue10171@psf.upfronthosting.co.za> Message-ID: <1288741972.76.0.557782628099.issue10171@psf.upfronthosting.co.za> Rafe Kettler added the comment: I don't know anything about the Tcl development process either. Luckily, Tk is hosted on SourceForge so it was just a matter of adding a ticket to their issue tracker. Hopefully it'll get fixed quickly and the fix will percolate down into Tkinter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 00:53:08 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Nov 2010 23:53:08 +0000 Subject: [issue10173] Don't pickle TestCase instances in test_multiprocessing In-Reply-To: <1287786993.14.0.756780399794.issue10173@psf.upfronthosting.co.za> Message-ID: <1288741988.35.0.12483862258.issue10173@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r86130 (3.2), r86131 (2.7) and r86132 (3.1). ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 01:33:53 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Nov 2010 00:33:53 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288744433.94.0.519642939011.issue10273@psf.upfronthosting.co.za> Raymond Hettinger added the comment: After discussion on python-dev, it seems that API lock-in precludes any change to the package structure. So, the main proposals left are the addition of new better aliases for some of the functions and changing to the docs so that the new name is clear: assertLE(self, other) old name: AssertLessEqual . . . Also, I we should still dedocument assertEqual and its brethren and leave assertEqual as the primary interface. At some point, we could add an option to assertEqual to allow user control of how failing results are displayed. This would let us separate content from presentation (i.e. a==b vs how a diff would get presented). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 01:54:11 2010 From: report at bugs.python.org (Andrew Vant) Date: Wed, 03 Nov 2010 00:54:11 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1288740162.3541.20.camel@localhost.localdomain> Message-ID: <4CD0B2B4.29230.B1D265E@ajvant.gmail.com> Andrew Vant added the comment: On 2 Nov 2010 at 23:22, Antoine Pitrou wrote: > I'm talking about the code under "if __name__ == '__main__'". > Specifically the "-c" option for specifying an SSL context. Now I feel silly. Partly because of the mistake, partly because I did test_nntplib.py last and by the time I was done I'd forgotten there was another section of test code involved. Thanks for the advice; I'll fix it as best I can in the next day or two and submit a new version. -- Andrew ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 01:57:02 2010 From: report at bugs.python.org (Bruce Sherwood) Date: Wed, 03 Nov 2010 00:57:02 +0000 Subject: [issue10215] Mac Python 3.1 installer does less than earlier installers In-Reply-To: <1288211894.49.0.439153814714.issue10215@psf.upfronthosting.co.za> Message-ID: <1288745822.79.0.19422579491.issue10215@psf.upfronthosting.co.za> Bruce Sherwood added the comment: Now I understand what you're getting at; I didn't realize that you were aiming at the possible distinction between 3 and 3.1. Yes, this is what bothered me and prompted my original posting. Python 3.1 goes into the same framework as the 2.x versions. Incidentally, I did find that in /usr/local/bin (where I had not thought to look) there are the following: python3.1, a link to the framework python3.1 pythonw3.1, a link to the framework pythonw3.1 python3, a link to a framework python3, which is an extra copy (not a link) to the framework python3.1 pythonw3, a link to a framework pythonw3, which is a link to the framework python3.1 This looks to me pretty contorted, although I suppose the goal was to let people either run "python" (their most recent Python 2.x) or run "python3" (their most recent Python 3.x). A somewhat related example of confusion is that on Ubuntu 10.10 there is a shadowy existence for some python3 that has its own lib folder, in parallel to python3.1; the python3 doesn't seem to be simply an alias for python3.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 02:17:32 2010 From: report at bugs.python.org (Roger Upole) Date: Wed, 03 Nov 2010 01:17:32 +0000 Subject: [issue10181] get_shape0 in memoryobject.c not checked for error return In-Reply-To: <1287858158.95.0.0752296181045.issue10181@psf.upfronthosting.co.za> Message-ID: <1288747052.45.0.352431471183.issue10181@psf.upfronthosting.co.za> Roger Upole added the comment: The culprit wrt copying Py_buffer structs seems mainly to be dup_buffer, which is called in memory_getbuf. This seems unnecessary in the case where there's an underlying object and it has returned the view thru its own tp_as_buffer. The underlying object at that point is solely responsible for releasing the buffer, so memory_getbuf shouldn't mess with it at all. In the case where there is no underlying object (mainly thru PyMemoryView_FromBuffer), it probably should allocate any memory in the view in such a way that it can be freed in memory_releasebuf when the view->obj is NULL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 02:31:43 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Nov 2010 01:31:43 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288747903.77.0.669350407405.issue10273@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think assertLE is enough of an improvement over assertLessEqual to be worth adding yet more deprecated names to unittest. So I'm -0 on this change in general. (I'd be -1 except that it would be kind of nice to have the names be shorter :) If the change is made, then assertEqual should become assertEQ, and assertNotEqual should become assertNE. Another option is to go the other way, and change assertLess to assertLessThan. That is, make the spelling consistently be the spelled out version of the abbreviation used in the special methods and elsewhere in the docs. This would involve far fewer name changes. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 03:00:52 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Nov 2010 02:00:52 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> Message-ID: <1288749652.15.0.548573293094.issue10281@psf.upfronthosting.co.za> R. David Murray added the comment: My conclusion in working on the email package is that only the first space after the ':', if it exists, should be stripped. That is, even though the RFC (for email) reads as if the space after the colon is part of the value, in practice it is part of the delimiter, but is optional (and almost always present, in email). Whether additional leading spaces are significant depends on why they are there. Since they are an unusual case, I would choose to preserve them on the theory that someone might care, and that someone who doesn't care can strip them. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 03:13:21 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Nov 2010 02:13:21 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> Message-ID: <1288750401.58.0.504832024196.issue10281@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Besides being shorter, the advantages of assertLE are consistent with the rich comparison method names, no worries about Than, no camel casing ambiguities, no pluralization or other nmemonic issues (LessThanEqual or LessThanEquals or LessThanOrEqual or LessThanOrEqualTo). The goal is to make sure you don't have to look up the spelling every time you use them. That being said, assertEqual can't change. It has been around forever and is clear about what it does. What I am sure about is that assertLess and assertLessEqual are very non-standard spellings and that infrequent users of comparison assertions won't remember them. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 03:29:53 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Nov 2010 02:29:53 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288751393.48.0.255134010366.issue10273@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Besides being shorter, the advantages of assertLE are consistent with the rich comparison method names, no worries about Than, no camel casing ambiguities, no pluralization or other nmemonic issues (LessThanEqual or LessThanEquals or LessThanOrEqual or LessThanOrEqualTo). The goal is to make sure you don't have to look up the spelling every time you use them. That being said, assertEqual can't change. It has been around forever and is clear about what it does. What I am sure about is that assertLess and assertLessEqual are very non-standard spellings and that infrequent users of comparison assertions won't remember them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 03:30:10 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Nov 2010 02:30:10 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> Message-ID: <1288751410.48.0.102433134329.issue10281@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- Removed message: http://bugs.python.org/msg120300 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 03:32:48 2010 From: report at bugs.python.org (Roger Upole) Date: Wed, 03 Nov 2010 02:32:48 +0000 Subject: [issue3605] Py_FatalError causes infinite loop In-Reply-To: <1219178538.87.0.507520309186.issue3605@psf.upfronthosting.co.za> Message-ID: <1288751568.61.0.284664596361.issue3605@psf.upfronthosting.co.za> Roger Upole added the comment: I know this has been closed, but I disagree with the fix. Py_FatalError is designed to give a clean exit with a readable error message when the state of the interpreter is known to be compromised. Calling *any* python functions or accessing *any* python internals is only likely to lead to more issues that obscure the original problems. IMO the PyErr_Occurred needs to be removed entirely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 03:37:29 2010 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Nov 2010 02:37:29 +0000 Subject: [issue10215] Mac Python 3.1 installer does less than earlier installers In-Reply-To: <1288211894.49.0.439153814714.issue10215@psf.upfronthosting.co.za> Message-ID: <1288751849.09.0.218332330923.issue10215@psf.upfronthosting.co.za> Ned Deily added the comment: It was a deliberate decision on Ronald's part to not modify the Versions/Current link in the Python framework when installing a Python 3.x version. As far as I know, the Current link is not used anywhere other than perhaps by Xcode when trying to link a Python frameworks into another language project. Current has no affect on any of the /usr/local symlinks optionally created by the python OS X installer. Use of the those symlinks is somewhat problematic anyway once you install any third-party packages the include scripts. By default, Distutils installs scripts into the framework bin directory of the appropriate version. That's why the recommended approach to managing paths is to simply put the framework bin directory towards the head of your shell PATH. For each version, the OS X installer provides "Update Shell Profile.command" to alter the most common shell profiles accordingly; it can be found in the "/Applications/Python x.m" folder. As documented in the installer README, for 3.x installs, the installer does not automatically run "Update Shell Profile" as it does for 2.x installs; you need to run it explicitly or otherwise cause PATH to be changed. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 03:41:23 2010 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Nov 2010 02:41:23 +0000 Subject: [issue10215] Mac Python 3.1 installer does less than earlier installers In-Reply-To: <1288211894.49.0.439153814714.issue10215@psf.upfronthosting.co.za> Message-ID: <1288752083.48.0.569393698897.issue10215@psf.upfronthosting.co.za> Ned Deily added the comment: It was a deliberate decision on Ronald's part to not modify the Versions/Current link in the Python framework when installing a Python 3.x version. As far as I know, the Current link is not used anywhere other than perhaps by Xcode when trying to link a Python frameworks into another language project. Current has no affect on any of the /usr/local symlinks optionally created by the python OS X installer. Use of the those symlinks is somewhat problematic anyway once you install any third-party packages that include scripts. By default, Distutils installs scripts into the framework bin directory of the appropriate version. That's why the recommended approach to managing paths is to simply put the framework bin directory towards the head of your shell PATH, so something like: export PATH="/Library/Frameworks/Python.framework/Versions/3.1/bin:${PATH}" For each version, the OS X installer provides "Update Shell Profile.command" to alter the most common shell profiles accordingly; it can be found in the "/Applications/Python x.m" folder. As documented in the installer README, for 3.x installs, the installer does not automatically run "Update Shell Profile" as it does for 2.x installs; you need to run it explicitly or otherwise cause PATH to be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 03:41:32 2010 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Nov 2010 02:41:32 +0000 Subject: [issue10215] Mac Python 3.1 installer does less than earlier installers In-Reply-To: <1288211894.49.0.439153814714.issue10215@psf.upfronthosting.co.za> Message-ID: <1288752092.99.0.447980842229.issue10215@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- Removed message: http://bugs.python.org/msg120303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 04:28:08 2010 From: report at bugs.python.org (Case Van Horsen) Date: Wed, 03 Nov 2010 03:28:08 +0000 Subject: [issue7652] Merge C version of decimal into py3k. In-Reply-To: <1262860972.65.0.690079130991.issue7652@psf.upfronthosting.co.za> Message-ID: <1288754888.21.0.493810987272.issue7652@psf.upfronthosting.co.za> Case Van Horsen added the comment: Has the cdecimal branch kept up with the hash value changes in 3.2? Is there a still a chance that cdecimal could be merged into 3.2? ---------- nosy: +casevh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 05:06:58 2010 From: report at bugs.python.org (Devin Cook) Date: Wed, 03 Nov 2010 04:06:58 +0000 Subject: [issue8998] add crypto routines to stdlib In-Reply-To: <1276551598.69.0.32913607148.issue8998@psf.upfronthosting.co.za> Message-ID: <1288757218.67.0.283021583175.issue8998@psf.upfronthosting.co.za> Devin Cook added the comment: It sounds like you may already have an idea of how you want the API structured, but just in case you're still thinking about it here's another API to look at that I think focuses on exactly what you were highlighting as priorities (sane defaults, easy to use): keyczar. I use keyczar quite a bit and really like it, although I tend to only use the key classes directly instead of using the generic "Crypter" etc. classes. http://code.google.com/p/keyczar/ ---------- nosy: +devin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 05:24:02 2010 From: report at bugs.python.org (Bruce Sherwood) Date: Wed, 03 Nov 2010 04:24:02 +0000 Subject: [issue10215] Mac Python 3.1 installer does less than earlier installers In-Reply-To: <1288211894.49.0.439153814714.issue10215@psf.upfronthosting.co.za> Message-ID: <1288758242.33.0.149121045304.issue10215@psf.upfronthosting.co.za> Bruce Sherwood added the comment: Thanks for the detailed explanation. What had not occurred to me was to read the README file that came with the installer. I made the mistake (that may be made by others) of assuming continuity with installer policy, especially since the installation location was the same as before. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:01:56 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 03 Nov 2010 06:01:56 +0000 Subject: [issue10295] _socket.pyd uses winsock2, select.pyd uses winsock 1 In-Reply-To: <1288764115.88.0.357779080417.issue10295@psf.upfronthosting.co.za> Message-ID: <1288764115.88.0.357779080417.issue10295@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : These two socket modules link to a different winsock api, thus pulling two potentially incompatible dlls in to the process. There is no guarantee that they interact. I'll see if there is a simple patch for select module ---------- components: IO messages: 120308 nosy: krisvale priority: normal severity: normal status: open title: _socket.pyd uses winsock2, select.pyd uses winsock 1 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:14:41 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 03 Nov 2010 06:14:41 +0000 Subject: [issue10295] _socket.pyd uses winsock2, select.pyd uses winsock 1 In-Reply-To: <1288764115.88.0.357779080417.issue10295@psf.upfronthosting.co.za> Message-ID: <1288764881.85.0.601551926981.issue10295@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Here is a patch ---------- keywords: +patch Added file: http://bugs.python.org/file19475/select.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:20:10 2010 From: report at bugs.python.org (Ron Adam) Date: Wed, 03 Nov 2010 06:20:10 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1288765210.24.0.0747928079146.issue2001@psf.upfronthosting.co.za> Changes by Ron Adam : Removed file: http://bugs.python.org/file16517/pydoc_gui.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:20:15 2010 From: report at bugs.python.org (Ron Adam) Date: Wed, 03 Nov 2010 06:20:15 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1288765215.63.0.276847974686.issue2001@psf.upfronthosting.co.za> Changes by Ron Adam : Removed file: http://bugs.python.org/file18165/pydoc_server3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:20:20 2010 From: report at bugs.python.org (Ron Adam) Date: Wed, 03 Nov 2010 06:20:20 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1288765220.42.0.256812059608.issue2001@psf.upfronthosting.co.za> Changes by Ron Adam : Removed file: http://bugs.python.org/file18271/pydoc_server4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:26:49 2010 From: report at bugs.python.org (Ron Adam) Date: Wed, 03 Nov 2010 06:26:49 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1288765609.82.0.345216138273.issue2001@psf.upfronthosting.co.za> Ron Adam added the comment: Here you go Nick. One file with Underscores for the new class's and functions. Where there was some overlap in names, like where some of the older server class's were reused, but don't have exactly the same behavior, I started those with underscores also. This should make it easier for you to review and/or make adjustments where it's needed. ---------- Added file: http://bugs.python.org/file19476/pydoc_r86133.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 08:41:14 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 03 Nov 2010 07:41:14 +0000 Subject: [issue9919] gdbinit lineno result is one line in excess In-Reply-To: <1285151676.58.0.234965887204.issue9919@psf.upfronthosting.co.za> Message-ID: <1288770074.17.0.927817417842.issue9919@psf.upfronthosting.co.za> Georg Brandl added the comment: Right. Fixed in r86134. Thanks :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 09:20:33 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 03 Nov 2010 08:20:33 +0000 Subject: [issue10296] ctypes catches BreakPoint error on windows 32 In-Reply-To: <1288772433.69.0.284335189868.issue10296@psf.upfronthosting.co.za> Message-ID: <1288772433.69.0.284335189868.issue10296@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : import ctypes ctypes.windll.kernel32.DebugBreak() This used to be a handy way to attach a debugger to a running program, by way of JIT debugging. Now ctypes catches and handles this exception so a debugger is never invoked. Bummer. ---------- messages: 120312 nosy: krisvale priority: normal severity: normal status: open title: ctypes catches BreakPoint error on windows 32 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 09:35:05 2010 From: report at bugs.python.org (Christoph Gohlke) Date: Wed, 03 Nov 2010 08:35:05 +0000 Subject: [issue9015] array.array.tofile cannot write arrays of sizes > 4GB, even compiled for amd64 In-Reply-To: <1276730446.48.0.255465495583.issue9015@psf.upfronthosting.co.za> Message-ID: <1288773305.52.0.886409179002.issue9015@psf.upfronthosting.co.za> Christoph Gohlke added the comment: This seems to be related: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/7c913001-227e-439b-bf07-54369ba07994 ---------- nosy: +cgohlke _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 09:47:02 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Nov 2010 08:47:02 +0000 Subject: [issue10295] _socket.pyd uses winsock2, select.pyd uses winsock 1 In-Reply-To: <1288764115.88.0.357779080417.issue10295@psf.upfronthosting.co.za> Message-ID: <1288774022.3.0.778786039641.issue10295@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 10:01:24 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 03 Nov 2010 09:01:24 +0000 Subject: [issue10295] _socket.pyd uses winsock2, select.pyd uses winsock 1 In-Reply-To: <1288764115.88.0.357779080417.issue10295@psf.upfronthosting.co.za> Message-ID: <1288774884.3.0.588651014978.issue10295@psf.upfronthosting.co.za> Martin v. L?wis added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 11:30:21 2010 From: report at bugs.python.org (hafiza jameel) Date: Wed, 03 Nov 2010 10:30:21 +0000 Subject: [issue10297] decimal module documentation is misguiding In-Reply-To: <1288780221.67.0.597486897879.issue10297@psf.upfronthosting.co.za> Message-ID: <1288780221.67.0.597486897879.issue10297@psf.upfronthosting.co.za> New submission from hafiza jameel : the documentation does not show the import statement of decimal module in the introduction: http://docs.python.org/library/decimal.html import should have been done like this: from decimal import * ---------- assignee: docs at python components: Documentation messages: 120315 nosy: docs at python, hafiza.jameel priority: normal severity: normal status: open title: decimal module documentation is misguiding versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 12:44:18 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 03 Nov 2010 11:44:18 +0000 Subject: [issue9995] "setup.py register sdist upload" requires pass to be saved In-Reply-To: <1285838842.84.0.5702466564.issue9995@psf.upfronthosting.co.za> Message-ID: <1288784658.32.0.0881079239562.issue9995@psf.upfronthosting.co.za> anatoly techtonik added the comment: > python setup.py build sdist register upload ... Save your login (y/N)?n running upload Submitting dist\review-r585.zip to http://pypi.python.org/pypi Upload failed (401): You must be identified to edit package information ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 12:58:16 2010 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 Nov 2010 11:58:16 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288785496.28.0.000850188381675.issue10263@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, yes, I see what you mean - because runpy ignores the sys.modules cache (by design), it won't see the precached module instance placed there by the bootstrap code. We actually *could* make this work on our end: if we find an existing module in sys.modules, derive the file to be executed from the __file__ attribute of that module rather than searching the whole path again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 12:59:54 2010 From: report at bugs.python.org (Roger Upole) Date: Wed, 03 Nov 2010 11:59:54 +0000 Subject: [issue10181] get_shape0 in memoryobject.c not checked for error return In-Reply-To: <1287858158.95.0.0752296181045.issue10181@psf.upfronthosting.co.za> Message-ID: <1288785594.53.0.159772587323.issue10181@psf.upfronthosting.co.za> Roger Upole added the comment: While on the subject, the docs for PyMemoryView_FromBuffer state that the resulting memoryview takes ownership of the Py_buffer struct and is responsible for freeing any associated memory. It does not do so, which is not surprising. The absence of a standard for allocation makes it absolutely impossible for it to do so safely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 13:19:56 2010 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 Nov 2010 12:19:56 +0000 Subject: [issue10181] get_shape0 in memoryobject.c not checked for error return In-Reply-To: <1287858158.95.0.0752296181045.issue10181@psf.upfronthosting.co.za> Message-ID: <1288786796.97.0.586977101382.issue10181@psf.upfronthosting.co.za> Nick Coghlan added the comment: Hmm, if we're ever creating a new copy of a Py_buffer without calling GetBuffer again on the original object, then *that* is a bug (exactly comparable to copying a PyObject pointer without incrementing the reference count - it's OK if you can guarantee the lifecycle of your borrowed pointer is shorter than the lifecycle of the original, but disallowed otherwise). This still doesn't sound like a problem with the spec to me, it sounds like a problem with the implementation strategy that was originally used when integrating the spec into the interpeter core (which I readily agree received far less attention than the spec itself did). It really sounds like we should be creating a _Py_ManagedBuffer internal object, with each instance containing a PyObject* and a Py_buffer instance. We don't need to alter PEP 3118 to do that - such a change is entirely consumer side, so the objects providing the buffers don't need to care how the lifecycle of the Py_buffer struct is managed. When we need another reference to the buffer, we can then just increment the refcount of the _Py_ManagedBuffer instance rather than having to call GetBuffer again on the original object. The contents of Py_buffer objects that have been passed to GetBuffer really shouldn't be getting modified at all - for those cases, we should maintain *two* Py_buffer structs, one (unmodified) with the original results of the GetBuffer call, and a second owned by the caller (for manipulation). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 13:21:52 2010 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 Nov 2010 12:21:52 +0000 Subject: [issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?) In-Reply-To: <1287858158.95.0.0752296181045.issue10181@psf.upfronthosting.co.za> Message-ID: <1288786912.75.0.0782611526963.issue10181@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- title: get_shape0 in memoryobject.c not checked for error return -> Problems with Py_buffer management in memoryobject.c (and elsewhere?) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 13:42:08 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 03 Nov 2010 12:42:08 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288788128.25.0.913704223304.issue10263@psf.upfronthosting.co.za> ?ric Araujo added the comment: Sounds good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 13:51:52 2010 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 Nov 2010 12:51:52 +0000 Subject: [issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?) In-Reply-To: <1287858158.95.0.0752296181045.issue10181@psf.upfronthosting.co.za> Message-ID: <1288788712.4.0.755696279881.issue10181@psf.upfronthosting.co.za> Nick Coghlan added the comment: It doesn't help that neither PEP 3118 nor the Py_buffer docs mention the "obj" member of the Py_buffer struct that refers back to the original object providing the buffer - that's fairly fundamental to understanding how PyBuffer_Release and PyMemoryView_FromBuffer can work even in theory. (Given that, an additional _PyManagedBuffer object shouldn't be necessary - MemoryView just needs to call ReleaseBuffer and GetBuffer at the appropriate times) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 14:00:36 2010 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 Nov 2010 13:00:36 +0000 Subject: [issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?) In-Reply-To: <1287858158.95.0.0752296181045.issue10181@psf.upfronthosting.co.za> Message-ID: <1288789236.21.0.230161432379.issue10181@psf.upfronthosting.co.za> Nick Coghlan added the comment: So the overall to-do list here is sounding like: 1. Document "Py_buffer->obj" appropriately in both the C API documentation and in PEP 3118 2. Ensure GetBuffer/ReleaseBuffer are used as the moral equivalent of INCREF/DECREF for Py_buffer objects. 3. Check builtin types correctly manage the lifecycle of all elements of their exported Py_buffer structs 4. Check return values and throw exceptions as noted in the original post ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 14:01:25 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Nov 2010 13:01:25 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288789285.15.0.420993930529.issue10273@psf.upfronthosting.co.za> R. David Murray added the comment: assertEquals existed forever, too, but we deprecated that :) (with no intent to remove it, as I understand it). There is no more ambiguity in "assertLessThan" than there is in assertLT, one just has more letters. True, you have to look it up the first time, but you have to do that anyway, so I don't see that as a big deal. Once you've looked it up the first time you know the naming rule and you can figure out all the other names. (Which is not true now, since instead of 'LessThan' we have "Less", which does *not* correspond to to the special method name by a simple rule). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 14:26:02 2010 From: report at bugs.python.org (Tod Olson) Date: Wed, 03 Nov 2010 13:26:02 +0000 Subject: [issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements In-Reply-To: <1224430404.43.0.0672391440841.issue4147@psf.upfronthosting.co.za> Message-ID: <1288790762.17.0.999666874301.issue4147@psf.upfronthosting.co.za> Changes by Tod Olson : ---------- nosy: +tod _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 14:28:25 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 03 Nov 2010 13:28:25 +0000 Subject: [issue10295] _socket.pyd uses winsock2, select.pyd uses winsock 1 In-Reply-To: <1288764115.88.0.357779080417.issue10295@psf.upfronthosting.co.za> Message-ID: <1288790905.42.0.810850903646.issue10295@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: committed as revision 86136 ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 14:57:45 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 03 Nov 2010 13:57:45 +0000 Subject: [issue9981] let make_buildinfo use a temporary directory on windows In-Reply-To: <1285741718.07.0.0571419018875.issue9981@psf.upfronthosting.co.za> Message-ID: <1288792665.2.0.263009094498.issue9981@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Committed to 3.2 in revision 86137 ---------- resolution: -> accepted status: open -> closed versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 15:00:39 2010 From: report at bugs.python.org (rep) Date: Wed, 03 Nov 2010 14:00:39 +0000 Subject: [issue10298] zipfile: incorrect comment size will prevent extracting In-Reply-To: <1288792839.67.0.901999285278.issue10298@psf.upfronthosting.co.za> Message-ID: <1288792839.67.0.901999285278.issue10298@psf.upfronthosting.co.za> New submission from rep : Opening (and thus extracting) zip files with appended junk data is not possible with the way the current zipfile implementation checks validity. Basically the problem comes down to the comment size in the end-of-central-directory record being different from the size of the data following that record. Unix unzip and similar utilities handle that case by looking at the eocd-record and taking that as the correct value. Zip files with data appended to them will be extracted just fine with these tools. In python's zipfile the _EndRecData function will return None if the comment size does not match the record's value. The patch modifies this behaviour and takes only the portion of trailing data that the record specifies and due to that it does not raise BadZipfile exceptions if there's any junk data appended to a zip file. ---------- components: Library (Lib) files: zipfile_recover_commentsize.patch keywords: patch messages: 120326 nosy: rep priority: normal severity: normal status: open title: zipfile: incorrect comment size will prevent extracting type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file19477/zipfile_recover_commentsize.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 15:24:59 2010 From: report at bugs.python.org (nestor) Date: Wed, 03 Nov 2010 14:24:59 +0000 Subject: [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> New submission from nestor : The built-in function page (http://docs.python.org/dev/py3k/library/functions.html) is pretty long. Each function has an anchor but unlike the built-in types section there is no quick way to get an overview or jump to a specific function (like open or print) short of scrolling through 22 pages. It would be nice to have an index of all built-in functions linked to the specific entry on the built-in functions page. This could be either somehow added to the index page (http://docs.python.org/dev/py3k/library/index.html) or to the top of the built-in functions page itself. For efficient use of real-estate multiple function names could be on one single line alphabetically sorted and separated by spaces. ---------- assignee: docs at python components: Documentation messages: 120327 nosy: docs at python, georg.brandl, nestor priority: normal severity: normal status: open title: Add index with links section for built-in functions type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 15:26:57 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Nov 2010 14:26:57 +0000 Subject: [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1288794417.9.0.823571123109.issue10299@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 16:54:22 2010 From: report at bugs.python.org (=?utf-8?q?Hagen_F=C3=BCrstenau?=) Date: Wed, 03 Nov 2010 15:54:22 +0000 Subject: [issue10300] Documentation of three PyDict_* functions In-Reply-To: <1288799659.81.0.759259964025.issue10300@psf.upfronthosting.co.za> Message-ID: <1288799659.81.0.759259964025.issue10300@psf.upfronthosting.co.za> New submission from Hagen F?rstenau : The documentation of the functions PyDict_Items, PyDict_Keys and PyDict_Values is incorrect: They do return PyListObject, but in Python 3.x this is not the same as dict.items() etc. ---------- assignee: docs at python components: Documentation messages: 120328 nosy: docs at python, hagen priority: normal severity: normal status: open title: Documentation of three PyDict_* functions versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 17:33:05 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Nov 2010 16:33:05 +0000 Subject: [issue10284] NNTP should accept bytestrings for username and password In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288801985.52.0.77647778345.issue10284@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: invalid -> stage: committed/rejected -> needs patch status: closed -> open title: Exception raised when decoding NNTP newsgroup descriptions -> NNTP should accept bytestrings for username and password _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 17:34:25 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Nov 2010 16:34:25 +0000 Subject: [issue2281] Enhanced cPython profiler with high-resolution timer In-Reply-To: <1205359008.42.0.436050296007.issue2281@psf.upfronthosting.co.za> Message-ID: <1288802065.57.0.821459953797.issue2281@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +krisvale _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 17:59:36 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 03 Nov 2010 16:59:36 +0000 Subject: [issue9995] "setup.py register sdist upload" requires pass to be saved In-Reply-To: <1285838842.84.0.5702466564.issue9995@psf.upfronthosting.co.za> Message-ID: <1288803576.6.0.444163153053.issue9995@psf.upfronthosting.co.za> anatoly techtonik added the comment: Do you have a list of more important tasks than this one. I'd like to elaborate, because for me alone it could take a lot of time. What I need now is SVN URL to checkout distutils code and some advice where to start. No guarantees though - if the code is too complicated, I won't be able to dedicate much time for exploration. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 18:03:24 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Nov 2010 17:03:24 +0000 Subject: [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1288803804.38.0.784294249007.issue10299@psf.upfronthosting.co.za> Ezio Melotti added the comment: The attached patch adds a 4-columns table that lists the functions without args. ---------- assignee: docs at python -> ezio.melotti keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file19478/issue10299.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 18:10:51 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Wed, 03 Nov 2010 17:10:51 +0000 Subject: [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1288804251.15.0.912068521781.issue10299@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 18:27:52 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Nov 2010 17:27:52 +0000 Subject: [issue10297] decimal module documentation is misguiding In-Reply-To: <1288780221.67.0.597486897879.issue10297@psf.upfronthosting.co.za> Message-ID: <1288805272.5.0.316540422766.issue10297@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 18:37:52 2010 From: report at bugs.python.org (5houston) Date: Wed, 03 Nov 2010 17:37:52 +0000 Subject: [issue8028] self.terminate() from a multiprocessing.Process raises AttributeError exception In-Reply-To: <1267300713.42.0.457825051385.issue8028@psf.upfronthosting.co.za> Message-ID: <1288805872.14.0.435949160449.issue8028@psf.upfronthosting.co.za> 5houston added the comment: I vote for the latter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 18:55:55 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Wed, 03 Nov 2010 17:55:55 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> Message-ID: <1288806955.85.0.708016176321.issue10281@psf.upfronthosting.co.za> Julien ?LIE added the comment: > Er, so you're disagreeing with your previous message? > Or am I missing something? :) I was saying that if an empty string is returned, then it means that the header exists and is empty. An example was "User-Agent: \r\n". And my remark "I believe None is better." concerned your initial question "Should the field be totally absent [...]" regarding how to deal with a header that does not exist. Therefore, "User-Agent: \r\n" becomes a real '', not None. None is only when the User-Agent: header field is absent from the headers. > Here is a patch trying to better handle whitespace. > Would it be ok for you? Yes Antoine, thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 19:01:09 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Wed, 03 Nov 2010 18:01:09 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> Message-ID: <1288807269.96.0.136484698532.issue10281@psf.upfronthosting.co.za> Julien ?LIE added the comment: > My conclusion in working on the email package is that only > the first space after the ':', if it exists, should be stripped. > That is, even though the RFC (for email) reads as if the space > after the colon is part of the value, in practice it is part > of the delimiter, but is optional (and almost always present, > in email). That is why the RFC (for netnews) explicitly mentions that the space after the colon is not part of the value. See the grammar for OVER in RFC 3977: hdr-n-content = [(header-name ":" / metadata-name) SP hdr-content] So yes, only the first space should be stripped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 19:10:20 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Wed, 03 Nov 2010 18:10:20 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1288807820.12.0.432104131685.issue1926@psf.upfronthosting.co.za> Julien ?LIE added the comment: >> * starttls() should probably test the `tls_on` attribute first and >> raise a ValueError if True (as you point out, a client mustn't attempt >> to start a new TLS session if one is already active). > > ...I actually meant to do exactly that, but forgot to put the check > in. Thank you. And it should also make sure the user is not already authenticated. And that STARTTLS is advertised (if nntp_version >=2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 19:19:29 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Nov 2010 18:19:29 +0000 Subject: [issue10281] Exception raised when an NNTP overview field is absent In-Reply-To: <1288641504.02.0.740146955118.issue10281@psf.upfronthosting.co.za> Message-ID: <1288808369.53.0.239275219428.issue10281@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, committed in r86139. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 19:26:20 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Nov 2010 18:26:20 +0000 Subject: [issue10282] IMPLEMENTATION token differently delt with in NNTP capability In-Reply-To: <1288642567.32.0.7785411032.issue10282@psf.upfronthosting.co.za> Message-ID: <1288808780.32.0.237935041277.issue10282@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Rather than special casing the dict item, I would rather add an "nntp_implementation" attribute containing the desired value. > Besides, shouldn't it be checked that the line is not empty, before > splitting it? If the line is empty, the server is non-conformant. Then it's a matter of taste whether all errors should be wrapped in higher-level exceptions; I tend to think it's useless clutter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 19:27:41 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 03 Nov 2010 18:27:41 +0000 Subject: [issue10171] Ugly buttons in some Tkinter objects in Windows In-Reply-To: <1287714866.92.0.753573590678.issue10171@psf.upfronthosting.co.za> Message-ID: <1288808861.3.0.976140789298.issue10171@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 19:33:15 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Nov 2010 18:33:15 +0000 Subject: [issue10285] Other status field flags in documentation for NNTP LIST command In-Reply-To: <1288643123.11.0.762395184057.issue10285@psf.upfronthosting.co.za> Message-ID: <1288809195.7.0.118303957124.issue10285@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Improvement committed in r86140, thank you! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 19:38:51 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Wed, 03 Nov 2010 18:38:51 +0000 Subject: [issue10282] IMPLEMENTATION token differently delt with in NNTP capability In-Reply-To: <1288642567.32.0.7785411032.issue10282@psf.upfronthosting.co.za> Message-ID: <1288809531.82.0.36776591303.issue10282@psf.upfronthosting.co.za> Julien ?LIE added the comment: The "nntp_implementation" attribute would be great. OK for the exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 20:05:12 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 03 Nov 2010 19:05:12 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1288811112.7.0.988937385991.issue9807@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: @rpetrov: reusing $LDVERSION does make sense, but then I think the variable is misnamed. I don't like $ABIVERSION either but maybe $BUILDVERSION? Also I think we need to let the substitution for $LDVERSION happen in the Makefile rather than in the configure script. I tried it the way you suggested and IIRC, it had some problems, but I don't remember the details. @doko: Agreed. I'll have an updated patch that fixes python.pc. I'll look at INSTALL_SCHEME/headers too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 20:32:24 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Nov 2010 19:32:24 +0000 Subject: [issue10284] NNTP should accept bytestrings for username and password In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288812744.25.0.755654545118.issue10284@psf.upfronthosting.co.za> R. David Murray added the comment: What I meant by saying that the spec was broken is that the user is going to be typing the password at a keyboard. The keyboard will generate scan codes. Those scan codes will get interpreted through a system-specific chain of processes until some bytes or some unicode characters are generated. What's to say that the password typed on the keyboard where the password is set up is going to be a binary match for the password entered on the keyboard used for authentication? Which doesn't change the fact that if the spec calls for binary, nttplib should support binary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 20:38:30 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 03 Nov 2010 19:38:30 +0000 Subject: [issue9995] "setup.py register sdist upload" requires pass to be saved In-Reply-To: <1285838842.84.0.5702466564.issue9995@psf.upfronthosting.co.za> Message-ID: <1288813110.04.0.0139128048826.issue9995@psf.upfronthosting.co.za> anatoly techtonik added the comment: Fix attached. Also on Rietveld - http://codereview.appspot.com/2874041 Could you also backport it to other Python distributions to avoid questions like these: http://stackoverflow.com/questions/3773613/pypi-issues-upload-failed-401-you-must-be-identified-to-edit-package-informa http://stackoverflow.com/questions/1750186/weird-pypi-authentication-behavior ---------- keywords: +patch Added file: http://bugs.python.org/file19479/issue9995.distutils-forces-developers-to-store-password-in-cleartext.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 21:24:08 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Wed, 03 Nov 2010 20:24:08 +0000 Subject: [issue10284] NNTP should accept bytestrings for username and password In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288815848.56.0.241662958533.issue10284@psf.upfronthosting.co.za> Julien ?LIE added the comment: OK, I understand. I believe it works fine in practice, because people often use ASCII-only characters... I assume it is going to be a problem when the passwords contain 8-bit characters. I doubt it will work fine if I use different news readers on different localized systems... Interesting question. I will ask how it should be handled. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 21:24:24 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 03 Nov 2010 20:24:24 +0000 Subject: [issue1500504] Alternate RFC 3986 compliant URI parsing module Message-ID: <1288815864.26.0.3281844062.issue1500504@psf.upfronthosting.co.za> ?ric Araujo added the comment: Sure, adding tests is a no-brainer. Regarding the module, I?m a bit reluctant. I see value in providing low-level building blocks (think OS calls) and high-level utilities for regular use, but here it seems that urllib.parse and urischemes are at the same level. I?m not opposed to the functionality itself?I would like to use a class simply named ?URI? (and generally get better names, that is RFC names instead of specific inventions), have components normalization and such goodies?but I think the existing module can get fixes and improvements. I fear the confusion that could be caused by having two modules for the same task, unless you want to propose that the new module deprecate urllib.parse. Senthil, what is your opinion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 21:38:39 2010 From: report at bugs.python.org (Ask Solem) Date: Wed, 03 Nov 2010 20:38:39 +0000 Subject: [issue8028] self.terminate() from a multiprocessing.Process raises AttributeError exception In-Reply-To: <1267300713.42.0.457825051385.issue8028@psf.upfronthosting.co.za> Message-ID: <1288816719.84.0.372685056004.issue8028@psf.upfronthosting.co.za> Ask Solem added the comment: Since you can't specify the return code, `self.terminate` is less flexible than `sys.exit`. I think the original intent is clear here, the method is there for the parent to control the child. You are of course welcome to argue otherwise. By the way, I just read the code and noticed that it handles SystemExit well, and supports using it to set the return code: class X(Process): def run(self): if not frobulating: raise SystemExit(255) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 22:28:58 2010 From: report at bugs.python.org (t.steinruecken) Date: Wed, 03 Nov 2010 21:28:58 +0000 Subject: [issue10301] Zipfile cannot be used in "with" Statement In-Reply-To: <1288819738.25.0.351027689616.issue10301@psf.upfronthosting.co.za> Message-ID: <1288819738.25.0.351027689616.issue10301@psf.upfronthosting.co.za> New submission from t.steinruecken : Using a ZipFile as a "with"-context dosnt work (Im using the standard Ubuntu version of Python3.1) Python 3.1.2 (r312:79147, Apr 15 2010, 15:35:48) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from zipfile import ZipFile >>> with ZipFile("test.zip","w") as z: ... z.close() Traceback (most recent call last): File "", line 1, in AttributeError: 'ZipFile' object has no attribute '__exit__' >>> ---------- components: Extension Modules messages: 120346 nosy: t.steinruecken priority: normal severity: normal status: open title: Zipfile cannot be used in "with" Statement type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 22:35:55 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 03 Nov 2010 21:35:55 +0000 Subject: [issue10300] Documentation of three PyDict_* functions In-Reply-To: <1288799659.81.0.759259964025.issue10300@psf.upfronthosting.co.za> Message-ID: <1288820155.26.0.821267091486.issue10300@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r86144 ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 22:40:22 2010 From: report at bugs.python.org (Alex) Date: Wed, 03 Nov 2010 21:40:22 +0000 Subject: [issue10301] Zipfile cannot be used in "with" Statement In-Reply-To: <1288819738.25.0.351027689616.issue10301@psf.upfronthosting.co.za> Message-ID: <1288820422.21.0.913264369036.issue10301@psf.upfronthosting.co.za> Alex added the comment: Context manager support was added in 3.2 ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 22:42:28 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 03 Nov 2010 21:42:28 +0000 Subject: [issue10301] Zipfile cannot be used in "with" Statement In-Reply-To: <1288819738.25.0.351027689616.issue10301@psf.upfronthosting.co.za> Message-ID: <1288820548.8.0.0633700283256.issue10301@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 22:47:36 2010 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 Nov 2010 21:47:36 +0000 Subject: [issue1500504] Alternate RFC 3986 compliant URI parsing module Message-ID: <1288820856.81.0.90415017671.issue1500504@psf.upfronthosting.co.za> Nick Coghlan added the comment: Just to be clear, even *I* don't think adding urischemes as it stands is a particularly great idea, and I wrote it. The only reason I haven't closed the issue is because I'd like to see it mined for additional tests in test_urlparse and perhaps even implementation or API enhancements in url.parse first. (The latter becomes a lot more likely if the urischemes implementation passes tests that url.parse fails) I also think, since I wrote this, the various urllib parsing methods were updated to return named tuple instances with properties, so a lot of the awkwardness of extracting partial values went away. (i.e. returning structured objects already raised the level of the urllib APIs from the "tuple-of-strings" level they used to be sitting at) I do still assert that urischemes is slightly "higher level" than the current incarnation of similar functionality in urllib.parse. Universal Resource Identifiers are more encompassing than Universal Resource Locators and Universal Resource Names, and the new APIs explicitly deal with both kinds of URI. There are subtle differences in the assumptions you're allowed to make when you may have a URN rather than a URL, so I believe the current module sometimes does the wrong thing when given one of the former. That said, it's been a long time since I've needed to remember the details, so I don't recall exactly where the current module gets URI handling wrong (or at least, did back in 2006). The intro to RFC 3986 is a good place to start in learning the differences though - Sir Tim writes good docs :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 23:27:58 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Wed, 03 Nov 2010 22:27:58 +0000 Subject: [issue10284] NNTP should accept bytestrings for username and password In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1288823278.85.0.70584667725.issue10284@psf.upfronthosting.co.za> Julien ?LIE added the comment: I quote what Russ Allbery has just answered on news.software.nntp: It's completely unspecified what encoding to use for AUTHINFO USER/PASS, which is one of the problems fixed by SASL. Clients should always use SASL where possible because of things like this. None of the legacy authentication mechanisms (for protocols besides NNTP, as well) support character sets. If they have to fall back to AUTHINFO USER/PASS, they're unfortunately just going to have to guess. Most clients previously probably just sent whatever bytes across the wire that corresponded to the local character set encoding of the username and password. In practice, using anything other than ASCII in passwords with AUTHINFO USER/PASS is not going to be portable and won't work reliably. > ** How do current news readers send them to news servers? > ** And how news servers should decode them? News servers probably can't do anything better than just accepting them as a byte stream and doing a byte-by-byte comparison against local configuration. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 23:40:26 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Nov 2010 22:40:26 +0000 Subject: [issue10301] Zipfile cannot be used in "with" Statement In-Reply-To: <1288819738.25.0.351027689616.issue10301@psf.upfronthosting.co.za> Message-ID: <1288824026.59.0.653398480296.issue10301@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 23:42:01 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Nov 2010 22:42:01 +0000 Subject: [issue8886] zipfile.ZipExtFile is a context manager, but that is not documented In-Reply-To: <1275565167.77.0.94387257463.issue8886@psf.upfronthosting.co.za> Message-ID: <1288824121.26.0.231262927645.issue8886@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 23:44:17 2010 From: report at bugs.python.org (Lukas Lueg) Date: Wed, 03 Nov 2010 22:44:17 +0000 Subject: [issue10302] Add class-functions to hash many small objects with hashlib In-Reply-To: <1288824257.88.0.548360154902.issue10302@psf.upfronthosting.co.za> Message-ID: <1288824257.88.0.548360154902.issue10302@psf.upfronthosting.co.za> New submission from Lukas Lueg : The objects provided by hashlib mainly serve the purpose of computing hashes over strings of arbitrary size. The user gets a new object (e.g. hashlib.sha1()), calls .update() with chunks of data and then finally uses .digest() or .hexdigest() to get the hash. For convenience reasons these steps can also be done in almost one step (e.g. hashlib.sha1('foobar').hexdigest()). While the above approach basically covers all use-cases for hash-functions, when computing hashes of many small strings it is yet inefficient (e.g. due to interpreter-overhead) and leaves out the possibility for performance improvements. There are many cases where we need the hashes of numerous (small) objects, most or all of which being available in memory at the same time. I therefor propose to extend the classes provided by hashlib with an additional function that takes an iterable object, computes the hash over the string representation of each member and returns the result. Due to the aim of this interface, the function is a member of the class (not the instance) and has therefor no state bound to an instance. Memory requirements are to be anticipated and met by the programmer. For example: foo = ['my_database_key1', 'my_database_key2'] hashlib.sha1.compute(foo) >> ('\x00\x00', '\xff\xff') I consider this interface to hashlib particular useful, as we can take advantage of vector-based implementations that compute multiple hashes in one pass (e.g. through SSE2). GCC has a vector-extension that provides a *somewhat* standard way to write code that can get compiled to SSE2 or similar machine code. Examples of vector-based implementations of SHA1 and MD5 can be found at https://code.google.com/p/pyrit/issues/detail?id=207 Contigency plan: We compile to code iterating over OpenSSL's EVP-functions if compiler is other than GCC or SSE2 is not available. The same approach can be used to cover hashlib-objects for which we don't have an optimized implementation. ---------- components: Library (Lib) messages: 120351 nosy: ebfe priority: normal severity: normal status: open title: Add class-functions to hash many small objects with hashlib type: feature request versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 00:06:48 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Nov 2010 23:06:48 +0000 Subject: [issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input In-Reply-To: <1288416372.65.0.387803067469.issue10242@psf.upfronthosting.co.za> Message-ID: <1288825608.51.0.870131650343.issue10242@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Suggestions: * new name: assertCountEqual(a, b) or: assertElementCountEqual(a, b) this name captures the essential service: - unordered comparison where duplicates matter - inputs are "elements", not "items" which means key/value pairs * O(n) implementation with O(n**2) fallback: try: a_cnt = collections.Counter(a) b_cnt = collections.Counter(b) except TypeError: # do current O(n**2) fallback else: if a_cnt == b_cnt: # test passed else: in_a_but_not_in_b = a - b in_b_but_not_in_a = b - a # display nice diff * documentation should emphasize the new name: assertElementCountEqual(a, b) obsolete alias: assertItemsEqual(a, b) ---------- assignee: rhettinger -> michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 00:14:37 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Nov 2010 23:14:37 +0000 Subject: [issue9796] Add summary tables for unittest API In-Reply-To: <1283906621.68.0.367606257735.issue9796@psf.upfronthosting.co.za> Message-ID: <1288826077.26.0.472664292567.issue9796@psf.upfronthosting.co.za> Ezio Melotti added the comment: I committed the patch in r86141 and a few other fixes in r86142 and r86143. There are still more things I want to fix before I backport all the patches to 3.1 and 2.7 and close the issue. ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 00:21:39 2010 From: report at bugs.python.org (Phillip J. Eby) Date: Wed, 03 Nov 2010 23:21:39 +0000 Subject: [issue10155] Add fixups for encoding problems to wsgiref In-Reply-To: <1287591822.31.0.50492787235.issue10155@psf.upfronthosting.co.za> Message-ID: <1288826499.13.0.1742116057.issue10155@psf.upfronthosting.co.za> Phillip J. Eby added the comment: Committed to Py3K in r86146, with added docs and a larger list of transcodable CGI variables. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 00:33:20 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Nov 2010 23:33:20 +0000 Subject: [issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input In-Reply-To: <1288416372.65.0.387803067469.issue10242@psf.upfronthosting.co.za> Message-ID: <1288827200.55.0.716619606448.issue10242@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I'd be inclined to insert a check that falls back > to the "unorderable_list_difference" approach in > the case where "expected != sorted(reversed(expected))". Too fragile and subtle. The method need to be absolutely straight-forward. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 00:36:08 2010 From: report at bugs.python.org (Michael Foord) Date: Wed, 03 Nov 2010 23:36:08 +0000 Subject: [issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input In-Reply-To: <1288416372.65.0.387803067469.issue10242@psf.upfronthosting.co.za> Message-ID: <1288827368.06.0.393935295082.issue10242@psf.upfronthosting.co.za> Michael Foord added the comment: assertElementCountEqual is good name and I like your implementation suggestion. I'll put this in. I think the implementation fix can go into 2.7 as well but not the rename/aliasing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 00:52:35 2010 From: report at bugs.python.org (Michael Foord) Date: Wed, 03 Nov 2010 23:52:35 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288828355.24.0.851805937208.issue10273@psf.upfronthosting.co.za> Michael Foord added the comment: Renaming and aliasing methods has a cost. It confuses users of the old names (including future users - the current API is now baked into django 1.3 unless I can get an update done in time for them to change the version they're using). People who use autocomplete or introspection (dir) to explore the APIs will also still come across the old names. Given that unittest has just changed a lot a further radical change is 'unfortunate'. However, for both the regexp methods and the Items method the names are actually misleading. For assertItemsEqual Raymond suggests assertElementCountsEqual. See issue 10242. For the regexp methods we should use assertRegexp - this is shorter, not misleading and consistent with assertRaisesRegexp. We should leave the gt / le / lt methods as they are. There is less consensus that these methods should be changed anyway. The documentation can be improved by moving *all* the deprecated methods (new and old) out of the main documentation and into a separate section at the end of the documentation. The type specific asserts we should also move into their own section and out of the main documentation. This means users who discover don't have to go to the source (there are online references) but they are out of the main documentation. Hopefully everyone is only equally unhappy with this resolution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 00:52:48 2010 From: report at bugs.python.org (Max Skaller) Date: Wed, 03 Nov 2010 23:52:48 +0000 Subject: [issue10243] Packaged Pythons In-Reply-To: <4CCBCC03.8020200@v.loewis.de> Message-ID: Max Skaller added the comment: On Sat, Oct 30, 2010 at 6:40 PM, Martin v. L??wis wrote: It may be there is none. You need to read the bit where I explain that I am not building Python, I'm grabbing pre-made packages, for OSX and for Ubuntu. The problem is that these packages don't seem to supply a dynamic link version. My problem cannot be solved by telling me I can build Python myself with the --enable-shared switch, because I am not the client. I am a vendor supplying a tool that can generate Python shared libraries which cannot run unless the CLIENT has a shared library version of libpython. So you're telling me to tell THEM to build Python with --enable-shared switch which is out of the question for many of them, who may, for example, be programmers working in a shop where they do not have the ability to change the system installed by their system admin. So the problem is that the *packagers* are not supplying the dynamic lib. Surely that is not the Python dev's issue directly, but it IS an issue the Python dev's can do something about, by talking to the packagers. Anyhow, I will give up. I can't test the feature of the compiler I have implemented because I don't have a libpython.so and I have no intention of building one, because I can't expect all those Python users out there to do it either. It seems you really don't understand the requirements for dynamic linking: my application code is exclusively in a dlopen()d shared library, so if it is used AS a python module or it wants itself to USE a Python extension module OR Python interpreter itself, it cannot do so. The top level application is a fixed mainline which does not include libpython.a or any such symbols. It's a basic design principle, Meyer called it "the principle of explicit interfaces" which means: if you depend on something make the dependency explicit. Extension modules which do not *explicitly* link against libpython break this rule. ---------- Added file: http://bugs.python.org/file19480/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------

On Sat, Oct 30, 2010 at 6:40 PM, Martin v. L??wis <report at bugs.python.org> wrote:

Martin v. L??wis <martin at v.loewis.de> added the comment:

> Python 2.6, for example, does ship a shared library.


I fail to see the bug in this report.


It may be there is none. You need to read the bit where I explain that I am not building Python, I'm grabbing pre-made packages, for OSX and for Ubuntu.

The problem is that these packages don't seem to supply a dynamic link version.

My problem cannot be solved by telling me I can build Python myself with
the --enable-shared switch, because I am not the client. I am a vendor supplying a tool that can generate Python shared libraries which cannot run unless the CLIENT has a shared library version of libpython. So you're telling me to tell THEM to build Python with --enable-shared switch which is out of the question for many of them, who may, for example, be programmers working in a shop where they do not have the ability to change the system installed by their system admin.
??
So the problem is that the *packagers* are not supplying the dynamic lib.

Surely that is not the Python dev's issue directly, but it IS an issue the Python dev's can do something about, by talking to the packagers.

Anyhow, I will give up. I can't test the feature of the compiler I have implemented
because I don't have a libpython.so and I have no intention of building one,
because I can't expect all those Python users out there to do it either.

It seems you really don't understand the requirements for dynamic linking:
my application code is exclusively in a dlopen()d shared library, so if it is
used AS a python module or it wants itself to USE a Python extension
module OR Python interpreter itself, it cannot do so.

The top level application is a fixed mainline which does not include
libpython.a or any such symbols.

It's a basic design principle, Meyer called it "the principle of explicit interfaces"
which means: if you depend on something make the dependency explicit.

Extension modules which do not *explicitly* link against libpython break
this rule.


From report at bugs.python.org Thu Nov 4 00:55:02 2010 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 03 Nov 2010 23:55:02 +0000 Subject: [issue3699] test_bigaddrspace broken In-Reply-To: <1219841607.12.0.523528748152.issue3699@psf.upfronthosting.co.za> Message-ID: <1288828502.55.0.0223510704614.issue3699@psf.upfronthosting.co.za> Sandro Tosi added the comment: After quite a bit of discussion with Antoine on IRC, here it is a preliminary patch: it uses byte instead of string, but at least it works :) I'll work on a string (additional) test class hopefully tomorrow ---------- keywords: +patch nosy: +sandro.tosi Added file: http://bugs.python.org/file19481/issue3699-py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:04:33 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 00:04:33 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288828355.24.0.851805937208.issue10273@psf.upfronthosting.co.za> Message-ID: <1288829068.5969.24.camel@localhost.localdomain> Antoine Pitrou added the comment: > For assertItemsEqual Raymond suggests assertElementCountsEqual. See > issue 10242. Why replace a long awkward name with an even longer and more awkward name? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:13:04 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 04 Nov 2010 00:13:04 +0000 Subject: [issue6081] str.format_from_mapping() In-Reply-To: <1242948196.62.0.545811632191.issue6081@psf.upfronthosting.co.za> Message-ID: <1288829584.77.0.00156814108537.issue6081@psf.upfronthosting.co.za> Eric Smith added the comment: Updated patch which adds tests and minimal docs. Named changed to format_map. I'll commit this before 3.2b1 unless I hear a complaint. ---------- keywords: +easy, needs review resolution: -> accepted Added file: http://bugs.python.org/file19482/issue6081-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:21:21 2010 From: report at bugs.python.org (Malte Helmert) Date: Thu, 04 Nov 2010 00:21:21 +0000 Subject: [issue10303] small inconsistency in tutorial In-Reply-To: <1288830081.73.0.485204964128.issue10303@psf.upfronthosting.co.za> Message-ID: <1288830081.73.0.485204964128.issue10303@psf.upfronthosting.co.za> New submission from Malte Helmert : Section "3.1.2. Strings" says "*Once again*, the print() function produces the more readable output.", but as far as I can see (or grep), this is the first time that this aspect of print() is mentioned. ---------- assignee: docs at python components: Documentation messages: 120362 nosy: docs at python, maltehelmert priority: normal severity: normal status: open title: small inconsistency in tutorial versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:27:04 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 04 Nov 2010 00:27:04 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288830424.01.0.720043508788.issue10273@psf.upfronthosting.co.za> Ezio Melotti added the comment: An alternative would be adding check_order and check_duplicates to assertSameElements and de-deprecate it. Python 2.7 could be left unchanged because it's too late to add/rename/deprecate methods (it has assertItemsEqual but not assertSameElements). Py3.2 would also be unchanged (assertItemsEqual and the deprecation of assertSameElements are both new in 3.2, assertSameElements has been introduced in 3.1). They would end up with two different methods though. The assertSameElements name seems quite good, and providing extra args will make it more flexible (it will cover all the 4 cases listed in msg100685) and the behavior would be clear without clumsy method names. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:27:53 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 04 Nov 2010 00:27:53 +0000 Subject: [issue10303] small inconsistency in tutorial In-Reply-To: <1288830081.73.0.485204964128.issue10303@psf.upfronthosting.co.za> Message-ID: <1288830473.81.0.624255817104.issue10303@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:28:23 2010 From: report at bugs.python.org (Malte Helmert) Date: Thu, 04 Nov 2010 00:28:23 +0000 Subject: [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> New submission from Malte Helmert : >From Section 3.1.2 of the tutorial: print(""" Usage: thingy [OPTIONS] -h Display this usage message -H hostname Hostname to connect to """) produces the following output: _____________________________________________________________ Usage: thingy [OPTIONS] -h Display this usage message -H hostname Hostname to connect to _____________________________________________________________ That doesn't quite match the behaviour: there should be an extra blank line prepended to the output. ---------- assignee: docs at python components: Documentation messages: 120364 nosy: docs at python, maltehelmert priority: normal severity: normal status: open title: error in tutorial triple-string example versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:30:19 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 04 Nov 2010 00:30:19 +0000 Subject: [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1288830619.83.0.547137437766.issue10304@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:44:11 2010 From: report at bugs.python.org (Malte Helmert) Date: Thu, 04 Nov 2010 00:44:11 +0000 Subject: [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1288831451.29.0.13903656512.issue10304@psf.upfronthosting.co.za> Malte Helmert added the comment: Here's a related one if you want to get the sample output really 100% correct. In the last example of Section 3, the output in {>>> a, b = 0, 1 >>> while b < 1000: ... print(b, end=' ') ... a, b = b, a+b ... 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987} should have an extra space at the end. (Granted, this is very very minor, but this may make a Python 2.x oldtimer like me wonder if print's end=" " does the same as old Python 2.x's "print b," including suppression of the "softspace".) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:54:43 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 04 Nov 2010 00:54:43 +0000 Subject: [issue9732] Addition of getattr_static for inspect module In-Reply-To: <1283347386.83.0.146152049794.issue9732@psf.upfronthosting.co.za> Message-ID: <1288832083.9.0.821058443521.issue9732@psf.upfronthosting.co.za> Changes by Michael Foord : Removed file: http://bugs.python.org/file18699/static.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:55:01 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 04 Nov 2010 00:55:01 +0000 Subject: [issue9732] Addition of getattr_static for inspect module In-Reply-To: <1283347386.83.0.146152049794.issue9732@psf.upfronthosting.co.za> Message-ID: <1288832101.83.0.445642253654.issue9732@psf.upfronthosting.co.za> Changes by Michael Foord : Removed file: http://bugs.python.org/file18701/test_static.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:57:18 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 04 Nov 2010 00:57:18 +0000 Subject: [issue9732] Addition of getattr_static for inspect module In-Reply-To: <1283347386.83.0.146152049794.issue9732@psf.upfronthosting.co.za> Message-ID: <1288832238.63.0.0116449159435.issue9732@psf.upfronthosting.co.za> Michael Foord added the comment: Updated implementation that handles instances with inherited __slots__ members and attributes from C descriptors correctly. I think is both "good enough" and useful enough to add to inspect. (The remaining constraints are rare or pathological.) ---------- Added file: http://bugs.python.org/file19483/static.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:57:43 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 04 Nov 2010 00:57:43 +0000 Subject: [issue9732] Addition of getattr_static for inspect module In-Reply-To: <1283347386.83.0.146152049794.issue9732@psf.upfronthosting.co.za> Message-ID: <1288832263.32.0.990836972417.issue9732@psf.upfronthosting.co.za> Changes by Michael Foord : Added file: http://bugs.python.org/file19484/test_static.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 02:03:36 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 04 Nov 2010 01:03:36 +0000 Subject: [issue10305] Cleanup up ResourceWarnings in multiprocessing In-Reply-To: <1288832616.21.0.291852483251.issue10305@psf.upfronthosting.co.za> Message-ID: <1288832616.21.0.291852483251.issue10305@psf.upfronthosting.co.za> New submission from Brian Curtin : As shown in a debug run of test_multiprocessing, at least two places in managers.py apparently leave open sockets. Lines 786 and 805 are the culprits, both util log lines. ---------- components: Library (Lib) messages: 120367 nosy: asksol, brian.curtin priority: normal severity: normal stage: needs patch status: open title: Cleanup up ResourceWarnings in multiprocessing type: resource usage versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 02:22:46 2010 From: report at bugs.python.org (StevenJ) Date: Thu, 04 Nov 2010 01:22:46 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1288833766.11.0.90440770238.issue1926@psf.upfronthosting.co.za> StevenJ added the comment: I too was just looking at NNTPS support because I have a need for it. The latest patch looks like great work and I think the things it implements are needed for this library. But it seems to me that the latest patch combines 3 things which might otherwise be able to be separately considered. NNTPS, START_TLS (RFC 4642) extension and AUTHINFO extension (RFC 4643). It may be that START_TLS and AUTHINFO are indivisible, I need to read those more, but shouldn't that be a new topic of discussion as this feature request is for NNTPS support? I also don't understand the difficulty with plain NNTPS as it doesn't need a new interface a very simple patch (attached) achieves NNTPS?? (Most of the patch is test case and variant defaults. The actual NNTPS code is just: + # Make sure we can actually use ssl if its attempted. + if ssl_context: + self.sslcontext = ssl_context + self.sock = self.sslcontext.wrap_socket(self.sock) I also don't understand why START_TLS and AUTHINFO need to change how the module is interfaced to (separating log in/authentication, etc), my reading of START_TLS and AUTHINFO seem to me that it should all be under the covers. It even explains this in Section 7 of "Using TLS with IMAP, POP3 and ACAP" [TLS-IMAPPOP]. That the idea is "It just works". So surely if someone uses this module and they do not specify NNTPS and it supports START_TLS and AUTHINFO and so does the server then it just works. Otherwise it seems a bunch of NNTP Extension requirements and processing spills over to the users of this module when they can probably be contained locally?? Perhaps there needs to be a separate feature request "START_TLS and AUTHINFO extension support for nntplib" so the issues and any necessary interface changes can be considered in isolation from simple NNTP over SSL? I think it would be nice to have NNTPS in for 3.2. ---------- nosy: +StevenJ Added file: http://bugs.python.org/file19485/nntps_only_patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 02:25:45 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 04 Nov 2010 01:25:45 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288833945.26.0.391847299844.issue10273@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > For the regexp methods we should use assertRegexp assertRegex is better. it matches the name used in other unittest implementations, there is not confusion with camel casing RegExp vs Regexp, and it matches the former name of Python's own regex module. > We should leave the gt / le / lt methods as they are. The assertLessEqual name is non-standard, it will never be spelled right by someone who hasn't used it recently. > The documentation can be improved by moving *all* the deprecated > methods (new and old) out of the main documentation and > into a separate section at the end of the documentation See issue 10242 for a suggestion on how to handle renaming (document the new and old name in the same entry, noting that one name is old). >> For assertItemsEqual Raymond suggests assertElementCountsEqual. > Why replace a long awkward name with an even longer > and more awkward name? If length is an issue, assertCountsEqual will also do fine. The important virtue is clarity. The problem with ItemsEqual is that it doesn't tell you anything about what it does (unordered comparison where duplicates matter). Also, the term "items" in Python usually means key/value pairs. That is why we use the term "elements" in sets, itertools, etc. In contrast, assertCountsEqual tells you what it does, compares the element counts. It is the same as Counter(a)==Counter(b) for hashable elements and an equivalent for unhashable elements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 02:54:32 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Nov 2010 01:54:32 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288835672.78.0.243686420434.issue10273@psf.upfronthosting.co.za> R. David Murray added the comment: assertCountsEqual is IMO much clearer than assertItemsCountsEqual (or however you spell it). I was unclear on what the latter did, but the former is fairly clear. Ezio's suggestion is also clearer. Raymond, since you said 'never' your statement about assertLessEqual is clearly false :). I don't have any problem remembering it (it's just __le__ spelled out using the standard unittest camelcase). assertLess, on the other hand, I often get wrong, since it is *not* __lt__ spelled out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 03:04:59 2010 From: report at bugs.python.org (Jeffrey Yasskin) Date: Thu, 04 Nov 2010 02:04:59 +0000 Subject: [issue10260] Add a threading.Condition.wait_for() method In-Reply-To: <1288697339.3549.1.camel@localhost.localdomain> Message-ID: Jeffrey Yasskin added the comment: On Tue, Nov 2, 2010 at 4:29 AM, Antoine Pitrou wrote: >> I spent some time thinking of a name. ?I tried wait_predicate and >> predicate_wait, but wait_for seemed natural. ?Any other ideas? >> How about wait_until_true? > > wait_for is ok IMO. Agreed. >> My original method had this as a free function, but I moved it into >> the Condition because I could see no other kind of primitive that >> would use it. ?I agree that it is unfortunate to pull what is >> essentially a utility function into the Condition variable, so I am >> leaning towards keeping it a module function. > > I'm not sure I see the point. It's an operation on a Condition variable, > so it's natural to have it as a Condition method. A module function > would feel rather weird. Yeah, it should primarily be used as a Condition method. I was suggesting implementing that Condition method in terms of a threading function, which would also help other people trying to, say, mock Condition objects. But that's not a big deal, and I could be wrong about whether it's useful at all. As I said earlier, I'm happy with this patch either way. (Note that Condition.wait_for is helpful to people mocking Condition anyway, since the number of calls is much more fixed than the calls to Condition.wait.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 03:24:03 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 04 Nov 2010 02:24:03 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288837443.84.0.483600638143.issue10273@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > assertLess, on the other hand, I often get wrong, > since it is *not* __lt__ spelled out. Right. Even Michael gets that one wrong. Meditate on why Guido created the special method __lt__ instead of __less_than__. Regardless of why Guido made that choice, we do already have a standard way to spell less-than in Python, and it would be good to stick with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 03:41:57 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 04 Nov 2010 02:41:57 +0000 Subject: [issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input In-Reply-To: <1288416372.65.0.387803067469.issue10242@psf.upfronthosting.co.za> Message-ID: <1288838517.53.0.545343816427.issue10242@psf.upfronthosting.co.za> Raymond Hettinger added the comment: One nuance, it may be better to implement as: a_cnt = collections.Counter(iter(a)) b_cnt = collections.Counter(iter(b)) That will bypass the special handling the Counter constructor has if the argument is a Mapping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 04:07:38 2010 From: report at bugs.python.org (David Sankel) Date: Thu, 04 Nov 2010 03:07:38 +0000 Subject: [issue1602] windows console doesn't print utf8 (Py30a2) In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1288840058.53.0.754973636629.issue1602@psf.upfronthosting.co.za> Changes by David Sankel : ---------- nosy: +David.Sankel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 04:08:10 2010 From: report at bugs.python.org (David Sankel) Date: Thu, 04 Nov 2010 03:08:10 +0000 Subject: [issue6058] Add cp65001 to encodings/aliases.py In-Reply-To: <1242692494.35.0.391765957832.issue6058@psf.upfronthosting.co.za> Message-ID: <1288840090.2.0.456248507953.issue6058@psf.upfronthosting.co.za> Changes by David Sankel : ---------- nosy: +David.Sankel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 04:14:06 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 04 Nov 2010 03:14:06 +0000 Subject: [issue6058] Add cp65001 to encodings/aliases.py In-Reply-To: <1242692494.35.0.391765957832.issue6058@psf.upfronthosting.co.za> Message-ID: <1288840446.04.0.613488337219.issue6058@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- nosy: -michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 04:41:07 2010 From: report at bugs.python.org (Julian) Date: Thu, 04 Nov 2010 03:41:07 +0000 Subject: [issue7317] Display full tracebacks when an error occurs asynchronously In-Reply-To: <1258140215.22.0.835793798885.issue7317@psf.upfronthosting.co.za> Message-ID: <1288842067.31.0.976059962904.issue7317@psf.upfronthosting.co.za> Julian added the comment: Amaury asks: "Is there an already existing flag that could control this behaviour?" I wonder if the warnings module could be used. ---------- nosy: +oddthinking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 04:49:56 2010 From: report at bugs.python.org (Julian) Date: Thu, 04 Nov 2010 03:49:56 +0000 Subject: [issue10306] Weakref callback exceptions should be turned into warnings. In-Reply-To: <1288842596.1.0.996476383192.issue10306@psf.upfronthosting.co.za> Message-ID: <1288842596.1.0.996476383192.issue10306@psf.upfronthosting.co.za> New submission from Julian : If a weakref callback raises an exception, weakref writes out some text (to stderr, I think) and ignores it. I think it would be more appropriate if weakref emitted that text using the Python warning module, to allow it to be better controlled. Consider this code with two foolish mistakes in it: --------- import warnings import weakref warnings.simplefilter('ignore') # Whoops, ignoring warnings is foolish. def callback(condemned_object): raise Exception("Failure") # Whoops, raising an exception in a callback is foolish. class RandomObject(object): pass strong_ref = RandomObject() wr = weakref.proxy(strong_ref, callback) print "Removing the only strong reference" strong_ref = None # No guarantee that the garbage collector will trigger # in practice, in CPython, it does. print "Shutting down now." --------- When I run this I get: Removing the only strong reference Exception Exception: Exception('Failure',) in ignored Shutting down now. The exception text is output even though I don't want it to be. To help me debug, I want for the exception text to be manageable (not by ignoring it, like in the example above, but using the other warnings module features.) ---------- components: Library (Lib) messages: 120375 nosy: oddthinking priority: normal severity: normal status: open title: Weakref callback exceptions should be turned into warnings. type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 04:50:22 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 04 Nov 2010 03:50:22 +0000 Subject: [issue10307] compile error in readline.c In-Reply-To: <1288842622.31.0.254816051601.issue10307@psf.upfronthosting.co.za> Message-ID: <1288842622.31.0.254816051601.issue10307@psf.upfronthosting.co.za> New submission from Senthil Kumaran : /py3k/Modules/readline.c: In function flex_complete: /py3k/Modules/readline.c:877: error: on_completion undeclared (first use in this function) ---------- assignee: orsenthil messages: 120376 nosy: orsenthil priority: normal severity: normal status: open title: compile error in readline.c type: compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 04:55:09 2010 From: report at bugs.python.org (And Clover) Date: Thu, 04 Nov 2010 03:55:09 +0000 Subject: [issue10155] Add fixups for encoding problems to wsgiref In-Reply-To: <1287591822.31.0.50492787235.issue10155@psf.upfronthosting.co.za> Message-ID: <1288842909.89.0.640922860652.issue10155@psf.upfronthosting.co.za> And Clover added the comment: Thanks. Some of those additions in _needs_transcode are potentially controversial, though. I'm not wholly sure it's the right thing to transcode these. Some of them may not actually come from the request, eg `REMOTE_USER` may be filled in by IIS's Windows authentication using a native-Unicode string from the Windows user database. Is it the right thing to turn it into UTF-8-bytes-in-Unicode for consistency with Apache? Maybe. (At least for most of the other new envvars there will never see a non-ASCII character. Or in `REMOTE_IDENT`'s case never be used for anything.) The case with the REDIRECT_HTTP_ and SSL_ envvars is an interesting one. Whilst transcoding them at some point will very probably be what applications need to do if they want to actually use them, is it within CGIHandler's remit to change Apache mod-specific variables that are not specified by CGI or WSGI? (There might, after all, be lots of these to catch for other mods and servers, and it's *conceivable* that somebody might be re-using one of these names to set in the environment for some other purpose, in which case transcoding would be adding an unexpected mangling. We can't in the general case expect users to know to avoid envvar names are used as non-standard extensions in all servers.) REDIRECT_HTTP_ at least comes from the HTTP request, so I guess the consistency is good there. (But then I think the only header that actually may contain non-ASCII is REDIRECT_URL, which replaces the unescaped SCRIPT_NAME and PATH_INFO; that one isn't caught at the moment.) ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 05:12:11 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 04 Nov 2010 04:12:11 +0000 Subject: [issue10307] compile error in readline.c In-Reply-To: <1288842622.31.0.254816051601.issue10307@psf.upfronthosting.co.za> Message-ID: <1288843931.46.0.338247407374.issue10307@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The problem was in py3k, due to a minor overlook in r85680. Fixed in r86153. ---------- components: +Build resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 05:44:19 2010 From: report at bugs.python.org (Martin Spacek) Date: Thu, 04 Nov 2010 04:44:19 +0000 Subject: [issue9015] array.array.tofile cannot write arrays of sizes > 4GB, even compiled for amd64 In-Reply-To: <1276730446.48.0.255465495583.issue9015@psf.upfronthosting.co.za> Message-ID: <1288845859.64.0.247815291434.issue9015@psf.upfronthosting.co.za> Martin Spacek added the comment: NumPy is addressing this with a workaround in its ndarray, calling fwrite multiple times in reasonably sized chunks. See http://projects.scipy.org/numpy/ticket/1660 ---------- nosy: +mspacek type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 07:19:52 2010 From: report at bugs.python.org (Ned Deily) Date: Thu, 04 Nov 2010 06:19:52 +0000 Subject: [issue10243] Packaged Pythons In-Reply-To: <1288421190.78.0.406160800778.issue10243@psf.upfronthosting.co.za> Message-ID: <1288851592.49.0.19819499978.issue10243@psf.upfronthosting.co.za> Ned Deily added the comment: For what it's worth, the python.org installers for Mac OS X do include a libpython shared library. As of Python 2.7 (and 3.2), the installer includes a symlink to make it easier to find: $ cd /Library/Frameworks/Python.framework/Versions/2.7/lib $ ls -l libpython2.7.dylib $ lrwxr-xr-x 1 root admin 9 Oct 27 20:46 libpython2.7.dylib@ -> ../Python $ file ../Python ../Python: Mach-O universal binary with 2 architectures ../Python (for architecture ppc): Mach-O dynamically linked shared library ppc ../Python (for architecture i386): Mach-O dynamically linked shared library i386 $ cd /Library/Frameworks/Python.framework/Versions/2.6 $ file Python Python: Mach-O universal binary with 2 architectures Python (for architecture ppc): Mach-O dynamically linked shared library ppc Python (for architecture i386): Mach-O dynamically linked shared library i386 In Debian and Ubuntu releases, the shared library is put into its own optionally installed package, libpythonx.x. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 07:20:04 2010 From: report at bugs.python.org (Ned Deily) Date: Thu, 04 Nov 2010 06:20:04 +0000 Subject: [issue10243] Packaged Pythons In-Reply-To: <1288421190.78.0.406160800778.issue10243@psf.upfronthosting.co.za> Message-ID: <1288851604.13.0.932028391314.issue10243@psf.upfronthosting.co.za> Changes by Ned Deily : Removed file: http://bugs.python.org/file19480/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 07:48:03 2010 From: report at bugs.python.org (=?utf-8?q?Hagen_F=C3=BCrstenau?=) Date: Thu, 04 Nov 2010 06:48:03 +0000 Subject: [issue10300] Documentation of three PyDict_* functions In-Reply-To: <1288799659.81.0.759259964025.issue10300@psf.upfronthosting.co.za> Message-ID: <1288853283.95.0.565693563934.issue10300@psf.upfronthosting.co.za> Hagen F?rstenau added the comment: The ReST links in http://docs.python.org/py3k/c-api/dict.html#PyDict_Items seem to be broken. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 09:29:19 2010 From: report at bugs.python.org (Ask Solem) Date: Thu, 04 Nov 2010 08:29:19 +0000 Subject: [issue10305] Cleanup up ResourceWarnings in multiprocessing In-Reply-To: <1288832616.21.0.291852483251.issue10305@psf.upfronthosting.co.za> Message-ID: <1288859359.67.0.805249303964.issue10305@psf.upfronthosting.co.za> Ask Solem added the comment: ah, this is something I've seen as well, its part of a bug that I haven't created an issue for yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 09:35:51 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 04 Nov 2010 08:35:51 +0000 Subject: [issue10286] URLOpener => URLopener x2 in fix_urllib.py In-Reply-To: <1288643335.41.0.951306369167.issue10286@psf.upfronthosting.co.za> Message-ID: <1288859751.99.0.454024694177.issue10286@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r86157. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 09:36:34 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 04 Nov 2010 08:36:34 +0000 Subject: [issue10293] PyMemoryView object has obsolete members In-Reply-To: <1288689996.27.0.790374524403.issue10293@psf.upfronthosting.co.za> Message-ID: <1288859794.1.0.397002229372.issue10293@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> pitrou nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 09:40:53 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 04 Nov 2010 08:40:53 +0000 Subject: [issue10198] wave module writes corrupt wav file for zero-length writeframes In-Reply-To: <1288107337.09.0.986719080657.issue10198@psf.upfronthosting.co.za> Message-ID: <1288860053.72.0.39764964327.issue10198@psf.upfronthosting.co.za> Georg Brandl added the comment: I'm sorry, the actual revision is r85970. Why should it be irrelevant for other branches? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 09:49:52 2010 From: report at bugs.python.org (Martin Spacek) Date: Thu, 04 Nov 2010 08:49:52 +0000 Subject: [issue9015] f.write(s) for s > 2GB hangs in win64 (and win32?) In-Reply-To: <1276730446.48.0.255465495583.issue9015@psf.upfronthosting.co.za> Message-ID: <1288860592.3.0.670484449031.issue9015@psf.upfronthosting.co.za> Martin Spacek added the comment: It turns out this isn't just a problem with array.array. It's a problem with Python's file.write() as well. Here's my test code: # file.write() test: FOURGBMINUS = 2**32 - 16 s = '0123456789012345' # 16 bytes longs = ''.join([s for i in xrange(FOURGBMINUS//len(s))]) assert len(longs) == FOURGBMINUS f = open('test.txt', 'w') f.write(longs) # completes successfully f.close() FOURGB = 2**32 s = '0123456789012345' # 16 bytes longs = ''.join([s for i in xrange(FOURGB//len(s))]) assert len(longs) == FOURGB f = open('test.txt', 'w') f.write(longs) # hangs with 100% CPU, file is 0 bytes f.close() SIXGB = 2**32 + 2**31 s = '0123456789012345' # 16 bytes longs = ''.join([s for i in xrange(SIXGB//len(s))]) assert len(longs) == SIXGB f = open('test.txt', 'w') f.write(longs) # hangs with 100% CPU, file is 2**31 bytes f.close() # file.read test: TWOGB = 2**31 TWOGBPLUS = TWOGB + 16 s = '0123456789012345' # 16 bytes longs = ''.join([s for i in xrange(TWOGBPLUS//len(s))]) assert len(longs) == TWOGBPLUS f = open('test.txt', 'w') f.write(longs) # completes successfully f.close() f = open('test.txt', 'r') longs = f.read() # works, but takes >30 min, memory usage keeps jumping around f.close() del longs # maybe f.read() reads 1 char at a time til it hits EOL. try this instead: f = open('test.txt', 'r') longs = f.read(TWOGBPLUS) # OverflowError: long int too large to convert to int longs = f.read(TWOGB) # OverflowError: long int too large to convert to int longs = f.read(TWOGB - 1) # works, takes only seconds f.close() So, I guess in windows (I've only tested in 64-bit Windows 7, Python 2.6.6 amd64), file.write() should call fwrite multiple times in chunks no greater than 2**31 bytes or so. Also, calling f.read(nbytes) where nbytes >= 2**31 raises "OverflowError: long int too large to convert to int". I don't have either of these problems in 64-bit Linux (Ubuntu 10.10) on the same machine (i7, 12GB). ---------- components: +IO -Extension Modules title: array.array.tofile cannot write arrays of sizes > 4GB, even compiled for amd64 -> f.write(s) for s > 2GB hangs in win64 (and win32?) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 09:53:34 2010 From: report at bugs.python.org (Martin Spacek) Date: Thu, 04 Nov 2010 08:53:34 +0000 Subject: [issue9015] f.write(s) for s > 2GB hangs in win64 (and win32?) In-Reply-To: <1276730446.48.0.255465495583.issue9015@psf.upfronthosting.co.za> Message-ID: <1288860814.87.0.685642131072.issue9015@psf.upfronthosting.co.za> Martin Spacek added the comment: I suppose someone should confirm this problem on Py > 2.6? ---------- components: +Extension Modules, Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:37:34 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 04 Nov 2010 09:37:34 +0000 Subject: [issue9015] f.write(s) for s > 2GB hangs in win64 (and win32?) In-Reply-To: <1276730446.48.0.255465495583.issue9015@psf.upfronthosting.co.za> Message-ID: <1288863454.53.0.711920336227.issue9015@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It's still an issue with 2.7, and even with 3.2a2, see issue9611. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:50:58 2010 From: report at bugs.python.org (Martin Spacek) Date: Thu, 04 Nov 2010 09:50:58 +0000 Subject: [issue9611] FileIO not 64-bit safe under Windows In-Reply-To: <1281893142.91.0.972520708976.issue9611@psf.upfronthosting.co.za> Message-ID: <1288864258.08.0.793442063634.issue9611@psf.upfronthosting.co.za> Martin Spacek added the comment: We've got a near duplicate Issue9015. This thread seems more considered though :) Note that writing more than 2**32-1 bytes at once results in a hung process with 100% CPU in 64-bit Windows, which has to be killed with Task Manager. So I think that qualifies as a crash. This is apparently due to fwrite limitations in msvc, even in win64. ---------- components: +IO nosy: +mspacek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 11:35:12 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 04 Nov 2010 10:35:12 +0000 Subject: [issue9611] FileIO not 64-bit safe under Windows In-Reply-To: <1281893142.91.0.972520708976.issue9611@psf.upfronthosting.co.za> Message-ID: <1288866912.84.0.452239578271.issue9611@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Fortunately, the lower-level write() has no such bug, at least when used in binary mode as FileIO does: it's almost a direct call to WriteFile(). This issue is more considered because it's not a bug in the Microsoft CRT, but in the Python implementation of the IO stack. About the issue, I'd suggest to just clamp the length to 2**32-1, and don't bother retrying; leave this to the buffered layer. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:27:44 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 11:27:44 +0000 Subject: [issue10308] Modules/getpath.c bugs In-Reply-To: <1288870063.75.0.834981100194.issue10308@psf.upfronthosting.co.za> Message-ID: <1288870063.75.0.834981100194.issue10308@psf.upfronthosting.co.za> New submission from Hallvard B Furuseth : Patches for getpath.c in Python 2.7 and 3.2a3: 2.7 chunk#2: copy_absolute() would use uninitialized data if getcwd() failed. The fix is equivalent to what 3.2a3 does. 3.2a3 chunk#2: search_for_exec_prefix() did 'unsigned value >= 0' on the PyUnicode_AsWideChar() result. (The fix just renames n to k of signed type, and moves the variables. An outer uninitialized 'size_t n' is in scope, so renaming the inner n to k leaves 'n=fread()' still a size_t.) Chunk #1, both versions: Fix an unlikely 'n+k' wraparound bug while I'm at it. The code has just checked that MAXPATHLEN-n will not wrap. ---------- files: getpath.diff keywords: patch messages: 120390 nosy: hfuru priority: normal severity: normal status: open title: Modules/getpath.c bugs type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file19486/getpath.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:43:47 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 11:43:47 +0000 Subject: [issue10309] dlmalloc.c needs _GNU_SOURCE for mremap() In-Reply-To: <1288871027.11.0.979430970782.issue10309@psf.upfronthosting.co.za> Message-ID: <1288871027.11.0.979430970782.issue10309@psf.upfronthosting.co.za> New submission from Hallvard B Furuseth : dlmalloc uses mremap() which is undeclared on Linux, needs _GNU_SOURCE. This can break at least on hosts where void* = 64 bits and int (default return type) 32 bits, since some bits in the return type are lost. A minimal patch is: --- Modules/_ctypes/libffi/src/dlmalloc.c +++ Modules/_ctypes/libffi/src/dlmalloc.c @@ -459,2 +459,4 @@ #define MMAP_CLEARS 0 /* WINCE and some others apparently don't clear */ +#elif !defined _GNU_SOURCE +#define _GNU_SOURCE 1 /* mremap() in Linux sys/mman.h */ #endif /* WIN32 */ However the (char*)CALL_MREMAP() cast looks like a broken fix for this, it suppresses a warning instead of fixing it. Maybe you should remove the cast and instead assign CALL_MREMAP() to a void*, to catch any similar trouble in the future. ---------- components: Extension Modules messages: 120391 nosy: hfuru priority: normal severity: normal status: open title: dlmalloc.c needs _GNU_SOURCE for mremap() type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:50:46 2010 From: report at bugs.python.org (Baiju M) Date: Thu, 04 Nov 2010 11:50:46 +0000 Subject: [issue10297] decimal module documentation is misguiding In-Reply-To: <1288780221.67.0.597486897879.issue10297@psf.upfronthosting.co.za> Message-ID: <1288871446.47.0.0541787548509.issue10297@psf.upfronthosting.co.za> Changes by Baiju M : ---------- nosy: +baijum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:51:20 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 11:51:20 +0000 Subject: [issue10310] signed:1 bitfields rarely make sense In-Reply-To: <1288871480.25.0.737532033065.issue10310@psf.upfronthosting.co.za> Message-ID: <1288871480.25.0.737532033065.issue10310@psf.upfronthosting.co.za> New submission from Hallvard B Furuseth : In Python 2.7 and 3.2a3, Modules/_io/textio.c uses signed:1 bitfields. They have value -1 or 0 in two's complement, but are not used thus here: gcc complains of = 1 overflow. If the point was that they are assigned signed values, well, unsigned:1 is promoted to signed int. I also fix a strange (int) cast doing (truncate flag to int) & 1. My guess is someone shut up a compiler warning about the above, by cleaning up in the wrong place. I kept a cast in case that's not it, and some compiler would get noisy anyway. There are possibly-signed 1-bit fields Modules/_ctypes/_ctypes_test.c: struct BITS too, but I don't know what that code is for. It does not specify signedness of the bitfields, which (as with char) makes it the compiler's choice. That's usually a bad idea, but maybe that code is for exploring the compiler? ---------- components: IO files: signed-1-bitfield.diff keywords: patch messages: 120392 nosy: hfuru priority: normal severity: normal status: open title: signed:1 bitfields rarely make sense type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file19487/signed-1-bitfield.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:53:02 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 04 Nov 2010 11:53:02 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288871582.51.0.0557967608571.issue10273@psf.upfronthosting.co.za> Ezio Melotti added the comment: It should be noted that, if we re-use assertSameElements, the default behavior should be preserved for compatibility with 3.1, and that is different (and possibly less useful) than the one of assertItemsEqual. Ambiguities could be solved easily specifying the args explicitly every time though. Regarding assertLT I'm still -1. The current names are imho the best compromise between being short and descriptive. They also match nicely assertEqual (assertLT <-> assertEQ; assertLessThan <-> assertEqualTo; but assertLess <-> assertEqual). Also it might not be immediately obvious what assertGE does, if one is not familiar with the special methods or if taken out of context (it's easy to recognize it if it's together with assertLT/LE/GT, but alone might just look a specialized method with a bad name). Moreover people who are used to the current spelling will have to notice the change, note that one name is now deprecated, update their code, remember if the correct name is assertLess or assertLT, wonder if assertEqual has been deprecated in favor of assertEQ too, remember the version where the name changed (e.g. if they try assertLT on 3.1 it won't work) and so on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:54:35 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Nov 2010 11:54:35 +0000 Subject: [issue10310] signed:1 bitfields rarely make sense In-Reply-To: <1288871480.25.0.737532033065.issue10310@psf.upfronthosting.co.za> Message-ID: <1288871675.49.0.740127158863.issue10310@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:54:41 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Nov 2010 11:54:41 +0000 Subject: [issue10308] Modules/getpath.c bugs In-Reply-To: <1288870063.75.0.834981100194.issue10308@psf.upfronthosting.co.za> Message-ID: <1288871681.77.0.848955321393.issue10308@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:55:21 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Nov 2010 11:55:21 +0000 Subject: [issue10309] dlmalloc.c needs _GNU_SOURCE for mremap() In-Reply-To: <1288871027.11.0.979430970782.issue10309@psf.upfronthosting.co.za> Message-ID: <1288871721.25.0.634264681743.issue10309@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:55:49 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Nov 2010 11:55:49 +0000 Subject: [issue10133] multiprocessing: conn_recv_string() broken error handling In-Reply-To: <1287346495.15.0.809946654619.issue10133@psf.upfronthosting.co.za> Message-ID: <1288871749.32.0.951430280397.issue10133@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:56:46 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Nov 2010 11:56:46 +0000 Subject: [issue10086] test_sysconfig failure with site-packages In-Reply-To: <1286980763.58.0.308351769071.issue10086@psf.upfronthosting.co.za> Message-ID: <1288871806.67.0.523630484836.issue10086@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:57:25 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Nov 2010 11:57:25 +0000 Subject: [issue2921] enable embedding: declare/#define only py* symbols in #includes In-Reply-To: <1211232563.03.0.480695098403.issue2921@psf.upfronthosting.co.za> Message-ID: <1288871845.83.0.00710305110284.issue2921@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:59:28 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Nov 2010 11:59:28 +0000 Subject: [issue10070] 2to3 wishes for already-2to3'ed files In-Reply-To: <1286882661.81.0.431457664283.issue10070@psf.upfronthosting.co.za> Message-ID: <1288871968.5.0.975993119991.issue10070@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:59:42 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Nov 2010 11:59:42 +0000 Subject: [issue10231] SimpleHTTPRequestHandler directory bugs In-Reply-To: <1288357835.63.0.535261040588.issue10231@psf.upfronthosting.co.za> Message-ID: <1288871982.25.0.198161709574.issue10231@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:59:47 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Nov 2010 11:59:47 +0000 Subject: [issue960325] "--require " option for configure/make (fail if building not possible) Message-ID: <1288871987.3.0.0286268511895.issue960325@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:04:23 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Nov 2010 12:04:23 +0000 Subject: [issue9611] FileIO not 64-bit safe under Windows In-Reply-To: <1281893142.91.0.972520708976.issue9611@psf.upfronthosting.co.za> Message-ID: <1288872263.44.0.770002964701.issue9611@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:15:31 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 04 Nov 2010 12:15:31 +0000 Subject: [issue9732] Addition of getattr_static for inspect module In-Reply-To: <1283347386.83.0.146152049794.issue9732@psf.upfronthosting.co.za> Message-ID: <1288872931.51.0.331511812553.issue9732@psf.upfronthosting.co.za> Changes by Michael Foord : Removed file: http://bugs.python.org/file19483/static.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:15:34 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 04 Nov 2010 12:15:34 +0000 Subject: [issue9732] Addition of getattr_static for inspect module In-Reply-To: <1283347386.83.0.146152049794.issue9732@psf.upfronthosting.co.za> Message-ID: <1288872934.44.0.886080485674.issue9732@psf.upfronthosting.co.za> Changes by Michael Foord : Removed file: http://bugs.python.org/file19484/test_static.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:17:10 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 12:17:10 +0000 Subject: [issue9611] FileIO not 64-bit safe under Windows In-Reply-To: <1281893142.91.0.972520708976.issue9611@psf.upfronthosting.co.za> Message-ID: <1288873030.04.0.369951983014.issue9611@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > About the issue, I'd suggest to just clamp the length to 2**32-1, and > don't bother retrying; leave this to the buffered layer. Yes, I think it's reasonable. (or perhaps clamp to something page-aligned, such as 2**32-4096). Also, the signal issue which was raised by Martin above has since been fixed in r84239. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:18:18 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 12:18:18 +0000 Subject: [issue10311] Signal handlers must preserve errno In-Reply-To: <1288873098.65.0.47223283391.issue10311@psf.upfronthosting.co.za> Message-ID: <1288873098.65.0.47223283391.issue10311@psf.upfronthosting.co.za> New submission from Hallvard B Furuseth : Signal handlers that can change errno, must restore it. I enclose a patch for <2.7, 3.2a3>/Modules/signalmodule.c which also rearranges the code to make this a bit easier. The patch does if (errno != save_errno) errno = save_errno; instead of just errno = save_errno; in case it's less thread-safe to write than to read errno, which would not surprise me but may be pointless paranoia. I don't know what needs to be done on non-Unix systems, like Windows' WSAError stuff. ---------- components: Interpreter Core files: signalmodule-errno.diff keywords: patch messages: 120395 nosy: hfuru priority: normal severity: normal status: open title: Signal handlers must preserve errno type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file19488/signalmodule-errno.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:20:59 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 04 Nov 2010 12:20:59 +0000 Subject: [issue9732] Addition of getattr_static for inspect module In-Reply-To: <1283347386.83.0.146152049794.issue9732@psf.upfronthosting.co.za> Message-ID: <1288873259.43.0.314231981583.issue9732@psf.upfronthosting.co.za> Michael Foord added the comment: Further updated implementation. Now handles data descriptors correctly but removes the code that resolves the builtin descriptors (calling __get__ on slot and attribute descriptors). As it was resolving some descriptors but not all, and resolving getset descriptors could still trigger execution in C extensions, Benjamin felt it was more consistent and cleaner to return descriptor objects rather than resolving them. As a bonus it makes the code shorter too. I would add to the documentation some example code showing how to handle the descriptor if the user wants to resolve them herself. (Example code shown in the tests.) The only remaining cases that are handled incorrectly are pathological ones. (See the notes in the tests.) ---------- Added file: http://bugs.python.org/file19489/static.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:21:14 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 04 Nov 2010 12:21:14 +0000 Subject: [issue9732] Addition of getattr_static for inspect module In-Reply-To: <1283347386.83.0.146152049794.issue9732@psf.upfronthosting.co.za> Message-ID: <1288873274.97.0.437469046864.issue9732@psf.upfronthosting.co.za> Changes by Michael Foord : Added file: http://bugs.python.org/file19490/test_static.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:24:09 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 12:24:09 +0000 Subject: [issue10311] Signal handlers must preserve errno In-Reply-To: <1288873098.65.0.47223283391.issue10311@psf.upfronthosting.co.za> Message-ID: <1288873449.1.0.190737639261.issue10311@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is a good idea IMO. It would be better if you minimized style changes, so that the patch is easier to review. Also, is the while loop around write() necessary here? ---------- nosy: +exarkun, loewis, pitrou stage: -> patch review versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:36:19 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 04 Nov 2010 12:36:19 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1288874179.7.0.706602461831.issue5391@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Thank for pointing this out. I've looked at bytearray and bytes implementations, they actually return unsigned value. I fixed this in r86159(py3k) and r86160(release31-maint). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:49:02 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 12:49:02 +0000 Subject: [issue10312] intcatcher() can deadlock In-Reply-To: <1288874942.68.0.464773855859.issue10312@psf.upfronthosting.co.za> Message-ID: <1288874942.68.0.464773855859.issue10312@psf.upfronthosting.co.za> New submission from Hallvard B Furuseth : Parser/intrcheck.c:intcatcher() can do FILE* operations, which can deadlock if the interrupt happens while a FILE* operation on the same FILE holds a mutex for the FILE. I've seen this happen elsewhere. It'd rather be a pity to remove Py_Exit(), so I suggest switch(interrupted++) gets a case 3 or 4: which does _exit(1), and 'interrupted = 0;' is moved there from case 2. Also 'interrupted' should be volatile sig_atomic_t, and the function should save/restore errno as in Issue 10311. BTW, you could use strlen(message) instead of sizeof(message)-1. ---------- components: Interpreter Core files: intrcheck.diff keywords: patch messages: 120399 nosy: hfuru priority: normal severity: normal status: open title: intcatcher() can deadlock type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file19491/intrcheck.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:50:10 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 12:50:10 +0000 Subject: [issue10312] intcatcher() can deadlock In-Reply-To: <1288874942.68.0.464773855859.issue10312@psf.upfronthosting.co.za> Message-ID: <1288875010.14.0.996034961636.issue10312@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:51:51 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 12:51:51 +0000 Subject: [issue10311] Signal handlers must preserve errno In-Reply-To: <1288873449.1.0.190737639261.issue10311@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: Parser/intrcheck.c:intcatcher() should do the same. Covered in Issue 10312. Antoine Pitrou writes: > This is a good idea IMO. It would be better if you minimized style > changes, so that the patch is easier to review. I'm afraid the un-rearranged code would be fairly ugly, so I cleaned up first. Single exit point. > Also, is the while loop around write() necessary here? Whoops, I'd forgotten I did that too, it was on my TODO list to check if Python makes it unnecessary by making write restartable. I don't remember if that's possible to ensure on all modern Posixes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:53:09 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 12:53:09 +0000 Subject: [issue10309] dlmalloc.c needs _GNU_SOURCE for mremap() In-Reply-To: <1288871027.11.0.979430970782.issue10309@psf.upfronthosting.co.za> Message-ID: <1288875189.73.0.46558087712.issue10309@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> theller nosy: +theller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:54:22 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 12:54:22 +0000 Subject: [issue10310] signed:1 bitfields rarely make sense In-Reply-To: <1288871480.25.0.737532033065.issue10310@psf.upfronthosting.co.za> Message-ID: <1288875262.44.0.891717624124.issue10310@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +amaury.forgeotdarc stage: -> patch review versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:02:33 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 13:02:33 +0000 Subject: [issue10306] Weakref callback exceptions should be turned into warnings. In-Reply-To: <1288842596.1.0.996476383192.issue10306@psf.upfronthosting.co.za> Message-ID: <1288875753.66.0.0405544355497.issue10306@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The behaviour of weakrefs here mirrors what is already done for __del__ exceptions. Using warnings would mean that exceptions can get silenced implicitly (for example, if an exception happens twice at the same location) which is not very Pythonic: generally, if you want to silence an exception, you have to do it explicitly through try...except. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:13:39 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 13:13:39 +0000 Subject: [issue10231] SimpleHTTPRequestHandler directory bugs In-Reply-To: <1288357835.63.0.535261040588.issue10231@psf.upfronthosting.co.za> Message-ID: <1288876419.37.0.749379845623.issue10231@psf.upfronthosting.co.za> Changes by Hallvard B Furuseth : ---------- versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:14:29 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 13:14:29 +0000 Subject: [issue10133] multiprocessing: conn_recv_string() broken error handling In-Reply-To: <1287346495.15.0.809946654619.issue10133@psf.upfronthosting.co.za> Message-ID: <1288876469.79.0.835343470216.issue10133@psf.upfronthosting.co.za> Changes by Hallvard B Furuseth : ---------- versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:14:44 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 13:14:44 +0000 Subject: [issue10308] Modules/getpath.c bugs In-Reply-To: <1288870063.75.0.834981100194.issue10308@psf.upfronthosting.co.za> Message-ID: <1288876484.93.0.0595335700476.issue10308@psf.upfronthosting.co.za> Changes by Hallvard B Furuseth : ---------- versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:15:41 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 13:15:41 +0000 Subject: [issue10309] dlmalloc.c needs _GNU_SOURCE for mremap() In-Reply-To: <1288871027.11.0.979430970782.issue10309@psf.upfronthosting.co.za> Message-ID: <1288876541.09.0.0779233842382.issue10309@psf.upfronthosting.co.za> Changes by Hallvard B Furuseth : ---------- versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:19:21 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 13:19:21 +0000 Subject: [issue10312] intcatcher() can deadlock In-Reply-To: <1288874942.68.0.464773855859.issue10312@psf.upfronthosting.co.za> Message-ID: <1288876761.82.0.0696245115479.issue10312@psf.upfronthosting.co.za> Changes by Hallvard B Furuseth : ---------- versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:26:59 2010 From: report at bugs.python.org (Julian) Date: Thu, 04 Nov 2010 13:26:59 +0000 Subject: [issue10306] Weakref callback exceptions should be turned into warnings. In-Reply-To: <1288842596.1.0.996476383192.issue10306@psf.upfronthosting.co.za> Message-ID: <1288877219.02.0.394472590329.issue10306@psf.upfronthosting.co.za> Julian added the comment: Thank you, Antoine, you make a good point. In my example, I am suppressing the warning, which, I agree isn't a good idea. In my real life usage, I was getting an unexpected exception in a callback in code written by another person. I wanted not to suppress the warning, but to turn it into an exception to help trace the cause. Thinking about this further, (if it was a warning, as I suggest,) I now believe that would raise that exception into the garbage collector which might have some unpredictable consequences. I have rejected my own Issue for this reason. I maintain that the current solution isn't terribly helpful. Getting this output to stderr is neither helpful to me, in development (i.e. nothing in the error indicated it was related to the weakref functionality) nor my users in production (fortunately the problem was caught before then!) However, I concede my proposal isn't the right solution. Thank you again for your comment. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:41:25 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 04 Nov 2010 13:41:25 +0000 Subject: [issue10311] Signal handlers must preserve errno In-Reply-To: <1288873098.65.0.47223283391.issue10311@psf.upfronthosting.co.za> Message-ID: <1288878085.55.0.396677454989.issue10311@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This issue is not really relevant on Windows: - signals are actually run in a new thread specially created. - errno is a thread-local variable; its value is thus local to the signal handler, same for WSAGetLastError(). ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:44:14 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 04 Nov 2010 13:44:14 +0000 Subject: [issue9931] test_ttk_guionly hangs on XP5 In-Reply-To: <1285273632.39.0.298869124825.issue9931@psf.upfronthosting.co.za> Message-ID: <1288878254.89.0.669664523326.issue9931@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I've created the patch to fix this. (This patch comes from #9055) ---------- keywords: +patch Added file: http://bugs.python.org/file19492/py3k_check_if_gui_is_really_available.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:44:30 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 04 Nov 2010 13:44:30 +0000 Subject: [issue9931] test_ttk_guionly hangs on XP5 In-Reply-To: <1285273632.39.0.298869124825.issue9931@psf.upfronthosting.co.za> Message-ID: <1288878270.51.0.00831903394687.issue9931@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- dependencies: -test_issue_8959_b fails when run from a service _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:45:04 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 13:45:04 +0000 Subject: [issue10311] Signal handlers must preserve errno In-Reply-To: <1288878085.55.0.396677454989.issue10311@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: Amaury Forgeot d'Arc writes: > This issue is not really relevant on Windows: > - signals are actually run in a new thread specially created. > - errno is a thread-local variable; its value is thus local to the > signal handler, same for WSAGetLastError(). Nice. Then I suggest a config macro for whether this is needed. Either a test for windows, or an autoconf thing in case some Unixes are equally sensible. (Linux isn't, I checked.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:57:16 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 04 Nov 2010 13:57:16 +0000 Subject: [issue10311] Signal handlers must preserve errno In-Reply-To: <1288873098.65.0.47223283391.issue10311@psf.upfronthosting.co.za> Message-ID: <1288879036.02.0.07176555682.issue10311@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > Nice. Then I suggest a config macro for whether this is needed. > Either a test for windows, or an autoconf thing in case some Unixes > are equally sensible. (Linux isn't, I checked.) I'm quite sure that all Unixes invoke signal handlers in some existing thread. So even if errno is thread-local, it needs to be saved and restored. OTOH this is really a micro optimization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 15:03:17 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 14:03:17 +0000 Subject: [issue10313] Reassure user: test_os BytesWarning is OK In-Reply-To: <1288879397.21.0.548228653771.issue10313@psf.upfronthosting.co.za> Message-ID: <1288879397.21.0.548228653771.issue10313@psf.upfronthosting.co.za> New submission from Hallvard B Furuseth : A test giving a strange warning can make a poor user nervous. Here's a minimal patch to calm his nerves. It would be better to only give the message if python -b (not -bb) is active, but I do not know how. diff -prU2 Lib/test/test_os.py Lib/test/test_os.py --- Lib/test/test_os.py +++ Lib/test/test_os.py @@ -443,4 +443,7 @@ class EnvironTests(mapping_tests.BasicTe test_env = {'PATH': os.pathsep.join(test_path)} + if os.supports_bytes_environ: + print("This test may give some 'BytesWarning's.", file=sys.stderr) + saved_environ = os.environ try: ---------- components: Tests messages: 120407 nosy: hfuru priority: normal severity: normal status: open title: Reassure user: test_os BytesWarning is OK type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 15:21:45 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 14:21:45 +0000 Subject: [issue960325] "--require " option for configure/make (fail if building not possible) Message-ID: <1288880505.63.0.301968960864.issue960325@psf.upfronthosting.co.za> Hallvard B Furuseth added the comment: Once upon a time, Terry J. Reedy wrote: > Hallvard, do you still consider this a live issue? If this general behavior remains, yes. It's been a while since I had a computer without these libraries to test it on. (Which is why I punted and then forgot to answer, sorry.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 15:36:52 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 14:36:52 +0000 Subject: [issue10311] Signal handlers must preserve errno In-Reply-To: <1288879036.02.0.07176555682.issue10311@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: Amaury Forgeot d'Arc writes: > OTOH this is really a micro optimization. ["this" = only saving/restoring errno when needed] True, but practically nothing is officially safe to do in signal handlers, so it's good to avoid code which can be avoided there. If one can be bothered to, that is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 15:38:37 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Nov 2010 14:38:37 +0000 Subject: [issue10313] Reassure user: test_os BytesWarning is OK In-Reply-To: <1288879397.21.0.548228653771.issue10313@psf.upfronthosting.co.za> Message-ID: <1288881517.92.0.178689946987.issue10313@psf.upfronthosting.co.za> R. David Murray added the comment: I don't see any bytes warnings when I run test_os with -b or -bb on linux on py3k trunk. (If there were such a warning and it was expected, the fix would be to capture the warning and ignore it.) Under what circumstances do you see this warning? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 15:42:01 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 04 Nov 2010 14:42:01 +0000 Subject: [issue10313] Reassure user: test_os BytesWarning is OK In-Reply-To: <1288881517.92.0.178689946987.issue10313@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: R. David Murray writes: > I don't see any bytes warnings when I run test_os with -b or -bb on > linux on py3k trunk. (If there were such a warning and it was expected, > the fix would be to capture the warning and ignore it.) > > Under what circumstances do you see this warning? Python 3.2a3, test_os with python -b. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 15:50:07 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 04 Nov 2010 14:50:07 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1288882207.24.0.171940326754.issue10273@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +flox, gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 15:50:08 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 14:50:08 +0000 Subject: [issue10311] Signal handlers must preserve errno In-Reply-To: <1288873098.65.0.47223283391.issue10311@psf.upfronthosting.co.za> Message-ID: <1288882208.61.0.379860480119.issue10311@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > ["this" = only saving/restoring errno when needed] > True, but practically nothing is officially safe to do in signal > handlers, so it's good to avoid code which can be avoided there. > If one can be bothered to, that is. I think it is extremely unlikely that mutating errno in a signal handler is unsafe (after all, the library functions called from that handler can mutate errno too: that's the whole point of the patch IIUC). Adding some configure machinery for this seems unwarranted to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 15:55:37 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 14:55:37 +0000 Subject: [issue10311] Signal handlers must preserve errno In-Reply-To: <1288873098.65.0.47223283391.issue10311@psf.upfronthosting.co.za> Message-ID: <1288882537.9.0.304460920785.issue10311@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, I'd like to clear out a potential misunderstanding: the function you are patching doesn't call Python signal handlers in itself (those registered using signal.signal()). It only schedules them for later execution. If you want to save errno around Python signal handlers themselves, PyErr_CheckSignals must be patched as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:10:02 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Nov 2010 15:10:02 +0000 Subject: [issue1602] windows console doesn't print utf8 (Py30a2) In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1288883402.85.0.253841988342.issue1602@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote a small function to call WriteConsoleOutputA() and WriteConsoleOutputW() in Python to do some tests. It works correclty, except if I change the code page using chcp command. It looks like the problem is that the chcp command changes the console code page and the ANSI code page, but it should only changes the ANSI code page (and not the console code page). chcp command ============ The chcp command changes the console code page, but in practice, the console still expects the OEM code page (eg. cp850 on my french setup). Example: C:\...> python.exe -c "import sys; print(sys.stdout.encoding") cp850 C:\...> chcp 65001 C:\...> python.exe Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: cp65001 C:\...> SET PYTHONIOENCODING=utf-8 C:\...> python.exe >>> import sys >>> sys.stdout.write("\xe9\n") ?? 2 >>> sys.stdout.buffer.write("\xe9\n".encode("utf8")) ?? 3 >>> sys.stdout.buffer.write("\xe9\n".encode("cp850")) ? 2 os.device_encoding(1) uses GetConsoleOutputCP() which gives 65001. It should maybe use GetOEMCP() instead? Or chcp command should be fixed? Set the console code page looks to be a bad idea, because if I type "?" using my keyboard, a random character (eg. U+0002) is displayed instead... WriteConsoleOutputA() and WriteConsoleOutputW() =============================================== Without touching the code page ------------------------------ If the character can be rendered by the current font (eg. U+00E9): WriteConsoleOutputA() and WriteConsoleOutputW() work correctly. If the character cannot be rendered by the current font, but there is a replacment character (eg. U+0141 replaced by U+0041): WriteConsoleOutputA() cannot be used (U+0141 cannot be encoded to the code page), WriteConsoleOutputW() writes U+0141 but the console contains U+0041 (I checked using ReadConsoleOutputW()) and U+0041 is displayed. It works like the mbcs encoding, the behaviour looks correct. If the character cannot be rendered by the current font, but there is a replacment character (eg. U+042D): WriteConsoleOutputA() cannot be used (U+042D cannot be encoded to the code page), WriteConsoleOutputW() writes U+042D but U+003d (?) is displayed instead. The behaviour looks correct. chcp 65001 ---------- Using "chcp 65001" command (+ "set PYTHONIOENCODING=utf-8" to avoid the fatal error), it becomes worse: the result depends on the font... Using raster font: - (ANSI) write "\xe9".encode("cp850") using WriteConsoleOutputA() displays U+00e9 (?), whereas the console output code page is cp65001 (I checked using GetConsoleOutputCP()) - (ANSI) write "\xe9".encode("utf-8") using WriteConsoleOutputA() displays ?? (mojibake!) - (UNICODE) write "\xe9" using WriteConsoleOutputW() displays... a random character (U+0002, U+0008, U+0069, U+00b0, ...) Using Lucida (TrueType font): - (ANSI) write "\xe9".encode("cp850") using WriteConsoleOutputA() displays U+0000 !? - (UNICODE) write "\xe9" using WriteConsoleOutputW() works correctly (display U+00e9), even with "\u0141", it works correctly (display U+0141) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:15:03 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Nov 2010 15:15:03 +0000 Subject: [issue1602] windows console doesn't print utf8 (Py30a2) In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1288883703.21.0.0442184880417.issue1602@psf.upfronthosting.co.za> STINNER Victor added the comment: sys_write_stdtout.patch: Create sys.write_stdout() test function to call WriteConsoleOutputA() or WriteConsoleOutputW() depending on the input types (bytes or str). ---------- keywords: +patch Added file: http://bugs.python.org/file19493/sys_write_stdout.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:22:04 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Thu, 04 Nov 2010 15:22:04 +0000 Subject: [issue1602] windows console doesn't print utf8 (Py30a2) In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1288884124.37.0.862334248872.issue1602@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: http://blogs.msdn.com/b/michkap/archive/2008/03/18/8306597.aspx If you want any kind of Unicode output in the console, the font must be an ?official? MS console TTF (?official? as defined by the Windows version); I believe only Lucida Console and Consolas are the ones with all MS private settings turned on inside the font file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:54:21 2010 From: report at bugs.python.org (Shashank) Date: Thu, 04 Nov 2010 15:54:21 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1288886061.85.0.430850492474.issue10030@psf.upfronthosting.co.za> Shashank added the comment: I had uploaded an incorrect patch. New corrected patch against trunk (on Mac OS uploaded). ---------- Added file: http://bugs.python.org/file19494/zipdecrypt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 17:03:29 2010 From: report at bugs.python.org (Shashank) Date: Thu, 04 Nov 2010 16:03:29 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1288886609.9.0.225543964496.issue10030@psf.upfronthosting.co.za> Changes by Shashank : Removed file: http://bugs.python.org/file19494/zipdecrypt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 17:04:00 2010 From: report at bugs.python.org (Shashank) Date: Thu, 04 Nov 2010 16:04:00 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1288886640.61.0.265002750287.issue10030@psf.upfronthosting.co.za> Changes by Shashank : Added file: http://bugs.python.org/file19495/zipdecrypt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 17:31:38 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 16:31:38 +0000 Subject: [issue10314] Improve JSON encoding with sort_keys=True In-Reply-To: <1288888298.44.0.485408020143.issue10314@psf.upfronthosting.co.za> Message-ID: <1288888298.44.0.485408020143.issue10314@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This patch makes sorting of keys when encoding a dict into JSON faster by not calling pure Python code. ---------- components: Library (Lib) files: jsonsort.patch keywords: patch messages: 120418 nosy: pitrou priority: normal severity: normal status: open title: Improve JSON encoding with sort_keys=True type: performance versions: Python 3.2 Added file: http://bugs.python.org/file19496/jsonsort.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 17:50:05 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 04 Nov 2010 16:50:05 +0000 Subject: [issue10314] Improve JSON encoding with sort_keys=True In-Reply-To: <1288888298.44.0.485408020143.issue10314@psf.upfronthosting.co.za> Message-ID: <1288889405.49.0.212738430764.issue10314@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 17:51:59 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 16:51:59 +0000 Subject: [issue10314] Improve JSON encoding with sort_keys=True In-Reply-To: <1288888298.44.0.485408020143.issue10314@psf.upfronthosting.co.za> Message-ID: <1288889519.77.0.618836663345.issue10314@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, committed in r86169. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 17:55:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 04 Nov 2010 16:55:06 +0000 Subject: [issue10198] wave module writes corrupt wav file for zero-length writeframes In-Reply-To: <1288107337.09.0.986719080657.issue10198@psf.upfronthosting.co.za> Message-ID: <1288889706.17.0.0856626539559.issue10198@psf.upfronthosting.co.za> ?ric Araujo added the comment: I asked that because I didn?t see the fix backported :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 18:04:22 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 04 Nov 2010 17:04:22 +0000 Subject: [issue6081] str.format_map() In-Reply-To: <1242948196.62.0.545811632191.issue6081@psf.upfronthosting.co.za> Message-ID: <1288890262.02.0.378549007056.issue6081@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- title: str.format_from_mapping() -> str.format_map() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 18:07:39 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 04 Nov 2010 17:07:39 +0000 Subject: [issue6081] str.format_map() In-Reply-To: <1242948196.62.0.545811632191.issue6081@psf.upfronthosting.co.za> Message-ID: <1288890459.68.0.767295608182.issue6081@psf.upfronthosting.co.za> Eric Smith added the comment: Committed to 3.2 in r86170. ---------- stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 18:30:15 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Nov 2010 17:30:15 +0000 Subject: [issue10313] Reassure user: test_os BytesWarning is OK In-Reply-To: <1288879397.21.0.548228653771.issue10313@psf.upfronthosting.co.za> Message-ID: <1288891815.59.0.839843495782.issue10313@psf.upfronthosting.co.za> R. David Murray added the comment: Can you give the exact command line you are using to run it, and the OS and version, and perhaps a printenv? I can't reproduce it in 3.1 or 3.2a3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 18:30:59 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Nov 2010 17:30:59 +0000 Subject: [issue10313] Reassure user: test_os BytesWarning is OK In-Reply-To: <1288879397.21.0.548228653771.issue10313@psf.upfronthosting.co.za> Message-ID: <1288891859.78.0.397702326454.issue10313@psf.upfronthosting.co.za> R. David Murray added the comment: Running it with -E and seeing if that changes the behavior would also be useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 18:35:36 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 04 Nov 2010 17:35:36 +0000 Subject: [issue10198] wave module writes corrupt wav file for zero-length writeframes In-Reply-To: <1288107337.09.0.986719080657.issue10198@psf.upfronthosting.co.za> Message-ID: <1288892136.61.0.10098394272.issue10198@psf.upfronthosting.co.za> Georg Brandl added the comment: I always to the backports batched for these minor and docs fixes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 18:55:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 04 Nov 2010 17:55:09 +0000 Subject: [issue10298] zipfile: incorrect comment size will prevent extracting In-Reply-To: <1288792839.67.0.901999285278.issue10298@psf.upfronthosting.co.za> Message-ID: <1288893309.81.0.420109931237.issue10298@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +needs review nosy: +alanmcintyre stage: -> patch review versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 18:57:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 04 Nov 2010 17:57:13 +0000 Subject: [issue10198] wave module writes corrupt wav file for zero-length writeframes In-Reply-To: <1288107337.09.0.986719080657.issue10198@psf.upfronthosting.co.za> Message-ID: <1288893433.1.0.0239197527044.issue10198@psf.upfronthosting.co.za> ?ric Araujo added the comment: Perfect, sorry for doubting you ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 19:39:26 2010 From: report at bugs.python.org (Sandro Tosi) Date: Thu, 04 Nov 2010 18:39:26 +0000 Subject: [issue3699] test_bigaddrspace broken In-Reply-To: <1219841607.12.0.523528748152.issue3699@psf.upfronthosting.co.za> Message-ID: <1288895966.13.0.736567868447.issue3699@psf.upfronthosting.co.za> Sandro Tosi added the comment: The attached patch implements the same tests of byte for string objects. ---------- assignee: -> sandro.tosi stage: -> patch review Added file: http://bugs.python.org/file19497/issue3699-py3k-v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 20:14:05 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Thu, 04 Nov 2010 19:14:05 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1288898045.39.0.00197610544328.issue1926@psf.upfronthosting.co.za> Julien ?LIE added the comment: Hi Steven, > I also don't understand why START_TLS and AUTHINFO need to change > how the module is interfaced to (separating log in/authentication, etc) Because once you have used AUTHINFO, STARTTLS is no longer a valid command in a session. The authentication part is currently delt with in the init function (in nntplib) so it needs to be separated because one could want to first use STARTTLS, and then AUTHINFO. Currently, AUTHINFO is sent just after the initial log in; it is therefore better to have AUTHINFO handled in another function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 20:22:36 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 04 Nov 2010 19:22:36 +0000 Subject: [issue10243] Packaged Pythons In-Reply-To: <1288421190.78.0.406160800778.issue10243@psf.upfronthosting.co.za> Message-ID: <1288898556.64.0.629774869036.issue10243@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 20:44:35 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Nov 2010 19:44:35 +0000 Subject: [issue960325] "--require " option for configure/make (fail if building not possible) Message-ID: <1288899875.17.0.241244944921.issue960325@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am closing this as some combination of wrong, inapplicable, out-of-date, and postponed. 1. In 3.1, ssl *is* documented as optional in the sense of dependent on an external library. "This module uses the OpenSSL library. It is available on all modern ... platforms, as long as OpenSSL is installed on that platform." For bz2, there is "This module provides a comprehensive interface for the bz2 compression library." If the library is not there, then the module obviously cannot function. Tkinter depends on tcl/tT being installed. I believe some crypto modules also require possibly absent libraries. (The PSF/L?wis Windows installer nicely provides all.) If someone wants to review the docs for all such dependencies (and perhaps whatever build docs or help strings or comments there are) and propose doc revision, that could be a separate issue. 2. I think the current default build process is right for most users. 3. Except for the PSF provided binaries, building is ultimately out of our hands. Distributions do what they do. I presume individual persons and organizations can patch the default build files to be stricter if they wish. If they cannot, neither can we ;-). 4. This seems to have become pretty much a non-issue. The OP says he has no further concrete interest because "It's been a while since I had a computer without these libraries...". I am suspecting this is pretty much true for everyone who might otherwise care enough to provide a patch. ---------- resolution: -> out of date stage: -> needs patch status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 20:51:00 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 04 Nov 2010 19:51:00 +0000 Subject: [issue9611] FileIO not 64-bit safe under Windows In-Reply-To: <1281893142.91.0.972520708976.issue9611@psf.upfronthosting.co.za> Message-ID: <1288900260.38.0.0942919063995.issue9611@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I propose a different solution: On Windows, instead of calling write(), we call WriteFile directly. We try to faithfully follow the CRT implementation as much as possible, knowing that what we write to actually is a binary file (in particular, the file handle should get locked). We should perhaps make an exception for the standard handles (0,1,2), and fall back to call the CRT write unless we determine they are also in binary mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:02:00 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 20:02:00 +0000 Subject: [issue9611] FileIO not 64-bit safe under Windows In-Reply-To: <1288900260.38.0.0942919063995.issue9611@psf.upfronthosting.co.za> Message-ID: <1288900916.3539.75.camel@localhost.localdomain> Antoine Pitrou added the comment: > I propose a different solution: On Windows, instead of calling > write(), we call WriteFile directly. If I'm not mistaken, WriteFile takes the length as a DWORD, which is still 32 bits under Win64. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:14:26 2010 From: report at bugs.python.org (Henning Hraban Ramm) Date: Thu, 04 Nov 2010 20:14:26 +0000 Subject: [issue10315] smtplib.SMTP_SSL new in 2.6 In-Reply-To: <1288901666.81.0.218057119797.issue10315@psf.upfronthosting.co.za> Message-ID: <1288901666.81.0.218057119797.issue10315@psf.upfronthosting.co.za> New submission from Henning Hraban Ramm : The docs tell us that smtplib.SMTP_SSL was only changed in 2.6, but it is new (i.e. it didn't exist in 2.5.x). ---------- assignee: docs at python components: Documentation messages: 120432 nosy: docs at python, hraban priority: normal severity: normal status: open title: smtplib.SMTP_SSL new in 2.6 versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:17:30 2010 From: report at bugs.python.org (Max Skaller) Date: Thu, 04 Nov 2010 20:17:30 +0000 Subject: [issue10243] Packaged Pythons In-Reply-To: <1288851592.49.0.19819499978.issue10243@psf.upfronthosting.co.za> Message-ID: Max Skaller added the comment: On Thu, Nov 4, 2010 at 5:19 PM, Ned Deily wrote: > > Ned Deily added the comment: > > For what it's worth, the python.org installers for Mac OS X do include a > libpython shared library. As of Python 2.7 (and 3.2), the installer > includes a symlink to make it easier to find: > > $ cd /Library/Frameworks/Python.framework/Versions/2.7/lib > $ ls -l libpython2.7.dylib > Ok.. so why is it called Python instead of Python.dylib? /Library/Frameworks/Python.framework>file Python Python: broken symbolic link to Versions/Current/Python /Library/Frameworks/Python.framework/Versions/3.1>file Python Python: Mach-O universal binary with 2 architectures Python (for architecture ppc): Mach-O dynamically linked shared library ppc Python (for architecture i386): Mach-O dynamically linked shared library i386 Hmm .. i386? Oh dear, I'm running Snow Leopard and I generate 64 bit code. ---------- Added file: http://bugs.python.org/file19498/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------

On Thu, Nov 4, 2010 at 5:19 PM, Ned Deily <report at bugs.python.org> wrote:

Ned Deily <nad at acm.org> added the comment:

For what it's worth, the python.org installers for Mac OS X do include a libpython shared library. ??As of Python 2.7 (and 3.2), the installer includes a symlink to make it easier to find:

$ cd /Library/Frameworks/Python.framework/Versions/2.7/lib
$ ls -l libpython2.7.dylib

Ok.. so why is it called Python instead of Python.dylib?

/Library/Frameworks/Python.framework>file Python
Python: broken symbolic link to Versions/Current/Python

/Library/Frameworks/Python.framework/Versions/3.1>file Python
Python: Mach-O universal binary with 2 architectures
Python (for architecture ppc):?? Mach-O dynamically linked shared library ppc
Python (for architecture i386): Mach-O dynamically linked shared library i386

Hmm .. i386? Oh dear, I'm running Snow Leopard and I generate 64 bit code.

From report at bugs.python.org Thu Nov 4 21:22:06 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 04 Nov 2010 20:22:06 +0000 Subject: [issue9611] FileIO not 64-bit safe under Windows In-Reply-To: <1288900916.3539.75.camel@localhost.localdomain> Message-ID: <4CD315EA.5070309@v.loewis.de> Martin v. L?wis added the comment: > If I'm not mistaken, WriteFile takes the length as a DWORD, which is > still 32 bits under Win64. Oops, ignore me, then... I agree that clamping is fine, assuming the buffering layer takes that into account. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:22:59 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 04 Nov 2010 20:22:59 +0000 Subject: [issue10243] Packaged Pythons In-Reply-To: <1288421190.78.0.406160800778.issue10243@psf.upfronthosting.co.za> Message-ID: <1288902179.79.0.0630999739246.issue10243@psf.upfronthosting.co.za> Changes by Martin v. L?wis : Removed file: http://bugs.python.org/file19498/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:24:21 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 20:24:21 +0000 Subject: [issue10293] PyMemoryView object has obsolete members In-Reply-To: <1288689996.27.0.790374524403.issue10293@psf.upfronthosting.co.za> Message-ID: <1288902261.99.0.46447964601.issue10293@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, there's this strange-looking thing in PyMemoryView_GetContiguous: if (buffertype == PyBUF_SHADOW) { /* return a shadowed memory-view object */ view->buf = dest; mem->base = PyTuple_Pack(2, obj, bytes); ... but I don't really want to bother. Let's remove it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:30:53 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 20:30:53 +0000 Subject: [issue10293] PyMemoryView object has obsolete members In-Reply-To: <1288689996.27.0.790374524403.issue10293@psf.upfronthosting.co.za> Message-ID: <1288902653.14.0.1648735792.issue10293@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Done in r86174. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:50:41 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 20:50:41 +0000 Subject: [issue3699] test_bigaddrspace broken In-Reply-To: <1219841607.12.0.523528748152.issue3699@psf.upfronthosting.co.za> Message-ID: <1288903841.02.0.74578680965.issue3699@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've made cosmetic changes and applied in r86175 (3.2) and r86176 (3.1). Thank you! ---------- priority: high -> normal resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:56:11 2010 From: report at bugs.python.org (Peter Hall) Date: Thu, 04 Nov 2010 20:56:11 +0000 Subject: [issue10316] tkFileDialog.askopenfilenames scrambling multiple file selection In-Reply-To: <1288904171.11.0.911089821654.issue10316@psf.upfronthosting.co.za> Message-ID: <1288904171.11.0.911089821654.issue10316@psf.upfronthosting.co.za> New submission from Peter Hall : I am running the following : Linux Centos version 2.6.18 Python version 2.5 tk version 8.5 tcl version 8.5 I have a Python GUI program (importing Tkinter and tkFileDialog) which prompts the user to select a (one to many) list of file names. The code is : fileList = tkFileDialog.askopenfilenames(initialdir=self.startfiledir, title="Select Files for Processing", filetypes=self.ftypes, multiple=1) where "startfiledir" and "ftypes" are defined elsewhere. When this code is run a file selection box pops up listing the chosen directory. Selecting just one file works fine. To select multiple files the user highlights a selection of the displayed files by dragging the cursor over them with "SHIFT left-mouse-button" pressed. It also lists ALL the selected files in the "File names:" selection field at the bottom of the selection box. These are separated by spaces. Clicking "Open" results in the selection box program trying to treat the entire list as a single file name. IE. It looks for a single file called "/home/mydir/file1 file2 file3 file4". Since there is no such file an error pop-up box appears with a "File ... does not exist." message. It appears that the file name list is not being parsed into indivdual file names. I have tried combinations with "askopenfilename" instead of "askopenfilenames" and including/omitting "multiple=1". I have also tried "multiple=bool(1)" and "multiple=xxx" where "xxx=1" and "xxx=bool(1)". None of these change the behaviour. Is there a fault with my code ? Is this a bug in "tkFileDialog.askopenfilenames" ? Is there a workaround ? Suggestions are welcome. ---------- components: Tkinter messages: 120438 nosy: pfhall priority: normal severity: normal status: open title: tkFileDialog.askopenfilenames scrambling multiple file selection versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:57:03 2010 From: report at bugs.python.org (Peter Hall) Date: Thu, 04 Nov 2010 20:57:03 +0000 Subject: [issue10316] tkFileDialog.askopenfilenames scrambling multiple file selection In-Reply-To: <1288904171.11.0.911089821654.issue10316@psf.upfronthosting.co.za> Message-ID: <1288904223.93.0.0404012776002.issue10316@psf.upfronthosting.co.za> Changes by Peter Hall : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:59:32 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 20:59:32 +0000 Subject: [issue10313] Reassure user: test_os BytesWarning is OK In-Reply-To: <1288879397.21.0.548228653771.issue10313@psf.upfronthosting.co.za> Message-ID: <1288904372.33.0.549260824736.issue10313@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I guess you're not seeing them because Victor silenced them a couple of days ago in r85902. Hallvard, if you update your py3k working copy, do these warnings disappear? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:04:35 2010 From: report at bugs.python.org (Ned Deily) Date: Thu, 04 Nov 2010 21:04:35 +0000 Subject: [issue10243] Packaged Pythons In-Reply-To: <1288421190.78.0.406160800778.issue10243@psf.upfronthosting.co.za> Message-ID: <1288904675.83.0.327960891463.issue10243@psf.upfronthosting.co.za> Ned Deily added the comment: It's called Python because that's the way frameworks on OS X are generally structured: the shared library file has the same name as the framework. The Apple developer docs have lots of information on frameworks. Prior to 2.7 and the upcoming 3.2 releases, python.org installers (including for 3.1) have been 32-bit only. Starting with 2.7 and the latest 3.2 alpha, there are two OS X installer downloads for each release, one 32-bit only (10.3 and later) and the other 32-bit/64-bit for use on 10.6. Also the Apple-supplied Python 2.6 in 10.6 is 32-bit/64-bit. Otherwise, if you need 64-bit for earlier releases, you will need to look elsewhere. For example, some of the third-party open source distributors for OS X like MacPorts support 64-bit builds of Python 2.6 and 3.1. Or you will need to build from scratch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:08:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 21:08:01 +0000 Subject: [issue10302] Add class-functions to hash many small objects with hashlib In-Reply-To: <1288824257.88.0.548360154902.issue10302@psf.upfronthosting.co.za> Message-ID: <1288904881.66.0.850369392521.issue10302@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This sounds dangerously like a micro-optimization to me, and I'm not sure an additional API is ok for that. ---------- nosy: +gregory.p.smith, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:11:41 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Nov 2010 21:11:41 +0000 Subject: [issue10313] Reassure user: test_os BytesWarning is OK In-Reply-To: <1288879397.21.0.548228653771.issue10313@psf.upfronthosting.co.za> Message-ID: <1288905101.59.0.820152196604.issue10313@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, then this report is probably out of date. I just realized that I ran my 3.2a3 test incorrectly, so my report that I didn't see them there is invalid. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:19:09 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 04 Nov 2010 21:19:09 +0000 Subject: [issue9611] FileIO not 64-bit safe under Windows In-Reply-To: <1281893142.91.0.972520708976.issue9611@psf.upfronthosting.co.za> Message-ID: <1288905549.43.0.888749248457.issue9611@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: On a second thought... is there another example where a *blocking* stream does not write all the data without raising an exception? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:24:12 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 04 Nov 2010 21:24:12 +0000 Subject: [issue9611] FileIO not 64-bit safe under Windows In-Reply-To: <1288905549.43.0.888749248457.issue9611@psf.upfronthosting.co.za> Message-ID: <4CD32478.2050903@v.loewis.de> Martin v. L?wis added the comment: > On a second thought... is there another example where a *blocking* stream does not write all the data without raising an exception? Why do you think this would be somehow an example for a blocking stream that does not write all data without raising an exception? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:28:39 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 04 Nov 2010 21:28:39 +0000 Subject: [issue9611] FileIO not 64-bit safe under Windows In-Reply-To: <1281893142.91.0.972520708976.issue9611@psf.upfronthosting.co.za> Message-ID: <1288906119.67.0.611612929514.issue9611@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > Why do you think this would be somehow an example for a blocking stream > that does not write all data without raising an exception? Well, that's what "clamping" means, isn't it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:31:23 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 21:31:23 +0000 Subject: [issue9611] FileIO not 64-bit safe under Windows In-Reply-To: <1288905549.43.0.888749248457.issue9611@psf.upfronthosting.co.za> Message-ID: <1288906279.3539.77.camel@localhost.localdomain> Antoine Pitrou added the comment: > On a second thought... is there another example where a *blocking* > stream does not write all the data without raising an exception? It can happen with pipes or sockets, if some buffer can only store part of the data. Or any regular stream if a signal is received after part of the data has been written. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:36:51 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 21:36:51 +0000 Subject: [issue10283] New parameter for an NNTP newsgroup pattern in LIST ACTIVE In-Reply-To: <1288642864.21.0.311033761057.issue10283@psf.upfronthosting.co.za> Message-ID: <1288906611.09.0.900898821384.issue10283@psf.upfronthosting.co.za> Antoine Pitrou added the comment: That's a fine addition, I've committed it in r86177. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:37:34 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 04 Nov 2010 21:37:34 +0000 Subject: [issue9611] FileIO not 64-bit safe under Windows In-Reply-To: <1288906119.67.0.611612929514.issue9611@psf.upfronthosting.co.za> Message-ID: <4CD3279B.7020102@v.loewis.de> Martin v. L?wis added the comment: Am 04.11.2010 22:28, schrieb Amaury Forgeot d'Arc: > > Amaury Forgeot d'Arc added the comment: > >> Why do you think this would be somehow an example for a blocking stream >> that does not write all data without raising an exception? > Well, that's what "clamping" means, isn't it? Ah, then I misunderstood. We certainly should discard any data. I understood the proposal as rejecting write attempts for larger blocks with an exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:40:17 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 21:40:17 +0000 Subject: [issue10279] test_gc failure on Windows x64 In-Reply-To: <1288629245.88.0.812868116264.issue10279@psf.upfronthosting.co.za> Message-ID: <1288906817.55.0.170989597137.issue10279@psf.upfronthosting.co.za> Antoine Pitrou added the comment: %Id is actually the expansion of PY_FORMAT_SIZE_T. Include/pyport.h says: /* PY_FORMAT_SIZE_T is a platform-specific modifier for use in a printf * format to convert an argument with the width of a size_t or Py_ssize_t. * C99 introduced "z" for this purpose, but not all platforms support that; * e.g., MS compilers use "I" instead. Perhaps this is outdated or simply wrong? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:40:24 2010 From: report at bugs.python.org (Lukas Lueg) Date: Thu, 04 Nov 2010 21:40:24 +0000 Subject: [issue10302] Add class-functions to hash many small objects with hashlib In-Reply-To: <1288824257.88.0.548360154902.issue10302@psf.upfronthosting.co.za> Message-ID: <1288906824.67.0.475740527709.issue10302@psf.upfronthosting.co.za> Lukas Lueg added the comment: Thanks for your comment; it is a very valid point to consider. However, as a vector-based implementation is roughly three to four times faster than what the current API can provide by design (reduced overhead and GIL-relaxation not included), I may disagree with it. I'm willing to make a proposal (read: patch) if you and the other overlords have enough confidence in this API-change and it has a chance to get submitted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:41:25 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Nov 2010 21:41:25 +0000 Subject: [issue9675] segfault: PyDict_SetItem: Assertion `value' failed. In-Reply-To: <1282683108.48.0.667769171779.issue9675@psf.upfronthosting.co.za> Message-ID: <1288906885.89.0.427088793324.issue9675@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Move the CObject use to a py3k warning instead of an error in r86178. I still need to solve improve error management in bsddb. This bug remains open for a while. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:43:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 21:43:11 +0000 Subject: [issue10279] test_gc failure on Windows x64 In-Reply-To: <1288629245.88.0.812868116264.issue10279@psf.upfronthosting.co.za> Message-ID: <1288906991.84.0.640756472874.issue10279@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, the issue seems to be simpler. This piece of code calls PyErr_WarnFormat, which doesn't use the platform's printf but Python's own format codes as documented in http://docs.python.org/dev/c-api/unicode.html#PyUnicode_FromFormat ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:46:30 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 21:46:30 +0000 Subject: [issue10279] test_gc failure on Windows x64 In-Reply-To: <1288629245.88.0.812868116264.issue10279@psf.upfronthosting.co.za> Message-ID: <1288907190.82.0.994370475969.issue10279@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Could you check the following patch works for you? ---------- assignee: -> brian.curtin keywords: +patch Added file: http://bugs.python.org/file19499/gcprint.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:50:21 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 04 Nov 2010 21:50:21 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288907421.55.0.72053422709.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a patch that adds a hack that allows to run turtle doctests using turtle.run_doctests() function. Running this function has revealed numerous mistakes in doctests that are corrected in the patch. The patch is against release27 branch because there are even more problems in py3k. I don't think run_doctests hack belongs to turtle module. I think it would be more appropriate to place it in test.test_turtle. I have also not been able to figure out how to make global functions' doctests runnable. The current patch disables them by mangling the >>> prompts in docstrings. ---------- Added file: http://bugs.python.org/file19500/issue7061-docstrings-r27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:55:30 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Nov 2010 21:55:30 +0000 Subject: [issue10302] Add class-functions to hash many small objects with hashlib In-Reply-To: <1288906824.67.0.475740527709.issue10302@psf.upfronthosting.co.za> Message-ID: <1288907723.3539.86.camel@localhost.localdomain> Antoine Pitrou added the comment: > Thanks for your comment; it is a very valid point to consider. > However, as a vector-based implementation is roughly three to four > times faster than what the current API can provide by design (reduced > overhead and GIL-relaxation not included), I may disagree with it. I fear that this kind of optimization is a moving target. If some CPU architecture gains hardware support for cryptographic hashes, OpenSSL will support it and be much faster than Python's parallel version. > I'm willing to make a proposal (read: patch) if you and the other > overlords have enough confidence in this API-change and it has a > chance to get submitted. If the only advantage is some speedup on parallel hashing of many-small-strings, I don't think a new API is warranted for such a specialized use case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 23:11:26 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Nov 2010 22:11:26 +0000 Subject: [issue6305] islice doesn't accept large stop values In-Reply-To: <1245309263.43.0.625809679675.issue6305@psf.upfronthosting.co.za> Message-ID: <1288908686.97.0.309708580429.issue6305@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In 3.1.2, range handles large numbers. >>> list(range(1000000000, 50000000000, 10000000000)) [1000000000, 11000000000, 21000000000, 31000000000, 41000000000] # those are all billions This means that the 'equivalent' code in the doc will work. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 23:20:17 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 04 Nov 2010 22:20:17 +0000 Subject: [issue10302] Add class-functions to hash many small objects with hashlib In-Reply-To: <1288824257.88.0.548360154902.issue10302@psf.upfronthosting.co.za> Message-ID: <1288909217.09.0.391839774924.issue10302@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with Overlord Antoine ;-) The API of "hashfunc *files" looks like something that should be done at the command line in bash. For the most part, I think users are better-off using normal Python loops so they can do something with the computed hashes as the files are read. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 00:01:08 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 04 Nov 2010 23:01:08 +0000 Subject: [issue10279] test_gc failure on Windows x64 In-Reply-To: <1288629245.88.0.812868116264.issue10279@psf.upfronthosting.co.za> Message-ID: <1288911668.23.0.734160499102.issue10279@psf.upfronthosting.co.za> Brian Curtin added the comment: Works for me. ---------- assignee: brian.curtin -> pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 00:51:56 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 04 Nov 2010 23:51:56 +0000 Subject: [issue5412] extend configparser to support mapping access(__*item__) In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1288914716.92.0.28985883195.issue5412@psf.upfronthosting.co.za> Changes by ?ukasz Langa : Removed file: http://bugs.python.org/file19010/issue5412.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 00:54:17 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 04 Nov 2010 23:54:17 +0000 Subject: [issue5412] extend configparser to support mapping access(__*item__) In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1288914857.66.0.112204692113.issue5412@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Patch updated yet again: * optional .get() arguments are now keyword only. This is a bit backwards incompatible but: * protects users of mapping protocol access from invoking get() as if the last positional argument was the `fallback` value (it would be `raw` for (Safe)ConfigParsers and `vars` for RawConfigParsers) * so it will improve API compatibility between Raw and others * it will make the client code more readable, e.g.: anyParser.get('section', 'value', fallback=True) vs. rawParser.get('section', 'value', {}, True) safeParser.get('section', 'value', 0, {}, True) parserUsedWrong('section', 'value', True) # NOT a fallback! * mapping protocol access is now quite thoroughly documented * renamed `default` arguments to get() to `fallback`. This is *not* backwards incompatible because those arguments were just recently added by me. I chose to rename them since because of DEFAULTSECT there already is a well-defined "default value" concept. Now the situation is much clearer, e.g. the docs can simply state: "default values have precedence over fallback values." and this is unambiguous. As for some suggestions to just provide the section dictionaries directly, this won't work because of interpolation and the terrific DEFAULT section special case, e.g. if a config file contains a DEFAULT section and other sections lack a value, it will be returned instead on get(). Also, DEFAULT values are used in interpolations. On top of that, the provided section proxies ensure while setting that the database holds only strings (which it should by design). There is still one paragraph to be finished (Customizing Parser Behaviour). This has to wait for tomorrow. ---------- Added file: http://bugs.python.org/file19501/issue5412.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 01:05:54 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Nov 2010 00:05:54 +0000 Subject: [issue10279] test_gc failure on Windows x64 In-Reply-To: <1288629245.88.0.812868116264.issue10279@psf.upfronthosting.co.za> Message-ID: <1288915554.25.0.481068214588.issue10279@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r86179. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 01:14:54 2010 From: report at bugs.python.org (Ned Deily) Date: Fri, 05 Nov 2010 00:14:54 +0000 Subject: [issue10316] tkFileDialog.askopenfilenames scrambling multiple file selection In-Reply-To: <1288904171.11.0.911089821654.issue10316@psf.upfronthosting.co.za> Message-ID: <1288916094.5.0.815612752953.issue10316@psf.upfronthosting.co.za> Ned Deily added the comment: Works for me on a current Debian Linux system with a Debian Python 2.5.5 + Tcl/Tk 8.5 and with Python 2.6.1 + Tcl/Tk 8.5 on OS X 10.6 and with Python 2.7 + Tcl/Tk 8.4 on OS X 10.6. In all cases, the tkFileDialog.askopenfilenames returns a tuple of absolute file paths. (BTW, only security issues are accepted for Python 2.5 at this time). ---------- nosy: +ned.deily resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 01:16:06 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 05 Nov 2010 00:16:06 +0000 Subject: [issue9675] segfault: PyDict_SetItem: Assertion `value' failed. In-Reply-To: <1282683108.48.0.667769171779.issue9675@psf.upfronthosting.co.za> Message-ID: <1288916166.59.0.557225304287.issue9675@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Better bsddb error control. Please, review. """ [jcea at babylon5 release27-maint]$ ./python Python 2.7.0+ (release27-maint:86176:86178M, Nov 5 2010, 00:30:) [GCC 4.5.1] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import bsddb >>> exit() """ """ [jcea at babylon5 release27-maint]$ ./python -3 Python 2.7.0+ (release27-maint:86176:86178M, Nov 5 2010, 00:30:) [GCC 4.5.1] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import bsddb __main__:1: DeprecationWarning: in 3.x, the bsddb module has been removed; please use the pybsddb project instead /home/python/svn-hg/release27-maint/Lib/bsddb/__init__.py:67: DeprecationWarning: CObject type is not supported in 3.x. Please use capsule objects instead. import _bsddb """ """ [jcea at babylon5 release27-maint]$ ./python -3 -Werror Python 2.7.0+ (release27-maint:86176:86178M, Nov 5 2010, 00:30:) [GCC 4.5.1] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import warnings >>> warnings.filterwarnings('ignore', ... "in 3.x, the bsddb module has been removed; please use the pybsddb project instead", ... category=DeprecationWarning) >>> import bsddb Exception DeprecationWarning: DeprecationWarning('CObject type is not supported in 3.x. Please use capsule objects instead.',) in ignored >>> exit() """ Why is my "PyErr_Warn()" not being printed? The code: (py_api is the CObject, will be NULL if an exception happened) """ if (py_api) { PyDict_SetItemString(d, "api", py_api); Py_DECREF(py_api); } else { /* Something bad happened */ PyErr_WriteUnraisable(m); PyErr_Warn(PyExc_RuntimeWarning, "_bsddb/_pybsddb C API will be not available"); PyErr_Clear(); } """ Commit r86180. Now I have to up-port this patch to the upcoming pybssddb 5.1.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 01:27:17 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 05 Nov 2010 00:27:17 +0000 Subject: [issue9675] segfault: PyDict_SetItem: Assertion `value' failed. In-Reply-To: <1282683108.48.0.667769171779.issue9675@psf.upfronthosting.co.za> Message-ID: <1288916837.63.0.973391479441.issue9675@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- assignee: -> jcea resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 02:05:07 2010 From: report at bugs.python.org (StevenJ) Date: Fri, 05 Nov 2010 01:05:07 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1288919107.48.0.763346414905.issue1926@psf.upfronthosting.co.za> StevenJ added the comment: Hi Julien, >> I also don't understand why START_TLS and AUTHINFO need to change >> how the module is interfaced to (separating log in/authentication, etc) > Because once you have used AUTHINFO, STARTTLS is no longer a valid > command in a session. I understand this, but doesn't this mean the init function needs to change to something like: init: if capability STARTTLS is advertised STARTLS stuff reget capabilities because STARTTLS changed them probably Now handle AUTHINFO Stuff Is there a case where a server advertises STARTTLS and one would not use it? If so then couldn't that just be handled with an option to the class inhibiting it? This is one of the reasons why I proposed dividing the job across two features. 1. Simple NNTPS which seems to be the most common secured NNTP in use at the moment and is easy to implement, and verify (either as an improvement to the NNTP class or as a new NNTP_SSL class). 2. SASL AUTHINFO/STARTTLS Extension handling implementation and improvements. There are also other bugs with properly handling capabilities at start related to this, are there not? http://bugs.python.org/issue10287 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 02:06:09 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 05 Nov 2010 01:06:09 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1288919169.05.0.446388431157.issue1926@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 03:08:21 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 05 Nov 2010 02:08:21 +0000 Subject: [issue1702036] Make Turtle thread-safe so it does not crash Message-ID: <1288922901.78.0.252655095143.issue1702036@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I think threading is a red herring here. The issue is really a duplicate of #6639. ---------- nosy: +belopolsky status: open -> pending superseder: -> turtle: _tkinter.TclError: invalid command name ".10170160" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 03:19:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 05 Nov 2010 02:19:40 +0000 Subject: [issue1702036] Make Turtle thread-safe so it does not crash Message-ID: <1288923580.72.0.970145070096.issue1702036@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On a closer look at the first post, I see that there are two parts to the issue. The first is indeed a duplicate of #6639, but the second is thread related. I am attaching the OP's code in a script file for convenience. Running ninja.py under python3 produces RuntimeError: main thread is not in main loop in every ninja thread. This looks like tkinter limitation, but I think it is possible to work around it in turtle, so this is a valid feature request. +1 ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 03:40:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 05 Nov 2010 02:40:56 +0000 Subject: [issue10317] Add TurtleShell to turtle In-Reply-To: <1288924856.05.0.699658333719.issue10317@psf.upfronthosting.co.za> Message-ID: <1288924856.05.0.699658333719.issue10317@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : In r84640, Raymond added TurtleShell to the cmd module documentation as an example of a simple interpreter that can be written using that module. I propose adding this code to turtle.py and make it runnable as python -m turtle. ---------- components: Library (Lib) keywords: easy messages: 120466 nosy: belopolsky, rhettinger priority: normal severity: normal stage: needs patch status: open title: Add TurtleShell to turtle type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 03:52:29 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 05 Nov 2010 02:52:29 +0000 Subject: [issue10293] PyMemoryView object has obsolete members In-Reply-To: <1288689996.27.0.790374524403.issue10293@psf.upfronthosting.co.za> Message-ID: <1288925549.22.0.502387785964.issue10293@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Ah, the SHADOW member... Weird. Anyway, I have been hacking around in the memory view. One thing that it does, and makes me uncomfortable since I think it is breaking the new buffer protocol, is to a) PyObject_GetBuffer() b) Modify the resulting local Py_buffer c) releaseing that modified Py_buffer when it calls PyBuffer_Release() I don't think one can do that, strictly speaking. You don't know what the buffer_releasebuffer() slot actually does, it might use the Py_buffer's "buf" member to release internal data, so I don't think it is permissable to mess with it. I was hacking away at the MemoryView to make it behave differently, perhaps more like the SHADOW buffer concept: When you call buffer_getbuffer on a memoryview, it returns a new Py_buffer that reflects its own view of the underlying object. In other words, it doesn't call PyObject_GetBuffer again on the underlying object A memoryview object should, IMHO, only perform that call once on the underlying object, and then serve its own view to its clients. Slicing memoryview objects should also be done differently. Rather than calling PyObject_GetBuffer() on the underlying object, it should rather refer to the origina MemoryView object, and create a local modification of that view. The only problem with this approact that I have found (having run the testsuite) is that the buffer_getbuffer slot now has to do more work, since it cannot simply call PyObject_GetBuffer() on some underlying object. It must now interpret flags and other things.... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 04:10:10 2010 From: report at bugs.python.org (Allan McRae) Date: Fri, 05 Nov 2010 03:10:10 +0000 Subject: [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> New submission from Allan McRae : The following files are incorrectly installed with a "#!/usr/bin/env python" shebang when using "make altinstall": usr/lib/python2.7/base64.py usr/lib/python2.7/bsddb/dbshelve.py usr/lib/python2.7/bsddb/test/test_dbtables.py usr/lib/python2.7/cgi.py usr/lib/python2.7/cgi.py usr/lib/python2.7/Cookie.py usr/lib/python2.7/cProfile.py usr/lib/python2.7/difflib.py usr/lib/python2.7/distutils/tests/test_build_scripts.py usr/lib/python2.7/distutils/tests/test_install_scripts.py usr/lib/python2.7/distutils/unixccompiler.py usr/lib/python2.7/encodings/rot_13.py usr/lib/python2.7/idlelib/PyShell.py usr/lib/python2.7/keyword.py usr/lib/python2.7/lib2to3/pgen2/token.py usr/lib/python2.7/lib2to3/tests/data/different_encoding.py usr/lib/python2.7/lib2to3/tests/pytree_idempotency.py usr/lib/python2.7/mailbox.py usr/lib/python2.7/mimify.py usr/lib/python2.7/pdb.py usr/lib/python2.7/platform.py usr/lib/python2.7/profile.py usr/lib/python2.7/pydoc.py usr/lib/python2.7/quopri.py usr/lib/python2.7/smtpd.py usr/lib/python2.7/smtplib.py usr/lib/python2.7/symbol.py usr/lib/python2.7/tabnanny.py usr/lib/python2.7/tarfile.py usr/lib/python2.7/test/curses_tests.py usr/lib/python2.7/test/pystone.py usr/lib/python2.7/test/regrtest.py usr/lib/python2.7/test/re_tests.py usr/lib/python2.7/test/test_al.py usr/lib/python2.7/test/test_anydbm.py usr/lib/python2.7/test/test_array.py usr/lib/python2.7/test/test_binhex.py usr/lib/python2.7/test/test_bsddb.py usr/lib/python2.7/test/test_bz2.py usr/lib/python2.7/test/test_cd.py usr/lib/python2.7/test/test_cl.py usr/lib/python2.7/test/test_cmd.py usr/lib/python2.7/test/test_codecencodings_cn.py usr/lib/python2.7/test/test_codecencodings_hk.py usr/lib/python2.7/test/test_codecencodings_jp.py usr/lib/python2.7/test/test_codecencodings_kr.py usr/lib/python2.7/test/test_codecencodings_tw.py usr/lib/python2.7/test/test_codecmaps_cn.py usr/lib/python2.7/test/test_codecmaps_hk.py usr/lib/python2.7/test/test_codecmaps_jp.py usr/lib/python2.7/test/test_codecmaps_kr.py usr/lib/python2.7/test/test_codecmaps_tw.py usr/lib/python2.7/test/test_dl.py usr/lib/python2.7/test/test_dumbdbm.py usr/lib/python2.7/test/test_eof.py usr/lib/python2.7/test/test_errno.py usr/lib/python2.7/test/test___future__.py usr/lib/python2.7/test/test_gl.py usr/lib/python2.7/test/test_gzip.py usr/lib/python2.7/test/test_imageop.py usr/lib/python2.7/test/test_imgfile.py usr/lib/python2.7/test/test_logging.py usr/lib/python2.7/test/test_marshal.py usr/lib/python2.7/test/test_multibytecodec.py usr/lib/python2.7/test/test_multibytecodec_support.py usr/lib/python2.7/test/test_multiprocessing.py usr/lib/python2.7/test/test_popen2.py usr/lib/python2.7/test/test_popen.py usr/lib/python2.7/test/test_random.py usr/lib/python2.7/test/test_sets.py usr/lib/python2.7/test/test_smtpnet.py usr/lib/python2.7/test/test_socket.py usr/lib/python2.7/test/test_tcl.py usr/lib/python2.7/test/test_urllib2_localnet.py usr/lib/python2.7/test/test_urllib2net.py usr/lib/python2.7/test/test_urllibnet.py usr/lib/python2.7/test/test_urlparse.py usr/lib/python2.7/test/test_userstring.py usr/lib/python2.7/test/test_whichdb.py usr/lib/python2.7/test/test_with.py usr/lib/python2.7/timeit.py usr/lib/python2.7/token.py usr/lib/python2.7/trace.py usr/lib/python2.7/UserString.py usr/lib/python2.7/uu.py usr/lib/python2.7/webbrowser.py usr/lib/python2.7/whichdb.py These should point to /usr/bin/python2.7 instead. ---------- components: Build messages: 120468 nosy: allan priority: normal severity: normal status: open title: "make altinstall" installs many files with incorrect shebangs versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 06:38:40 2010 From: report at bugs.python.org (jrodman2) Date: Fri, 05 Nov 2010 05:38:40 +0000 Subject: [issue10319] SocketServer.TCPServer truncates responses on close (in some situations) In-Reply-To: <1288935519.72.0.951711716225.issue10319@psf.upfronthosting.co.za> Message-ID: <1288935519.72.0.951711716225.issue10319@psf.upfronthosting.co.za> New submission from jrodman2 : Behavior exists in at least Python 2.5 through 3.1. The issue regards the socketserver's handling of the tcp sockets it works with. On object reaping, the sockets are properly closed (in some versions explicitly, in others implicitly). However, closing a socket with unread data will in some operating systems prevent sent data from being sent. Notably this occurs on Linux and Windows (I tested on Debian testing x86_64 and Windows Vista x86). Extensive tcpdump sessions and a lot of head scratching finally clarified the issue. The OS would send an RST packet after just the first bit of data handed over to the socket implementation, in typical cases meaning hte first line of text python is writing would be sent to the client, but no more, causing invalid HTTP replies. Here is a change to force the socket to be drained on close. It is of no matter that more data may arrive on the socket post-drain, because the socket implementation in the operating system should be happy to send off what was already queued by the python program at this point. Testing bears this out, across many platforms here. Here is one way to accomplish this in python 2.x, in 3.x the equivalent file is socketserver.py, but has the same issue. It lacks the explicit request.close() call, bgut this seems a matter of aesthetics. Note that the use of select.select() is documented by Linux to be unsafe for this purpose in some circumstances, and may be on other platforms as well. I sort of would rather have sockets have a socket.drain() function which is known to be safe and correct for this type of socket programming issue. If that would be more appropriate, please suggest. select(2) Under Linux, select() may report a socket file descriptor as "ready for reading", while nevertheless a subsequent read blocks. This could for example happen when data has arrived but upon examination has wrong checksum and is discarded. There may be other circumstances in which a file descriptor is spuriously reported as ready. Thus it may be safer to use O_NONBLOCK on sockets that should not block. --- SocketServer.py.orig 2010-11-04 21:36:23.000000000 -0700 +++ SocketServer.py 2010-11-04 21:38:19.000000000 -0700 @@ -445,6 +445,13 @@ def close_request(self, request): """Called to clean up an individual request.""" + # drain socket + request.setblocking(0) + try: + while True: + request.recv(4096) + except socket.error, e: + pass request.close() ---------- messages: 120469 nosy: jrodman2 priority: normal severity: normal status: open title: SocketServer.TCPServer truncates responses on close (in some situations) type: behavior versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 08:34:12 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 05 Nov 2010 07:34:12 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288942452.88.0.931355211696.issue7061@psf.upfronthosting.co.za> Georg Brandl added the comment: Why shouldn't global function doctests be runnable? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 08:38:04 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 05 Nov 2010 07:38:04 +0000 Subject: [issue10315] smtplib.SMTP_SSL new in 2.6 In-Reply-To: <1288901666.81.0.218057119797.issue10315@psf.upfronthosting.co.za> Message-ID: <1288942684.23.0.689903188027.issue10315@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r86189. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 08:48:39 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Nov 2010 07:48:39 +0000 Subject: [issue10317] Add TurtleShell to turtle In-Reply-To: <1288924856.05.0.699658333719.issue10317@psf.upfronthosting.co.za> Message-ID: <1288943319.42.0.916428323694.issue10317@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It's better as a demo for cmd than as a useful utility for the turtle module. Also, we want people using turtle to learn Python, not to bypass the language altogether. ---------- assignee: -> rhettinger resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 09:38:09 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Fri, 05 Nov 2010 08:38:09 +0000 Subject: [issue10320] printf %qd is nonstandard In-Reply-To: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> Message-ID: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> New submission from Hallvard B Furuseth : Modules/_ctypes/callproc.c:PyCArg_repr() uses sprintf(%qd, long long), which is a GNU (and more?) extension. ISO C99 says %lld. Instead, use "%" PY_FORMAT_LONG_LONG "d" from pyconfig.h/pyport.h. Kills off #ifdef MS_WIN32 too. If Python must support C libraries that handle %qd but not %lld, configure.in seems the right place. Index: ./Modules/_ctypes/callproc.c @@ -468,8 +468,3 @@ PyCArg_repr(PyCArgObject *self) case 'Q': - sprintf(buffer, -#ifdef MS_WIN32 - "", -#else - "", -#endif + sprintf(buffer, "", self->tag, self->value.q); pyport.h tests (defined(MS_WIN64) || defined(MS_WINDOWS)) instead of #ifdef MS_WIN32 for when to use %I64d. I assume that's more up to date. ---------- assignee: theller components: ctypes messages: 120473 nosy: hfuru, theller priority: normal severity: normal status: open title: printf %qd is nonstandard type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 10:03:14 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Fri, 05 Nov 2010 09:03:14 +0000 Subject: [issue10313] Reassure user: test_os BytesWarning is OK In-Reply-To: <1288904372.33.0.549260824736.issue10313@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: Antoine Pitrou writes: > Hallvard, if you update your py3k working copy, do these warnings disappear? Yes, switching to the svn version shuts them up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 10:07:41 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Nov 2010 09:07:41 +0000 Subject: [issue10321] Add support for Message objects and binary data to smtplib.sendmail In-Reply-To: <1288948061.88.0.822892450886.issue10321@psf.upfronthosting.co.za> Message-ID: <1288948061.88.0.822892450886.issue10321@psf.upfronthosting.co.za> New submission from R. David Murray : The attached patch adds support to smtplib.SMTP.sendmail for the 'msg' argument to be, in addition to the currently accepted ASCII-only string, either a bytes string or a Message object. It also adds support for byte strings to smtplib.SMPT.data. Binary support is straightforward: if a byte string is passed, it is subject to leading '.' quoting but otherwise transmitted as is (that is, no \r\n transformation is done, unlike the string case). For Message object support, the Message is serialized via BytesGenerator, meaning that a message parsed from a bytes source can be successfully re-transmitted via smtplib. In addition to_addrs and from_addr can be set to None, in which case the addresses are obtained from the appropriate Message object headers (and, for safety, any Bcc header is deleted). Although this patch is complete with docs, I'm not convinced this is the correct API. First is the question of whether or not Message object support should be added. It is in the patch because I started the work with the idea that serializing a Message via BytesGenerator was the "right way" to get binary data into smtplib, but as the implementation fell out I in fact ended up adding support for arbitrary binary data to sendmail (and data). So in fact the Message object handling is not required in smtplib. The feature is, however, clearly useful. Perhaps, however, it should live in email as one or more helper methods instead. I prefer having it in smtplib, but would like the opinions of others. The second question is whether or not either functionality should be added to the existing sendmail method, or whether new methods should be created instead. The alternative API might be: send_bytes(from_addr, to_addrs, msg, mail_options, rcpt_options) send_message(msg, mail_options, rcpt_options, from_addr=None, to_addrs=None) Having completed the patch I'm neutral on this API refactoring, and again welcome other opinions. 'send_bytes' doesn't really seem like the right name, since it implies sending arbitrary bytes when in fact what is happening is a complete message transaction. 'send_bytesmail'? Ugly :( (See also issue 8050 and issue 4403.) Note that I'd like to get some variation of this in (that at a minimum at least supports passing binary data to sendmail) before beta1, since it is the logical compliment to the new bytes support in the email package. ---------- assignee: r.david.murray components: Library (Lib) files: sendmail_message.patch keywords: patch messages: 120475 nosy: Allison.Vollmann, barry, ccgus, exarkun, giampaolo.rodola, pitrou, r.david.murray priority: normal severity: normal stage: patch review status: open title: Add support for Message objects and binary data to smtplib.sendmail type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file19502/sendmail_message.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 10:08:31 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Nov 2010 09:08:31 +0000 Subject: [issue4403] regression from 2.6: smtplib.py requiring ascii for sending messages In-Reply-To: <1227499144.72.0.0111235228814.issue4403@psf.upfronthosting.co.za> Message-ID: <1288948111.27.0.895594644095.issue4403@psf.upfronthosting.co.za> R. David Murray added the comment: I'm closing this issue as invalid, since as Martin pointed out you can't send unicode over the wire. However, see issue 8050 where I've attached a patch that adds support for sending binary data as a by-product of adding support for Message objects. >From Martin's msg76301 I gather he initially expected sendmail to take only binary data, which would it seems to me probably be the better API. However at this point we are stuck with supporting ASCII-only strings in the API as well. As a further note, however, the original example in this issue would have produced a non-RFC-conformant message when used in python 2.x. You can't just send 8bit data willy-nilly, there are rules that should be followed. Which is why the issue 8050 patch adds support for using Message objects, since the email package knows what those rules are... ---------- nosy: +r.david.murray resolution: -> invalid stage: unit test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 10:11:07 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Nov 2010 09:11:07 +0000 Subject: [issue8050] smtplib SMTP.sendmail (TypeError: expected string or buffer) In-Reply-To: <1267628417.9.0.660961800232.issue8050@psf.upfronthosting.co.za> Message-ID: <1288948267.4.0.0586118615542.issue8050@psf.upfronthosting.co.za> R. David Murray added the comment: See issue 10321 for a proposal to add Message support to smtplib. ---------- nosy: -Allison.Vollmann _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 10:12:20 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Nov 2010 09:12:20 +0000 Subject: [issue4403] regression from 2.6: smtplib.py requiring ascii for sending messages In-Reply-To: <1227499144.72.0.0111235228814.issue4403@psf.upfronthosting.co.za> Message-ID: <1288948340.42.0.260777839997.issue4403@psf.upfronthosting.co.za> R. David Murray added the comment: I'm closing this issue as invalid, since as Martin pointed out you can't send unicode over the wire. However, see issue 10321 where I've attached a patch that adds support for sending binary data as a by-product of adding support for Message objects. >From Martin's msg76301 I gather he initially expected sendmail to take only binary data, which would it seems to me probably be the better API. However at this point we are stuck with supporting ASCII-only strings in the API as well. As a further note, however, the original example in this issue would have produced a non-RFC-conformant message when used in python 2.x. You can't just send 8bit data willy-nilly, there are rules that should be followed. Which is why the issue 10321 patch adds support for using Message objects, since the email package knows what those rules are... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 10:12:26 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Nov 2010 09:12:26 +0000 Subject: [issue4403] regression from 2.6: smtplib.py requiring ascii for sending messages In-Reply-To: <1227499144.72.0.0111235228814.issue4403@psf.upfronthosting.co.za> Message-ID: <1288948346.6.0.684454527931.issue4403@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- Removed message: http://bugs.python.org/msg120476 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 10:18:59 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Nov 2010 09:18:59 +0000 Subject: [issue10313] Reassure user: test_os BytesWarning is OK In-Reply-To: <1288879397.21.0.548228653771.issue10313@psf.upfronthosting.co.za> Message-ID: <1288948739.06.0.264649729937.issue10313@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 10:49:58 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Fri, 05 Nov 2010 09:49:58 +0000 Subject: [issue10311] Signal handlers must preserve errno In-Reply-To: <1288882537.9.0.304460920785.issue10311@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: Antoine Pitrou writes: > By the way, I'd like to clear out a potential misunderstanding: the > function you are patching doesn't call Python signal handlers in itself > (those registered using signal.signal()). (...) Good point - I'm talking C signal handlers, not Python signal handlers. > If you want to save errno around Python signal handlers > themselves, PyErr_CheckSignals must be patched as well. Probably not. I don't know Python's errno conventions, if any, but it's usually a bug to use errno at any distance from the error. The C code near the error can save errno if it wants it later. It can't do that around C signal handlers, since those can get called anywhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 11:06:35 2010 From: report at bugs.python.org (=?utf-8?q?R=C3=BCgheimer?=) Date: Fri, 05 Nov 2010 10:06:35 +0000 Subject: [issue10322] sys.argv and quoted arguments on command line In-Reply-To: <1288951595.56.0.0656691082387.issue10322@psf.upfronthosting.co.za> Message-ID: <1288951595.56.0.0656691082387.issue10322@psf.upfronthosting.co.za> New submission from R?gheimer : Words in quoted command line arguments containing whitespace are split into separate entries of the argument vector sys.argv. This implemetation (quote removal + word splitting) removes information required to read string arguments passed via the command line. The expected behaviour would be to unquote the argument, but not to conduct word splitting within the quoted text. ---- Test program output: > ./argtest arg1 arg2 "this should be a single argument" ['./argtest', 'arg1', 'arg2', 'this', 'should', 'be', 'a', 'single', 'argument'] ---- (observed with Python 3.1.2 (r312:79147, Oct 28 2010, 14:12:33) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2 ---------- components: None files: argtest messages: 120480 nosy: fcr priority: normal severity: normal status: open title: sys.argv and quoted arguments on command line type: behavior versions: Python 2.5, Python 3.1 Added file: http://bugs.python.org/file19503/argtest _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 11:07:41 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Fri, 05 Nov 2010 10:07:41 +0000 Subject: [issue10311] Signal handlers must preserve errno In-Reply-To: <1288882208.61.0.379860480119.issue10311@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: Antoine Pitrou writes: > I think it is extremely unlikely that mutating errno in a signal handler > is unsafe (after all, the library functions called from that handler can > mutate errno too: that's the whole point of the patch IIUC). Adding some > configure machinery for this seems unwarranted to me. Fine by me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 11:13:39 2010 From: report at bugs.python.org (Shashank) Date: Fri, 05 Nov 2010 10:13:39 +0000 Subject: [issue10323] Final state of underlying sequence in islice In-Reply-To: <1288952019.84.0.665724422308.issue10323@psf.upfronthosting.co.za> Message-ID: <1288952019.84.0.665724422308.issue10323@psf.upfronthosting.co.za> New submission from Shashank : -- Converting the discussion here http://mail.python.org/pipermail/python-list/2010-November/1259601.html to a bug report (+nosy for everyone that responded, quoting the initial message for context) Are there any promises made with regard to final state of the underlying sequence that islice slices? for example consider this >>> from itertools import * >>> c = count() >>> list(islice(c, 1, 3, 50)) [1] >>> c.next() 51 Now, the doc [1] says "If stop is None, then iteration continues until the iterator is exhausted, if at all; otherwise, it stops at the specified position". It clearly is not stopping at stop (3). Further, the doc gives an example of how this is *equivalent* to a generator defined in the same section. It turns out, these two are not exactly the same if the side-effect of the code is considered on the underlying sequence. Redefining islice using the generator function defined in the doc gives different (and from one pov, expected) result >>> def islice(iterable, *args): ... # islice('ABCDEFG', 2) --> A B ... >>> c = count() >>> list(islice(c, 1, 3, 50)) [1] >>> c.next() 2 While "fixing" this should be rather easy in terms of the change in code required it might break any code depending on this seemingly incorrect behavior ---------- components: Interpreter Core messages: 120482 nosy: ned.deily, rhettinger, shashank, terry.reedy priority: normal severity: normal status: open title: Final state of underlying sequence in islice type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 11:25:31 2010 From: report at bugs.python.org (Shashank) Date: Fri, 05 Nov 2010 10:25:31 +0000 Subject: [issue10323] Final state of underlying sequence in islice In-Reply-To: <1288952019.84.0.665724422308.issue10323@psf.upfronthosting.co.za> Message-ID: <1288952731.18.0.627612454683.issue10323@psf.upfronthosting.co.za> Shashank added the comment: @Raymond: I don't have a particular use case where I had a problem with this behavior. I came across this "problem" when looking at this issue http://bugs.python.org/issue6305. An important problem that can happen with this behavior is that it does extra work that is not needed. Consider the case (it appears in Lib/test/test_itertools.py): islice(count(), 1, 10, maxsize) where maxsize is MAX_Py_ssize_t Current implementation goes all the way up to maxsize when it should have just stopped at 10. You are probably right in saying that the caller can make sure that the parameters are such that such cases don't arise but I would still like to see python doing the best possible thing as far as possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 12:25:02 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 05 Nov 2010 11:25:02 +0000 Subject: [issue10322] sys.argv and quoted arguments on command line In-Reply-To: <1288951595.56.0.0656691082387.issue10322@psf.upfronthosting.co.za> Message-ID: <1288956302.0.0.200729750459.issue10322@psf.upfronthosting.co.za> Eric Smith added the comment: I don't see this behavior on MacOS: $ ./argtest arg1 arg2 "this should be a single argument" 2.6.1 (r261:67515, Feb 11 2010, 15:47:53) [GCC 4.2.1 (Apple Inc. build 5646)] ['./argtest', 'arg1', 'arg2', 'this should be a single argument'] This splitting is done by the shell (Unix-like systems) or by the C runtime (Windows), not by Python. What OS are you running? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 12:39:27 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 05 Nov 2010 11:39:27 +0000 Subject: [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1288957167.4.0.980058001567.issue10318@psf.upfronthosting.co.za> Eric Smith added the comment: Is there any reason for the test files to have a shebang line at all? I think those should be removed, which would cut the problem in half. Also, given "-m", I'm not sure any of the files in the stdlib should have a shebang line. Is there really an expectation that these should be run directly? Is anyone really running UserString.py as a script in order to run its tests? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 13:00:24 2010 From: report at bugs.python.org (=?utf-8?q?R=C3=BCgheimer?=) Date: Fri, 05 Nov 2010 12:00:24 +0000 Subject: [issue10322] sys.argv and quoted arguments on command line In-Reply-To: <1288951595.56.0.0656691082387.issue10322@psf.upfronthosting.co.za> Message-ID: <1288958424.02.0.685375959461.issue10322@psf.upfronthosting.co.za> R?gheimer added the comment: 2.6.18-194.17.1.el5 #1 SMP Wed Sep 29 12:51:33 EDT 2010 i686 i686 i386 GNU/Linux GNU bash, version 3.2.25(1)-release (i686-redhat-linux-gnu) I wrote test program in C to do the same thing as before and the arguments are treated properly: > ./testcargs arg1 arg2 "this should be one arg" argument 0 is: ./testcargs argument 1 is: arg1 argument 2 is: arg2 argument 3 is: this should be one arg My suspicion is that sys implementation goes into a branch intended for a different OS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 13:13:16 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 05 Nov 2010 12:13:16 +0000 Subject: [issue10322] sys.argv and quoted arguments on command line In-Reply-To: <1288951595.56.0.0656691082387.issue10322@psf.upfronthosting.co.za> Message-ID: <1288959196.84.0.93957387313.issue10322@psf.upfronthosting.co.za> Eric Smith added the comment: The python version works for me also on a Fedora box with 3.2 and 2.7. What shell are you using? Did you compile this python yourself, or did it come with your distro? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 13:23:09 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Nov 2010 12:23:09 +0000 Subject: [issue10322] sys.argv and quoted arguments on command line In-Reply-To: <1288951595.56.0.0656691082387.issue10322@psf.upfronthosting.co.za> Message-ID: <1288959789.07.0.669894680856.issue10322@psf.upfronthosting.co.za> R. David Murray added the comment: Works fine for me on Gentoo linux. What exactly is 'python' in your path, and what happens if you do /usr/bin/python3 argtest? I'm 99.99% certain this is not a bug in Python, otherwise it would have been reported long before now, since it would represent a major change in behavior. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 13:30:27 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Nov 2010 12:30:27 +0000 Subject: [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1288960227.01.0.383279288519.issue10318@psf.upfronthosting.co.za> R. David Murray added the comment: Benjamin did some cleanup in this area in at least py3k, so he might have some thoughts, making him nosy. ---------- nosy: +benjamin.peterson, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 13:31:22 2010 From: report at bugs.python.org (Nicolas Kaiser) Date: Fri, 05 Nov 2010 12:31:22 +0000 Subject: [issue10324] Modules/binascii.c: simplify expressions In-Reply-To: <1288960282.63.0.36896617849.issue10324@psf.upfronthosting.co.za> Message-ID: <1288960282.63.0.36896617849.issue10324@psf.upfronthosting.co.za> New submission from Nicolas Kaiser : Hi there! I noticed two expressions that can be simplified like: (a || (!a && b)) => (a || b) Best regards, Nicolas Kaiser --- --- a/Modules/binascii.c 2010-11-05 13:21:22.075303326 +0100 +++ b/Modules/binascii.c 2010-11-05 13:24:16.986174756 +0100 @@ -1337,8 +1337,7 @@ binascii_b2a_qp (PyObject *self, PyObjec ((data[in] == '\t' || data[in] == ' ') && (in + 1 == datalen)) || ((data[in] < 33) && (data[in] != '\r') && (data[in] != '\n') && - (quotetabs || - (!quotetabs && ((data[in] != '\t') && (data[in] != ' ')))))) + (quotetabs || ((data[in] != '\t') && (data[in] != ' '))))) { if ((linelen + 3) >= MAXLINESIZE) { linelen = 0; @@ -1410,8 +1409,7 @@ binascii_b2a_qp (PyObject *self, PyObjec ((data[in] == '\t' || data[in] == ' ') && (in + 1 == datalen)) || ((data[in] < 33) && (data[in] != '\r') && (data[in] != '\n') && - (quotetabs || - (!quotetabs && ((data[in] != '\t') && (data[in] != ' ')))))) + (quotetabs || ((data[in] != '\t') && (data[in] != ' '))))) { if ((linelen + 3 )>= MAXLINESIZE) { odata[out++] = '='; ---------- components: Extension Modules messages: 120490 nosy: nikai priority: normal severity: normal status: open title: Modules/binascii.c: simplify expressions type: feature request versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 13:37:09 2010 From: report at bugs.python.org (Nicolas Kaiser) Date: Fri, 05 Nov 2010 12:37:09 +0000 Subject: [issue10324] Modules/binascii.c: simplify expressions In-Reply-To: <1288960282.63.0.36896617849.issue10324@psf.upfronthosting.co.za> Message-ID: <1288960629.39.0.00281279042582.issue10324@psf.upfronthosting.co.za> Changes by Nicolas Kaiser : ---------- keywords: +patch Added file: http://bugs.python.org/file19504/python-binascii.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 14:09:27 2010 From: report at bugs.python.org (=?utf-8?q?Frank_R=C3=BCgheimer?=) Date: Fri, 05 Nov 2010 13:09:27 +0000 Subject: [issue10322] sys.argv and quoted arguments on command line In-Reply-To: <1288951595.56.0.0656691082387.issue10322@psf.upfronthosting.co.za> Message-ID: <1288962567.32.0.600127347217.issue10322@psf.upfronthosting.co.za> Frank R?gheimer added the comment: You are right, it seems to work when the file is passed directly into python so the quotes are stripped somewhere before python even gets to see them. Thanks ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 14:11:26 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 05 Nov 2010 13:11:26 +0000 Subject: [issue10322] sys.argv and quoted arguments on command line In-Reply-To: <1288951595.56.0.0656691082387.issue10322@psf.upfronthosting.co.za> Message-ID: <1288962686.95.0.540531419178.issue10322@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- components: -None resolution: -> invalid stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 14:56:12 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Fri, 05 Nov 2010 13:56:12 +0000 Subject: [issue10325] PY_LLONG_MAX & co - preprocessor constants or not? In-Reply-To: <1288965372.95.0.322439917087.issue10325@psf.upfronthosting.co.za> Message-ID: <1288965372.95.0.322439917087.issue10325@psf.upfronthosting.co.za> New submission from Hallvard B Furuseth : Include/pyport.h invites potential compile errors with the definitions #define PY_LLONG_MIN LLONG_MIN #define PY_LLONG_MAX LLONG_MAX #define PY_ULLONG_MAX ULLONG_MAX which can fall back to gcc variants or to #else /* Otherwise, rely on two's complement. */ #define PY_ULLONG_MAX (~0ULL) #define PY_LLONG_MAX ((long long)(PY_ULLONG_MAX>>1)) #define PY_LLONG_MIN (-PY_LLONG_MAX-1) Code developed with the former #definitions might use them in '#if's, and then break when it meets a host where the fallbacks are used. It would be safer if either all the macros and pyconfig variants used casts, or all used predefined constants - from configure if needed. The signed variants would break because '#if's do not accept casts. PY_ULLONG_MAX is more insidious: If it meets a host which supports a type bigger than unsigned long long, then preprocessor arithmetic will happen in that type. ~0ULL in #if statements is then actually the same as ~ULLL or whatever it would be spelled. This one definitely needs a cast to protect from the surprise that preprocessor value != value outside preprocessor. You get the same effect with ~0U vs ~0UL on a 64-bit compiler, and ~0U vs ~0ULL on a C99 compiler: #if (~0U) == (~0ULL) # error "oops" #endif Incidentally, the "two's complement" comment is wrong. It also relies on unsigned long long being widest type with no padding bits, and -LLONG_MAX-1 not being a trap representation. ~0ULL is not two's complement since it is unsigned, it works because it has the same result as -1ULL which is defined to have the max value. The PY_LLONG_MIN definitions rely on two's complement. If anyone cared, one could avoid that with #define PY_LLONG_MIN (-PY_LLONG_MAX-(/*two's complement*/(-1LL & 3)==3)) Anyway. If they use casts, fix PY_TIMEOUT_MAX in 3.2a3 pythread.h: #define PY_MIN(x, y) ((x) < (y) ? (x) : (y)) #define PY_TIMEOUT_MAXTMP instead of PY_TIMEOUT_MAX, and then #ifndef NT_THREADS #define PY_TIMEOUT_MAX PY_TIMEOUT_MAXTMP #else #define PY_TIMEOUT_MAX PY_MIN(Py_LL(0xFFFFFFFF)*1000, PY_TIMEOUT_MAXTMP) #endif ---------- components: Interpreter Core messages: 120492 nosy: hfuru priority: normal severity: normal status: open title: PY_LLONG_MAX & co - preprocessor constants or not? type: compile error versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:06:31 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 05 Nov 2010 14:06:31 +0000 Subject: [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1288965991.87.0.463621687445.issue10318@psf.upfronthosting.co.za> Nick Coghlan added the comment: Removing shebang lines from svn completely and only *adding* them during installation steps as appropriate may be an interesting approach. (I noted that my grep of my local build found only correct references to python3.2 in the built scripts directory) I'll add the list of Py3k files that are unexpectedly referencing something other than "/usr/bin/env python3" in SVN as well (note that this is a straight grep, without checking to see if any of them are *meant* to be referring to Python 2.x): Doc/distutils/setupscript.rst does not use python3 in the example Doc/faq/library.rst (multiple instances) Doc/howto/unicode.rst Doc/howto/webservers.rst Doc/library/cgi.rst Doc/library/logging.rst Doc/library/urllib.request.rst Doc/using/unix.rst Lib/test/test_logging.py: #! /usr/bin/env python Lib/cgi.py: #! /usr/bin/env python Mac/BuildScript/build-installer.py: #! /usr/bin/env python Mac/Tools/fixapplepython23.py: #! /usr/bin/env python Mac/Tools/bundlebuilder.py: #! /usr/bin/env python Tools/gdb/libpython.py: #! /usr/bin/env python Tools/pybench/clockres.py: #!/usr/bin/env python Tools/pybench/pybench.py: #!/usr/local/bin/python -O Tools/pybench/Setup.py: #!python Tools/pybench/systimes.py: #!/usr/bin/env python Tools/pynche/pynche: #! /usr/bin/env python Tools/pynche/pynche.pyw: #! /usr/bin/env python Tools/scripts/2to3.py: #! /usr/bin/env python Tools/scripts/gprof2html.py: #! /usr/bin/env python32.3 Tools/scripts/reindent-rst.py: #!/usr/bin/env python Tools/world/world: #! /usr/bin/env python The spec file in Misc/RPM also has multiple references to fixing shebang lines, but I don't know anything about spec files, so I didn't even try to check if it was doing the right thing. ---------- nosy: +ncoghlan versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:07:46 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 05 Nov 2010 14:07:46 +0000 Subject: [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1288966066.43.0.147874623485.issue10318@psf.upfronthosting.co.za> Nick Coghlan added the comment: For the record, my list is from an svn checkout of r86191 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:16:15 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 05 Nov 2010 14:16:15 +0000 Subject: [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1288966575.74.0.102568930526.issue10318@psf.upfronthosting.co.za> Nick Coghlan added the comment: A few more deeper in the py3k source tree: Doc/tools/docutils/_string_template_compat.py Doc/tools/docutils/readers/python/pynodes.py Doc/tools/sphinx/pycode/pgen2/token.py Lib/lib2to3/tests/data/different_encoding.py Adding Georg, since this affects the docs as well as the source code. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:16:24 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 05 Nov 2010 14:16:24 +0000 Subject: [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1288966584.75.0.930719712574.issue10318@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: docs at python -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:17:29 2010 From: report at bugs.python.org (Michael Foord) Date: Fri, 05 Nov 2010 14:17:29 +0000 Subject: [issue10326] Can't pickle unittest.TestCase instances In-Reply-To: <1288966649.03.0.6620170389.issue10326@psf.upfronthosting.co.za> Message-ID: <1288966649.03.0.6620170389.issue10326@psf.upfronthosting.co.za> New submission from Michael Foord : In Python 2.7 a change was introduced to TestCase which involves storing a dictionary of method objects on TestCase instances. This makes them unpickleable. unittest2 stores strings (method names) instead of method objects (a fix to make TestCase instances copyable under earlier versions of Python). The same fix could be applied to unittest. ---------- assignee: michael.foord components: Library (Lib) keywords: easy messages: 120496 nosy: michael.foord priority: low severity: normal stage: needs patch status: open title: Can't pickle unittest.TestCase instances type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:22:20 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Nov 2010 14:22:20 +0000 Subject: [issue10325] PY_LLONG_MAX & co - preprocessor constants or not? In-Reply-To: <1288965372.95.0.322439917087.issue10325@psf.upfronthosting.co.za> Message-ID: <1288966940.32.0.674082571633.issue10325@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:27:55 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 05 Nov 2010 14:27:55 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1288967275.14.0.524569341323.issue5251@psf.upfronthosting.co.za> Nick Coghlan added the comment: Reopening as a reminder to myself that I have a new PEP I want to write in this area. The idea is essentially a lighter weight alternative to PEP 377 that adds an optional __entered__ method to the context management protocol along the following lines: _v = cm.__enter__() try: if hasattr(cm, "__entered__"): VAL = cm.__entered__(_v) else: VAL = _v # do stuff finally: cm.__exit__(*exception_status) Providing a second, optional method that is executed *inside* the body will let CMs do things they can't do now (like skip the body of the with statement) without significantly affecting the behaviour of normal CMs. Notably, GeneratorContextManager will be able to use this to more gracefully handle the case where the generator doesn't yield a value. I plan to flesh this out into a python-ideas post (and likely a subsequent PEP) at some point in the next few months. ---------- components: +Interpreter Core -Documentation resolution: out of date -> postponed status: closed -> open versions: +Python 3.3 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:31:53 2010 From: report at bugs.python.org (Pascal Chambon) Date: Fri, 05 Nov 2010 14:31:53 +0000 Subject: [issue10327] Abnormal SSL timeouts when using socket timeouts - once again In-Reply-To: <1288967513.64.0.717673746201.issue10327@psf.upfronthosting.co.za> Message-ID: <1288967513.64.0.717673746201.issue10327@psf.upfronthosting.co.za> New submission from Pascal Chambon : On freebsd 8, using python 2.6.6, I've run into the bug already widely dealt with in these reports : http://bugs.python.org/issue1380952 http://bugs.python.org/issue1153016 When using socket timeouts (eg. with socket.setdefaulttimeout()), whatever the timeout I use (eg. 10 seconds), I begin having random "SSLError: The read operation timed out" exceptions in my http calls, via urlopen or 3rd party libraries. Here is an example of traceback ending: ... File "/usr/local/lib/python2.6/site-packages/ZSI-2.0-py2.6.egg/ZSI/client.py", line 349, in ReceiveRaw response = self.h.getresponse() File "/usr/local/lib/python2.6/httplib.py", line 990, in getresponse response.begin() File "/usr/local/lib/python2.6/httplib.py", line 391, in begin version, status, reason = self._read_status() File "/usr/local/lib/python2.6/httplib.py", line 349, in _read_status line = self.fp.readline() File "/usr/local/lib/python2.6/socket.py", line 427, in readline data = recv(1) File "/usr/local/lib/python2.6/ssl.py", line 215, in recv return self.read(buflen) File "/usr/local/lib/python2.6/ssl.py", line 136, in read return self._sslobj.read(len) SSLError: The read operation timed out I've checked the py2.6.6 sources, the patches described in previous reports are still applied (eg. SSL_pending() checks etc.), I have no idea of how so long socket timeouts might interfere with ssl operations... ---------- components: IO messages: 120498 nosy: arekm, georg.brandl, maltehelmert, pakal, pristine777, tarek-ziade, twouters priority: normal severity: normal status: open title: Abnormal SSL timeouts when using socket timeouts - once again type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:33:48 2010 From: report at bugs.python.org (Alexander Schmolck) Date: Fri, 05 Nov 2010 14:33:48 +0000 Subject: [issue10328] re.sub[n] doesn't seem to handle /Z replacements correctly in all cases In-Reply-To: <1288967628.79.0.550964963089.issue10328@psf.upfronthosting.co.za> Message-ID: <1288967628.79.0.550964963089.issue10328@psf.upfronthosting.co.za> New submission from Alexander Schmolck : In certain cases a zero-width /Z match that should be replaced isn't. An example might help: re.compile('(?m)(?P[ \t]+\r*$)|(?P(?<=[^\n])\Z)').subn(lambda m:next('<'+k+'>' for k,v in m.groupdict().items() if v is not None), 'foobar ') this gives ('foobar', 1) I would have expected ('foobar', 2) Contrast this with the following behavior: [m.span() for m in re.compile('(?P[ \t]+\r*$)|(?P(?<=[^\n])\Z)', re.M).finditer('foobar ')] gives [(6, 7), (7, 7)] The matches are clearly not overlapping and the re module docs for sub say "Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.", so I would have expected two replacements. This seems to be what perl is doing: echo -n 'foobar ' | perl -pe 's/(?m)(?P[ \t]+\r*$)|(?P(?<=[^\n])\Z)/<$&>/g' gives foobar< ><>% ---------- components: Regular Expressions messages: 120499 nosy: Alexander.Schmolck priority: normal severity: normal status: open title: re.sub[n] doesn't seem to handle /Z replacements correctly in all cases type: behavior versions: Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:40:47 2010 From: report at bugs.python.org (Malte Helmert) Date: Fri, 05 Nov 2010 14:40:47 +0000 Subject: [issue10327] Abnormal SSL timeouts when using socket timeouts - once again In-Reply-To: <1288967513.64.0.717673746201.issue10327@psf.upfronthosting.co.za> Message-ID: <1288968047.99.0.34079409633.issue10327@psf.upfronthosting.co.za> Malte Helmert added the comment: I checked if issue1153016 has reappeared for me (Ubuntu, Python 2.6.6), but it hasn't. Both the urllib and the imaplib examples given there work fine for me. Or at least opening the connections works fine for me, which it didn't at the time of issue1153016. But you say you have random errors, so maybe I need to exercise this more heavily. Can you attach a test script that can be used to make the bug appear? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:43:44 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 05 Nov 2010 14:43:44 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1288942452.88.0.931355211696.issue7061@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, Nov 5, 2010 at 3:34 AM, Georg Brandl wrote: .. > Why shouldn't global function doctests be runnable? They should - I just couldn't figure out a better hack that would work for both mathods and functions. Note that functions are auto-generated in turtle from Screen and Turtle methods. The doctests are just method doctests with turtle. or screen. prefix dropped. In order to remove dependency between doctests, I create a new turtle for each test and assign it to global "turtle" variable. For some reason similar approach did not work for functions. I'll keep trying, though. On the other hand, since function doctests are auto-generated from method doctests, there is little to be gained from running them separately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:52:21 2010 From: report at bugs.python.org (Jesse Noller) Date: Fri, 05 Nov 2010 14:52:21 +0000 Subject: [issue9244] multiprocessing.pool: Worker crashes if result can't be encoded In-Reply-To: <1279021915.02.0.743108448879.issue9244@psf.upfronthosting.co.za> Message-ID: <1288968741.33.0.878050573654.issue9244@psf.upfronthosting.co.za> Jesse Noller added the comment: Fine w/ committing this Ask. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:53:07 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Nov 2010 14:53:07 +0000 Subject: [issue10327] Abnormal SSL timeouts when using socket timeouts - once again In-Reply-To: <1288967513.64.0.717673746201.issue10327@psf.upfronthosting.co.za> Message-ID: <1288968787.68.0.619949065685.issue10327@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > When using socket timeouts (eg. with socket.setdefaulttimeout()), > whatever the timeout I use (eg. 10 seconds), I begin having random > "SSLError: The read operation timed out" exceptions in my http calls, > via urlopen or 3rd party libraries. Well, this isn't a random error. It just signals that the timeout has expired. It's a pity that it raises SSLError rather than socket.timeout, though. Or are you saying that the exception is raised too early? If so, it would be nice to have a way of reproducing. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:53:21 2010 From: report at bugs.python.org (Jesse Noller) Date: Fri, 05 Nov 2010 14:53:21 +0000 Subject: [issue7707] multiprocess.Queue operations during import can lead to deadlocks In-Reply-To: <1263573315.16.0.465636049394.issue7707@psf.upfronthosting.co.za> Message-ID: <1288968801.28.0.610200927049.issue7707@psf.upfronthosting.co.za> Jesse Noller added the comment: Fine w/ committing this Ask. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:54:35 2010 From: report at bugs.python.org (Jesse Noller) Date: Fri, 05 Nov 2010 14:54:35 +0000 Subject: [issue8028] self.terminate() from a multiprocessing.Process raises AttributeError exception In-Reply-To: <1267300713.42.0.457825051385.issue8028@psf.upfronthosting.co.za> Message-ID: <1288968875.76.0.946698080656.issue8028@psf.upfronthosting.co.za> Jesse Noller added the comment: Fine w/ committing this Ask as-is ask. You are correct in the original intent of the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 16:01:38 2010 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Fri, 05 Nov 2010 15:01:38 +0000 Subject: [issue10329] trace.py and unicode in Python 3 In-Reply-To: <1288969298.32.0.515004183172.issue10329@psf.upfronthosting.co.za> Message-ID: <1288969298.32.0.515004183172.issue10329@psf.upfronthosting.co.za> New submission from Walter D?rwald : It seems that on Python 3 (i.e. the py3k branch) trace.py can not handle source that includes Unicode characters. Running the test suite with code coverage info via ./python Lib/test/regrtest.py -T -N -uurlfetch,largefile,network,decimal sometimes fails with the following exception: Traceback (most recent call last): File "Lib/test/regrtest.py", line 1500, in main() File "Lib/test/regrtest.py", line 696, in main r.write_results(show_missing=True, summary=True, coverdir=coverdir) File "/home/coverage/python/Lib/trace.py", line 319, in write_results lnotab, count) File "/home/coverage/python/Lib/trace.py", line 369, in write_results_file outfile.write(line.expandtabs(8)) UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in position 30: ordinal not in range(128) The script that produces code coverage info on http://coverage.livinglogic.de/ uses this feature to generate code coverage info. Applying the attached patch (i.e. specifying an explicit encoding when opening the output file) fixes the problem. ---------- files: trace.diff keywords: patch messages: 120506 nosy: doerwalter, haypo priority: normal severity: normal status: open title: trace.py and unicode in Python 3 Added file: http://bugs.python.org/file19505/trace.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 16:07:07 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Nov 2010 15:07:07 +0000 Subject: [issue10329] trace.py and unicode in Python 3 In-Reply-To: <1288969298.32.0.515004183172.issue10329@psf.upfronthosting.co.za> Message-ID: <1288969627.51.0.768507977596.issue10329@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- components: +Library (Lib) nosy: +belopolsky stage: -> patch review type: -> behavior versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 16:22:51 2010 From: report at bugs.python.org (Pascal Chambon) Date: Fri, 05 Nov 2010 15:22:51 +0000 Subject: [issue10327] Abnormal SSL timeouts when using socket timeouts - once again In-Reply-To: <1288967513.64.0.717673746201.issue10327@psf.upfronthosting.co.za> Message-ID: <1288970571.44.0.534299092278.issue10327@psf.upfronthosting.co.za> Pascal Chambon added the comment: The exception is raised too early, none of my calls takes more than 1-2 seconds and I've a default timeout set at 10s or more. This occurs rather rarely, one or two times on some hundreds of calls. I'll make a little script to try to isolate the pb. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 16:25:10 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 05 Nov 2010 15:25:10 +0000 Subject: [issue10329] trace.py and unicode in Python 3 In-Reply-To: <1288969298.32.0.515004183172.issue10329@psf.upfronthosting.co.za> Message-ID: <1288970710.68.0.370433447497.issue10329@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 16:26:45 2010 From: report at bugs.python.org (Gregor Lingl) Date: Fri, 05 Nov 2010 15:26:45 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288970805.51.0.00394839332218.issue7061@psf.upfronthosting.co.za> Gregor Lingl added the comment: What do you mean with "similar approach"? Keep in mind, that functions derived form turtle methods, call methods for the class variable _pen of class Turtle. A new Turtle-object is bound to _pen, if it is not already present, whenever one of these functions is called, via _getpen() So perhaps _getpen() can do for you what you need? (A similar approach is used for screen-oriented functions with turtle._screen.) I'm very sorry that, due to time restrictions, for the next two or three months I'm not able to participate in these discussions as intensely as I'd like to. Best regards, Gregor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 16:38:19 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Nov 2010 15:38:19 +0000 Subject: [issue10328] re.sub[n] doesn't seem to handle /Z replacements correctly in all cases In-Reply-To: <1288967628.79.0.550964963089.issue10328@psf.upfronthosting.co.za> Message-ID: <1288971499.74.0.672352078123.issue10328@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 16:40:46 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 05 Nov 2010 15:40:46 +0000 Subject: [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1288971646.77.0.893727217128.issue10318@psf.upfronthosting.co.za> Georg Brandl added the comment: You can ignore those under Doc/tools; they are neither part of the distribution and nor installed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 16:53:39 2010 From: report at bugs.python.org (Pascal Chambon) Date: Fri, 05 Nov 2010 15:53:39 +0000 Subject: [issue10327] Abnormal SSL timeouts when using socket timeouts - once again In-Reply-To: <1288967513.64.0.717673746201.issue10327@psf.upfronthosting.co.za> Message-ID: <1288972419.46.0.781868697897.issue10327@psf.upfronthosting.co.za> Pascal Chambon added the comment: Humz on second thought you may be right, now I have some trouble reproducing the bugs (wich have been there since the beginning, though), so it may be that the webservice I call seldom takes 10+ seconds to answer (weird anyway). I've placed timers in the codebase, the pb will eventually surface again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 17:56:49 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Nov 2010 16:56:49 +0000 Subject: [issue10323] Final state of underlying sequence in islice In-Reply-To: <1288952019.84.0.665724422308.issue10323@psf.upfronthosting.co.za> Message-ID: <1288976209.61.0.480737391074.issue10323@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger components: +Documentation -Interpreter Core priority: normal -> low versions: -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 17:57:57 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 05 Nov 2010 16:57:57 +0000 Subject: [issue5412] extend configparser to support mapping access(__*item__) In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1288976277.34.0.165039409641.issue5412@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Documentation complete. ---------- Added file: http://bugs.python.org/file19506/issue5412.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 17:58:07 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 05 Nov 2010 16:58:07 +0000 Subject: [issue5412] extend configparser to support mapping access(__*item__) In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1288976287.13.0.196221481385.issue5412@psf.upfronthosting.co.za> Changes by ?ukasz Langa : Removed file: http://bugs.python.org/file19501/issue5412.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 18:18:23 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 05 Nov 2010 17:18:23 +0000 Subject: [issue10288] Remove deprecated C "character" handling macros ISUPPER() etc In-Reply-To: <1288651306.95.0.100885156034.issue10288@psf.upfronthosting.co.za> Message-ID: <1288977503.89.0.523828026365.issue10288@psf.upfronthosting.co.za> Dave Malcolm added the comment: Thanks for reviewing. If I'm reading things correctly, the ISUPPER et al macros were added in 2.6 and 3.0, and deprecated in 2.7 and 3.1. Tested with a full run of "-m test.regrtest -uall" here (x86_64 Fedora 13), with both 2-byte and 4-byte unicode; no failures: 342 tests OK. 7 tests skipped: test_gdb test_kqueue test_ossaudiodev test_startfile test_winreg test_winsound test_zipfile64 Those skips are all expected on linux2. I've fixed up the issue number in Misc/NEWS in my local tree. The patch as-is doesn't make sense for 3.1 or 2.7 (the macros should remain within the maintenance branches, in deprecated form) - do I need to explicitly mark this revision (e.g. using "svnmerge.py block"?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 18:18:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Nov 2010 17:18:59 +0000 Subject: [issue10317] Add TurtleShell to turtle In-Reply-To: <1288924856.05.0.699658333719.issue10317@psf.upfronthosting.co.za> Message-ID: <1288977539.54.0.213924486335.issue10317@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 18:19:55 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Nov 2010 17:19:55 +0000 Subject: [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1288977595.31.0.681390241559.issue10318@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 18:20:39 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 05 Nov 2010 17:20:39 +0000 Subject: [issue10288] Remove deprecated C "character" handling macros ISUPPER() etc In-Reply-To: <1288651306.95.0.100885156034.issue10288@psf.upfronthosting.co.za> Message-ID: <1288977639.89.0.166087683212.issue10288@psf.upfronthosting.co.za> Eric Smith added the comment: I'd 'svnmerge block' them, just in case anyone decides to manually merge (which I doubt will happen, but you never know). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 18:25:38 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 05 Nov 2010 17:25:38 +0000 Subject: [issue10288] Remove deprecated C "character" handling macros ISUPPER() etc In-Reply-To: <1288651306.95.0.100885156034.issue10288@psf.upfronthosting.co.za> Message-ID: <1288977938.8.0.916859955341.issue10288@psf.upfronthosting.co.za> Dave Malcolm added the comment: Committed to py3k in r86210 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 18:33:39 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 05 Nov 2010 17:33:39 +0000 Subject: =?utf-8?q?=5Bissue10053=5D_Don=E2=80=99t_close_fd_when_FileIO=2E=5F=5Fini?= =?utf-8?b?dF9fIGZhaWxz?= In-Reply-To: <1286611699.72.0.643946384367.issue10053@psf.upfronthosting.co.za> Message-ID: <1288978419.85.0.0774822595468.issue10053@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Recently, the patch to close fd when FileIO#__init__ failed and closefd = True was checked in. Is this mean this issue is invalid? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 18:34:04 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 05 Nov 2010 17:34:04 +0000 Subject: [issue1346238] A constant folding optimization pass for the AST Message-ID: <1288978444.33.0.518286982937.issue1346238@psf.upfronthosting.co.za> Dave Malcolm added the comment: FWIW, I'm working on fixing up the this patch to work against py3k; I'm assuming there's still interest in the AST visitor + specific optimization passes approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 18:47:14 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 05 Nov 2010 17:47:14 +0000 Subject: [issue10325] PY_LLONG_MAX & co - preprocessor constants or not? In-Reply-To: <1288965372.95.0.322439917087.issue10325@psf.upfronthosting.co.za> Message-ID: <1288979234.76.0.50707642444.issue10325@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for the report; I agree that there's a potential issue here, and I also think that all these definitions *should* be preprocessor defines. (Idle question: does C99 require that LONG_MAX and friends are usable in the preprocessor? I see it in e.g. 7.18.2p2 for INT32_MAX and friends, but I'm not sure if there's something similar for LONG_MAX and co.) Can you suggest a suitable fix for the PY_ULLONG_MAX and PY_LLONG_MAX defines? Note that a configure-based fix may need to take into account the special needs of Windows---for which configure isn't used, of course---and OS X---where the same code, based on a single run of configure, should be able to compile to the correct thing both in 32-bit and 64-bit mode, so that universal builds work; see PC/pyconfig.h and Include/pymacconfig.h respectively for dealing with these issues. BTW, do you know of any modern non-Windows platforms that don't define LLONG_MIN and LLONG_MAX? It may well be that the "two's complement" fallback hasn't been exercised in recent years. > Incidentally, the "two's complement" comment is wrong. > It also relies on unsigned long long being widest type with no > padding bits, and -LLONG_MAX-1 not being a trap representation. Agreed---that comment needs to be better. I think it's fine, though, for practical purposes to assume an absence of padding bits and no trap representation; IIRC there are places internally (e.g., in the bitwise operators section of the 'int' type implementation) that already assume two's complement + no padding bits + no trap representation. (I *thought* I had an old issue open somewhere about documenting---and possibly testing---these assumptions, but now I can't find it.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 18:52:35 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 05 Nov 2010 17:52:35 +0000 Subject: [issue10232] Tkinter issues with Scrollbar and custom widget list In-Reply-To: <1288366788.46.0.695886030233.issue10232@psf.upfronthosting.co.za> Message-ID: <1288979555.13.0.812827687679.issue10232@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I think issue4 happens because all frames are grid-forgotten in redisp(), sometimes widget becomes empty. I think we can close this issue as invalid. P.S. Try this change in redisp() yy = 0 for xx in self.frms[start:self.maxdisp+start]: xx.grid(in_=self,row=yy,column=0) yy += 1 for xx in self.frms[self.active:self.maxdisp+self.active]: if xx in self.frms[start:self.maxdisp+start]: continue xx.grid_forget() ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 19:18:46 2010 From: report at bugs.python.org (Robert Lerche) Date: Fri, 05 Nov 2010 18:18:46 +0000 Subject: [issue10232] Tkinter issues with Scrollbar and custom widget list In-Reply-To: <1288366788.46.0.695886030233.issue10232@psf.upfronthosting.co.za> Message-ID: <1288981126.67.0.484540808511.issue10232@psf.upfronthosting.co.za> Robert Lerche added the comment: Thank you, Hirokazu! I see now -- deleting the rows first causes the scroll bar to shrink. So I take it calling grid with a row/column that is already in the grid replaces the prior mapped widget. [or should I say, "domo arigato Yamamoto-san"?] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 19:22:12 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 05 Nov 2010 18:22:12 +0000 Subject: [issue10329] trace.py and unicode in Python 3 In-Reply-To: <1288969298.32.0.515004183172.issue10329@psf.upfronthosting.co.za> Message-ID: <1288981332.97.0.556899891266.issue10329@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I don't think trace.diff is proposed for commit. I see it more as a supporting file for diagnosing the problem. I see two problems here: 1. Apparently OP's system opens files with encoding set to 'ascii' by default. This is not the case on any of the systems I have access to (OSX and Linux). I will try to reproduce this issue by setting LANG="en_US.ascii". 2. Regrtest attempts to write a no-ascii character into the trace results file. I suspect this comes from test cases that test import from modules with non-ascii name or with non-ascii identifiers. I am not sure there is anything we need to change here other than possibly skip tests that use non-ascii identifiers of the systems with default encoding set to ascii. I would be +0 on adding errors='replace' or 'backshlashreplace' to the open() call in write_results_file(), but hardcoding encoding="utf-8" is definitely not the right thing to do. ---------- stage: patch review -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 19:26:51 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 05 Nov 2010 18:26:51 +0000 Subject: [issue10027] os.lstat/os.stat don't set st_nlink on Windows In-Reply-To: <1286289327.29.0.159315245099.issue10027@psf.upfronthosting.co.za> Message-ID: <1288981611.28.0.905574607941.issue10027@psf.upfronthosting.co.za> Brian Curtin added the comment: Works for me. I think it should be ok to commit. ---------- assignee: -> ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 19:43:10 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Nov 2010 18:43:10 +0000 Subject: [issue10329] trace.py and unicode in Python 3 In-Reply-To: <1288969298.32.0.515004183172.issue10329@psf.upfronthosting.co.za> Message-ID: <1288982590.85.0.299607092654.issue10329@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I would be +0 on adding errors='replace' or 'backshlashreplace' to the > open() call in write_results_file(), but hardcoding encoding="utf-8" > is definitely not the right thing to do. Who are the consumers of the trace files? Is there a formal specification or is Python the primary consumer? If the former, then follow the specification (and/or amend it ;-)). If the latter, you have the right to be creative; then utf-8 with the sounds like a most reasonable choice (possibly with an error handler such as "ignore" or "replace" to avoid barfing on lone surrogates). Relying on the default encoding is not really a good idea, though. This is good for quick scripts or in the rare cases where it is by definition the expected behaviour. But in more elaborate cases you certainly want to decide the encoding by yourself. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 20:00:21 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Nov 2010 19:00:21 +0000 Subject: [issue1346238] A constant folding optimization pass for the AST Message-ID: <1288983621.29.0.0374928300006.issue1346238@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 20:16:59 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Nov 2010 19:16:59 +0000 Subject: [issue10282] IMPLEMENTATION token differently delt with in NNTP capability In-Reply-To: <1288642567.32.0.7785411032.issue10282@psf.upfronthosting.co.za> Message-ID: <1288984619.53.0.5998414391.issue10282@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed the new attribute in r86213. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 20:29:59 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Nov 2010 19:29:59 +0000 Subject: [issue10232] Tkinter issues with Scrollbar and custom widget list In-Reply-To: <1288366788.46.0.695886030233.issue10232@psf.upfronthosting.co.za> Message-ID: <1288985399.89.0.443464093544.issue10232@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Robert, I interpret your response to Hirokazu to mean that his suggestion works. Hence I am following his suggestion. Reopen is I erred. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 20:31:05 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Fri, 05 Nov 2010 19:31:05 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1288985465.03.0.605253390282.issue1926@psf.upfronthosting.co.za> Julien ?LIE added the comment: Hi Steven, I agree with what you suggest for the implementation. > Is there a case where a server advertises STARTTLS > and one would not use it? Yes, the overhead added by the encryption. It is what people usually mention for the reason not to use it. However, the TLS protocol allows to negotiate compression; in this case, it is very powerful! LIST ACTIVE answers are for instance a lot faster. The same for OVER answers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 20:36:20 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Fri, 05 Nov 2010 19:36:20 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1288985780.77.0.0241832324337.issue1926@psf.upfronthosting.co.za> Julien ?LIE added the comment: (Note that smtplib can give ideas for an implementation of AUTHINFO SASL with PLAIN, LOGIN and CRAM-MD5 mechanisms.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 20:40:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 05 Nov 2010 19:40:15 +0000 Subject: [issue10317] Add TurtleShell to turtle In-Reply-To: <1288977539.64.0.0956225774062.issue10317@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, Nov 5, 2010 at 1:18 PM, ?ric Araujo wrote: .. > nosy: +eric.araujo Raymond has already rejected and closed this request, so I am not optimistic that anything will happen here. (I also understand that he feels rather strongly about this because he closed the issue in just 5 hours!) Nevertheless, let me answer Raymond's arguments for historical records: > It's better as a demo for cmd than as a useful utility for the turtle module. While I agree that TurtleShell is an excellent demo for the cmd module, I find ReST files a poor place for example code, especially multipage code like TurtleShell. We do not have a procedure for testing code presented in ReST files and such code regularly goes out of date unnoticed. At a minimum, I would like to see TurtleShell code moved into its own file under Doc/includes/ and embedded in Doc/library/cmd.rst using .. literalinclude:: ../includes/turtleshell.py directive. See datetime.py and tzinfo-examples.py as an example of this approach. Doing so will help users that want to study TurtleShell code by running and editing to get a working .py file. (Sphinx can actually make it even easier by supplying and easily accessible download link for literalincludes.) This will still not solve the problem of untested code in the manual, but I this is a more general issue. See #10225, for example. > Also, we want people using turtle to learn Python, not to bypass the language altogether. I agree and I can clearly see this a slippery slope before someone would want to expand TurtleShell into a full-featured Logo interpreter. As it stands, however, I don't see a problem in letting users command the turtle without twisting their fingers to enter superfluous commas and parentheses. (Remember, the target audience may not even have full command of the shift key yet.) We can also teach TurtleShell to save history as a python program which will help them to learn python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 20:42:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 05 Nov 2010 19:42:51 +0000 Subject: [issue10317] Add TurtleShell to turtle In-Reply-To: <1288924856.05.0.699658333719.issue10317@psf.upfronthosting.co.za> Message-ID: <1288986171.12.0.958540496854.issue10317@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +gregorlingl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 20:55:50 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Nov 2010 19:55:50 +0000 Subject: [issue10311] Signal handlers must preserve errno In-Reply-To: <1288873098.65.0.47223283391.issue10311@psf.upfronthosting.co.za> Message-ID: <1288986950.45.0.553359817056.issue10311@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, fixed in r86214 (3.x), r86215 (3.1) and r86216 (2.7). Thanks for the patch! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 21:21:19 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Nov 2010 20:21:19 +0000 Subject: [issue10330] trace module doesn't work without threads In-Reply-To: <1288988479.33.0.578006700843.issue10330@psf.upfronthosting.co.za> Message-ID: <1288988479.33.0.578006700843.issue10330@psf.upfronthosting.co.za> New submission from Antoine Pitrou : The trace module doesn't work when threading is disabled ("./configure --without-threads"). The following patch fixes this: diff -r 345827dcf409 Lib/trace.py --- a/Lib/trace.py Fri Nov 05 20:58:28 2010 +0100 +++ b/Lib/trace.py Fri Nov 05 21:20:09 2010 +0100 @@ -53,7 +53,10 @@ import linecache import os import re import sys -import threading +try: + import threading +except ImportError: + import dummy_threading as threading import time import token import tokenize ---------- assignee: belopolsky components: Library (Lib) messages: 120529 nosy: belopolsky, pitrou priority: normal severity: normal stage: patch review status: open title: trace module doesn't work without threads type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 21:28:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Nov 2010 20:28:40 +0000 Subject: [issue4391] optparse: use proper gettext plurals forms In-Reply-To: <1227390268.91.0.0525140101381.issue4391@psf.upfronthosting.co.za> Message-ID: <1288988920.97.0.867989546833.issue4391@psf.upfronthosting.co.za> ?ric Araujo added the comment: Now that argparse has been included in the standard library to supersede optparse, I?m not sure there is still value in fixing this bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 21:30:54 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Nov 2010 20:30:54 +0000 Subject: [issue1098749] Single-line option to pygettext.py Message-ID: <1288989054.93.0.078723400296.issue1098749@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 21:32:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Nov 2010 20:32:52 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1288989172.5.0.0001424011189.issue5404@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 21:45:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Nov 2010 20:45:12 +0000 Subject: [issue1649329] Extract file-finding and language-handling code from gettext.find Message-ID: <1288989912.18.0.475682097933.issue1649329@psf.upfronthosting.co.za> ?ric Araujo added the comment: Barry said in http://mail.python.org/pipermail/python-dev/2009-March/087847.html : The class-based API for gettext takes streams, so resource_stream() would work just fine. I think i18n plugins for Python do not necessarily need to use the classic gettext API. The title as I changed it some time ago is thus invalid, so I?m changing it again. This is still a request for separating the language selection code from the file finding. Anyone feel free to enter a better title, this one is not very clear. My first vote was to try to fix the code without writing a VFS, but OTOH maybe a lightweight ABC with mixin methods and a concrete implementation of the full gettext logic may be clear and educational here. Shannon, if you?re still getting those emails, what do you think? ---------- assignee: tarek -> title: Support for non-filesystem-based catalogs in gettext -> Extract file-finding and language-handling code from gettext.find _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 21:46:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Nov 2010 20:46:36 +0000 Subject: [issue8409] gettext should honor $LOCPATH environment variable In-Reply-To: <1271341694.43.0.480005164083.issue8409@psf.upfronthosting.co.za> Message-ID: <1288989996.4.0.00477095459057.issue8409@psf.upfronthosting.co.za> ?ric Araujo added the comment: Should this be closed as invalid? ---------- nosy: +eric.araujo, lemburg, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 21:48:43 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 05 Nov 2010 20:48:43 +0000 Subject: [issue8409] gettext should honor $LOCPATH environment variable In-Reply-To: <1271341694.43.0.480005164083.issue8409@psf.upfronthosting.co.za> Message-ID: <1288990123.93.0.126632502184.issue8409@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'm not an expert on this, but I think it's still valid. Maybe Martin has an opinion on it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 21:49:04 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Nov 2010 20:49:04 +0000 Subject: [issue2931] optparse: various problems with unicode and gettext In-Reply-To: <1211297479.44.0.970954846769.issue2931@psf.upfronthosting.co.za> Message-ID: <1288990144.96.0.955732765006.issue2931@psf.upfronthosting.co.za> ?ric Araujo added the comment: It would be nice to test argparse for the same behavior. ---------- nosy: +bethard, eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:08:08 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Nov 2010 21:08:08 +0000 Subject: [issue10245] Fix resource warnings in test_telnetlib In-Reply-To: <1288441077.58.0.74967624488.issue10245@psf.upfronthosting.co.za> Message-ID: <1288991288.78.0.994426247573.issue10245@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:08:32 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Nov 2010 21:08:32 +0000 Subject: [issue10245] Fix resource warnings in test_telnetlib In-Reply-To: <1288441077.58.0.74967624488.issue10245@psf.upfronthosting.co.za> Message-ID: <1288991312.15.0.941960599522.issue10245@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:10:00 2010 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 05 Nov 2010 21:10:00 +0000 Subject: [issue10328] re.sub[n] doesn't seem to handle /Z replacements correctly in all cases In-Reply-To: <1288967628.79.0.550964963089.issue10328@psf.upfronthosting.co.za> Message-ID: <1288991400.41.0.385249765988.issue10328@psf.upfronthosting.co.za> Matthew Barnett added the comment: It's a bug caused by trying to avoid getting stuck when a zero-width match is found. Basically the fix is to advance one character after a zero-width match, but that doesn't always give the correct result. There are a number of related issues like issue #1647489 ("zero-length match confuses re.finditer()"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:16:15 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Nov 2010 21:16:15 +0000 Subject: [issue10180] File objects should not pickleable In-Reply-To: <1287854367.84.0.526587779087.issue10180@psf.upfronthosting.co.za> Message-ID: <1288991775.67.0.187101168057.issue10180@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r86220. I won't backport it since it would risk breaking existing code, although relying on this is really a bug in itself. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:20:01 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 05 Nov 2010 21:20:01 +0000 Subject: [issue7434] general pprint rewrite In-Reply-To: <1259944363.21.0.149882342014.issue7434@psf.upfronthosting.co.za> Message-ID: <1288992001.4.0.769148183501.issue7434@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:23:30 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Nov 2010 21:23:30 +0000 Subject: [issue10270] Fix resource warnings in test_threading In-Reply-To: <1288549842.1.0.819549161722.issue10270@psf.upfronthosting.co.za> Message-ID: <1288992210.39.0.558891444803.issue10270@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> commit review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:30:26 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Nov 2010 21:30:26 +0000 Subject: [issue10331] test_gdb failure when warnings printed out In-Reply-To: <1288992626.81.0.692321873477.issue10331@psf.upfronthosting.co.za> Message-ID: <1288992626.81.0.692321873477.issue10331@psf.upfronthosting.co.za> New submission from Antoine Pitrou : There is this kind of failures on Barry's new buildbot. It looks like warning messages should be ignored when checking gdb output: ====================================================================== FAIL: test_NULL_ob_type (test.test_gdb.PrettyPrintTests) Ensure that a PyObject* with NULL ob_type is handled gracefully ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-ppc/build/Lib/test/test_gdb.py", line 390, in test_NULL_ob_type 'set v->ob_type=0') File "/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-ppc/build/Lib/test/test_gdb.py", line 361, in assertSane cmds_after_breakpoint=cmds_after_breakpoint) File "/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-ppc/build/Lib/test/test_gdb.py", line 150, in get_gdb_repr import_site=import_site) File "/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-ppc/build/Lib/test/test_gdb.py", line 132, in get_stack_trace self.assertEquals(err, '') AssertionError: '\nwarning: not using untrusted file "/home/barry/.gdbinit"\n' != '' - - warning: not using untrusted file "/home/barry/.gdbinit" See http://www.python.org/dev/buildbot/builders/PPC%20Ubuntu%203.x/builds/0/steps/test/logs/stdio ---------- assignee: dmalcolm components: Tests messages: 120537 nosy: barry, dmalcolm, pitrou priority: normal severity: normal stage: needs patch status: open title: test_gdb failure when warnings printed out type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:41:54 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 05 Nov 2010 21:41:54 +0000 Subject: [issue10331] test_gdb failure when warnings printed out In-Reply-To: <1288992626.81.0.692321873477.issue10331@psf.upfronthosting.co.za> Message-ID: <1288993314.3.0.280527573377.issue10331@psf.upfronthosting.co.za> Dave Malcolm added the comment: Seems to relate to this gdb feature: http://sourceware.org/ml/gdb-patches/2005-05/msg00637.html Barry: is your ~/.gdbinit world writable? I can cook up a patch to ignore such warnings ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:48:25 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Nov 2010 21:48:25 +0000 Subject: [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1288993705.43.0.64342455247.issue10299@psf.upfronthosting.co.za> Terry J. Reedy added the comment: +1 from me on a table at the top of the functions page. I am assuming that the markup will induce hotlinks. The main problem I see is the need to hand rewrite when another function is added ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:53:46 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 05 Nov 2010 21:53:46 +0000 Subject: [issue10331] test_gdb failure when warnings printed out In-Reply-To: <1288992626.81.0.692321873477.issue10331@psf.upfronthosting.co.za> Message-ID: <1288994026.85.0.247709265545.issue10331@psf.upfronthosting.co.za> Dave Malcolm added the comment: Alternatively, it looks like having it owned by another user would do this. For curiosity's sake, what's the output of: ls -al /home/barry/.gdbinit on that buildbot? Given that it's a security warning, should this simply be treated as misconfiguration, and be fixed on the buildbot? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:55:48 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Nov 2010 21:55:48 +0000 Subject: [issue1346238] A constant folding optimization pass for the AST Message-ID: <1288994148.33.0.0286429364653.issue1346238@psf.upfronthosting.co.za> Raymond Hettinger added the comment: David, it would be great if an optional AST optimization pass could do something that we don't already have (perhaps, loop invariant code motion when python is called with -OO or somesuch). The AST tree makes it possible for the first time to provide some non-trivial optimizations, so aim high. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:56:23 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 05 Nov 2010 21:56:23 +0000 Subject: [issue10331] test_gdb failure when warnings printed out In-Reply-To: <1288992626.81.0.692321873477.issue10331@psf.upfronthosting.co.za> Message-ID: <1288994183.69.0.820060538304.issue10331@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: It is a misconfiguration. I started my new buildbot with my environment active. I've since killed that and restarted it with a clean ~buildbot environment. So we shouldn't see this in my buildbots any more. (FWIW, ~/.gdbinit is 644) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:59:43 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 05 Nov 2010 21:59:43 +0000 Subject: [issue10300] Documentation of three PyDict_* functions In-Reply-To: <1288853283.95.0.565693563934.issue10300@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: This is fixed now. 2010/11/4 Hagen F?rstenau : > > Hagen F?rstenau added the comment: > > The ReST links in http://docs.python.org/py3k/c-api/dict.html#PyDict_Items seem to be broken. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:05:50 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Nov 2010 22:05:50 +0000 Subject: [issue10321] Add support for Message objects and binary data to smtplib.sendmail In-Reply-To: <1288948061.88.0.822892450886.issue10321@psf.upfronthosting.co.za> Message-ID: <1288994750.64.0.927161504573.issue10321@psf.upfronthosting.co.za> R. David Murray added the comment: New patch that takes a middle ground on the API: sendmail accepts string and bytes, and a new method send_message accepts a Message object with a more convenient signature. I think send_message does belong in smtplib since it would be awkward and unintuitive to put the helper function in email, since one needs to create an SMTP server to call sendmail. I am satisfied with this version; the delta against the existing code and docs is smaller and the API feels clean. The new patch also updates a couple of the email package examples that use sendmail to use send_message (one of the sendmail examples is left untouched). If there are no objections I'll commit this this weekend sometime. ---------- Added file: http://bugs.python.org/file19507/sendmail_message_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:13:42 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Nov 2010 22:13:42 +0000 Subject: [issue10303] small inconsistency in tutorial In-Reply-To: <1288830081.73.0.485204964128.issue10303@psf.upfronthosting.co.za> Message-ID: <1288995222.61.0.315663210388.issue10303@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The sentence should be deleted. Print is *not* used in any of the previous examples. This is the first mention of print() in the chapter and is nonsensical in context. ---------- keywords: +easy nosy: +terry.reedy stage: -> needs patch versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:20:47 2010 From: report at bugs.python.org (Ned Deily) Date: Fri, 05 Nov 2010 22:20:47 +0000 Subject: [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1288995647.92.0.32062081694.issue10318@psf.upfronthosting.co.za> Ned Deily added the comment: I agree with Eric's comment about why have shebang lines at all for files in the standard library. There isn't any use case or recommendation for ever putting /path/to/lib/pythonx.x or its subdirectories directly on a shell search path is there? WRT the three files found in the Mac directory, I think all of these should be left alone for right now. Specifically: Mac/BuildScript/build-installer.py is the script used to build OS X installer images; at the moment, it depends on a system Python 2 as a build tool, primarily because of Sphinx, and there has been an effort to keep the Python 2 and Python 3 versions of the script in sync. Eventually that will need to be changed. The shebang line could simply be removed. Mac/Tools/fixapplepython23.py: this one needs to be looked at a bit more as it runs during the installation process but only on OS X 10.3, a minor and dwindling niche of the user base. I think that it actually depends on the Apple-installed system Python at run time. I'll follow up on it. Mac/Tools/bundlebuilder.py: #! /usr/bin/env python AFAIK, bundlebuilder is neither used during the build process of Python 3 nor is it installed. It is used in the Python 2 build process. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:22:32 2010 From: report at bugs.python.org (James Hutchison) Date: Fri, 05 Nov 2010 22:22:32 +0000 Subject: [issue10332] Multiprocessing maxtasksperchild results in hang In-Reply-To: <1288995752.47.0.110889938296.issue10332@psf.upfronthosting.co.za> Message-ID: <1288995752.47.0.110889938296.issue10332@psf.upfronthosting.co.za> New submission from James Hutchison : v.3.2a3 If the maxtasksperchild argument is used, the program will just hang after whatever that value is rather than working as expected. Tested in Windows XP 32-bit test code: import multiprocessing def f(x): return 0; if __name__ == '__main__': pool = multiprocessing.Pool(processes=2,maxtasksperchild=1); results = list(); for i in range(10): results.append(pool.apply_async(f, (i))); pool.close(); pool.join(); for r in results: print(r); print("Done"); ---------- components: Library (Lib) messages: 120547 nosy: Jimbofbx priority: normal severity: normal status: open title: Multiprocessing maxtasksperchild results in hang versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:24:31 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Nov 2010 22:24:31 +0000 Subject: [issue10332] Multiprocessing maxtasksperchild results in hang In-Reply-To: <1288995752.47.0.110889938296.issue10332@psf.upfronthosting.co.za> Message-ID: <1288995871.28.0.184794385624.issue10332@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +asksol, jnoller type: -> behavior versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:28:57 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Nov 2010 22:28:57 +0000 Subject: [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1288996137.4.0.0926914706198.issue10304@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 1. Rather than add a blank line to the output, the input should have the newline suppressed with \ (which has been done in previous examples). print("""\ 2. It is rather difficult to see that there is no blank at the end (highlight with mouse). I can imagine that either the formatter or display system might delete even if in the master .rst file. In interactive use, the interpreter will go to a new line anyway before printing the >>> prompt. The intent and effect of end=' ' is that the outputs are all on one line (as with 2.x print) instead of each on a separate line ---------- nosy: +terry.reedy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:29:12 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Nov 2010 22:29:12 +0000 Subject: [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1288996152.59.0.550201248754.issue10304@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:33:55 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Nov 2010 22:33:55 +0000 Subject: [issue10321] Add support for Message objects and binary data to smtplib.sendmail In-Reply-To: <1288948061.88.0.822892450886.issue10321@psf.upfronthosting.co.za> Message-ID: <1288996435.98.0.511581338422.issue10321@psf.upfronthosting.co.za> R. David Murray added the comment: One more patch update. This one includes the versionadded/version changed and a minimal What's New entry. ---------- Added file: http://bugs.python.org/file19508/sendmail_message_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:37:20 2010 From: report at bugs.python.org (Malte Helmert) Date: Fri, 05 Nov 2010 22:37:20 +0000 Subject: [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1288996640.4.0.934027495891.issue10304@psf.upfronthosting.co.za> Malte Helmert added the comment: > 1. Rather than add a blank line to the output, the input should have > the newline suppressed with \ (which has been done in previous > examples). > print("""\ I think that would be didactically bad after just mentioning that newlines in triple-quoted strings don't have to be escaped etc. I think this would confuse the reader. Better use print("""Usage... > In interactive use, the interpreter will go to a new line anyway > before printing the >>> prompt. It won't (at least in Python 3.1). I just tried it. > The intent and effect of end=' ' is that the outputs are all on one > line (as with 2.x print) instead of each on a separate line Sure. But I think that in an example that is essentially about whitespace produced by print, the actual whitespace in the output should match the actual behaviour of print. One why to get rid of this problem altogether is to add a 'print "done!"' or whatever at the end, or use a different separator from " ". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:57:08 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Nov 2010 22:57:08 +0000 Subject: [issue10324] Modules/binascii.c: simplify expressions In-Reply-To: <1288960282.63.0.36896617849.issue10324@psf.upfronthosting.co.za> Message-ID: <1288997828.26.0.772250092288.issue10324@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As near as I can tell, since && and || are logical rather than bitwise, and since the variable reference 'quotetabs' has no side effect, you are correct. Have you run the unittest on a patched build? ---------- nosy: +terry.reedy stage: -> commit review type: feature request -> performance versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:00:52 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Nov 2010 23:00:52 +0000 Subject: [issue10328] re.sub[n] doesn't seem to handle /Z replacements correctly in all cases In-Reply-To: <1288967628.79.0.550964963089.issue10328@psf.upfronthosting.co.za> Message-ID: <1288998052.45.0.848140393957.issue10328@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:01:31 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Nov 2010 23:01:31 +0000 Subject: [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1288998091.81.0.834405612339.issue10304@psf.upfronthosting.co.za> R. David Murray added the comment: I think the commit hook might object to the trailing blank (I'm not sure it applies to rst files, but I think it does). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:02:46 2010 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 05 Nov 2010 23:02:46 +0000 Subject: [issue10241] gc fixes for module m_copy attribute In-Reply-To: <1288410530.83.0.095379048444.issue10241@psf.upfronthosting.co.za> Message-ID: <1288998166.54.0.261982647397.issue10241@psf.upfronthosting.co.za> Neil Schemenauer added the comment: The attached patch seems better. The copies of module dicts stored in the interpreter state are dereferenced when the interpreter shuts down. ---------- Added file: http://bugs.python.org/file19509/module_m_copy2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:05:41 2010 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 05 Nov 2010 23:05:41 +0000 Subject: [issue10333] Remove ancient backwards compatibility GC API In-Reply-To: <1288998341.4.0.536091524037.issue10333@psf.upfronthosting.co.za> Message-ID: <1288998341.4.0.536091524037.issue10333@psf.upfronthosting.co.za> New submission from Neil Schemenauer : I think it should be safe to remove some backwards compatibility cruft. This was introduced during the 2.3 development cycle. ---------- files: gc_cruft.txt messages: 120554 nosy: nascheme priority: low severity: normal status: open title: Remove ancient backwards compatibility GC API Added file: http://bugs.python.org/file19510/gc_cruft.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:06:38 2010 From: report at bugs.python.org (Philippe Devalkeneer) Date: Fri, 05 Nov 2010 23:06:38 +0000 Subject: [issue8033] sqlite: broken long integer handling for arguments to user-defined functions In-Reply-To: <1267408991.73.0.408537758811.issue8033@psf.upfronthosting.co.za> Message-ID: <1288998398.42.0.559760706893.issue8033@psf.upfronthosting.co.za> Philippe Devalkeneer added the comment: Hello, Here is a patch to fix it :) ( and don't blame me too much if something is not correct, it's the first patch I submit :) ) Philippe ---------- keywords: +patch nosy: +flupke Added file: http://bugs.python.org/file19511/broken_long_int_sqlite_functions.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:08:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 05 Nov 2010 23:08:13 +0000 Subject: [issue10330] trace module doesn't work without threads In-Reply-To: <1288988479.33.0.578006700843.issue10330@psf.upfronthosting.co.za> Message-ID: <1288998493.67.0.538108766398.issue10330@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I wish I could test this patch but on OSX I get $ ./configure --without-threads $ make Traceback (most recent call last): File "/Users/sasha/Work/python-svn/py3k/Lib/site.py", line 519, in main() File "/Users/sasha/Work/python-svn/py3k/Lib/site.py", line 507, in main known_paths = addusersitepackages(known_paths) File "/Users/sasha/Work/python-svn/py3k/Lib/site.py", line 253, in addusersitepackages user_site = getusersitepackages() File "/Users/sasha/Work/python-svn/py3k/Lib/site.py", line 228, in getusersitepackages user_base = getuserbase() # this will also set USER_BASE File "/Users/sasha/Work/python-svn/py3k/Lib/site.py", line 218, in getuserbase USER_BASE = get_config_var('userbase') File "/Users/sasha/Work/python-svn/py3k/Lib/sysconfig.py", line 580, in get_config_var return get_config_vars().get(name) File "/Users/sasha/Work/python-svn/py3k/Lib/sysconfig.py", line 458, in get_config_vars import re File "/Users/sasha/Work/python-svn/py3k/Lib/re.py", line 121, in import functools File "/Users/sasha/Work/python-svn/py3k/Lib/functools.py", line 15, in from collections import OrderedDict File "/Users/sasha/Work/python-svn/py3k/Lib/collections.py", line 16, in from reprlib import recursive_repr as _recursive_repr File "/Users/sasha/Work/python-svn/py3k/Lib/reprlib.py", line 8, in from _thread import get_ident ImportError: No module named _thread ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:12:59 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Nov 2010 23:12:59 +0000 Subject: [issue10333] Remove ancient backwards compatibility GC API In-Reply-To: <1288998341.4.0.536091524037.issue10333@psf.upfronthosting.co.za> Message-ID: <1288998779.13.0.849786326158.issue10333@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Looks good to me. I suppose everything builds fine? ---------- components: +Extension Modules, Interpreter Core nosy: +pitrou stage: -> commit review versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:21:49 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Nov 2010 23:21:49 +0000 Subject: [issue10197] subprocess.getoutput fails on win32 In-Reply-To: <1288095541.88.0.426506052882.issue10197@psf.upfronthosting.co.za> Message-ID: <1288999309.59.0.556108054178.issue10197@psf.upfronthosting.co.za> ?ric Araujo added the comment: () is used to launch a command in a sub-shell and {} is used to group commands, for example to set up a stream redirection for all commands in brackets. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:32:05 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 05 Nov 2010 23:32:05 +0000 Subject: [issue10330] trace module doesn't work without threads In-Reply-To: <1288988479.33.0.578006700843.issue10330@psf.upfronthosting.co.za> Message-ID: <1288999925.58.0.502533740976.issue10330@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: dummy_threading feels a bit like black magic to me. What do you think about something like issue10330.diff attached. ---------- keywords: +patch Added file: http://bugs.python.org/file19512/issue10330.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:35:23 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Nov 2010 23:35:23 +0000 Subject: [issue10330] trace module doesn't work without threads In-Reply-To: <1288999925.58.0.502533740976.issue10330@psf.upfronthosting.co.za> Message-ID: <1289000116.3563.20.camel@localhost.localdomain> Antoine Pitrou added the comment: > dummy_threading feels a bit like black magic to me. What do you think > about something like issue10330.diff attached. It's fine for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:59:09 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 05 Nov 2010 23:59:09 +0000 Subject: [issue10252] Fix resource warnings in distutils In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1289001549.87.0.389268475185.issue10252@psf.upfronthosting.co.za> Eric Smith added the comment: Is it really true that 3.x's distutils is source compatible with 2.3? For 3.x I'd like to see the with statement used. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:59:54 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 05 Nov 2010 23:59:54 +0000 Subject: [issue1346238] A constant folding optimization pass for the AST Message-ID: <1289001594.62.0.713384511884.issue1346238@psf.upfronthosting.co.za> Dave Malcolm added the comment: I've been working on this against the py3k branch. I'm attaching what I've got so far. I foolishly didn't check the tlee-ast-optimize branch, instead using file6850 as a base. Rune Holm/titanstar, I assume you've signed a PSF contributor agreement? Changes since titanstar's original patch: - rework to apply against py3k - reformatted tabs to 4-space indentation; tried to reformat to PEP-7 as much as possible - added stmt types: With_kind, Nonlocal_kind - added expr types: IfExp_kind, Bytes_kind, SetComp_kind, DictComp_kind, Ellipsis_Kind - removed Print_kind, Exec_kind, Repr_kind - reworked Raise_kind - added "col_offset" and "arena" arguments; pass in the PyArena from the compiler as the context of the visitor - removal of all "free_expr" and "asdl_seq_free" calls on the assumption that PyArena now handles all of this (am I correct in thinking this?) - String -> Bytes in create_ast_from_constant_object - added test_optimize selftest suite, though this is based on bytecode disassembly, rather than direct inspection of the AST - I've fixed it up so it compiles and passes regrtest, but I suspect I've missed optimization possibilities I did a little performance testing using the py3k version of the benchmark suite; currently it's a slight regression for some tests, a slight improvement for others; nothing impressive yet. Thomas Lee's AST optimization branch (branched from r62457) has lots of interesting work: e.g. http://svn.python.org/view/python/branches/tlee-ast-optimize/Python/optimize.c?view=log This appears to not be quite the same starting point; he added a PyCF_NO_OPTIMIZE flag to Include/pythonrun.h (and other places), which seems like a good way to see the effect of the optimization pass. He also removed the peepholer; maybe it's worth doing that, but it seems worth at least keeping the test suite around to ensure a lack of regressions. I can look at cherrypicking Thomas' work/porting it to py3k. Re: "aiming high": I'd love to add new optimizations, but it's not clear to me what's permissable. In particular, is it permissable for an optimization pass to assume that there are no external modifications to the locals within a frame? It's possible to write code like this: frame = inspect.currentframe() inspect.getouterframes(frame)[-depth][0].f_locals[name] = value to manipulate locals; whether or not this actually affects running code in the current implementation of CPython seems hit-or-miss to me right now, I think depending on exactly when fastlocals get written back to the f_locals dictionary (I could have miswritten the precise code). By strategically manipulating locals in other frames, we can break pretty-much any typical compiler optimization: locals can appear or change from under us, or change attribute values, or gain side-effects to their __getattr__ (e.g. writing to disk). If it is permissable for an optimization pass to assume that there are no external modifications to the locals within a frame, then issue 4264 might be one to investigate: this is a patch on top of Tom Lee's work (to do local type-inference to replace list.append with LIST_APPEND). Ideas for other optimizations would be most welcome. ---------- Added file: http://bugs.python.org/file19513/py3k-ast-optimization-2010-11-05-001.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 01:10:15 2010 From: report at bugs.python.org (Dave Malcolm) Date: Sat, 06 Nov 2010 00:10:15 +0000 Subject: [issue1346238] A constant folding optimization pass for the AST Message-ID: <1289002215.12.0.462304330739.issue1346238@psf.upfronthosting.co.za> Dave Malcolm added the comment: Another optimization idea: detect local dictionaries that are only ever used in non-mutating ways, and convert them to constants, rather than rebuilding the dict from scratch each time. See e.g. htmlparser.py:adjustSVGAttributes etc within the bm_html5lib benchmark (though this doesn't seem to be ported to py3k yet) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 01:27:25 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 06 Nov 2010 00:27:25 +0000 Subject: [issue10302] Add class-functions to hash many small objects with hashlib In-Reply-To: <1288824257.88.0.548360154902.issue10302@psf.upfronthosting.co.za> Message-ID: <1289003245.66.0.653378763929.issue10302@psf.upfronthosting.co.za> Gregory P. Smith added the comment: This is an application specific optimization that I'd like to see as its own library or a feature added to NSS or OpenSSL. Regardless if you want this for python, write an extension module and put it on pypy before aiming for the stdlib. I understand the optimization potential but it is a bit obscure. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 01:30:37 2010 From: report at bugs.python.org (Nicolas Kaiser) Date: Sat, 06 Nov 2010 00:30:37 +0000 Subject: [issue10324] Modules/binascii.c: simplify expressions In-Reply-To: <1288960282.63.0.36896617849.issue10324@psf.upfronthosting.co.za> Message-ID: <1289003437.57.0.658971963554.issue10324@psf.upfronthosting.co.za> Nicolas Kaiser added the comment: That's ./Lib/test/test_unittest.py? With patched builds of Python 2.6.5 and 3.1.2: ---------------------------------------------------------------------- Ran 126 tests in 0.015s OK ---------------------------------------------------------------------- Ran 187 tests in 0.054s OK ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 01:40:21 2010 From: report at bugs.python.org (Santoso Wijaya) Date: Sat, 06 Nov 2010 00:40:21 +0000 Subject: [issue8033] sqlite: broken long integer handling for arguments to user-defined functions In-Reply-To: <1267408991.73.0.408537758811.issue8033@psf.upfronthosting.co.za> Message-ID: <1289004021.58.0.591676543402.issue8033@psf.upfronthosting.co.za> Changes by Santoso Wijaya : ---------- nosy: +santa4nt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 02:02:53 2010 From: report at bugs.python.org (Alex) Date: Sat, 06 Nov 2010 01:02:53 +0000 Subject: [issue1346238] A constant folding optimization pass for the AST Message-ID: <1289005373.84.0.252680867012.issue1346238@psf.upfronthosting.co.za> Alex added the comment: ISTM that you don't need to worry about mutating locals, the locals() function is explicitly documented as not necessarily affecting local variables (not sure if frame objects have the same documentation). If you want a free optimization opportunity: BINARY_SUBSCR with a list for the first argument who's contents are all constant, this can be optimized to turn it into a tuple which can be load const'd (as we do in the case of an in check), note that this cannot be used in the case of:: l = [1, 2, 3] l[v] As v.__index__ could theoretically mutate l. ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 02:11:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 01:11:12 +0000 Subject: [issue10252] Fix resource warnings in distutils In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1289005872.32.0.291083969086.issue10252@psf.upfronthosting.co.za> ?ric Araujo added the comment: Fixed in the py3k branch in r86223, r86224 and r86226. Thanks for the report and starting patch. Eric: This compatibility policy was instated because a newer version of distutils may be used/is often used to install distributions for older Pythons. In the 2.x line, this was enforced. I checked the current py3k code with the oldest version I have, 2.4, and it?s not entirely compatible. Python 3.x is developed as a clean break from 2.x (no versionchanged directives in docs,?etc.), so what?s the status of the distutils compatibility policy? I think that the reasons are still valid, so keeping 2.x source compat in py3k is a nice thing to do for our users. Even if we?re working on distutils2 (which will have releases for 2.4-3.2), distutils is still widely used and we expect a long transition period. I can bring this up on python-dev if you think it?s needed. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 02:18:33 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 06 Nov 2010 01:18:33 +0000 Subject: [issue10330] trace module doesn't work without threads In-Reply-To: <1288988479.33.0.578006700843.issue10330@psf.upfronthosting.co.za> Message-ID: <1289006313.99.0.441470123186.issue10330@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I'll commit tonight. BTW, on a without-threads build: >>> import dummy_threading >>> dummy_threading.settrace >>> dummy_threading.settrace.__module__ 'threading' In other words, dummy_threading.settrace is always the same as threading.settrace. Since threading.settrace just sets a global variable which is probably not used by dummy_threading, OP's patch is probably fine, but may not be as future proof. ---------- resolution: -> accepted stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 02:39:23 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 01:39:23 +0000 Subject: [issue10252] Fix resource warnings in distutils In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1289007563.39.0.309664894158.issue10252@psf.upfronthosting.co.za> ?ric Araujo added the comment: (Not closing yet: Some calls of os.popen and subprocess.Popen are still to be fixed, and then there?s the backport.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 02:39:43 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 06 Nov 2010 01:39:43 +0000 Subject: [issue10330] trace module doesn't work without threads In-Reply-To: <1288988479.33.0.578006700843.issue10330@psf.upfronthosting.co.za> Message-ID: <1289007583.52.0.481732356024.issue10330@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in r86229, merged in r86231 (3.1) and r86233 (2.7). ---------- stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 03:22:51 2010 From: report at bugs.python.org (Matthew Barnett) Date: Sat, 06 Nov 2010 02:22:51 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1289010171.3.0.24257538874.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-20101106.zip is a new version of the regex module. Fix for issue 10328, which regex also shared. ---------- Added file: http://bugs.python.org/file19514/issue2636-20101106.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 03:55:06 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Nov 2010 02:55:06 +0000 Subject: [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1289012106.84.0.224800246626.issue10304@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I should have said that IDLE puts >>> on a new line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 03:56:59 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Nov 2010 02:56:59 +0000 Subject: [issue10324] Modules/binascii.c: simplify expressions In-Reply-To: <1288960282.63.0.36896617849.issue10324@psf.upfronthosting.co.za> Message-ID: <1289012219.51.0.751446781166.issue10324@psf.upfronthosting.co.za> Terry J. Reedy added the comment: test_binascii.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 04:03:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 06 Nov 2010 03:03:09 +0000 Subject: [issue10329] trace.py and unicode in Python 3 In-Reply-To: <1288982590.85.0.299607092654.issue10329@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, Nov 5, 2010 at 2:43 PM, Antoine Pitrou wrote: .. > Who are the consumers of the trace files? Is there a formal specification > or is Python the primary consumer? The trace files contain annotated python source code. There is no formal specification that I am aware of as these files are intended for human consumption. .. > Relying on the default encoding is not really a good idea, though. This is good for quick scripts or > in the rare cases where it is by definition the expected behaviour. But in more elaborate cases you > certainly want to decide the encoding by yourself. I agree and the correct encoding seems to be the encoding of the original source file that trace annotates. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 04:21:59 2010 From: report at bugs.python.org (Mark Roddy) Date: Sat, 06 Nov 2010 03:21:59 +0000 Subject: [issue10326] Can't pickle unittest.TestCase instances In-Reply-To: <1288966649.03.0.6620170389.issue10326@psf.upfronthosting.co.za> Message-ID: <1289013719.02.0.139854800994.issue10326@psf.upfronthosting.co.za> Mark Roddy added the comment: Patch which makes TestCase pickle-able for Python 2.7, includes unit test ---------- keywords: +patch nosy: +MarkRoddy Added file: http://bugs.python.org/file19515/python27.pickle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 04:22:53 2010 From: report at bugs.python.org (Mark Roddy) Date: Sat, 06 Nov 2010 03:22:53 +0000 Subject: [issue10326] Can't pickle unittest.TestCase instances In-Reply-To: <1288966649.03.0.6620170389.issue10326@psf.upfronthosting.co.za> Message-ID: <1289013773.45.0.549808729128.issue10326@psf.upfronthosting.co.za> Mark Roddy added the comment: Attaching patch which makes TestCase pickle-able for Python 3.2, includes unit test ---------- Added file: http://bugs.python.org/file19516/python3k.pickle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 04:56:16 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Sat, 06 Nov 2010 03:56:16 +0000 Subject: [issue5412] extend configparser to support mapping access(__*item__) In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1289015776.02.0.876047336546.issue5412@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: Code ==== - The __name__-aversion in the mapping interface is a little heavy-handed, but given the implementation of __name__ elsewhere, I think this can be revisited separately if anyone cares enough. In particular, it should be allowed to give an __name__ value explicitly and have it exposed: >>> import configparser >>> import io >>> cp = configparser.RawConfigParser() >>> cp.read_file(io.StringIO('[sect]\n__name__ = FooBar\n')) >>> cp.get('sect', '__name__') 'FooBar' >>> cp['sect']['__name__'] Traceback (most recent call last): File "", line 1, in File ".../py3k/Lib/configparser.py", line 1132, in __getitem__ raise ValueError(self._noname) ValueError: __name__ special key access and modification not supported through the mapping interface. In this example, the __name__ key isn't special, it's just a key. Documentation ============= - I dislike the 'fallback'/'default' terminology problem; everywhere else, the fallback is called 'default'. This really points to configparser (ne ConfigParser) not having been fully thought out before it was released as part of Python. There's probably nothing to be done about it at this point. Has anyone attempted to determine how widely used the "defaults" (mis-)feature is? I've not seen a good user for it as implemented outside the original application ConfigParser was written for (though others probably exist that have a similar need). - There's no value in saying `None` can be provided as a `fallback` value. (regardless of the terminology). None is a value like any other, and the docs already indicate it is used if provided. If anything need be said, identify the exception raised if the default isn't provided and no value is present. Identifying None as a possible value isn't needed or done in any of the mapping descriptions, so let's not add it here, even for the methods that don't correlate to mapping methods. - I dislike the documentation style where we indicate arguments are keyword-only using a bare * in the signature, and then repeat that in prose (this is not the only place this happens). It's redundant (more work to maintain) and more verbose than helpful. I still need to give the new docs a thorough read. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 05:07:41 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 04:07:41 +0000 Subject: [issue10252] Fix resource warnings in distutils In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1289016461.71.0.900060157169.issue10252@psf.upfronthosting.co.za> ?ric Araujo added the comment: [Pp]open objects closed in r86234. All fixes ported to 3.1 in r86237, 2.7 in r86238. Cheers! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 05:10:00 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 06 Nov 2010 04:10:00 +0000 Subject: [issue10329] trace.py and unicode in Python 3 In-Reply-To: <1288969298.32.0.515004183172.issue10329@psf.upfronthosting.co.za> Message-ID: <1289016600.21.0.75147972422.issue10329@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Attached patch, issue10329.diff fixes the issue by setting the encoding of the coverage file to that of the source file. I am not 100% happy with this patch for the following reasons: 1. It opens the source file one more time. This is probably acceptable because existing code already opens it at least four times when -m (show missing) option is selected. (Twice in find_executable_linenos() and twice in linecache.getlines(). Fixing that would require refactoring of linecache code. 2. This will not work for source code not stored in a file, but provided by a __loader__.get_source() method. However it looks like trace will not work at all in this case, so fixing that is a separate issue. ---------- assignee: -> belopolsky keywords: +needs review Added file: http://bugs.python.org/file19517/issue10329.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 05:13:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 04:13:40 +0000 Subject: [issue10229] Refleak run of test_gettext fails In-Reply-To: <1288348294.62.0.0907397506052.issue10229@psf.upfronthosting.co.za> Message-ID: <1289016820.0.0.331437126365.issue10229@psf.upfronthosting.co.za> ?ric Araujo added the comment: Fixed in r86239. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 05:38:14 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 04:38:14 +0000 Subject: [issue10229] Refleak run of test_gettext fails In-Reply-To: <1288348294.62.0.0907397506052.issue10229@psf.upfronthosting.co.za> Message-ID: <1289018294.28.0.857060987888.issue10229@psf.upfronthosting.co.za> ?ric Araujo added the comment: Added NEWS entry in r86241. Fix (including NEWS entry) backported to 3.1 in r862442 and 2.7 in r86243. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 05:54:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 04:54:25 +0000 Subject: [issue9281] Race condition with mkdir/makedirs in distutils2 In-Reply-To: <1279342839.57.0.133468665449.issue9281@psf.upfronthosting.co.za> Message-ID: <1289019265.96.0.550028339999.issue9281@psf.upfronthosting.co.za> ?ric Araujo added the comment: Fixed in r86244 (py3k), r86245 (3.1), r86246 (2.7), thanks! For distutils2, I?d like to commit a comprehensive fix. Do you want to expand your patch to cover all instances of mkdir/makedirs? ---------- components: -Distutils status: pending -> open title: Race condition in distutils.dir_util.mkpath() -> Race condition with mkdir/makedirs in distutils2 versions: -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 06:26:39 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 05:26:39 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1289021199.82.0.287303754877.issue10273@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 06:38:32 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 05:38:32 +0000 Subject: [issue10228] Refleak run of test_dbm fails when several dbm modules are available In-Reply-To: <1288347112.92.0.717435942769.issue10228@psf.upfronthosting.co.za> Message-ID: <1289021912.16.0.648646257475.issue10228@psf.upfronthosting.co.za> ?ric Araujo added the comment: A quick look makes me think the bug is in the test, not the code. ---------- nosy: +eric.araujo, giampaolo.rodola, michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 07:13:42 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 06:13:42 +0000 Subject: [issue7908] remove leftover macos9 support code In-Reply-To: <1265898907.53.0.125133680219.issue7908@psf.upfronthosting.co.za> Message-ID: <1289024022.86.0.424998211824.issue7908@psf.upfronthosting.co.za> ?ric Araujo added the comment: FTR, see also #9508. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 07:14:43 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 06 Nov 2010 06:14:43 +0000 Subject: [issue10205] Can't have two tags with the same QName In-Reply-To: <1288122049.66.0.916624044666.issue10205@psf.upfronthosting.co.za> Message-ID: <1289024083.39.0.646966802268.issue10205@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 07:18:46 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 06 Nov 2010 06:18:46 +0000 Subject: [issue6269] threading documentation makes no mention of the GIL In-Reply-To: <1244752636.53.0.230892071938.issue6269@psf.upfronthosting.co.za> Message-ID: <1289024326.45.0.111706073951.issue6269@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 07:19:49 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 06:19:49 +0000 Subject: [issue9508] python3.2 reversal of distutils reintrocud macos9 support In-Reply-To: <1280927222.45.0.841645452377.issue9508@psf.upfronthosting.co.za> Message-ID: <1289024389.4.0.727307029603.issue9508@psf.upfronthosting.co.za> ?ric Araujo added the comment: Fixed in r86248, thanks. BTW, my commit removes a bit more than yours originally did. In 2.7, the unused distutils.sysconfig._init_mac function is still left over. I don?t know if killing dead code is acceptable in a stable version. Benjamin? ---------- assignee: tarek -> eric.araujo nosy: +benjamin.peterson, eric.araujo resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 07:26:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 06:26:35 +0000 Subject: [issue3902] Packages containing only extension modules have to contain __init__.py In-Reply-To: <1221761506.23.0.180859211428.issue3902@psf.upfronthosting.co.za> Message-ID: <1289024795.56.0.897218793915.issue3902@psf.upfronthosting.co.za> ?ric Araujo added the comment: Reclassifying as request for doc enhancement. I?ll check the distutils2 doc and add a line about this problem if I find the text is not clear enough. Someone finding this report thanks to the ?easy? keyword can feel free to propose a patch. ---------- components: +Distutils2, Documentation -Distutils keywords: +easy stage: -> needs patch title: distutils does not create __init__.py for packages containing extension modules -> Packages containing only extension modules have to contain __init__.py versions: +3rd party -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 07:28:03 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Nov 2010 06:28:03 +0000 Subject: [issue10334] Add new reST directive for links to source code In-Reply-To: <1289024882.94.0.454472669489.issue10334@psf.upfronthosting.co.za> Message-ID: <1289024882.94.0.454472669489.issue10334@psf.upfronthosting.co.za> New submission from Raymond Hettinger : In a few cases where the pure python source code is a helpful adjunct to the documentation, I've added some links using the "seealso" directive: .. seealso:: Latest version of the `ast module Python source code `_ It would be great if a new directive could be introduced for this purpose. Something like: .. sourcecode Lib/ast.py With a directive, we could easily point the root directory to different releases or to a local source directory for local doc build. ---------- assignee: georg.brandl components: Documentation messages: 120587 nosy: georg.brandl, rhettinger priority: low severity: normal status: open title: Add new reST directive for links to source code type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 07:42:24 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 06:42:24 +0000 Subject: [issue4931] distutils does not show any error msg when can't build C module extensions due to a missing C compiler In-Reply-To: <1231867865.54.0.174725758904.issue4931@psf.upfronthosting.co.za> Message-ID: <1289025744.75.0.647076549215.issue4931@psf.upfronthosting.co.za> ?ric Araujo added the comment: Giampaolo, can you test Amaury?s patch? I?d prefer some testing before committing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 07:45:38 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 06:45:38 +0000 Subject: [issue9709] test_distutils warning: initfunc exported twice on Windows In-Reply-To: <1283101838.76.0.73949668593.issue9709@psf.upfronthosting.co.za> Message-ID: <1289025938.05.0.149752547832.issue9709@psf.upfronthosting.co.za> ?ric Araujo added the comment: I can review a patch for this bug but not write it, lacking knowledge in C. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 07:54:40 2010 From: report at bugs.python.org (Alex) Date: Sat, 06 Nov 2010 06:54:40 +0000 Subject: [issue10334] Add new reST directive for links to source code In-Reply-To: <1289024882.94.0.454472669489.issue10334@psf.upfronthosting.co.za> Message-ID: <1289026480.68.0.152828618497.issue10334@psf.upfronthosting.co.za> Alex added the comment: Seems to me it should be an inline directive (or whatever they're called). i.e. it'd be written:: .. seealso:: Latest version of the :sourcecode:`ast module Python source code `. ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 07:58:03 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 06:58:03 +0000 Subject: [issue10334] Add new reST directive for links to source code In-Reply-To: <1289024882.94.0.454472669489.issue10334@psf.upfronthosting.co.za> Message-ID: <1289026683.05.0.567760885919.issue10334@psf.upfronthosting.co.za> ?ric Araujo added the comment: A directive can take options, for example to control highlighting, display of line numbers, etc. Similar existing constructs like literalinclude are directives. Inline reST things are called roles :) ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 08:13:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 07:13:06 +0000 Subject: [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1289027586.87.0.173923373865.issue10299@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1 on the general idea. I applied the patch and built the documentation to see what the output looks like: The hotlinks are here and work, that?s cool, but I think the table wastes space. You could use five columns without damaging usability (that is, summoning the hateful horizontal scrollbar), even in 800?600 with an uncollapsed sidebar. Alternative ideas like using a special unordered list with automatic CSS?3 flowing or replacing the manual table with a new Sphinx directive would take a lot of time, so consider I?m +1 on whatever you decide best. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 08:18:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 07:18:31 +0000 Subject: [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1289027911.03.0.441186851904.issue10299@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1 on the general idea. I applied the patch and built the documentation to see what the output looks like: The hotlinks are here and work, that?s cool, but I think the table wastes space. You could use five columns without damaging usability (that is, summoning the hateful horizontal scrollbar), even in 800?600 with an uncollapsed sidebar. Alternative ideas like using a special unordered list with automatic CSS?3 flowing or replacing the manual table with a new Sphinx directive would take a lot of time, so consider I?m +1 on whatever you decide best. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 08:20:35 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Nov 2010 07:20:35 +0000 Subject: [issue10334] Add new reST directive for links to source code In-Reply-To: <1289024882.94.0.454472669489.issue10334@psf.upfronthosting.co.za> Message-ID: <1289028035.5.0.127528796937.issue10334@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, I added a "source" role in r86256. It can be used as Alex showed: either like :source:`ast module Python source code ` (with an explicit link title) or like :source:`Lib/ast.py` (where the link title is the file name). ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 08:40:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 07:40:59 +0000 Subject: [issue8910] Write a text file explaining why Lib/test/data exists In-Reply-To: <1275793580.19.0.611567237471.issue8910@psf.upfronthosting.co.za> Message-ID: <1289029259.11.0.499200164297.issue8910@psf.upfronthosting.co.za> ?ric Araujo added the comment: By the way, is this file picked up by Tools/msi/msi.py? ---------- nosy: +loewis versions: -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 08:44:40 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 06 Nov 2010 07:44:40 +0000 Subject: [issue5412] extend configparser to support mapping access(__*item__) In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1289029480.38.0.645753177638.issue5412@psf.upfronthosting.co.za> R. David Murray added the comment: Email uses 'failobj' instead of 'default'. I find that kind of odd, but oh well. I'm not sure how useful a single data point is, but just last month I wrote an application that uses the DEFAULT section. Each configfile section gives a set of parameters describing certain attributes of an input file, and the DEFAULT section gives the default values for each of those parameters. A few years ago I had an application that made heavy use of interpolation and provided for config files that would override 'earlier' config files, and I used the 'defaults' parameter to the constructor to achieve this easily. I'm pretty sure I also added a few defaults programatically, but the memory is a bit hazy (I no longer maintain that application and I don't think it is in use any longer). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 09:18:20 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Nov 2010 08:18:20 +0000 Subject: [issue10273] Clean-up Unittest API In-Reply-To: <1288570422.58.0.20051998916.issue10273@psf.upfronthosting.co.za> Message-ID: <1289031500.61.0.530068851686.issue10273@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > people who are used to the current spelling > will have to notice the change, note that one > name is now deprecated I haven't proposed any deprecations. Just add the new names as aliases. Change the docs list the new names as primary and mention the old name for reference. We don't have to sticking with crummy naming. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 09:34:05 2010 From: report at bugs.python.org (Steven Bethard) Date: Sat, 06 Nov 2010 08:34:05 +0000 Subject: [issue2931] optparse: various problems with unicode and gettext In-Reply-To: <1211297479.44.0.970954846769.issue2931@psf.upfronthosting.co.za> Message-ID: <1289032445.34.0.276262522924.issue2931@psf.upfronthosting.co.za> Steven Bethard added the comment: Yep, argparse almost certainly has the same kind of problems - I basically copied the optparse gettext behavior into argparse because I don't really know how that stuff works but figured people must have wanted what was in there. ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 10:22:20 2010 From: report at bugs.python.org (Nicolas Kaiser) Date: Sat, 06 Nov 2010 09:22:20 +0000 Subject: [issue10324] Modules/binascii.c: simplify expressions In-Reply-To: <1288960282.63.0.36896617849.issue10324@psf.upfronthosting.co.za> Message-ID: <1289035340.92.0.292188887992.issue10324@psf.upfronthosting.co.za> Nicolas Kaiser added the comment: Sorry, found it - with patched builds of Python 2.6.5 and 3.1.2: python2.6 test_binascii.py test_base64invalid (__main__.BinASCIITest) ... ok test_base64valid (__main__.BinASCIITest) ... ok test_crc32 (__main__.BinASCIITest) ... ok test_empty_string (__main__.BinASCIITest) ... ok test_exceptions (__main__.BinASCIITest) ... ok test_functions (__main__.BinASCIITest) ... ok test_hex (__main__.BinASCIITest) ... ok test_qp (__main__.BinASCIITest) ... ok test_uu (__main__.BinASCIITest) ... ok ---------------------------------------------------------------------- Ran 9 tests in 0.002s OK python3.1 test_binascii.py test_base64invalid (__main__.BinASCIITest) ... ok test_base64valid (__main__.BinASCIITest) ... ok test_crc32 (__main__.BinASCIITest) ... ok test_empty_string (__main__.BinASCIITest) ... ok test_exceptions (__main__.BinASCIITest) ... ok test_functions (__main__.BinASCIITest) ... ok test_hex (__main__.BinASCIITest) ... ok test_no_binary_strings (__main__.BinASCIITest) ... ok test_qp (__main__.BinASCIITest) ... ok test_uu (__main__.BinASCIITest) ... ok ---------------------------------------------------------------------- Ran 10 tests in 0.006s OK ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 11:49:39 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Nov 2010 10:49:39 +0000 Subject: [issue10335] tokenize.open_python(): open a Python file with the right encoding In-Reply-To: <1289040579.7.0.473143443383.issue10335@psf.upfronthosting.co.za> Message-ID: <1289040579.7.0.473143443383.issue10335@psf.upfronthosting.co.za> New submission from STINNER Victor : In Python3, the following pattern becomes common: with open(fullname, 'rb') as fp: coding, line = tokenize.detect_encoding(fp.readline) with open(fullname, 'r', encoding=coding) as fp: ... It opens the file is opened twice, whereas it is unnecessary: it's possible to reuse the raw buffer to create a text file. And I don't like the detect_encoding() API: pass the readline function is not intuitive. I propose to create tokenize.open_python() function with a very simple API: just one argument, the filename. This function calls detect_encoding() and only open the file once. Attached python adds the function with an unit test and a patch on the documentation. It patchs also functions currently using detect_encoding(). open_python() only supports read mode. I suppose that it is enough. ---------- components: Library (Lib), Unicode files: open_python.patch keywords: patch messages: 120600 nosy: haypo priority: normal severity: normal status: open title: tokenize.open_python(): open a Python file with the right encoding versions: Python 3.2 Added file: http://bugs.python.org/file19518/open_python.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 11:51:04 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Nov 2010 10:51:04 +0000 Subject: [issue10329] trace.py and unicode in Python 3 In-Reply-To: <1289016600.21.0.75147972422.issue10329@psf.upfronthosting.co.za> Message-ID: <201011061150.54315.victor.stinner@haypocalc.com> STINNER Victor added the comment: > 1. It opens the source file one more time. This is probably acceptable > because existing code already opens it at least four times when -m (show > missing) option is selected. (Twice in find_executable_linenos() and > twice in linecache.getlines(). Fixing that would require refactoring of > linecache code. Create a function like linecache.getencoding() seems to be overkill. I created issue #10335 to add a function tokenize.open_python(): open a Python script in read mode without opening the file twice and get the encoding with detect_encoding(). This issue is more generic than trying to optimize the trace module. > 2. This will not work for source code not stored in a file, but provided by > a __loader__.get_source() method. However it looks like trace will not > work at all in this case, so fixing that is a separate issue. For this case, I think that we can add a try/except IOError with a fallback to encoding = 'utf-8'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 11:55:17 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 06 Nov 2010 10:55:17 +0000 Subject: [issue10336] test_xmlrpc fails if gzip is not supported by client In-Reply-To: <1289040917.15.0.713563652016.issue10336@psf.upfronthosting.co.za> Message-ID: <1289040917.15.0.713563652016.issue10336@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : In test_xmlrpc.py, def test_gsip_response(self): # (sniP) self.assertTrue(a>b) last line can fail if gzip is not supported by client. (gzip is not set in HTTP header's Accept-Encoding) ====================================================================== FAIL: test_gsip_response (__main__.GzipServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "e:\python-dev\py3k\lib\test\test_xmlrpc.py", line 722, in test_gsip_resp onse self.assertTrue(a>b) AssertionError: False is not True ---------- components: Library (Lib) messages: 120602 nosy: ocean-city priority: normal severity: normal status: open title: test_xmlrpc fails if gzip is not supported by client versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 11:56:07 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 06 Nov 2010 10:56:07 +0000 Subject: [issue10336] test_xmlrpc fails if gzip is not supported by client Message-ID: <1289040967.83.0.157032272423.issue10336@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- Removed message: http://bugs.python.org/msg120602 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 11:57:18 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 06 Nov 2010 10:57:18 +0000 Subject: [issue10336] test_xmlrpc fails if gzip is not supported by client In-Reply-To: <1289041038.52.0.266218953067.issue10336@psf.upfronthosting.co.za> Message-ID: <1289041038.52.0.266218953067.issue10336@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : In test_xmlrpc.py, def test_gsip_response(self): # (sniP) self.assertTrue(a>b) last line can fail if gzip is not supported by client. (gzip is not set in HTTP header's Accept-Encoding) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:03:56 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Nov 2010 11:03:56 +0000 Subject: [issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x" In-Reply-To: <1289041435.79.0.181491237155.issue10337@psf.upfronthosting.co.za> Message-ID: <1289041435.79.0.181491237155.issue10337@psf.upfronthosting.co.za> New submission from STINNER Victor : On "NetBSD 5 i386 3.x" buildbot, testTanh() of test_math fails because the sign of wrong. configure scripts has a test to check if tanh(-0.0) keeps the sign or no, and on this buildbot the result is "no". pyconfig.h contains a TANH_PRESERVES_ZERO_SIGN define, but it is not used in Modules/mathmodule.c. Extract of configure comment: # On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of # -0. on some architectures. --- http://www.python.org/dev/buildbot/builders/NetBSD%205%20i386%203.x/builds/237/steps/configure/logs/stdio ... checking whether tanh preserves the sign of zero... no ... http://www.python.org/dev/buildbot/builders/NetBSD%205%20i386%203.x/builds/237/steps/test/logs/stdio ====================================================================== FAIL: testTanh (test.test_math.MathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.smith-netbsd-i386/build/Lib/test/test_math.py", line 898, in testTanh math.copysign(1., -0.)) AssertionError: 1.0 != -1.0 ---------------------------------------------------------------------- ---------- components: Library (Lib) messages: 120604 nosy: haypo priority: normal severity: normal status: open title: testTanh() of test_math fails on "NetBSD 5 i386 3.x" versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:04:21 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Nov 2010 11:04:21 +0000 Subject: [issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x" In-Reply-To: <1289041435.79.0.181491237155.issue10337@psf.upfronthosting.co.za> Message-ID: <1289041461.22.0.822861835157.issue10337@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:05:15 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Nov 2010 11:05:15 +0000 Subject: [issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x" In-Reply-To: <1289041435.79.0.181491237155.issue10337@psf.upfronthosting.co.za> Message-ID: <1289041515.89.0.939360464527.issue10337@psf.upfronthosting.co.za> STINNER Victor added the comment: test_cmath does also fail: http://www.python.org/dev/buildbot/builders/NetBSD%205%20i386%203.x/builds/237/steps/test/logs/stdio ====================================================================== FAIL: test_specific_values (test.test_cmath.CMathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.smith-netbsd-i386/build/Lib/test/test_cmath.py", line 348, in test_specific_values msg=error_message) File "/home/buildbot/buildarea/3.x.smith-netbsd-i386/build/Lib/test/test_cmath.py", line 94, in rAssertAlmostEqual 'got {!r}'.format(a, b)) AssertionError: tanh0002: tanh(complex(-0.0, 0.0)) Expected: complex(-0.0, 0.0) Received: complex(0.0, 0.0) Received value insufficiently close to expected value. ---------------------------------------------------------------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:05:35 2010 From: report at bugs.python.org (Andrew Vant) Date: Sat, 06 Nov 2010 11:05:35 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1289041535.83.0.255043312776.issue1926@psf.upfronthosting.co.za> Andrew Vant added the comment: Here's a second version of the previous patch taking into account the errors Antoine noticed and some odds and ends from the other comments. Specifically: Comments fixed and tabs (I think...I hope...) all removed. Added explicit skip to test_nntplib when attempting to test starttls using a server that doesn't support it. Exceptions raised when issuing STARTTLS for: Authorization already done, TLS already active, server not advertising STARTTLS. Method moving: I'm not sure why the first patch seemed to think I was e.g. moving getwelcome (I wasn't, as far as I knew), but this time I put the new functions at the end of the class and it's no longer doing it. (still a bit of a mess for the code moved from __init__ to login, starttls, and readermode though) Selftest cli option: I threw out what I did before (as pointed out, it didn't work anyway) and added a -l flag to use SSL. It uses port 563 for the test only if the user hasn't asked for a non-default port. I'd like to address some of the objections other users have to the way I implemented it the first time. NNTPS and STARTTLS separation: One objection noted that nntps and STARTTLS support are really separate things and should be handled as such. Actually they're probably right. I did both at once because I view them as simply two ways of performing the same function, as someone mentioned earlier in the thread. Unnecessary Method Separation: One objection noted that separating out login and starttls was unnecessary and the calling program shouldn't have to worry about these steps. I disagree; I think the caller should be able to choose when and if to log in or engage encryption. (in fact I think usenetrc should be false by default for this reason, but I figure that would break backwards compatibility for programs that rely on it being true by default, and I'm not sure what the rules are regarding this) More significant than my own potentially newbie-ish opinion is that the RFC suggests as a valid use case the idea of a client starting up TLS or authentication in reaction to a 483 command response, rather than right off the bat. I'm pretty sure this is impossible under the current setup, where login/encryption happens only at initialization and there's no method exposed to do it later. If I'm going to get overruled on this, I guess the other option is to add a starttls argument to the constructors. If so, I'd suggest it have settings to forbid starttls, use it if it's advertised, or insist on it (by raising an exception if it can't be used). Perhaps false/none/true respectively. Existing issue for AUTHINFO and MODE READER: One objection noted there's already an issue open for them (#10287). Which is true, but the AUTHINFO and MODE READER changes were necessary to make STARTTLS work as intended. (in my opinion, I suppose) So I did them as I went along. I'm not sure if I violated custom there, but my apologies if so. At least having them functioned out will make most of what's mentioned in 10287 easier to fix, I suppose. Randomness: BTW, I've been maintaining the readermode_afterauth thing because of the comment next to it, but it sounds from that other issue like it's not supposed to be there at all...which kind of restores my faith in the universe since it smelled bad from the start to me. ---------- Added file: http://bugs.python.org/file19519/python_nntp_ssl_patch2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:08:03 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Nov 2010 11:08:03 +0000 Subject: [issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x" In-Reply-To: <1289041435.79.0.181491237155.issue10337@psf.upfronthosting.co.za> Message-ID: <1289041683.69.0.151121503247.issue10337@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:12:38 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Nov 2010 11:12:38 +0000 Subject: [issue10338] test_lib2to3 failure on buildbot x86 debian parallel 3.x: node is None in find_root() In-Reply-To: <1289041958.15.0.549624913321.issue10338@psf.upfronthosting.co.za> Message-ID: <1289041958.15.0.549624913321.issue10338@psf.upfronthosting.co.za> New submission from STINNER Victor : http://www.python.org/dev/buildbot/builders/x86%20debian%20parallel%203.x/builds/806/steps/test/logs/stdio test test_lib2to3 failed -- multiple errors occurred ====================================================================== ERROR: test_bom (lib2to3.tests.test_refactor.TestRefactoringTool) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/tests/test_refactor.py", line 239, in test_bom data = self.check_file_refactoring(fn) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/tests/test_refactor.py", line 186, in check_file_refactoring rt.refactor_file(test_file) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/refactor.py", line 348, in refactor_file tree = self.refactor_string(input, filename) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/refactor.py", line 380, in refactor_string self.refactor_tree(tree, name) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/refactor.py", line 441, in refactor_tree find_root(node) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/fixer_util.py", line 276, in find_root while node.type != syms.file_input: AttributeError: 'NoneType' object has no attribute 'type' ====================================================================== ERROR: test_crlf_newlines (lib2to3.tests.test_refactor.TestRefactoringTool) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/tests/test_refactor.py", line 248, in test_crlf_newlines self.check_file_refactoring(fn, fixes) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/tests/test_refactor.py", line 186, in check_file_refactoring rt.refactor_file(test_file) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/refactor.py", line 348, in refactor_file tree = self.refactor_string(input, filename) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/refactor.py", line 380, in refactor_string self.refactor_tree(tree, name) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/refactor.py", line 441, in refactor_tree find_root(node) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/fixer_util.py", line 276, in find_root while node.type != syms.file_input: AttributeError: 'NoneType' object has no attribute 'type' ====================================================================== ERROR: test_file_encoding (lib2to3.tests.test_refactor.TestRefactoringTool) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/tests/test_refactor.py", line 235, in test_file_encoding self.check_file_refactoring(fn) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/tests/test_refactor.py", line 186, in check_file_refactoring rt.refactor_file(test_file) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/refactor.py", line 348, in refactor_file tree = self.refactor_string(input, filename) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/refactor.py", line 380, in refactor_string self.refactor_tree(tree, name) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/refactor.py", line 441, in refactor_tree find_root(node) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/fixer_util.py", line 276, in find_root while node.type != syms.file_input: AttributeError: 'NoneType' object has no attribute 'type' ====================================================================== ERROR: test_unencodable_diff (lib2to3.tests.test_main.TestMain) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/tests/test_main.py", line 36, in test_unencodable_diff ret = self.run_2to3_capture(["-"], input_stream, out_enc, err) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/tests/test_main.py", line 25, in run_2to3_capture return main.main("lib2to3.fixes", args) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/main.py", line 168, in main rt.refactor_stdin() File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/refactor.py", line 393, in refactor_stdin tree = self.refactor_string(input, "") File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/refactor.py", line 380, in refactor_string self.refactor_tree(tree, name) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/refactor.py", line 441, in refactor_tree find_root(node) File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/lib2to3/fixer_util.py", line 276, in find_root while node.type != syms.file_input: AttributeError: 'NoneType' object has no attribute 'type' ---------------------------------------------------------------------- ---------- components: 2to3 (2.x to 3.0 conversion tool) messages: 120607 nosy: benjamin.peterson, haypo priority: normal severity: normal status: open title: test_lib2to3 failure on buildbot x86 debian parallel 3.x: node is None in find_root() versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:12:45 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Nov 2010 11:12:45 +0000 Subject: [issue10338] test_lib2to3 failure on buildbot x86 debian parallel 3.x: node is None in find_root() In-Reply-To: <1289041958.15.0.549624913321.issue10338@psf.upfronthosting.co.za> Message-ID: <1289041965.63.0.153428632001.issue10338@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:48:24 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Nov 2010 11:48:24 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1289041535.83.0.255043312776.issue1926@psf.upfronthosting.co.za> Message-ID: <1289044096.3550.9.camel@localhost.localdomain> Antoine Pitrou added the comment: Thanks for the patch, Andrew. It looks mostly good. I would rename setreadermode to _setreadermode (there's no reason to make it public IMO). Also, I would not explicitly check "STARTTLS" in the capabilities. It the server doesn't support it, it will issue an error anyway. Some servers might support it without advertising it, who knows? I can take care of all that when committing, you don't need to submit a new patch (you can of course, if you want). > (in fact I think usenetrc should be false by default for this reason, > but I figure that would break backwards compatibility for programs > that rely on it being true by default, and I'm not sure what the rules > are regarding this) In 3.2, the reworked nntplib already breaks compatibility. It is reasonable to switch the default for usenetrc to False; but I prefer to do it in a separate commit for clarity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:49:33 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Nov 2010 11:49:33 +0000 Subject: [issue10339] test_lib2to3 leaks In-Reply-To: <1289044173.26.0.233554890418.issue10339@psf.upfronthosting.co.za> Message-ID: <1289044173.26.0.233554890418.issue10339@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This is only on 3.1: $ ./python -m test.regrtest -R 3:3 test_lib2to3 test_lib2to3 beginning 6 repetitions 123456 No handlers could be found for logger "RefactoringTool" ...... test_lib2to3 leaked [32, 32, 32] references, sum=96 ---------- assignee: benjamin.peterson components: 2to3 (2.x to 3.0 conversion tool), Tests messages: 120609 nosy: benjamin.peterson, pitrou priority: normal severity: normal stage: needs patch status: open title: test_lib2to3 leaks type: resource usage versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:57:01 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Sat, 06 Nov 2010 11:57:01 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1289044621.12.0.526567558675.issue1926@psf.upfronthosting.co.za> Julien ?LIE added the comment: > More significant than my own potentially newbie-ish > opinion is that the RFC suggests as a valid use case > the idea of a client starting up TLS or authentication > in reaction to a 483 command response, rather than right > off the bat. Yes. (Currently, it would only be TLS with nntplib, because SASL mechanisms which negotiate an encryption layer are not implemented yet in nntplib. But in case someone wishes to test, I have the following capabilities on my news server, news.trigofacile.com : AUTHINFO USER SASL SASL GSSAPI OTP PLAIN NTLM LOGIN DIGEST-MD5 CRAM-MD5 STARTTLS ) > I'm pretty sure this is impossible under the current setup, > where login/encryption happens only at initialization and > there's no method exposed to do it later. Absolutely. > I've been maintaining the readermode_afterauth thing [...] > it smelled bad from the start to me. Yep. According to RFC 4643: Additionally, the client MUST NOT issue a MODE READER command after authentication, and a server MUST NOT advertise the MODE-READER capability. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 13:12:52 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 06 Nov 2010 12:12:52 +0000 Subject: [issue4931] distutils does not show any error msg when can't build C module extensions due to a missing C compiler In-Reply-To: <1231867865.54.0.174725758904.issue4931@psf.upfronthosting.co.za> Message-ID: <1289045572.68.0.614559072568.issue4931@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I don't have the same setup I had at the time when I submitted the first message so maybe something has changed in meantime. Below is what I get on Windows 2000 SP-3, no VS installed, python 2.7, before and after the patch. C:\Documents and Settings\foo\Desktop\psutil>setup.py build running build running build_py copying psutil\compat.py -> build\lib.win32-2.7\psutil copying psutil\error.py -> build\lib.win32-2.7\psutil copying psutil\_psbsd.py -> build\lib.win32-2.7\psutil copying psutil\_pslinux.py -> build\lib.win32-2.7\psutil copying psutil\_psmswindows.py -> build\lib.win32-2.7\psutil copying psutil\_psosx.py -> build\lib.win32-2.7\psutil copying psutil\_psposix.py -> build\lib.win32-2.7\psutil copying psutil\__init__.py -> build\lib.win32-2.7\psutil running build_ext building '_psutil_mswindows' extension error: Unable to find vcvarsall.bat Although the message is improved ("Unable to find vcvarsall.bat" vs "None") it seems the patch had no effect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 14:19:26 2010 From: report at bugs.python.org (Andrew Vant) Date: Sat, 06 Nov 2010 13:19:26 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1289044096.3550.9.camel@localhost.localdomain> Message-ID: <4CD555EA.24283.1D3AB092@ajvant.gmail.com> Andrew Vant added the comment: On 6 Nov 2010 at 11:48, Antoine Pitrou wrote: > I would rename setreadermode to _setreadermode (there's no reason to > make it public IMO). Also, I would not explicitly check "STARTTLS" in > the capabilities. It the server doesn't support it, it will issue an > error anyway. Some servers might support it without advertising it, > who knows? > > I can take care of all that when committing, you don't need to submit > a new patch (you can of course, if you want). I'd appreciate it if you took care of it, if you feel the patch is otherwise commit-worthy. It takes a pretty excessive amount of time to convince myself that it's really doing what I want it to (and only what I want it to). I forgot to include a note for Misc/NEWS in the new patch version, by the way. > > (in fact I think usenetrc should be false by default for this > > reason, but I figure that would break backwards compatibility for > > programs that rely on it being true by default, and I'm not sure > > what the rules are regarding this) > > In 3.2, the reworked nntplib already breaks compatibility. It is > reasonable to switch the default for usenetrc to False; but I prefer > to do it in a separate commit for clarity. Okay. For the time being I left a note in the documentation pointing out that it had to be set False for starttls to be useful. -- Andrew ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 14:36:08 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 06 Nov 2010 13:36:08 +0000 Subject: [issue9508] python3.2 reversal of distutils reintrocud macos9 support In-Reply-To: <1289024389.4.0.727307029603.issue9508@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: Fine. 2010/11/6 ?ric Araujo : > > ?ric Araujo added the comment: > > Fixed in r86248, thanks. ?BTW, my commit removes a bit more than yours originally did. > > In 2.7, the unused distutils.sysconfig._init_mac function is still left over. ?I don?t know if killing dead code is acceptable in a stable version. ?Benjamin? > > ---------- > assignee: tarek -> eric.araujo > nosy: +benjamin.peterson, eric.araujo > resolution: ?-> fixed > stage: ?-> committed/rejected > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:10:30 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 14:10:30 +0000 Subject: [issue10252] Fix resource warnings in distutils In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1289052630.3.0.105237743521.issue10252@psf.upfronthosting.co.za> ?ric Araujo added the comment: The tests don?t pass on a Windows buildbot (thanks Antoine): I was mistaken about subprocess.Popen, it has no close method like os.popen objects. Attached patch should fix it, can someone kindly review and/or test it? ---------- nosy: +pitrou Added file: http://bugs.python.org/file19520/fix-popen.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:10:51 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 14:10:51 +0000 Subject: [issue10252] Fix resource warnings in distutils In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1289052651.33.0.599822771961.issue10252@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: fixed -> stage: committed/rejected -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:17:42 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 14:17:42 +0000 Subject: [issue9508] python3.2 reversal of distutils reintrocud macos9 support In-Reply-To: <1280927222.45.0.841645452377.issue9508@psf.upfronthosting.co.za> Message-ID: <1289053062.57.0.696659279026.issue9508@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the reply. r86264. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:31:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 14:31:06 +0000 Subject: [issue10335] tokenize.open_python(): open a Python file with the right encoding In-Reply-To: <1289040579.7.0.473143443383.issue10335@psf.upfronthosting.co.za> Message-ID: <1289053866.0.0.375896598541.issue10335@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good. In the test, do you have to remove the TESTFN file manually? Isn?t that handled by unittest or regrtest? I think the name of the function could be better but I don?t have a proposal. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:32:27 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 14:32:27 +0000 Subject: [issue10336] test_xmlrpc fails if gzip is not supported by client In-Reply-To: <1289041038.52.0.266218953067.issue10336@psf.upfronthosting.co.za> Message-ID: <1289053947.83.0.109788164794.issue10336@psf.upfronthosting.co.za> ?ric Araujo added the comment: Do you want to make a patch? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:34:58 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 14:34:58 +0000 Subject: [issue8679] write a distutils to distutils2 converter In-Reply-To: <1273527573.05.0.844239277503.issue8679@psf.upfronthosting.co.za> Message-ID: <1289054098.15.0.586284139293.issue8679@psf.upfronthosting.co.za> ?ric Araujo added the comment: Rejected in http://hg.python.org/distutils2/rev/05f890cbd877: ?Removing the converter. This is not going to work out. We have better ideas about d1 -> d2 migration paths? (like mkpkg, now mkcfg, still to be given a better name :). ---------- dependencies: -add a metadata section in setup.cfg, add a resource+files section in setup.cfg, update mkpkg to latest coding standards resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:56:32 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 06 Nov 2010 14:56:32 +0000 Subject: [issue10340] asyncore doesn't properly handle EINVAL on OSX In-Reply-To: <1289055392.69.0.485144076522.issue10340@psf.upfronthosting.co.za> Message-ID: <1289055392.69.0.485144076522.issue10340@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : http://code.google.com/p/pyftpdlib/issues/detail?id=143 This comes from a user who sent me a report via e-mail. Unfortunately I don't have an OSX box to test against. Code which should replicate the problem is this: import socket, struct s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack('ii', 1, 0)) s.connect(('localhost', 21)) s.close() ...while this is a fix I think it should work: Index: Lib/asyncore.py =================================================================== --- Lib/asyncore.py (revisione 86084) +++ Lib/asyncore.py (copia locale) @@ -242,7 +242,7 @@ try: self.addr = sock.getpeername() except socket.error, err: - if err.args[0] == ENOTCONN: + if err.args[0] in (ENOTCONN, EINVAL): # To handle the case where we got an unconnected # socket. self.connected = False Nosying ixokai as I know he has an OSX box to test against. Setting "high" priority and type == "security" as asyncore-based servers are likely to crash because of this. It might even make sense to backport the fix in Python 2.6 because of the security implications. ---------- components: Library (Lib) keywords: patch messages: 120620 nosy: giampaolo.rodola, ixokai priority: high severity: normal stage: patch review status: open title: asyncore doesn't properly handle EINVAL on OSX type: security versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 16:08:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 15:08:12 +0000 Subject: [issue10341] Remove traces of setuptools In-Reply-To: <1289056092.28.0.82143087387.issue10341@psf.upfronthosting.co.za> Message-ID: <1289056092.28.0.82143087387.issue10341@psf.upfronthosting.co.za> New submission from ?ric Araujo : There are some leftovers of the short-lived presence of setuptools in the CPython source tree, precisely in Tools/msi/msi.py and Makefile.pre.in. Attached patch removes them. ---------- components: Build files: remove-setuptools-leftovers.diff keywords: patch messages: 120621 nosy: eric.araujo, loewis priority: normal severity: normal stage: patch review status: open title: Remove traces of setuptools versions: Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file19521/remove-setuptools-leftovers.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 16:13:05 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 06 Nov 2010 15:13:05 +0000 Subject: [issue10334] Add new reST directive for links to source code In-Reply-To: <1289024882.94.0.454472669489.issue10334@psf.upfronthosting.co.za> Message-ID: <1289056385.26.0.395904390867.issue10334@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 16:14:38 2010 From: report at bugs.python.org (th3flyboy) Date: Sat, 06 Nov 2010 15:14:38 +0000 Subject: [issue8680] Add a sandbox in Distutils2 In-Reply-To: <1273529748.63.0.145688721875.issue8680@psf.upfronthosting.co.za> Message-ID: <1289056478.54.0.677778785661.issue8680@psf.upfronthosting.co.za> th3flyboy added the comment: Hey, even if it's not perfect, it would be nice to at least see partial sand boxing in Python, rather than none at all. I'm working on an open source game project that uses Python, but recently the issue of security came up involving using python scripts with malicious intent or even just on accident that may cause security issues with user generated content. It would be great to be able to see even a built in sandbox that just covers python scripts, let alone calls to C/C++ code. Even if it's not perfect, some is better than none in my opinion. ---------- nosy: +th3flyboy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 16:18:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 15:18:15 +0000 Subject: [issue8680] Add a sandbox in Distutils2 In-Reply-To: <1273529748.63.0.145688721875.issue8680@psf.upfronthosting.co.za> Message-ID: <1289056695.55.0.234478093235.issue8680@psf.upfronthosting.co.za> ?ric Araujo added the comment: We?re saying the same thing :) It all depends on the promise: If you?re making a best-effort sandbox, you?re trying to do the best you can, in cooperation with your users. For a game, I think you want an iron-clad sandbox that is totally error-proof. See https://pypi.python.org/pypi/pysandbox/1.0.3 for such a thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 16:21:40 2010 From: report at bugs.python.org (th3flyboy) Date: Sat, 06 Nov 2010 15:21:40 +0000 Subject: [issue8680] Add a sandbox in Distutils2 In-Reply-To: <1273529748.63.0.145688721875.issue8680@psf.upfronthosting.co.za> Message-ID: <1289056900.34.0.641692863328.issue8680@psf.upfronthosting.co.za> th3flyboy added the comment: Cool, thanks for that link, that should really help. One quick question however, do you or anyone else know if that will work under Python 3, we currently use 2, however it would be nice to be able to future proof for moving to 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 16:22:38 2010 From: report at bugs.python.org (Malte Helmert) Date: Sat, 06 Nov 2010 15:22:38 +0000 Subject: [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1289056958.01.0.312393467621.issue10304@psf.upfronthosting.co.za> Malte Helmert added the comment: I see. (The tutorial really talks about the interactive interpreter though -- I don't think IDLE has been mentioned yet.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 16:26:49 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 06 Nov 2010 15:26:49 +0000 Subject: [issue10342] trace module cannot produce coverage reports for zipped modules In-Reply-To: <1289057209.7.0.964126417973.issue10342@psf.upfronthosting.co.za> Message-ID: <1289057209.7.0.964126417973.issue10342@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Please run attached zip archive as a python script. Note that the problem is not specific for using __main__.py - any module that comes from a zip archive or loaded by a custom loader would show the same bug. $ unzip -l test.zip Archive: test.zip Length Date Time Name -------- ---- ---- ---- 79 10-24-08 18:26 __main__.py -------- ------- 79 1 file $ $ cat __main__.py from trace import Trace def traced(flag): if flag: return 1 else: return 2 tracer = Trace() tracer.runfunc(traced, False) results = tracer.results() results.write_results(coverdir='.') $ python testtrace.zip --- modulename: __main__, funcname: traced Not printing coverage data for 'testtrace.zip/__main__.py': [Errno 20] Not a directory: 'testtrace.zip/__main__.py' __main__.py(4): __main__.py(7): $ ---------- assignee: belopolsky components: Library (Lib) files: testtrace.zip messages: 120626 nosy: belopolsky, haypo priority: normal severity: normal stage: unit test needed status: open title: trace module cannot produce coverage reports for zipped modules type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file19522/testtrace.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 16:33:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 15:33:13 +0000 Subject: [issue8680] Add a sandbox in Distutils2 In-Reply-To: <1273529748.63.0.145688721875.issue8680@psf.upfronthosting.co.za> Message-ID: <1289057593.65.0.24459762281.issue8680@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think there is some py3 support in pysandbox, but I?m not sure, and this discussion is off-topic for this bug tracker. If you don?t find anything in the links on the pysandbox page, feel free to ask on the python-list mailing list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 16:42:22 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Nov 2010 15:42:22 +0000 Subject: [issue10335] tokenize.open_python(): open a Python file with the right encoding In-Reply-To: <1289053866.0.0.375896598541.issue10335@psf.upfronthosting.co.za> Message-ID: <201011061642.14520.victor.stinner@haypocalc.com> STINNER Victor added the comment: > In the test, do you have to remove the TESTFN file manually? Isn?t that > handled by unittest or regrtest? The test uses TESTFN+'.py', not TESTFN ;-) > I think the name of the function could be better but I don?t have a > proposal. Do you prefer a name like tokenize.open()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 16:44:14 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 15:44:14 +0000 Subject: [issue10335] tokenize.open_python(): open a Python file with the right encoding In-Reply-To: <1289040579.7.0.473143443383.issue10335@psf.upfronthosting.co.za> Message-ID: <1289058254.6.0.432995091897.issue10335@psf.upfronthosting.co.za> ?ric Araujo added the comment: > The test uses TESTFN+'.py', not TESTFN ;-) Ah, right. You can use addCleanup then. > Do you prefer a name like tokenize.open()? Hm, tokenize being ?Tokenization help for Python programs?, I think this name is rather good. Or tokenize.open_source. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 16:53:36 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 06 Nov 2010 15:53:36 +0000 Subject: [issue10341] Remove traces of setuptools In-Reply-To: <1289056092.28.0.82143087387.issue10341@psf.upfronthosting.co.za> Message-ID: <1289058816.32.0.237587574973.issue10341@psf.upfronthosting.co.za> Martin v. L?wis added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 16:59:55 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 15:59:55 +0000 Subject: [issue10252] Fix resource warnings in distutils In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1289059195.61.0.592838916158.issue10252@psf.upfronthosting.co.za> ?ric Araujo added the comment: Committed to py3k in r86274, after ?LGTM? from Brian on IRC. Will backport if buildbots don?t scream at me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 17:00:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 06 Nov 2010 16:00:15 +0000 Subject: [issue10335] tokenize.open_python(): open a Python file with the right encoding In-Reply-To: <1289040579.7.0.473143443383.issue10335@psf.upfronthosting.co.za> Message-ID: <1289059215.52.0.745533650542.issue10335@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: +1 on adding the function. Note that it is useful for opening any text file with an encoding cookie, not only python source code, so "tokenize.open()" sounds attractive. Once we are at it, I would like to factor out and document code that extracts the cookie from a decoded string. This functionality is useful for tools that produce annotated source code and want to preserve source encoding in their output. See issue10329. Also, to answer Victor's comment on issue10329, msg120601, while using this function simplifies dealing with source files in trace module, it does not solve all the issues: source file will still be opened separately in linecache.gettines() and find_executable_linenos() and find_executable_linenos() still does not respect __loader__ interface. See issue 10342. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 17:08:43 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 16:08:43 +0000 Subject: [issue10341] Remove traces of setuptools In-Reply-To: <1289056092.28.0.82143087387.issue10341@psf.upfronthosting.co.za> Message-ID: <1289059723.14.0.0907836648442.issue10341@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks, committed to py3k in r86275. Shall I backport to the stable branches? (On another bug, Benjamin told me it was acceptable to remove dead code in stable branches.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 17:12:32 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 06 Nov 2010 16:12:32 +0000 Subject: [issue10341] Remove traces of setuptools In-Reply-To: <1289056092.28.0.82143087387.issue10341@psf.upfronthosting.co.za> Message-ID: <1289059952.94.0.987082882039.issue10341@psf.upfronthosting.co.za> Martin v. L?wis added the comment: In this case, backporting is ok (but IMO not needed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 17:15:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 16:15:15 +0000 Subject: [issue10335] tokenize.open_python(): open a Python file with the right encoding In-Reply-To: <1289040579.7.0.473143443383.issue10335@psf.upfronthosting.co.za> Message-ID: <1289060115.97.0.384816250075.issue10335@psf.upfronthosting.co.za> ?ric Araujo added the comment: > Note that it is useful for opening any text file with an encoding > cookie, not only python source code, This is cool. doctest could benefit from that, I think. > so "tokenize.open()" sounds attractive. Agreed, even though the docstring of tokenize does talk about Python code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 17:17:36 2010 From: report at bugs.python.org (Stephen Hansen) Date: Sat, 06 Nov 2010 16:17:36 +0000 Subject: [issue10340] asyncore doesn't properly handle EINVAL on OSX In-Reply-To: <1289055392.69.0.485144076522.issue10340@psf.upfronthosting.co.za> Message-ID: <1289060256.32.0.604076970886.issue10340@psf.upfronthosting.co.za> Stephen Hansen added the comment: I can verify the problem exists in asyncore at release27-maint on the mac, and that the below patch fixes it. After applying, I ran a full regrtest and nothing new broke. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 17:25:33 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 06 Nov 2010 16:25:33 +0000 Subject: [issue10335] tokenize.open_python(): open a Python file with the right encoding In-Reply-To: <1289060115.97.0.384816250075.issue10335@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Sat, Nov 6, 2010 at 12:15 PM, ?ric Araujo wrote: .. >> so "tokenize.open()" sounds attractive. > Agreed, even though the docstring of tokenize does talk about Python code. I still like "tokenize.open()" more, but for the sake of completeness of discussion, what about open(.., encoding="fromcookie")? (I know, tokenize.detect_encoding() also looks for an utf-8 BOM, so "fromcookie" can be improved.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 17:32:04 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 16:32:04 +0000 Subject: [issue10335] tokenize.open_python(): open a Python file with the right encoding In-Reply-To: <1289040579.7.0.473143443383.issue10335@psf.upfronthosting.co.za> Message-ID: <1289061124.59.0.159662350593.issue10335@psf.upfronthosting.co.za> ?ric Araujo added the comment: I don?t know if it would be okay to depend on tokenize in io. Anyway, I tend to prefer tokenize.open over builtins.open(..., encoding='fromcookie'). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 17:42:08 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 06 Nov 2010 16:42:08 +0000 Subject: [issue10340] asyncore doesn't properly handle EINVAL on OSX In-Reply-To: <1289055392.69.0.485144076522.issue10340@psf.upfronthosting.co.za> Message-ID: <1289061728.86.0.156732887889.issue10340@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: While writing a test case for this I found out another problem in asyncore: handle_connect was erroneously called when the dispatcher delegates the connection to a handler resulting in ENOTCONN being raised. Patch in attachment targeted for python 2.7 should fix both issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 17:42:20 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 06 Nov 2010 16:42:20 +0000 Subject: [issue10340] asyncore doesn't properly handle EINVAL on OSX In-Reply-To: <1289055392.69.0.485144076522.issue10340@psf.upfronthosting.co.za> Message-ID: <1289061740.75.0.98483433353.issue10340@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +josiah.carlson versions: +Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 17:46:36 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 06 Nov 2010 16:46:36 +0000 Subject: [issue10340] asyncore doesn't properly handle EINVAL on OSX In-Reply-To: <1289055392.69.0.485144076522.issue10340@psf.upfronthosting.co.za> Message-ID: <1289061996.3.0.417835228719.issue10340@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Forgot to attach the patch. ---------- Added file: http://bugs.python.org/file19523/asyncore.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 18:23:06 2010 From: report at bugs.python.org (StevenJ) Date: Sat, 06 Nov 2010 17:23:06 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1289064186.46.0.691566209426.issue1926@psf.upfronthosting.co.za> StevenJ added the comment: The only comment I have is, if the caller needs to organise when to auth and instigate tls then for completeness getcapabilities() should have an option to force a reget of the current capabilities, in line with rfc3977 5.2.2: > An NNTP client MAY cache the results of this command, but MUST NOT > rely on the correctness of any cached results, whether from earlier > in this session or from a previous session, MUST cope gracefully > with the cached status being out of date, and SHOULD (if caching > results) provide a way to force the cached information to be > refreshed. As it stands, the nntplib can cause the cached capabilities to be refreshed at certain points automatically (as it should), but I think it should be possible for the caller of the method to also specify that fresh capabilities are required and not cached ones. something like this perhaps? : mynntp.getcapabilites(refresh=True) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 18:39:38 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 17:39:38 +0000 Subject: [issue10341] Remove traces of setuptools In-Reply-To: <1289056092.28.0.82143087387.issue10341@psf.upfronthosting.co.za> Message-ID: <1289065178.48.0.396059932679.issue10341@psf.upfronthosting.co.za> ?ric Araujo added the comment: Given your recent email on python-dev about backporting changes that don?t fix bugs, I will not backport this. 2.5 and 2.6 were fine with the unneeded lines, 2.7 and 3.1 will be too. ---------- assignee: -> eric.araujo resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 18:56:22 2010 From: report at bugs.python.org (Brian Curtin) Date: Sat, 06 Nov 2010 17:56:22 +0000 Subject: [issue10252] Fix resource warnings in distutils In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1289066182.2.0.363282919055.issue10252@psf.upfronthosting.co.za> Changes by Brian Curtin : Added file: http://bugs.python.org/file19524/fix_pipe_close.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 19:01:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Nov 2010 18:01:02 +0000 Subject: [issue10335] tokenize.open_python(): open a Python file with the right encoding In-Reply-To: <1289040579.7.0.473143443383.issue10335@psf.upfronthosting.co.za> Message-ID: <1289066462.7.0.617135521751.issue10335@psf.upfronthosting.co.za> Georg Brandl added the comment: +1 for the feature. However, tokenize.open() sounds a bit unspecific. But I don't really have better suggestions; open_cookie() is wrong too, since it doesn't open cookies :) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 19:04:19 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 18:04:19 +0000 Subject: [issue10252] Fix resource warnings in distutils In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1289066659.82.0.987306368854.issue10252@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the patch. r86276 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 19:22:31 2010 From: report at bugs.python.org (Andrew Vant) Date: Sat, 06 Nov 2010 18:22:31 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1289064186.46.0.691566209426.issue1926@psf.upfronthosting.co.za> Message-ID: <4CD59CF4.16302.1E502F87@ajvant.gmail.com> Andrew Vant added the comment: On 6 Nov 2010 at 17:23, StevenJ wrote: > As it stands, the nntplib can cause the cached capabilities to be > refreshed at certain points automatically (as it should), but I think > it should be possible for the caller of the method to also specify > that fresh capabilities are required and not cached ones. I agree. I actually added a way to do this when I functioned out __init__, so that starttls could refresh it when required. It was ugly and not exposed to the caller though. > something like this perhaps? : > > mynntp.getcapabilites(refresh=True) My method sucked, this one doesn't. Might belong in a separate issue though. (I feel like a bit of a hypocrite saying that now) -- Andrew ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 19:43:12 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Sat, 06 Nov 2010 18:43:12 +0000 Subject: [issue10325] PY_LLONG_MAX & co - preprocessor constants or not? In-Reply-To: <1288979234.76.0.50707642444.issue10325@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: Mark Dickinson writes: > Thanks for the report; I agree that there's a potential issue here, and > I also think that all these definitions *should* be preprocessor > defines. Indeed, my suggestion to castify everything for uniformity was silly: My own PY_TIMEOUT_MAX fix illustrates why that won't promote portability. It breaks code which #ifdefs between using LONG_MAX and PY_LLONG_MAX. > (Idle question: does C99 require that LONG_MAX and friends are > usable in the preprocessor? ...) 5.2.4.2.1p1: Sizes of integer types . > Can you suggest a suitable fix for the PY_ULLONG_MAX and PY_LLONG_MAX > defines? (...) As far as I can tell, PC/pyconfig.h already solves it for Windows. For pyport.h, since you do #define SIZEOF_LONG_LONG: #define PY_LLONG_MAX \ (1 + 2 * ((Py_LL(1) << (CHAR_BIT*SIZEOF_LONG_LONG-2)) - 1)) #define PY_ULLONG_MAX (PY_LLONG_MAX * 2ULL + 1) You could check PY_ULLONG_MAX with a compile-time assertion if you want: #ifndef __cplusplus /* this requires different magic in C++ */ /* Compile-time assertion -- max one per post-preprocessed line */ #define Py_static_assert(expr) Py_static_assert1_(expr, __LINE__) #define Py_static_assert1_(expr, line) Py_static_assert2_(expr, line) #define Py_static_assert2_(expr, line) struct Py_static_assert##line { \ int Assert1_[(expr) ? 9 : -9]; int Assert2_: (expr) ? 9 : -9; } Py_static_assert(PY_ULLONG_MAX == (unsigned long long)-1); #endif /* __cplusplus */ > BTW, do you know of any modern non-Windows platforms that don't define > LLONG_MIN and LLONG_MAX? It may well be that the "two's complement" > fallback hasn't been exercised in recent years. Anyting compiled with strict ANSI pre-C99 mode, e.g. gcc -ansi, which you do have a workaround for. But gcc isn't the only one to be slow in upgrading to C99. And unfortunately, even if Python is built without a compiler's equivalent of -ansi, a user embedding Python might be compiling with it. Beyond that: No, I know none, but I don't know many platforms anyway. >> Incidentally, the "two's complement" comment is wrong. >> It also relies on unsigned long long being widest type with no >> padding bits, and -LLONG_MAX-1 not being a trap representation. > > Agreed---that comment needs to be better. I think it's fine, though, > for practical purposes to assume an absence of padding bits and no trap > representation; IIRC there are places internally (e.g., in the bitwise > operators section of the 'int' type implementation) that already assume > two's complement + no padding bits + no trap representation. I expect so, yes. It's easy to find breakage with non-two's complement, just grep the C code for '~'. I just get peeved when people get this wrong, then document and promote the errors:) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 19:52:07 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Sat, 06 Nov 2010 18:52:07 +0000 Subject: [issue10343] urllib.parse problems with bytes vs str In-Reply-To: <1289069527.47.0.125931197964.issue10343@psf.upfronthosting.co.za> Message-ID: <1289069527.47.0.125931197964.issue10343@psf.upfronthosting.co.za> New submission from Hallvard B Furuseth : urlunparse(url or params = bytes object) produces a result with the repr of the bytes object. urllib.parse.urlunparse(['http', 'host', '/dir', b'params', '', '']) --> "http://host/dir;b'params'" That's confusing since urllib/parse.py goes to a lot of trouble to support both bytes and str. Simplest fix is to only accept str: Index: Lib/urllib/parse.py @@ -219,5 +219,5 @@ def urlunparse(components): scheme, netloc, url, params, query, fragment = components if params: - url = "%s;%s" % (url, params) + url = ';'.join((url, params)) return urlunsplit((scheme, netloc, url, query, fragment)) Some people at comp.lang.python tell me code shouldn't anyway do str() just in case it is needed like urllib does, not that I can make much sense of that discussion. (Subject: harmful str(bytes)). BTW, the str vs bytes code doesn't have to be quite as painful as in urllib.parse, I enclose patch which just rearranges and factors out some code. ---------- components: Library (Lib) files: parse.diff keywords: patch messages: 120647 nosy: hfuru priority: normal severity: normal status: open title: urllib.parse problems with bytes vs str type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file19525/parse.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 20:06:26 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Sat, 06 Nov 2010 19:06:26 +0000 Subject: [issue10325] PY_LLONG_MAX & co - preprocessor constants or not? In-Reply-To: Message-ID: Hallvard B Furuseth added the comment: I wrote: > #define PY_LLONG_MAX \ > (1 + 2 * ((Py_LL(1) << (CHAR_BIT*SIZEOF_LONG_LONG-2)) - 1)) > #define PY_ULLONG_MAX (PY_LLONG_MAX * 2ULL + 1) Eh, Py_ULL(2). > (...) I just get peeved when people get this > wrong, then document and promote the errors:) Just to be clear, I'm peeving at the comment, not the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 21:30:04 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 06 Nov 2010 20:30:04 +0000 Subject: [issue10343] urllib.parse problems with bytes vs str In-Reply-To: <1289069527.47.0.125931197964.issue10343@psf.upfronthosting.co.za> Message-ID: <1289075404.85.0.421975373686.issue10343@psf.upfronthosting.co.za> R. David Murray added the comment: I believe this is effectively a duplicate of issue 9873. If not, it is still probably more appropriate to add commentary there rather than have a separate bug here. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> urllib.parse: Allow bytes in some APIs that use string literals internally _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 22:39:41 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 21:39:41 +0000 Subject: [issue935117] pkgutil doesn't understand case-senseless filesystems Message-ID: <1289079581.92.0.576161558349.issue935117@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 23:11:47 2010 From: report at bugs.python.org (Torsten Landschoff) Date: Sat, 06 Nov 2010 22:11:47 +0000 Subject: [issue850728] Semaphore.acquire() timeout parameter Message-ID: <1289081507.93.0.630775727801.issue850728@psf.upfronthosting.co.za> Torsten Landschoff added the comment: Thanks for applying! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 00:00:18 2010 From: report at bugs.python.org (Santiago Piccinini) Date: Sat, 06 Nov 2010 23:00:18 +0000 Subject: [issue10344] codecs.readline doesn't care buffering=0 In-Reply-To: <1289084418.05.0.231852584468.issue10344@psf.upfronthosting.co.za> Message-ID: <1289084418.05.0.231852584468.issue10344@psf.upfronthosting.co.za> New submission from Santiago Piccinini : codecs.readline has an internal buffer of 72 chars so calling codecs.open with buffering=0 doesn't work as expected although buffering is passed to the underlying __builtin__.open call. Example session: Python 3.2a3+ (py3k, Nov 6 2010, 16:17:14) [GCC 4.5.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import codecs >>> f = codecs.open("foo.txt", "w", "utf-8") >>> word = "bar\n" >>> content = word * 1000 >>> f.write(content) >>> f.close() >>> f = codecs.open("foo.txt", "rb", "utf-8", buffering=0) >>> f.readline() 'bar\n' >>> f.tell() 72 ---------- components: Library (Lib) messages: 120652 nosy: Santiago.Piccinini priority: normal severity: normal status: open title: codecs.readline doesn't care buffering=0 type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 01:11:15 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sun, 07 Nov 2010 00:11:15 +0000 Subject: [issue10344] codecs.readline doesn't care buffering=0 In-Reply-To: <1289084418.05.0.231852584468.issue10344@psf.upfronthosting.co.za> Message-ID: <1289088675.81.0.966361423928.issue10344@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Antoine, should codecs.open() be removed or simply aliased to open()? ---------- nosy: +amaury.forgeotdarc, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 01:37:33 2010 From: report at bugs.python.org (Mark Roddy) Date: Sun, 07 Nov 2010 00:37:33 +0000 Subject: [issue9857] SkipTest in tearDown is reported an as an error In-Reply-To: <1284500719.22.0.435536478708.issue9857@psf.upfronthosting.co.za> Message-ID: <1289090253.13.0.800078564569.issue9857@psf.upfronthosting.co.za> Mark Roddy added the comment: Attaching patch which adds support for registering a skip when raised from tearDown. Per Michael's point regarding failed tests, this is only handled if the test has been successful when SkipTest is raised from tearDown. ---------- keywords: +patch nosy: +MarkRoddy Added file: http://bugs.python.org/file19526/python3k.skipteardown.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 01:39:49 2010 From: report at bugs.python.org (Mark Roddy) Date: Sun, 07 Nov 2010 00:39:49 +0000 Subject: [issue9857] SkipTest in tearDown is reported an as an error In-Reply-To: <1284500719.22.0.435536478708.issue9857@psf.upfronthosting.co.za> Message-ID: <1289090389.06.0.932937183873.issue9857@psf.upfronthosting.co.za> Mark Roddy added the comment: Attaching patch which does the same as the previous for the release27-maint branch. ---------- Added file: http://bugs.python.org/file19527/python27.skipteardown.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 02:07:53 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sun, 07 Nov 2010 01:07:53 +0000 Subject: [issue10344] codecs.readline doesn't care buffering=0 In-Reply-To: <1289088675.81.0.966361423928.issue10344@psf.upfronthosting.co.za> Message-ID: <4CD5FBE3.60906@egenix.com> Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > Antoine, should codecs.open() be removed or simply aliased to open()? Both is not possible: codecs.open() provides a different API than open(). Unlike open(), codecs.open() allow use of all available codecs, not just ones that decode to Unicode. Regarding the issue itself: I think this is a wrong interpretation of what the buffering parameter does. File buffering is different from .readline() buffering (which can be customized on a per-call basis by specifying a size parameter). Besides, switching buffering off in open() is only allowed for binary files, so open() wouldn't "solve" the mentioned behavior. The only way to implement "unbuffered" .readline() in the way that Santiago appears to be after would be to set the size parameter to 1 for all .readline() calls. That would result in very poor performance, though. I think we should close this issue as "won't fix". ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 02:16:45 2010 From: report at bugs.python.org (Ben Gamari) Date: Sun, 07 Nov 2010 01:16:45 +0000 Subject: [issue10345] fcntl.ioctl always fails claiming an invalid fd In-Reply-To: <1289092604.86.0.0417079814942.issue10345@psf.upfronthosting.co.za> Message-ID: <1289092604.86.0.0417079814942.issue10345@psf.upfronthosting.co.za> New submission from Ben Gamari : Even the simple example included below fails in the following manner, $ sudo python3.1 hi.py 3 Traceback (most recent call last): File "hi.py", line 13, in ioctl(a, EVIOCGID, buf, True) TypeError: ioctl requires a file or file descriptor, an integer and optionally an integer or buffer argument As the debugging output demonstrates, the fileno() is in fact a valid fd. #!/usr/bin/python from fcntl import ioctl EVIOCGID = 1 f = open('/dev/input/mouse0', 'w') buf = bytes([0]*128) a = (f.fileno(),) print(a.__class__, a) ioctl(a, EVIOCGID, buf, True) print(buf) ---------- components: Extension Modules messages: 120657 nosy: bgamari priority: normal severity: normal status: open title: fcntl.ioctl always fails claiming an invalid fd versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 02:17:06 2010 From: report at bugs.python.org (Ben Gamari) Date: Sun, 07 Nov 2010 01:17:06 +0000 Subject: [issue10345] fcntl.ioctl always fails claiming an invalid fd In-Reply-To: <1289092604.86.0.0417079814942.issue10345@psf.upfronthosting.co.za> Message-ID: <1289092626.52.0.302014791239.issue10345@psf.upfronthosting.co.za> Changes by Ben Gamari : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 02:41:41 2010 From: report at bugs.python.org (Santiago Piccinini) Date: Sun, 07 Nov 2010 01:41:41 +0000 Subject: [issue10344] codecs.readline doesn't care buffering=0 In-Reply-To: <1289084418.05.0.231852584468.issue10344@psf.upfronthosting.co.za> Message-ID: <1289094101.97.0.0844918224105.issue10344@psf.upfronthosting.co.za> Santiago Piccinini added the comment: Marc-Andre Lemburg wrote: >Regarding the issue itself: I think this is a wrong interpretation of >what the buffering parameter does. File buffering is different >from .readline() buffering (which can be customized on a per-call >basis by specifying a size parameter). Ok. But builtin's readline buffering works like (I) expected. So there is a difference in behavior between builtins readline an codecs.readline (and it bite me). ?Maybe it should be noted in documentation? Python 3.2a3+ (py3k, Nov 6 2010, 16:17:14) [GCC 4.5.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> f = open("foo.txt", "rb", buffering=0) >>> f.readline() b'bar\n' >>> f.tell() 4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 02:42:19 2010 From: report at bugs.python.org (Ben Gamari) Date: Sun, 07 Nov 2010 01:42:19 +0000 Subject: [issue10345] fcntl.ioctl always fails claiming an invalid fd In-Reply-To: <1289092604.86.0.0417079814942.issue10345@psf.upfronthosting.co.za> Message-ID: <1289094139.12.0.0659102538442.issue10345@psf.upfronthosting.co.za> Ben Gamari added the comment: The problem seems to have been that I tried passing mutate_flag. Things seem to work fine when the last parameter is omitted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 03:36:41 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 07 Nov 2010 02:36:41 +0000 Subject: [issue6317] winsound.PlaySound doesn't accept non-unicode string In-Reply-To: <1245548191.7.0.718565157283.issue6317@psf.upfronthosting.co.za> Message-ID: <1289097401.9.0.34586743585.issue6317@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I updated the patch. (I hope we can remove ANSI version of Win32 API, though) ---------- Added file: http://bugs.python.org/file19528/py3k_winsound_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 10:04:49 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Nov 2010 09:04:49 +0000 Subject: [issue10335] tokenize.open_python(): open a Python file with the right encoding In-Reply-To: Message-ID: <201011070518.28941.victor.stinner@haypocalc.com> STINNER Victor added the comment: > what about open(.., encoding="fromcookie")? Please don't do that. It remembers me the magical str.encode() method of Python2. I prefer simple API with limited features: if you want to open a Python script, use tokenize.open(), if you want to open an XML document use any XML library, etc. It remembers me also the discussion about detecting BOM in text files: issue #7651. There was no consensus, and so the issue is still open. For this particular issue, I prefer a specific function tokenize.. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 10:24:48 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Nov 2010 09:24:48 +0000 Subject: [issue10335] tokenize.open_python(): open a Python file with the right encoding In-Reply-To: <1289059215.52.0.745533650542.issue10335@psf.upfronthosting.co.za> Message-ID: <201011070536.00599.victor.stinner@haypocalc.com> STINNER Victor added the comment: On Saturday 06 November 2010 17:00:15 you wrote: > Note that it is useful for opening any text file with an encoding cookie, > not only python source code, so "tokenize.open()" sounds attractive. Ok, the new patch (tokenize_open-2.patch) uses tokenize.open() name and adds a test for BOM without coding cookie (test utf-8-sig encoding). ---------- Added file: http://bugs.python.org/file19529/tokenize_open-2.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Index: Doc/library/tokenize.rst =================================================================== --- Doc/library/tokenize.rst (r??vision 86167) +++ Doc/library/tokenize.rst (copie de travail) @@ -101,16 +101,18 @@ If no encoding is specified, then the default of ``'utf-8'`` will be returned. - :func:`detect_encoding` is useful for robustly reading Python source files. - A common pattern for this follows:: + Use :func:`open` to open Python script: it uses :func:`detect_encoding` to + detect the file encoding. - def read_python_source(file_name): - with open(file_name, "rb") as fp: - encoding = tokenize.detect_encoding(fp.readline)[0] - with open(file_name, "r", encoding=encoding) as fp: - return fp.read() +.. function:: open(filename) + Open a Python script in read mode using the encoding detected by + :func:`detect_encoding`. + + .. versionadded:: 3.2 + + Example of a script rewriter that transforms float literals into Decimal objects:: @@ -153,4 +155,3 @@ result.append((toknum, tokval)) return untokenize(result).decode('utf-8') - Index: Lib/py_compile.py =================================================================== --- Lib/py_compile.py (r??vision 86167) +++ Lib/py_compile.py (copie de travail) @@ -104,9 +104,7 @@ byte-compile all installed files (or all files in selected directories). """ - with open(file, "rb") as f: - encoding = tokenize.detect_encoding(f.readline)[0] - with open(file, encoding=encoding) as f: + with tokenize.open(file) as f: try: timestamp = int(os.fstat(f.fileno()).st_mtime) except AttributeError: Index: Lib/tabnanny.py =================================================================== --- Lib/tabnanny.py (r??vision 86167) +++ Lib/tabnanny.py (copie de travail) @@ -93,11 +93,8 @@ check(fullname) return - with open(file, 'rb') as f: - encoding, lines = tokenize.detect_encoding(f.readline) - try: - f = open(file, encoding=encoding) + f = tokenize.open(file) except IOError as msg: errprint("%r: I/O Error: %s" % (file, msg)) return Index: Lib/tokenize.py =================================================================== --- Lib/tokenize.py (r??vision 86167) +++ Lib/tokenize.py (copie de travail) @@ -29,6 +29,7 @@ from token import * from codecs import lookup, BOM_UTF8 import collections +from io import TextIOWrapper cookie_re = re.compile("coding[:=]\s*([-\w.]+)") import token @@ -335,6 +336,20 @@ return default, [first, second] +_builtin_open = open + +def open(filename): + """ + Open a Python script in read mode with the right encoding. + """ + buffer = _builtin_open(filename, 'rb') + encoding, line = detect_encoding(buffer.readline) + buffer.seek(0) + text = TextIOWrapper(buffer, encoding, line_buffering=True) + text.mode = 'r' + return text + + def tokenize(readline): """ The tokenize() generator requires one argment, readline, which Index: Lib/trace.py =================================================================== --- Lib/trace.py (r??vision 86167) +++ Lib/trace.py (copie de travail) @@ -419,10 +419,9 @@ def find_executable_linenos(filename): """Return dict where keys are line numbers in the line number table.""" try: - with io.FileIO(filename, 'r') as file: - encoding, lines = tokenize.detect_encoding(file.readline) - with open(filename, "r", encoding=encoding) as f: + with tokenize.open_python(filename) as f: prog = f.read() + encoding = f.encoding except IOError as err: print(("Not printing coverage data for %r: %s" % (filename, err)), file=sys.stderr) Index: Lib/linecache.py =================================================================== --- Lib/linecache.py (r??vision 86167) +++ Lib/linecache.py (copie de travail) @@ -123,9 +123,7 @@ else: return [] try: - with open(fullname, 'rb') as fp: - coding, line = tokenize.detect_encoding(fp.readline) - with open(fullname, 'r', encoding=coding) as fp: + with tokenize.open(fullname) as fp: lines = fp.readlines() except IOError: return [] Index: Lib/test/test_tokenize.py =================================================================== --- Lib/test/test_tokenize.py (r??vision 86167) +++ Lib/test/test_tokenize.py (copie de travail) @@ -564,7 +564,8 @@ from test import support from tokenize import (tokenize, _tokenize, untokenize, NUMBER, NAME, OP, - STRING, ENDMARKER, tok_name, detect_encoding) + STRING, ENDMARKER, tok_name, detect_encoding, + open as tokenize_open) from io import BytesIO from unittest import TestCase import os, sys, glob @@ -857,6 +858,27 @@ readline = self.get_readline((b'# coding: bad\n',)) self.assertRaises(SyntaxError, detect_encoding, readline) + def test_open(self): + filename = support.TESTFN + '.py' + self.addCleanup(support.unlink, filename) + + #??test coding cookie + for encoding in ('iso-8859-15', 'utf-8'): + with open(filename, 'w', encoding=encoding) as fp: + print("# coding: %s" % encoding, file=fp) + print("print('euro:\u20ac')", file=fp) + with tokenize_open(filename) as fp: + assert fp.encoding == encoding + assert fp.mode == 'r' + + #??test BOM (no coding cookie) + encoding = 'utf-8-sig' + with open(filename, 'w', encoding=encoding) as fp: + print("print('euro:\u20ac')", file=fp) + with tokenize_open(filename) as fp: + assert fp.encoding == encoding + assert fp.mode == 'r' + class TestTokenize(TestCase): def test_tokenize(self): From report at bugs.python.org Sun Nov 7 10:27:22 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 07 Nov 2010 09:27:22 +0000 Subject: [issue6317] winsound.PlaySound doesn't accept non-unicode string In-Reply-To: <1245548191.7.0.718565157283.issue6317@psf.upfronthosting.co.za> Message-ID: <1289122042.59.0.98075055472.issue6317@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I've committed in r86283(py3k). I'll merge this into release31-maint and release27-maint. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 10:59:47 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 07 Nov 2010 09:59:47 +0000 Subject: [issue6317] winsound.PlaySound doesn't accept non-unicode string In-Reply-To: <1245548191.7.0.718565157283.issue6317@psf.upfronthosting.co.za> Message-ID: <1289123987.44.0.209554262541.issue6317@psf.upfronthosting.co.za> Martin v. L?wis added the comment: As for back-porting: I'm not sure this is a bug in 2.7. It just doesn't support Unicode filenames, but that's not (inherently) a bug. In 3.1, I can agree that it's a bug - but we need to preserve the bytes support for compatibility. For 3.2, dropping the bytes support is fine with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 11:40:20 2010 From: report at bugs.python.org (Alexey Radkov) Date: Sun, 07 Nov 2010 10:40:20 +0000 Subject: [issue10346] strange arithmetic behaviour In-Reply-To: <1289126419.86.0.576404326217.issue10346@psf.upfronthosting.co.za> Message-ID: <1289126419.86.0.576404326217.issue10346@psf.upfronthosting.co.za> New submission from Alexey Radkov : The following excerpt will show the issue: $ python Python 2.7 (r27:82500, Sep 16 2010, 18:02:00) [GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 8 * 4 / ( 2 - 7 ) * 6 / 3 -14 >>> Why it is evaluated to -14 ?? In floating point arithmetic it should be -12.8, in integer arithmetic i believe it should be -12 (at least bc and a small dedicated C program evaluate it to -12). Perhaps i do not understand some specific python arithmetic priority or associativity rules, anyway i cannot find a specific combinations of them to yield -14 in this expression. ---------- components: None messages: 120665 nosy: alexey.radkov priority: normal severity: normal status: open title: strange arithmetic behaviour type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 11:46:21 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 07 Nov 2010 10:46:21 +0000 Subject: [issue6317] winsound.PlaySound doesn't accept non-unicode string In-Reply-To: <1245548191.7.0.718565157283.issue6317@psf.upfronthosting.co.za> Message-ID: <1289126781.02.0.82769715204.issue6317@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: > As for back-porting: I'm not sure this is a bug in 2.7. It just > doesn't support Unicode filenames, but that's not (inherently) > a bug. > In 3.1, I can agree that it's a bug - but we need to preserve the > bytes support for compatibility. I agree. > For 3.2, dropping the bytes support is fine with me. Is this also applied to *all* ANSI Win32 API in other sources? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 11:51:27 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2010 10:51:27 +0000 Subject: [issue10346] strange arithmetic behaviour In-Reply-To: <1289126419.86.0.576404326217.issue10346@psf.upfronthosting.co.za> Message-ID: <1289127087.3.0.59046366113.issue10346@psf.upfronthosting.co.za> Mark Dickinson added the comment: It's not a bug: you're seeing Python's rules for integer division, which do indeed differ from those of (some) other languages when either the divisor or the dividend is negative. For integers x and y, in Python 2.x, x / y gives the floor of the exact quotient. >>> -32 / 5 -7 >>> 32 / -5 -7 In Python 3.x, the '/' operator does 'true division', giving you (a floating-point approximation to) the true result: >>> -32 / 5 -6.4 >>> 32 / -5 -6.4 You can also get this behaviour in Python 2.x if you start your script with 'from __future__ import division'. See the documentation at: http://docs.python.org/reference/expressions.html#binary-arithmetic-operations for more. ---------- nosy: +mark.dickinson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 11:55:55 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 07 Nov 2010 10:55:55 +0000 Subject: [issue10336] test_xmlrpc fails if gzip is not supported by client In-Reply-To: <1289041038.52.0.266218953067.issue10336@psf.upfronthosting.co.za> Message-ID: <1289127355.81.0.140597688099.issue10336@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Sorry, I cannot. I don't know HTTP. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 12:07:55 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2010 11:07:55 +0000 Subject: [issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x" In-Reply-To: <1289041435.79.0.181491237155.issue10337@psf.upfronthosting.co.za> Message-ID: <1289128075.79.0.967786929289.issue10337@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'm not sure what can reasonably be done about these failures. The Python test is failing because of a deficiency in the system math library. Adding extra code to Python to handle this (making use of TANH_PRESERVES_ZERO_SIGN) is an option, but it seems like overkill to me. I definitely don't want to remove these tests---they're valuable. If there's a way of marking the test as an expected failure on NetBSD 5 then that would be fine, I guess. We should also report the problem upstream. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 12:17:45 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2010 11:17:45 +0000 Subject: [issue10297] decimal module documentation is misguiding In-Reply-To: <1288780221.67.0.597486897879.issue10297@psf.upfronthosting.co.za> Message-ID: <1289128665.82.0.19251574573.issue10297@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 12:29:42 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2010 11:29:42 +0000 Subject: [issue10297] decimal module documentation is misguiding In-Reply-To: <1288780221.67.0.597486897879.issue10297@psf.upfronthosting.co.za> Message-ID: <1289129382.31.0.136814132171.issue10297@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in r86286, r86287, r86288. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 12:58:13 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 07 Nov 2010 11:58:13 +0000 Subject: [issue6317] winsound.PlaySound doesn't accept non-unicode string In-Reply-To: <1245548191.7.0.718565157283.issue6317@psf.upfronthosting.co.za> Message-ID: <1289131093.54.0.221771417495.issue6317@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I've committed in r86291(release31-maint). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 13:01:15 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2010 12:01:15 +0000 Subject: [issue10325] PY_LLONG_MAX & co - preprocessor constants or not? In-Reply-To: <1288965372.95.0.322439917087.issue10325@psf.upfronthosting.co.za> Message-ID: <1289131275.13.0.371820955835.issue10325@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch (against py3k) incorporating your suggestions. Would you be willing to review? [Removing Python 2.6 from versions since it's no longer maintained for non-security issues.) ---------- keywords: +patch versions: -Python 2.6 Added file: http://bugs.python.org/file19530/issue10325.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 13:02:39 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2010 12:02:39 +0000 Subject: [issue10325] PY_LLONG_MAX & co - preprocessor constants or not? In-Reply-To: <1288965372.95.0.322439917087.issue10325@psf.upfronthosting.co.za> Message-ID: <1289131359.43.0.119706277347.issue10325@psf.upfronthosting.co.za> Changes by Mark Dickinson : Added file: http://bugs.python.org/file19531/issue10325.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 13:03:00 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2010 12:03:00 +0000 Subject: [issue10325] PY_LLONG_MAX & co - preprocessor constants or not? In-Reply-To: <1288965372.95.0.322439917087.issue10325@psf.upfronthosting.co.za> Message-ID: <1289131380.74.0.485595397598.issue10325@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file19530/issue10325.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 13:17:39 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 07 Nov 2010 12:17:39 +0000 Subject: [issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally In-Reply-To: <1284643512.64.0.708677047597.issue9873@psf.upfronthosting.co.za> Message-ID: <1289132259.65.0.620771892715.issue9873@psf.upfronthosting.co.za> Nick Coghlan added the comment: Just a note for myself when I next update the patch: the 2-tuple returned by defrag needs to be turned into a real result type of its own, and the decode/encode methods on result objects should be tested explicitly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 13:30:59 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2010 12:30:59 +0000 Subject: [issue7652] Merge C version of decimal into py3k. In-Reply-To: <1288754888.21.0.493810987272.issue7652@psf.upfronthosting.co.za> Message-ID: Mark Dickinson added the comment: On Wed, Nov 3, 2010 at 3:28 AM, Case Van Horsen wrote: > Has the cdecimal branch kept up with the hash value changes in 3.2? Not sure; that's a question for Stefan. > Is there a still a chance that cdecimal could be merged into 3.2? A chance, yes; the major need is for someone with time to do a full review. (I'm afraid that's not me, right now.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 13:39:10 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 07 Nov 2010 12:39:10 +0000 Subject: [issue10027] os.lstat/os.stat don't set st_nlink on Windows In-Reply-To: <1286289327.29.0.159315245099.issue10027@psf.upfronthosting.co.za> Message-ID: <1289133550.24.0.241636716264.issue10027@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I found Win32 FileID API. With this library, it seems we can use GetFileInformationByHandleEx before Vista. We can get real file name and hard link count from handle. http://www.microsoft.com/downloads/en/details.aspx?FamilyID=1DECC547-AB00-4963-A360-E4130EC079B8&displaylang=en I don't have a patch, but maybe it is worth to implement it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 13:53:33 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2010 12:53:33 +0000 Subject: [issue10145] float.is_integer is undocumented In-Reply-To: <1287488440.57.0.0400472595143.issue10145@psf.upfronthosting.co.za> Message-ID: <1289134413.22.0.633299688942.issue10145@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in r86293, r86394, r86295. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 14:08:20 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2010 13:08:20 +0000 Subject: [issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4) In-Reply-To: <1286609205.46.0.0704666326351.issue10052@psf.upfronthosting.co.za> Message-ID: <1289135300.81.0.273406643095.issue10052@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for the patch. This looks fine, in principle. A couple of comments and questions: (1) I think the patch should provide *MIN values alongside the *MAX values (for signed types only, of course). (2) Are we sure that these values are valid on all FreeBSD 4 platforms, or should these definitions be further restricted to Free BSD 4 / x86? (3) Are the types of the constants definitely correct? E.g., UINT64_MAX should have type uint64_t. That gets a bit tricky, since we can't use casts (which would prevent these constants being used in preprocessor #ifs), so we need to determine exactly what basic types uint32_t and uint64_t match, and make sure to use the correct suffix (e.g., ULL, LL, UL, L). For uint32_t I guess this is easy: it'll almost certainly be the same type as unsigned int. Is uint64_t defined as unsigned long long, or as unsigned long? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 14:22:01 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 07 Nov 2010 13:22:01 +0000 Subject: [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1289136121.25.0.718608734675.issue10226@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed the wordings in r86296(py3k), r86297(release31-maint) and r86298(release27-maint). David, for the examples you mentioned, the first one's parsing logic follows the explanation that is written. It is correct. For the second example, the port value not being a DIGIT exhibits such a behavior. I am unable to recollect the reason for this behavior. Either the URL is invalid (PORT is not a DIGIT, and parse module is simply ignoring to raise an error - it's okay, given the input is invalid) or it needs to distinguish the ':' as a port separator from path separator for some valid urls. I think, if we find a better reason to change something for the second scenario, we shall address that. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 15:00:55 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Nov 2010 14:00:55 +0000 Subject: [issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x" In-Reply-To: <1289041435.79.0.181491237155.issue10337@psf.upfronthosting.co.za> Message-ID: <1289138455.82.0.460943235854.issue10337@psf.upfronthosting.co.za> STINNER Victor added the comment: Here is a patch skipping math and cmath tests if TANH_PRESERVES_ZERO_SIGN is 0. ---------- keywords: +patch Added file: http://bugs.python.org/file19532/skip_tanh_sign.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 15:11:19 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Nov 2010 14:11:19 +0000 Subject: [issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x" In-Reply-To: <1289041435.79.0.181491237155.issue10337@psf.upfronthosting.co.za> Message-ID: <1289139079.36.0.530417092058.issue10337@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file19533/skip_tanh_sign-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 15:15:42 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Nov 2010 14:15:42 +0000 Subject: [issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x" In-Reply-To: <1289041435.79.0.181491237155.issue10337@psf.upfronthosting.co.za> Message-ID: <1289139342.04.0.947617677658.issue10337@psf.upfronthosting.co.za> STINNER Victor added the comment: Commited to Python 3.2 (r86299) after a review of Mark Dickson on IRC. Thanks Mark ;-) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 15:17:27 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 07 Nov 2010 14:17:27 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1289139447.0.0.0127891503828.issue2001@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'd actually started typing out the command to commit this before it finally clicked that the patch changes public APIs of the pydoc module in incompatible ways. Sure, they aren't documented, but the fact they aren't protected by an underscore means I'm not comfortable with the idea of removing them or radically change their functionality without going through a deprecation period first. I've attached my version of the patch which includes some additional documentation cleanups and a tweak to test_pyclbr (since the pydoc changes broke that test through no fault of their own). However, the public (albeit undocumented) nature of the APIs implementing the old Tk GUI means I'm not comfortable committing the patch in a form that simply drops them without going through a deprecation period first. So, the way forward from here: 1. The good news is beta 1 has been pushed back to December 4 for other reasons, so there's still more time to work on this 2. The gui() function should still open the Tkinter GUI, and the -g option should be retained with its old functionality. Invoking this function should trigger DeprecationWarning. 3. A serve() function to start the web server component should be added back in 4. The new behaviour of opening the web client can be provided as a "browse()" function (that accepts the port number the server is listening on as an argument). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 15:18:34 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2010 14:18:34 +0000 Subject: [issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x" In-Reply-To: <1289041435.79.0.181491237155.issue10337@psf.upfronthosting.co.za> Message-ID: <1289139514.06.0.208145329275.issue10337@psf.upfronthosting.co.za> Mark Dickinson added the comment: Nice fix! Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 15:18:35 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 07 Nov 2010 14:18:35 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1289139515.65.0.0105303734349.issue2001@psf.upfronthosting.co.za> Changes by Nick Coghlan : Added file: http://bugs.python.org/file19534/issue2001_ncoghlan_cleanup.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 15:20:50 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2010 14:20:50 +0000 Subject: [issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x" In-Reply-To: <1289041435.79.0.181491237155.issue10337@psf.upfronthosting.co.za> Message-ID: <1289139650.6.0.371586862951.issue10337@psf.upfronthosting.co.za> Mark Dickinson added the comment: P.S. Greg, as the owner of the buildbot, do you feel like reporting this upstream? I get the impression that it's easier to do the reporting directly from the NetBSD machine in question... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 15:25:15 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 07 Nov 2010 14:25:15 +0000 Subject: [issue10347] regrtest progress counter makes -f option less useful In-Reply-To: <1289139915.05.0.729238355052.issue10347@psf.upfronthosting.co.za> Message-ID: <1289139915.05.0.729238355052.issue10347@psf.upfronthosting.co.za> New submission from Antoine Pitrou : The regrtest progress counter ("[ 1/350]") is very nice but makes it less practical to use the "-f" option to regrtest. ---------- components: Tests messages: 120684 nosy: georg.brandl, pitrou priority: low severity: normal status: open title: regrtest progress counter makes -f option less useful type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 15:29:03 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Nov 2010 14:29:03 +0000 Subject: [issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x" In-Reply-To: <1289139650.6.0.371586862951.issue10337@psf.upfronthosting.co.za> Message-ID: <201011071528.55290.victor.stinner@haypocalc.com> STINNER Victor added the comment: > P.S. Greg, as the owner of the buildbot, do you feel like reporting this > upstream? I get the impression that it's easier to do the reporting > directly from the NetBSD machine in question... I already reported the bug upstream: "Thank you for your problem report. You should receive confirmation of your problem report and an internal identification number by electronic mail in less than 24 hours." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 15:30:53 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 07 Nov 2010 14:30:53 +0000 Subject: [issue10347] regrtest progress counter makes -f option less useful In-Reply-To: <1289139915.05.0.729238355052.issue10347@psf.upfronthosting.co.za> Message-ID: <1289140253.24.0.459931284878.issue10347@psf.upfronthosting.co.za> Georg Brandl added the comment: Right. Let's make -f ignore leading [...] in the file :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 15:31:41 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 07 Nov 2010 14:31:41 +0000 Subject: [issue10329] trace.py and unicode in Python 3 In-Reply-To: <1288969298.32.0.515004183172.issue10329@psf.upfronthosting.co.za> Message-ID: <1289140301.64.0.457534109995.issue10329@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For the record, the test failure can reproduced by the following: $ LANG=C ./python -m test.regrtest test_imp test_trace [1/2] test_imp [2/2] test_trace /home/antoine/py3k/__svn__/Lib/unittest/case.py:402: ResourceWarning: unclosed file <_io.TextIOWrapper name='@test_11986_tmp/os.cover' encoding='ANSI_X3.4-1968'> result.addError(self, sys.exc_info()) test test_trace failed -- Traceback (most recent call last): File "/home/antoine/py3k/__svn__/Lib/test/test_trace.py", line 296, in test_coverage self._coverage(tracer) File "/home/antoine/py3k/__svn__/Lib/test/test_trace.py", line 291, in _coverage r.write_results(show_missing=True, summary=True, coverdir=TESTFN) File "/home/antoine/py3k/__svn__/Lib/trace.py", line 334, in write_results lnotab, count) File "/home/antoine/py3k/__svn__/Lib/trace.py", line 384, in write_results_file outfile.write(line.expandtabs(8)) UnicodeEncodeError: 'ascii' codec can't encode character '\xa0' in position 5: ordinal not in range(128) 1 test OK. 1 test failed: test_trace There's a strange interaction between test_imp and test_trace, it seems. Not sure why. ---------- stage: unit test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 15:38:55 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Nov 2010 14:38:55 +0000 Subject: [issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x" In-Reply-To: <1289041435.79.0.181491237155.issue10337@psf.upfronthosting.co.za> Message-ID: <1289140735.28.0.981909022625.issue10337@psf.upfronthosting.co.za> STINNER Victor added the comment: NetBSD bug report: http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=44057 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 15:49:30 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Nov 2010 14:49:30 +0000 Subject: [issue9561] distutils: set encoding to utf-8 for input and output files In-Reply-To: <1281462699.26.0.0348702049008.issue9561@psf.upfronthosting.co.za> Message-ID: <1289141370.89.0.645495029601.issue9561@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue might be splitted in multiple issue: one issue per file type (eg. Makefile, RPM spec file, etc.). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 16:54:58 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Nov 2010 15:54:58 +0000 Subject: [issue10329] trace.py and unicode in Python 3 In-Reply-To: <1288969298.32.0.515004183172.issue10329@psf.upfronthosting.co.za> Message-ID: <1289145298.67.0.0839554047039.issue10329@psf.upfronthosting.co.za> STINNER Victor added the comment: $ LANG=C ./python -m test.regrtest test_imp test_trace [1/2] test_imp [2/2] test_trace ... UnicodeEncodeError: 'ascii' codec can't encode character '\xa0' in position 5: ordinal not in range(128) issue10329.diff fixes this failure. The failure comes from a nonbreaking space introduced by myself by error in Lib/os.py, which is the only non-ASCII character in this file. r86302 removes it. I commited issue10329.diff to Python 3.2 as r86303: thanks Alex ;-) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 16:56:12 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Nov 2010 15:56:12 +0000 Subject: [issue10342] trace module cannot produce coverage reports for zipped modules In-Reply-To: <1289057209.7.0.964126417973.issue10342@psf.upfronthosting.co.za> Message-ID: <1289145372.69.0.511925195489.issue10342@psf.upfronthosting.co.za> STINNER Victor added the comment: I commited Alexander's fix for #10329: r86303. The trace module now uses the input Python script encoding, instead of the locale encoding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 17:07:01 2010 From: report at bugs.python.org (=?utf-8?q?Ren=C3=A9_Liebscher?=) Date: Sun, 07 Nov 2010 16:07:01 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1289146021.87.0.0920503645176.issue2001@psf.upfronthosting.co.za> Ren? Liebscher added the comment: What about http://bugs.python.org/issue2001#msg114326 ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 23:46:43 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 07 Nov 2010 22:46:43 +0000 Subject: [issue6317] winsound.PlaySound doesn't accept non-unicode string In-Reply-To: <1289126781.02.0.82769715204.issue6317@psf.upfronthosting.co.za> Message-ID: <4CD71418.8080803@v.loewis.de> Martin v. L?wis added the comment: > Is this also applied to *all* ANSI Win32 API > in other sources? No. I think there are backwards compatibility concerns in some of the APIs, so this must be discussed on python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 00:56:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 07 Nov 2010 23:56:03 +0000 Subject: [issue10329] trace.py and unicode in Python 3 In-Reply-To: <1288969298.32.0.515004183172.issue10329@psf.upfronthosting.co.za> Message-ID: <1289174163.42.0.090002162835.issue10329@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Reopening as a reminder to add a unit test for this case. ---------- stage: needs patch -> unit test needed status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 01:00:24 2010 From: report at bugs.python.org (Bobby Impollonia) Date: Mon, 08 Nov 2010 00:00:24 +0000 Subject: [issue775964] fix test_grp failing when NIS entries present Message-ID: <1289174424.96.0.705883355268.issue775964@psf.upfronthosting.co.za> Bobby Impollonia added the comment: Martin, are you able to check in this fix? If not, what should I do and whom should I talk to so this can be checked in? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 01:02:24 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 08 Nov 2010 00:02:24 +0000 Subject: [issue775964] fix test_grp failing when NIS entries present Message-ID: <1289174544.51.0.900521245796.issue775964@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'm able to, but I may not find time. Ask on python-dev; if you feel you need to push this, offer to review issues in return. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 01:04:41 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Nov 2010 00:04:41 +0000 Subject: [issue10347] regrtest progress counter makes -f option less useful In-Reply-To: <1289139915.05.0.729238355052.issue10347@psf.upfronthosting.co.za> Message-ID: <1289174681.73.0.935089209022.issue10347@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Fixed in r86307. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 01:19:11 2010 From: report at bugs.python.org (Jessica McKellar) Date: Mon, 08 Nov 2010 00:19:11 +0000 Subject: [issue5066] IDLE documentation for Unix obsolete/incorrect In-Reply-To: <1232942217.99.0.191249551049.issue5066@psf.upfronthosting.co.za> Message-ID: <1289175551.35.0.616916278933.issue5066@psf.upfronthosting.co.za> Jessica McKellar added the comment: Attached is a patch updating the IDLE web documentation as well as the help file displayed when you click the Help -> Idle Help menu item in IDLE. It looks like the IDLE web documentation was lifted directly from the help file at some point and they have gotten out of sync. The section of the document describing starting IDLE was updated in March of 2009, so I've left that alone. I've updated the Menu option descriptions in both files, including: adding missing items, making the help file and web document descriptions the same, and using a consistent format. The patch is against release27-maint. ---------- keywords: +patch nosy: +jesstess versions: +Python 2.7, Python 3.2 -Python 2.6, Python 3.0 Added file: http://bugs.python.org/file19535/issue5066.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 02:12:56 2010 From: report at bugs.python.org (Kent Johnson) Date: Mon, 08 Nov 2010 01:12:56 +0000 Subject: [issue10303] small inconsistency in tutorial In-Reply-To: <1288830081.73.0.485204964128.issue10303@psf.upfronthosting.co.za> Message-ID: <1289178776.5.0.580896427331.issue10303@psf.upfronthosting.co.za> Kent Johnson added the comment: Attached patch deletes the referenced sentence. ---------- keywords: +patch nosy: +kjohnson Added file: http://bugs.python.org/file19536/issue10303.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 02:26:32 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2010 01:26:32 +0000 Subject: [issue1602] windows console doesn't print utf8 (Py30a2) In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1289179592.47.0.0520616207903.issue1602@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't understand exactly the goal of this issue. Different people described various bugs of the Windows console, but I don't see any problem with Python here. It looks like it's just not possible to display correctly unicode with the Windows console (the whole unicode charset, not the current code page subset). - 65001 code page: it's not the same encoding than utf-8 and so it cannot be set as an alias to utf-8 (see #6058) => nothing to do, or maybe document that PYTHONIOENCODING=utf-8 workaround... But if you do that, you may get strange errors when writing to stdout or stderr like "IOError: [Errno 13] Permission denied" or "IOError: [Errno 2] No such file or directory" ... - chcp command sets the console encoding, which is stupid because the console still expects text encoded to the previous code page => Windows (chcp command) bug, chcp command should not be used (it doesn't solve any problem, it just makes the situation worse) - use the console API instead of read()/write() to fix this issue: it doesn't work, the console is completly buggy (msg120414) => Windows (console) bug - use "Lucida Console" font avoids some issue => I don't think that the Python interpreter should configure the console (using SetCurrentConsoleFontEx?), it's not the role of Python To me, there is nothing to do, and so I close the bug. If you would like to fix a particular Python bug, open a new specific issue. If you consider that I'm wrong, Python should fix this issue and you know how, please reopen it. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 02:32:29 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 08 Nov 2010 01:32:29 +0000 Subject: [issue10342] trace module cannot produce coverage reports for zipped modules In-Reply-To: <1289057209.7.0.964126417973.issue10342@psf.upfronthosting.co.za> Message-ID: <1289179949.97.0.506698613746.issue10342@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a "proof of concept" patch. The trace code is in a dire need of restructuring to eliminate repeated reading of source files. ---------- keywords: +needs review, patch nosy: +eli.bendersky, terry.reedy stage: unit test needed -> patch review Added file: http://bugs.python.org/file19537/issue10342.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 02:37:36 2010 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Nov 2010 01:37:36 +0000 Subject: [issue10316] tkFileDialog.askopenfilenames scrambling multiple file selection In-Reply-To: <1288904171.11.0.911089821654.issue10316@psf.upfronthosting.co.za> Message-ID: <1289180256.21.0.268915313979.issue10316@psf.upfronthosting.co.za> Ned Deily added the comment: Postscript: I've subsequently noticed Issue5712 in which somewhat similar symptoms are reported but, so far, only on Windows systems. If your problem is not yet resolved, you might want to chime in there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 02:41:38 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 08 Nov 2010 01:41:38 +0000 Subject: [issue10342] trace module cannot produce coverage reports for zipped modules In-Reply-To: <1289057209.7.0.964126417973.issue10342@psf.upfronthosting.co.za> Message-ID: <1289180498.43.0.572854479495.issue10342@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 02:47:16 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2010 01:47:16 +0000 Subject: [issue10342] trace module cannot produce coverage reports for zipped modules In-Reply-To: <1289057209.7.0.964126417973.issue10342@psf.upfronthosting.co.za> Message-ID: <1289180836.84.0.156023568366.issue10342@psf.upfronthosting.co.za> STINNER Victor added the comment: + try: + with open(filename, 'rb') as fp: + encoding, _ = tokenize.detect_encoding(fp.readline) + except IOError: + encoding = None You should use 'utf-8' instead of None (which will fall back to the locale encoding) here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 02:57:28 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 08 Nov 2010 01:57:28 +0000 Subject: [issue10342] trace module cannot produce coverage reports for zipped modules In-Reply-To: <1289180836.84.0.156023568366.issue10342@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Sun, Nov 7, 2010 at 8:47 PM, STINNER Victor wrote: > > STINNER Victor added the comment: > > + ? ? ? ? ? ?try: > + ? ? ? ? ? ? ? ?with open(filename, 'rb') as fp: > + ? ? ? ? ? ? ? ? ? ?encoding, _ = tokenize.detect_encoding(fp.readline) > + ? ? ? ? ? ?except IOError: > + ? ? ? ? ? ? ? ?encoding = None > > You should use 'utf-8' instead of None (which will fall back to the locale encoding) here. > I know. I was too lazy to look up the correct spelling for the proof of concept. I am really posting this patch to show how this bug can be fixed in theory and discuss how much of refactoring is acceptable. For example, do we need to preserve trace.find_strings() function? What is the best way to pass around source code? - file-like objects, line iterators, readline-like function? Also compile(prog, filename, "exec") to find module's bytecode is a hack. There must be a standard way to achieve that which would use a .pyc file if available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 02:57:39 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2010 01:57:39 +0000 Subject: [issue10348] multiprocessing: use SYSV semaphores on FreeBSD In-Reply-To: <1289181459.49.0.601327253766.issue10348@psf.upfronthosting.co.za> Message-ID: <1289181459.49.0.601327253766.issue10348@psf.upfronthosting.co.za> New submission from STINNER Victor : Support POSIX semaphore on FreeBSD is recent, optional (eg. disabled by default in FreeBSD 7) and limited (30 semaphores). SYSV should be used instead because they are less limited or more adjustable (at runtime: POSIX semaphore requires to recompile the kernel!). This issue should fix test_concurrent_futures on FreeBSD 7.2 and 8.0: many tests use more than 30 semaphores. The maximum is test_all_completed_some_already_completed: 52 semaphores. ---------- components: Library (Lib) keywords: buildbot messages: 120705 nosy: db3l, haypo priority: normal severity: normal status: open title: multiprocessing: use SYSV semaphores on FreeBSD versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 02:57:53 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 08 Nov 2010 01:57:53 +0000 Subject: [issue10303] small inconsistency in tutorial In-Reply-To: <1288830081.73.0.485204964128.issue10303@psf.upfronthosting.co.za> Message-ID: <1289181473.5.0.859372344423.issue10303@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in r86310. print was used in some examples following its mention, so a simple introduction to it was okay. It is introduced properly further down in the tutorial. ---------- nosy: +orsenthil resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 02:59:25 2010 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Nov 2010 01:59:25 +0000 Subject: [issue10342] trace module cannot produce coverage reports for zipped modules In-Reply-To: <1289057209.7.0.964126417973.issue10342@psf.upfronthosting.co.za> Message-ID: <1289181565.06.0.986097998457.issue10342@psf.upfronthosting.co.za> Brett Cannon added the comment: The handling of __loader__ looks fine to me, although I don't quite see the point of the get_source call as it isn't returned or used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 03:03:33 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 08 Nov 2010 02:03:33 +0000 Subject: [issue10342] trace module cannot produce coverage reports for zipped modules In-Reply-To: <1289181565.06.0.986097998457.issue10342@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Sun, Nov 7, 2010 at 8:59 PM, Brett Cannon wrote: > .. I don't quite see the point of the get_source call as it isn't returned or used. It is passed to find_docstrings() to produce the "strs" dictionary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 03:35:43 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2010 02:35:43 +0000 Subject: [issue10348] multiprocessing: use SysV semaphores on FreeBSD In-Reply-To: <1289181459.49.0.601327253766.issue10348@psf.upfronthosting.co.za> Message-ID: <1289183743.78.0.837530403139.issue10348@psf.upfronthosting.co.za> STINNER Victor added the comment: It looks like SysV semaphores are also preferred on Darwin. So I suppose that Mac OS X would also benefit of this issue. Maybe also other OSes (Solaris?). See also issue #7272. ---------- nosy: +jnoller title: multiprocessing: use SYSV semaphores on FreeBSD -> multiprocessing: use SysV semaphores on FreeBSD _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 03:37:28 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Nov 2010 02:37:28 +0000 Subject: [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1289183848.54.0.770619572048.issue10226@psf.upfronthosting.co.za> R. David Murray added the comment: Senthil, no it isn't. There is no way to know a priori that ':80' represents a port number rather than a path, absent the // introducer for the netloc. This bug is fixed; I ought to open a new one for the path thing but perhaps I will wait for a user report instead :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 04:53:03 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2010 03:53:03 +0000 Subject: [issue10308] Modules/getpath.c bugs In-Reply-To: <1288870063.75.0.834981100194.issue10308@psf.upfronthosting.co.za> Message-ID: <1289188383.35.0.82373707.issue10308@psf.upfronthosting.co.za> STINNER Victor added the comment: 3.2a3 chunk#2 cannot fail because PyUnicode_AsWideChar() only returns -1 if the first argument is NULL, whereas we just checked that decoded is not NULL. But it would be better to fix the variable type to avoid future bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 05:11:52 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2010 04:11:52 +0000 Subject: [issue6058] Add cp65001 to encodings/aliases.py In-Reply-To: <1242692494.35.0.391765957832.issue6058@psf.upfronthosting.co.za> Message-ID: <1289189512.32.0.346021503816.issue6058@psf.upfronthosting.co.za> STINNER Victor added the comment: Different tests proved that cp65001 can *not* be set as an alias to utf-8, and that's why I'm closing this issue. Anyway, I don't think that cp65001 is configured by default on any Windows setup. It is only set by the user, using the chcp command, to try to display unicode characters in the Windows console: but it is not possible to display any unicode character in this console (see issue #1602). And chcp command should not be used in the Windows console because it does not only change the ANSI code page: it changes also the console code page, which is wrong (the console still expect text encoded to the previous code page). It is possible to implement a codec for cp65001 using utf-8 existing codec in surrogatepass mode, or by using MultiByteToWideChar() / WideCharToMultiByte() with codepage=CP_UTF8. But I don't think that we need cp65001 at all. If you need cp65001 for a good reason and you would like to implement a cp65001 Python codec, open a new issue. If you consider that we should use _O_U8TEXT or _O_U16TEXT, open another new issue. _O_U8TEXT or _O_U16TEXT might improve unicode support if Python output is redirected to a pipe, but I don't think that it would help to display unicode character in the Windows console. I also fear that it breaks existing code and any function not aware of this special mode. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 06:10:26 2010 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 08 Nov 2010 05:10:26 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1289193026.4.0.572429510623.issue2986@psf.upfronthosting.co.za> Eli Bendersky added the comment: Adding a documentation patch for 3.1 which is similar to the 2.6 documentation patch that's been committed by Georg into 2.6 ---------- Added file: http://bugs.python.org/file19538/issue2986.docs31.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 07:21:07 2010 From: report at bugs.python.org (Jeong-Min Lee) Date: Mon, 08 Nov 2010 06:21:07 +0000 Subject: [issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input In-Reply-To: <1190630936.13.0.318924236509.issue1195@psf.upfronthosting.co.za> Message-ID: <1289197267.96.0.632845964813.issue1195@psf.upfronthosting.co.za> Changes by Jeong-Min Lee : ---------- nosy: +falsetru _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 07:52:23 2010 From: report at bugs.python.org (Prabhu Gurumurthy) Date: Mon, 08 Nov 2010 06:52:23 +0000 Subject: [issue10349] Error in Module/python.c when building on OpenBSD 4.8 In-Reply-To: <1289199143.28.0.506984185363.issue10349@psf.upfronthosting.co.za> Message-ID: <1289199143.28.0.506984185363.issue10349@psf.upfronthosting.co.za> New submission from Prabhu Gurumurthy : When manually building on OpenBSD 4.8 using gcc 4.2.1, I got the following error: g++ -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I/usr/home/pgurumur/temp/Python-3.1.2/Include -DTHREAD_STACK_SIZE=0x20000 -fPIC -I/usr/include -DPy_BUILD_CORE -o Modules/python.o /usr/home/pgurumur/temp/Python-3.1.2/Modules/python.ccc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++/usr/home/pgurumur/temp/Python-3.1.2/Modules/python.c: In function 'wchar_t* char2wchar(char*)':/usr/home/pgurumur/temp/Python-3.1.2/Modules/python.c:60: error: invalid conversion from 'void*' to 'wchar_t*'*** Error code 1 I changed line 60 from: res = PyMem_Malloc(argsize*sizeof(wchar_t)); to: res = (wchar_t *)PyMem_Malloc(argsize*sizeof(wchar_t)); I was able to compile it successfully, another thing you would notice is that, -Wstrict-prototypes is not a valid option with g++, (just a warning though) My configure options: /usr/home/pgurumur/temp/Python-3.1.2/configure --with-fpectl --with-threads --srcdir=/usr/home/pgurumur/temp/Python-3.1.2 --enable-ipv6 --enable-shared --with-cxx_main --with-signal-module --prefix=/opt/local ---------- components: Build messages: 120714 nosy: pgurumur priority: normal severity: normal status: open title: Error in Module/python.c when building on OpenBSD 4.8 versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 08:33:40 2010 From: report at bugs.python.org (Bill Barrett) Date: Mon, 08 Nov 2010 07:33:40 +0000 Subject: [issue10217] python-2.7.amd64.msi install fails In-Reply-To: <1288234706.92.0.436900381953.issue10217@psf.upfronthosting.co.za> Message-ID: <1289201620.18.0.512662478776.issue10217@psf.upfronthosting.co.za> Bill Barrett added the comment: Same problem here. I also tried command line launch and get the same warning dialog as I got by clicking Firefox Download. My install "seems" to basically work however. I used Task Manager to kill the Install Application to avoid unrolling the installation. ---------- nosy: +Bill.Barrett versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 08:59:00 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 08 Nov 2010 07:59:00 +0000 Subject: [issue10349] Error in Module/python.c when building on OpenBSD 4.8 In-Reply-To: <1289199143.28.0.506984185363.issue10349@psf.upfronthosting.co.za> Message-ID: <1289203140.13.0.736671109242.issue10349@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Out of curiosity: why are you building with --with-cxx_main? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 09:03:07 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 08 Nov 2010 08:03:07 +0000 Subject: [issue10217] python-2.7.amd64.msi install fails In-Reply-To: <1288234706.92.0.436900381953.issue10217@psf.upfronthosting.co.za> Message-ID: <1289203387.03.0.119820241155.issue10217@psf.upfronthosting.co.za> Martin v. L?wis added the comment: IIUC, Manfred's pythonInstallLog.zip is now from a successful installation, so it is unfortunately of little help. We really would need a log of a failed installation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 09:35:37 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Mon, 08 Nov 2010 08:35:37 +0000 Subject: [issue10325] PY_LLONG_MAX & co - preprocessor constants or not? In-Reply-To: <1289131275.13.0.371820955835.issue10325@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: Mark Dickinson writes: > Here's a patch (against py3k) incorporating your suggestions. Would you > be willing to review? Looks fine to me. (Actually the gcc branch makes the same assumptions as the final branch, but then I expect gcc itself does too.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 09:48:18 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Mon, 08 Nov 2010 08:48:18 +0000 Subject: [issue10350] errno is read too late In-Reply-To: <1289206098.51.0.17539694799.issue10350@psf.upfronthosting.co.za> Message-ID: <1289206098.51.0.17539694799.issue10350@psf.upfronthosting.co.za> New submission from Hallvard B Furuseth : errno is sometimes read too late after the error: After another call may have modified it. Here's a patch against py3k. Most of it or a variant applies to 2.7 too, but I haven't really looked at that. I've not looked at math code, where I don't even know what sets errno. There might also be a late errno read at Modules/_ctypes/callproc.c line 794: "space[0] = errno;". Does it want the errno from before _ctypes_get_errobj()? I'm unsure what's going on there. Modules/_multiprocessing/semaphore.c doesn't need the patch's extra variable, it can instead be rearranged with the commented-out patch. ---------- components: None files: late-errno.diff keywords: patch messages: 120719 nosy: hfuru priority: normal severity: normal status: open title: errno is read too late type: behavior versions: Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file19539/late-errno.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 10:11:33 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Mon, 08 Nov 2010 09:11:33 +0000 Subject: [issue10325] PY_LLONG_MAX & co - preprocessor constants or not? In-Reply-To: Message-ID: Hallvard B Furuseth added the comment: I wrote: >> BTW, do you know of any modern non-Windows platforms that don't define >> LLONG_MIN and LLONG_MAX? It may well be that the "two's complement" >> fallback hasn't been exercised in recent years. > > Anyting compiled with strict ANSI pre-C99 mode, e.g. gcc -ansi, (...) which also disables 'long long', so such examples are moot. duh. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 10:22:40 2010 From: report at bugs.python.org (Valery Khamenya) Date: Mon, 08 Nov 2010 09:22:40 +0000 Subject: [issue10351] to introduce autocompletion for keys in dictionaries (patch attached) In-Reply-To: <1289208160.65.0.489934250712.issue10351@psf.upfronthosting.co.za> Message-ID: <1289208160.65.0.489934250712.issue10351@psf.upfronthosting.co.za> New submission from Valery Khamenya : 1. The patch introduces autocompletion for keys in dictionaries (patch attached) 2. The patched rlcompleter as such works OK for unicode dictionary keys as well. All tests pass OK. HOWEVER, readline's completion mechanism seem to be confused with unicode strings -- see comments to Completer.dict_key_matches(). So, perhaps, one day some changes should be applied to readline code too. 3. rlcompleter.py has no tests in trunk -- I spawn a separate issue for it. Meanwhile I took test_rlcompleter.py from 2.7 and extended it. 4. The following usual lines in .pythonstartup: import readline import rlcompleter readline.parse_and_bind('tab: complete') readline.parse_and_bind('Control-Space: complete') should be extended by this one: readline.set_completer_delims(re.compile(r'[\'"\\[]').sub('', readline.get_completer_delims())) ---------- components: Library (Lib) files: rlcompleter-dict-keys-autocompletion.tar.gz messages: 120721 nosy: Valery.Khamenya priority: normal severity: normal status: open title: to introduce autocompletion for keys in dictionaries (patch attached) type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file19540/rlcompleter-dict-keys-autocompletion.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 10:27:43 2010 From: report at bugs.python.org (Valery Khamenya) Date: Mon, 08 Nov 2010 09:27:43 +0000 Subject: [issue10352] rlcompleter.py has no tests in trunk In-Reply-To: <1289208463.71.0.79566317851.issue10352@psf.upfronthosting.co.za> Message-ID: <1289208463.71.0.79566317851.issue10352@psf.upfronthosting.co.za> New submission from Valery Khamenya : rlcompleter.py has no test_rlcompleter in trunk, see http://svn.python.org/view/python/trunk/Lib/test/ There is one in 2.7 though. Remark: the issue http://bugs.python.org/issue10351 introduces autocompletion patch and comes with new tests. So, one may want to use it as for up-to-date test_rlcompleter.py, given the issue #10351 is accepted ;-) ---------- components: Library (Lib), Tests messages: 120722 nosy: Valery.Khamenya priority: normal severity: normal status: open title: rlcompleter.py has no tests in trunk versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 10:41:11 2010 From: report at bugs.python.org (Ron Adam) Date: Mon, 08 Nov 2010 09:41:11 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1289209271.24.0.902315896878.issue2001@psf.upfronthosting.co.za> Ron Adam added the comment: > What about http://bugs.python.org/issue2001#msg114326 ? Thanks for the reminder. To Nick: >However, the public (albeit undocumented) nature of the APIs >implementing the old Tk GUI means I'm not comfortable committing the >patch in a form that simply drops them without going through a >deprecation period first. I think it would be ok sense this is a 'user' interface rather than a programming interface, but it won't hurt to ask specifically about this on python dev. I got the impression that pydoc is considered a 'user' tool like idle, that just happens to live in lib, so the rules aren't considered to be quite as strict as it would be if it was a module meant to be used by other modules or programs. >3. A serve() function to start the web server component should be >added back in There is a _startserver() function. The leading underscore can be removed, or it can be renamed to serve. A serve() function could also just call _startserver(). >2. The gui() function should still open the Tkinter GUI, >and the -g option should be retained with its old functionality. >Invoking this function should trigger DeprecationWarning. > >4. The new behaviour of opening the web client can be provided >as a "browse()" function (that accepts the port number the >server is listening on as an argument). After the patch the gui() function starts the server with a server text command window, and opens the browser to the correct page. If you close the browser, you can use 'b' at the server prompt to reopen the browser at the address it is serving. It sounds like you want "serve()" to just start the server. and "browse()" to just start the browser. The gui() function does both in one step. What would be the equivalent new way of doing both in one step, if gui() retains the old tk behavior? Cheers, Ron ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:10:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 08 Nov 2010 10:10:02 +0000 Subject: [issue10352] rlcompleter.py has no tests in trunk In-Reply-To: <1289208463.71.0.79566317851.issue10352@psf.upfronthosting.co.za> Message-ID: <1289211002.59.0.103112504208.issue10352@psf.upfronthosting.co.za> Georg Brandl added the comment: trunk is no longer active. The real "trunk" is the py3k branch, which does have test_rlcompleter. ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:42:18 2010 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Mon, 08 Nov 2010 10:42:18 +0000 Subject: [issue10329] trace.py and unicode in Python 3 In-Reply-To: <1288969298.32.0.515004183172.issue10329@psf.upfronthosting.co.za> Message-ID: <1289212938.44.0.401999020635.issue10329@psf.upfronthosting.co.za> Walter D?rwald added the comment: Using the original encoding of the Python source file might be the politically correct thing to do, but it complicates handling of the output of trace.py. For each file you have to do the encoding detection dance again. It would be great if I could specify which encoding trace.py use (with the files encoding being the default). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:48:17 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2010 10:48:17 +0000 Subject: [issue10329] trace.py and unicode in Python 3 In-Reply-To: <1288969298.32.0.515004183172.issue10329@psf.upfronthosting.co.za> Message-ID: <1289213297.51.0.299688121399.issue10329@psf.upfronthosting.co.za> STINNER Victor added the comment: > ... it complicates handling of the output of trace.py. > For each file you have to do the encoding detection dance again ... What? You just have to call one function! tokenize.open() :-) Well, ok, it's not commited yet, but it looks like most people agree: #10335. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:58:43 2010 From: report at bugs.python.org (Weeble) Date: Mon, 08 Nov 2010 10:58:43 +0000 Subject: [issue2304] subprocess under windows fails to quote properly when shell=True In-Reply-To: <1205685138.96.0.183811169845.issue2304@psf.upfronthosting.co.za> Message-ID: <1289213923.54.0.0789267279027.issue2304@psf.upfronthosting.co.za> Weeble added the comment: Is there any way to write code that's safe with or without this fix? If I have code that currently does this: subprocess.check_call('""c:\some path with spaces" arg1 arg2 "a quoted arg""', shell=True) ...will it break when running on a version of Python with this fix? Is there any good way to detect whether the running Python has this fix or not? ---------- nosy: +weeble _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:03:43 2010 From: report at bugs.python.org (Peter) Date: Mon, 08 Nov 2010 11:03:43 +0000 Subject: [issue10353] 2to3 and places argument in unitests assertAlmostEqual In-Reply-To: <1289214223.54.0.6247578407.issue10353@psf.upfronthosting.co.za> Message-ID: <1289214223.54.0.6247578407.issue10353@psf.upfronthosting.co.za> New submission from Peter : Consider the following example unit test using assertAlmostEqual which uses the places argument as a positional argument, call this places.py: import unittest class Tests(unittest.TestCase): def test_equal_to_five_decimal_places(self): """Check assertAlmostEqual using decimal places""" self.assertAlmostEqual(0.123456789, 0.123456, 5) if __name__ == "__main__": runner = unittest.TextTestRunner(verbosity = 2) unittest.main(testRunner=runner) This works fine with Python 2.6.6 (Linux), $ python2.6 places.py Check assertAlmostEqual using decimal places ... ok ---------------------------------------------------------------------- Ran 1 test in 0.000s OK Trying 2to3 on it reports no changes needed: $ 2to3 places.py RefactoringTool: Skipping implicit fixer: buffer RefactoringTool: Skipping implicit fixer: idioms RefactoringTool: Skipping implicit fixer: set_literal RefactoringTool: Skipping implicit fixer: ws_comma RefactoringTool: No changes to places.py RefactoringTool: Files that need to be modified: RefactoringTool: places.py Trying the test as is under Python 3.1.2 (Linux) fails: $ python3.1 places.py test_equal_to_five_decimal_places (__main__.Tests) Check assertAlmostEqual using decimal places ... ERROR ====================================================================== ERROR: test_equal_to_five_decimal_places (__main__.Tests) Check assertAlmostEqual using decimal places ---------------------------------------------------------------------- Traceback (most recent call last): File "places.py", line 5, in test_equal_to_five_decimal_places self.assertAlmostEqual(0.123456789, 0.123456, 5) TypeError: assertAlmostEqual() takes exactly 3 positional arguments (4 given) ---------------------------------------------------------------------- Ran 1 test in 0.001s FAILED (errors=1) The test can be fixed to run on Python 3.1 (any Python 2.6) by supplying the places argument by name: import unittest class Tests(unittest.TestCase): def test_equal_to_five_decimal_places(self): """Check assertAlmostEqual using decimal places""" self.assertAlmostEqual(0.123456789, 0.123456, places=5) if __name__ == "__main__": runner = unittest.TextTestRunner(verbosity = 2) unittest.main(testRunner=runner) Note http://docs.python.org/library/unittest.html does not explicitly discuss passing places by name vs position. On the other hand, http://docs.python.org/py3k/library/unittest.html explicitly shows the by name form only. I think the 2to3 script needs to be extended to use the places argument by name. ---------- components: 2to3 (2.x to 3.0 conversion tool) messages: 120728 nosy: maubp priority: normal severity: normal status: open title: 2to3 and places argument in unitests assertAlmostEqual type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:28:15 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Nov 2010 11:28:15 +0000 Subject: [issue10354] tempfile.template is broken In-Reply-To: <1289215695.29.0.553789101836.issue10354@psf.upfronthosting.co.za> Message-ID: <1289215695.29.0.553789101836.issue10354@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : >>> import tempfile >>> tempfile.template = 'XXX' >>> tempfile.mkdtemp() '/tmp/tmpPf5lML' >>> Functions that use template use it as an argument default, so changing it afterwards has no effect. ---------- components: Library (Lib) messages: 120729 nosy: giampaolo.rodola priority: normal severity: normal status: open title: tempfile.template is broken versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:33:25 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Nov 2010 11:33:25 +0000 Subject: [issue10354] tempfile.template is broken In-Reply-To: <1289215695.29.0.553789101836.issue10354@psf.upfronthosting.co.za> Message-ID: <1289216005.49.0.517041849355.issue10354@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Patch in attachment. ---------- keywords: +patch Added file: http://bugs.python.org/file19541/tempfile.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:40:26 2010 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 08 Nov 2010 11:40:26 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1289216426.75.0.456243272271.issue2001@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yeah, I'll ask for feedback on python-dev regarding the API breakage. If we decide not to break the existing API, I'd suggest the following: - keep both the old serve() and the old gui() (with DeprecationWarning added to both) (I'd forgotten your point in the previous python-dev thread that gui() would need changes to work with the new server, which isn't worth the hassle) - use _startserver(port=0) and _browse(port, *, start=False) for the new components (with the -b option invoking _browse with start=True) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:44:37 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 08 Nov 2010 11:44:37 +0000 Subject: [issue10354] tempfile.template is broken In-Reply-To: <1289215695.29.0.553789101836.issue10354@psf.upfronthosting.co.za> Message-ID: <1289216677.4.0.23658742247.issue10354@psf.upfronthosting.co.za> Eric Smith added the comment: The patch looks good to me, but it needs a test. ---------- nosy: +eric.smith stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:52:56 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 08 Nov 2010 11:52:56 +0000 Subject: [issue10228] Refleak run of test_dbm fails when several dbm modules are available In-Reply-To: <1288347112.92.0.717435942769.issue10228@psf.upfronthosting.co.za> Message-ID: <1289217176.27.0.741239014086.issue10228@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- nosy: -michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:53:51 2010 From: report at bugs.python.org (Pascal Chambon) Date: Mon, 08 Nov 2010 11:53:51 +0000 Subject: [issue10327] Abnormal SSL timeouts when using socket timeouts - once again In-Reply-To: <1288967513.64.0.717673746201.issue10327@psf.upfronthosting.co.za> Message-ID: <1289217231.25.0.21509444521.issue10327@psf.upfronthosting.co.za> Pascal Chambon added the comment: Allright, it actually looks more like a pathological latency behaviour of my target platforms than a ssl bug... I was mislead by the heavy history of socket.settimeout(), sorry. >_< ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 13:04:59 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Nov 2010 12:04:59 +0000 Subject: [issue10354] tempfile.template is broken In-Reply-To: <1289215695.29.0.553789101836.issue10354@psf.upfronthosting.co.za> Message-ID: <1289217899.27.0.314434224421.issue10354@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Patch including tests is in attachment. I think I've just found two further bugs though: >>> tempfile.TemporaryFile().name '' >>> tempfile.TemporaryFile(prefix='xxx').name '' >>> tempfile.SpooledTemporaryFile().name Traceback (most recent call last): File "", line 1, in File "/home/giampaolo/svn/python-2.7/Lib/tempfile.py", line 574, in name return self._file.name AttributeError: 'cStringIO.StringO' object has no attribute 'name' I'm going to open two separate tickets. ---------- Added file: http://bugs.python.org/file19542/tempfile.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 13:07:09 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Nov 2010 12:07:09 +0000 Subject: [issue10354] tempfile.template is broken In-Reply-To: <1289215695.29.0.553789101836.issue10354@psf.upfronthosting.co.za> Message-ID: <1289218029.65.0.00170556994445.issue10354@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Adding georg.brandl to nosy list as per misc/maintainers.rst. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 13:14:02 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Nov 2010 12:14:02 +0000 Subject: [issue10355] SpooledTemporaryFile's name property is broken In-Reply-To: <1289218442.71.0.42635989391.issue10355@psf.upfronthosting.co.za> Message-ID: <1289218442.71.0.42635989391.issue10355@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : >>> import tempfile >>> tempfile.SpooledTemporaryFile().name Traceback (most recent call last): File "", line 1, in File "/home/giampaolo/svn/python-2.7/Lib/tempfile.py", line 574, in name return self._file.name AttributeError: 'cStringIO.StringO' object has no attribute 'name' ---------- messages: 120736 nosy: georg.brandl, giampaolo.rodola priority: normal severity: normal status: open title: SpooledTemporaryFile's name property is broken versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 13:23:13 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Nov 2010 12:23:13 +0000 Subject: [issue10354] tempfile.template is broken In-Reply-To: <1289215695.29.0.553789101836.issue10354@psf.upfronthosting.co.za> Message-ID: <1289218993.11.0.537015845078.issue10354@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Created issue 10355 for SpooledTemporaryFile bug while TemporaryFile having no name seems to be rightful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 13:34:03 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 08 Nov 2010 12:34:03 +0000 Subject: [issue10356] decimal.py: hash of -1 In-Reply-To: <1289219643.76.0.519336821084.issue10356@psf.upfronthosting.co.za> Message-ID: <1289219643.76.0.519336821084.issue10356@psf.upfronthosting.co.za> New submission from Stefan Krah : When the __hash__ method is called directly, the hash of -1 is -1: >>> from decimal import * >>> Decimal(-1).__hash__() -1 >>> hash(Decimal(-1)) -2 I've a patch, which also sneaks in a ValueError. ---------- components: Library (Lib) files: decimal_hash.patch keywords: needs review, patch messages: 120738 nosy: mark.dickinson, skrah priority: normal severity: normal stage: patch review status: open title: decimal.py: hash of -1 type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file19543/decimal_hash.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 14:16:27 2010 From: report at bugs.python.org (Fergal Daly) Date: Mon, 08 Nov 2010 13:16:27 +0000 Subject: [issue10357] ** and "mapping" are poorly defined in python docs In-Reply-To: <1289222187.72.0.886873143688.issue10357@psf.upfronthosting.co.za> Message-ID: <1289222187.72.0.886873143688.issue10357@psf.upfronthosting.co.za> New submission from Fergal Daly : According to the index, the only place that mentions ** in argument lists is http://docs.python.org/tutorial/controlflow.html#index-1099 and gives no indication of what an object must support to allow **. When you attempt to ** an object the real attribute exception is suppressed and you get a message "argument after ** must be a mapping" "mapping" is quite loosely defined. There are 3 definitions, the glossary entry seems the most complete http://docs.python.org/library/stdtypes.html#index-625 http://docs.python.org/reference/datamodel.html#index-842 http://docs.python.org/glossary.html#term-mapping But even the glossary entry doesn't tell you what you need for **. Only by reading the C source code did I discover that to be usable in **, an object must implement .keys() and .__getitem__(). The docs either should add .keys() to the definition of mapping or the code should use some other term or simply allow the original exception to reach the user. ---------- assignee: docs at python components: Documentation messages: 120739 nosy: Fergal.Daly, docs at python priority: normal severity: normal status: open title: ** and "mapping" are poorly defined in python docs versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 14:22:13 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Nov 2010 13:22:13 +0000 Subject: [issue10357] ** and "mapping" are poorly defined in python docs In-Reply-To: <1289222187.72.0.886873143688.issue10357@psf.upfronthosting.co.za> Message-ID: <1289222533.94.0.694593241237.issue10357@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 14:23:08 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Nov 2010 13:23:08 +0000 Subject: [issue10350] errno is read too late In-Reply-To: <1289206098.51.0.17539694799.issue10350@psf.upfronthosting.co.za> Message-ID: <1289222588.33.0.698198902754.issue10350@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 14:37:22 2010 From: report at bugs.python.org (Peter Hall) Date: Mon, 08 Nov 2010 13:37:22 +0000 Subject: [issue5712] tkinter - askopenfilenames returns string instead of tuple in windows 2.6.1 release In-Reply-To: <1239039911.64.0.172824576559.issue5712@psf.upfronthosting.co.za> Message-ID: <1289223442.42.0.66781636567.issue5712@psf.upfronthosting.co.za> Peter Hall added the comment: There seems some similarity between this issue and issue #10316 which occurs on Linux. ---------- nosy: +pfhall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 14:48:06 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Mon, 08 Nov 2010 13:48:06 +0000 Subject: [issue10358] Doc styles for print should only use dark colors In-Reply-To: <1289224086.88.0.0372722217541.issue10358@psf.upfronthosting.co.za> Message-ID: <1289224086.88.0.0372722217541.issue10358@psf.upfronthosting.co.za> New submission from Fred L. Drake, Jr. : The HTML version of the documentation should include style settings for printing that use fairly dark colors, so that printed copies of pages are more readable. Using a printer that reduces colors to grays causes the light colors in code examples (or inlined references to classes and the like) to nearly drop out, making the result very painful to read. ---------- assignee: docs at python components: Documentation keywords: easy messages: 120741 nosy: docs at python, fdrake priority: normal severity: normal stage: needs patch status: open title: Doc styles for print should only use dark colors type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 15:11:33 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Mon, 08 Nov 2010 14:11:33 +0000 Subject: [issue10359] ISO C cleanup In-Reply-To: <1289225493.06.0.31753137713.issue10359@psf.upfronthosting.co.za> Message-ID: <1289225493.06.0.31753137713.issue10359@psf.upfronthosting.co.za> New submission from Hallvard B Furuseth : Here are some ISO C conformance patches, and a minor cleanup I encountered along the way. Lib/distutils/tests/test_config_cmd.py // comment --> /* comment */. Lib/distutils/tests/test_build_ext.py, Objects/weakrefobject.c, Modules/_pickle.c, Modules/_testcapimodule.c, Python/import.c . . . . . . . Remove some invalid ',' and ';'s. Python/Python-ast.c, Modules/arraymodule.c . . . . . Non-constant array initializer. Modules/_csv.c . . . . . . . Slight cleanup. Modules/_ctypes/libffi/src/x86/ffi.c Empty translation unit. TODO when bored, if anyone cares for more pedantic ISO patches: - printf(%p, non-void* pointer): The pointer should be cast to void*. - More // comments -> /**/, but mostly in system-specific code so I can't test any patches I make. ---------- components: None files: iso-c.zip messages: 120742 nosy: hfuru priority: normal severity: normal status: open title: ISO C cleanup type: compile error versions: Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file19544/iso-c.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 15:12:43 2010 From: report at bugs.python.org (Tres Seaver) Date: Mon, 08 Nov 2010 14:12:43 +0000 Subject: [issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors In-Reply-To: <1289225563.5.0.586847358991.issue10360@psf.upfronthosting.co.za> Message-ID: <1289225563.5.0.586847358991.issue10360@psf.upfronthosting.co.za> New submission from Tres Seaver : Because application code which tests for the presence of an object in a WeakSet may not be able to ensure that the object is weak-referenceable, the set should just return False for any object passed to '__contains__' which causes 'ref' to raise a TypeError. Patch forthcoming. ---------- messages: 120743 nosy: tseaver priority: normal severity: normal status: open title: _weakrefset.WeakSet.__contains__ should not propagate TypeErrors versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 15:26:13 2010 From: report at bugs.python.org (Tres Seaver) Date: Mon, 08 Nov 2010 14:26:13 +0000 Subject: [issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors In-Reply-To: <1289225563.5.0.586847358991.issue10360@psf.upfronthosting.co.za> Message-ID: <1289226373.82.0.902560761758.issue10360@psf.upfronthosting.co.za> Changes by Tres Seaver : ---------- components: +Library (Lib) keywords: +patch Added file: http://bugs.python.org/file19545/issue10360.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 15:30:26 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Mon, 08 Nov 2010 14:30:26 +0000 Subject: [issue10325] PY_LLONG_MAX & co - preprocessor constants or not? In-Reply-To: Message-ID: Hallvard B Furuseth added the comment: Hallvard B Furuseth writes: > Looks fine to me. Hold on.. #elif defined SIZEOF_LONG_LONG would be a bit safer than #else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 15:48:00 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Nov 2010 14:48:00 +0000 Subject: [issue10353] 2to3 and places argument in unitests assertAlmostEqual In-Reply-To: <1289214223.54.0.6247578407.issue10353@psf.upfronthosting.co.za> Message-ID: <1289227680.02.0.277641280662.issue10353@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 15:51:29 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Nov 2010 14:51:29 +0000 Subject: [issue10353] 2to3 and places argument in unitests assertAlmostEqual In-Reply-To: <1289214223.54.0.6247578407.issue10353@psf.upfronthosting.co.za> Message-ID: <1289227889.78.0.220553307089.issue10353@psf.upfronthosting.co.za> R. David Murray added the comment: The change of places to a keyword-only argument in 3.x was reverted last week in py3k trunk. ---------- nosy: +michael.foord, r.david.murray resolution: -> out of date stage: -> committed/rejected status: open -> closed versions: -Python 2.6, Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 15:57:21 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Nov 2010 14:57:21 +0000 Subject: [issue10354] tempfile.template is broken In-Reply-To: <1289215695.29.0.553789101836.issue10354@psf.upfronthosting.co.za> Message-ID: <1289228241.52.0.414728297831.issue10354@psf.upfronthosting.co.za> R. David Murray added the comment: Shouldn't the global template variable just be deleted in python3? It is no longer documented except for what is probably an overlooked mention in the introduction. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 15:58:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 14:58:11 +0000 Subject: [issue10359] ISO C cleanup In-Reply-To: <1289225493.06.0.31753137713.issue10359@psf.upfronthosting.co.za> Message-ID: <1289228291.12.0.0309022889786.issue10359@psf.upfronthosting.co.za> ?ric Araujo added the comment: If it?s not too much trouble for you, please post diffs as text files rather than binary. You can also use ?svn diff? to produce one file with all differences. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 15:59:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 14:59:57 +0000 Subject: [issue10359] ISO C cleanup In-Reply-To: <1289225493.06.0.31753137713.issue10359@psf.upfronthosting.co.za> Message-ID: <1289228397.65.0.662013581372.issue10359@psf.upfronthosting.co.za> ?ric Araujo added the comment: By the way, do these changes actually fix errors or are they just cleanups and pedantic (not a slight) fixes? If the latter, I think they won?t go into stable branches. I don?t do C though, so I won?t be the one to judge. Thanks for the patches! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:00:57 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Nov 2010 15:00:57 +0000 Subject: [issue10359] ISO C cleanup In-Reply-To: <1289225493.06.0.31753137713.issue10359@psf.upfronthosting.co.za> Message-ID: <1289228457.89.0.615168065047.issue10359@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:04:22 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Nov 2010 15:04:22 +0000 Subject: [issue10348] multiprocessing: use SysV semaphores on FreeBSD In-Reply-To: <1289181459.49.0.601327253766.issue10348@psf.upfronthosting.co.za> Message-ID: <1289228662.22.0.282747796688.issue10348@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:07:18 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 15:07:18 +0000 Subject: [issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally In-Reply-To: <1284643512.64.0.708677047597.issue9873@psf.upfronthosting.co.za> Message-ID: <1289228838.04.0.265289360544.issue9873@psf.upfronthosting.co.za> ?ric Araujo added the comment: Related issue in msg120647. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:07:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 15:07:59 +0000 Subject: [issue10336] test_xmlrpc fails if gzip is not supported by client In-Reply-To: <1289041038.52.0.266218953067.issue10336@psf.upfronthosting.co.za> Message-ID: <1289228879.66.0.686647448309.issue10336@psf.upfronthosting.co.za> ?ric Araujo added the comment: No problem :) I?ve had a look at the test and don?t understand the problem. What?s the client you?re referring to? I thought that in the tests, client-side and server-side were both under control. Is the problem related to *python* being built without gzip support? ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:08:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 15:08:05 +0000 Subject: [issue10355] SpooledTemporaryFile's name property is broken In-Reply-To: <1289218442.71.0.42635989391.issue10355@psf.upfronthosting.co.za> Message-ID: <1289228885.43.0.772950554314.issue10355@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:08:34 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 15:08:34 +0000 Subject: [issue10354] tempfile.template is broken In-Reply-To: <1289215695.29.0.553789101836.issue10354@psf.upfronthosting.co.za> Message-ID: <1289228914.98.0.224181028387.issue10354@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:10:30 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 15:10:30 +0000 Subject: [issue10353] 2to3 and places argument in unitests assertAlmostEqual In-Reply-To: <1289214223.54.0.6247578407.issue10353@psf.upfronthosting.co.za> Message-ID: <1289229030.09.0.542352231191.issue10353@psf.upfronthosting.co.za> ?ric Araujo added the comment: Is 3.1 incompatible with 2.7 and 3.2? If so, is it best to have 3.2 compatible with 3.1 or to have 3.1 buggy? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:12:58 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 08 Nov 2010 15:12:58 +0000 Subject: [issue10353] 2to3 and places argument in unitests assertAlmostEqual In-Reply-To: <1289214223.54.0.6247578407.issue10353@psf.upfronthosting.co.za> Message-ID: <1289229178.23.0.318388686648.issue10353@psf.upfronthosting.co.za> Michael Foord added the comment: It's fixed in release31-maint as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:15:01 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 15:15:01 +0000 Subject: [issue10351] Add autocompletion for keys in dictionaries In-Reply-To: <1289208160.65.0.489934250712.issue10351@psf.upfronthosting.co.za> Message-ID: <1289229301.57.0.210007158521.issue10351@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thank you for the report and patch. This is a new feature, thus targetting the py3k branch (future 3.2). If your patch is not against this branch, can you refresh it? Also, please attach it as text file(s), and generally follow guidelines outlined at http://www.python.org/dev/patches/ Thanks again! ---------- nosy: +eric.araujo stage: -> patch review title: to introduce autocompletion for keys in dictionaries (patch attached) -> Add autocompletion for keys in dictionaries type: behavior -> feature request versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:26:13 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 08 Nov 2010 15:26:13 +0000 Subject: [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1289229973.82.0.171326884327.issue10225@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:26:22 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 15:26:22 +0000 Subject: [issue8919] python should read ~/.pythonrc.py by default In-Reply-To: <1275846984.04.0.731293977336.issue8919@psf.upfronthosting.co.za> Message-ID: <1289229982.31.0.672755360252.issue8919@psf.upfronthosting.co.za> ?ric Araujo added the comment: > the .pythonrc.py file is not deprecated. only the user module is deprecated. Which amounts to the same IMO. > the problem i have with the PYTHONSTARTUP variable is that i find it > is an unecessary intermediate step to set up an initialization file. Okay, I see your point, even though I?m not convinced :) I suggest you write to the python-ideas mailing list to gather feedback about this. ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:28:16 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 08 Nov 2010 15:28:16 +0000 Subject: [issue10335] tokenize.open_python(): open a Python file with the right encoding In-Reply-To: <201011070536.00599.victor.stinner@haypocalc.com> Message-ID: Alexander Belopolsky added the comment: On Sun, Nov 7, 2010 at 4:24 AM, STINNER Victor wrote: .. > Ok, the new patch (tokenize_open-2.patch) uses tokenize.open() name and adds a > test for BOM without coding cookie (test utf-8-sig encoding). Here are my comments on the new patch: 1. A nit-pick: tokenize.py is already inconsistent in this respect, but I believe it is conventional not to start a docsting with an empty line: +def open(filename): + """Open a Python script in read mode with the right encoding. instead of +def open(filename): + """ + Open a Python script in read mode with the right encoding. Also, I would prefer a more neutral description that will not imply that the method is only useful for Python source code. For example: """Detect encoding and open a file in read mode with the right encoding. (optionally a more detailed explanation or a reference to detect_encoding.) """ 2. Another nit-pick: detect_encoding() returns a list of 0-2 lines in the second item, not a single line, so it is better to write + encoding, lines = detect_encoding(buffer.readline) or even + encoding, _ = detect_encoding(buffer.readline) instead of + encoding, line = detect_encoding(buffer.readline) 3. In test_open(self), I think you should use self.assertEqual() instead of a plain assert. 4. Last nit-pick (feel free to ignore as prejudice to %-formatting :-): instead of + print("# coding: %s" % encoding, file=fp) you can write + print("# coding: " + encoding, file=fp) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:34:39 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 08 Nov 2010 15:34:39 +0000 Subject: [issue10335] tokenize.open(): open a Python file with the right encoding In-Reply-To: <1289040579.7.0.473143443383.issue10335@psf.upfronthosting.co.za> Message-ID: <1289230479.54.0.93412109724.issue10335@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Changing the title to make the latest choice of function name more visible. ---------- stage: -> patch review title: tokenize.open_python(): open a Python file with the right encoding -> tokenize.open(): open a Python file with the right encoding type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:35:48 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 15:35:48 +0000 Subject: [issue10335] tokenize.open(): open a file with encoding detected from a coding cookie In-Reply-To: <1289040579.7.0.473143443383.issue10335@psf.upfronthosting.co.za> Message-ID: <1289230548.12.0.253505045389.issue10335@psf.upfronthosting.co.za> ?ric Araujo added the comment: 1. Agreed on both. Extraneous blank lines seem to be favored by people who need to work around bugs in their editor. 2. Yes, ?_? is recommended for a discarded object. 3. Agreed. 4. Even better: print('# coding:', encoding, file=fp). No intermediary string! ---------- title: tokenize.open(): open a Python file with the right encoding -> tokenize.open(): open a file with encoding detected from a coding cookie _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:42:26 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 08 Nov 2010 15:42:26 +0000 Subject: [issue10356] decimal.py: hash of -1 In-Reply-To: <1289219643.76.0.519336821084.issue10356@psf.upfronthosting.co.za> Message-ID: <1289230946.06.0.764716139828.issue10356@psf.upfronthosting.co.za> Mark Dickinson added the comment: Are there situations where this is a problem? I don't think that there's any requirement that the __hash__ method for a user-defined Python type not return -1. (It's also allowed to return values outside the range of hash values; these get automatically rehashed to values within the range.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:50:42 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Nov 2010 15:50:42 +0000 Subject: [issue10355] SpooledTemporaryFile's name property is broken In-Reply-To: <1289218442.71.0.42635989391.issue10355@psf.upfronthosting.co.za> Message-ID: <1289231442.16.0.650182016087.issue10355@psf.upfronthosting.co.za> R. David Murray added the comment: What makes you think SpooledTemporaryFile *has* a name attribute? :) Seriously, though, I presume this bug report is asking for either a better error message or for .name to raise an attribute error on a SpooledTemporaryFile? ---------- nosy: +r.david.murray stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:00:51 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Nov 2010 16:00:51 +0000 Subject: [issue10357] ** and "mapping" are poorly defined in python docs In-Reply-To: <1289222187.72.0.886873143688.issue10357@psf.upfronthosting.co.za> Message-ID: <1289232051.52.0.341797882835.issue10357@psf.upfronthosting.co.za> R. David Murray added the comment: I think the Glossary entry needs to be updated to point to the authoritative source for 'mapping' methods: http://docs.python.org/library/collections.html#abcs-abstract-base-classes (and yes, I realize that info is not located in a particularly intuitive location!) I wonder, however, if the code should be updated to use a dictionary iterator rather than 'keys'. ---------- nosy: +r.david.murray, rhettinger stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:03:46 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 08 Nov 2010 16:03:46 +0000 Subject: [issue10356] decimal.py: hash of -1 In-Reply-To: <1289219643.76.0.519336821084.issue10356@psf.upfronthosting.co.za> Message-ID: <1289232226.59.0.0978918355339.issue10356@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It's not about the hash value, but about consistency: help(Decimal.__hash__) says "x.__hash__() <==> hash(x)", but this is not true for x=Decimal(-1). ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:05:01 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Nov 2010 16:05:01 +0000 Subject: [issue10355] SpooledTemporaryFile's name property is broken In-Reply-To: <1289218442.71.0.42635989391.issue10355@psf.upfronthosting.co.za> Message-ID: <1289232301.49.0.685272061697.issue10355@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Yes, sorry, I should have been less concise. =) > Seriously, though, I presume this bug report is asking for either a > better error message or for .name to raise an attribute error on a > SpooledTemporaryFile? I'm not sure what's better. I must be honest and say that I opened this report more to signal this behavior rather than provide a solution, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:12:30 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 16:12:30 +0000 Subject: [issue10355] SpooledTemporaryFile's name property is broken In-Reply-To: <1289218442.71.0.42635989391.issue10355@psf.upfronthosting.co.za> Message-ID: <1289232750.1.0.268938257941.issue10355@psf.upfronthosting.co.za> ?ric Araujo added the comment: >From the doc of tempfile.NamedTemporaryFile: ?This function operates exactly as TemporaryFile() does, except that the file is guaranteed to have a visible name in the file system (on Unix, the directory entry is not unlinked). That name can be retrieved from the name member of the file object. Whether the name can be used to open the file a second time, while the named temporary file is still open, varies across platforms (it can be so used on Unix; it cannot on Windows NT or later).? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:12:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 08 Nov 2010 16:12:59 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1289232779.54.0.416970122574.issue10224@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: As discussed on #python-dev, building 3.x documentation using python3.x will require Sphinx 1.1 which will not be released in time for 3.2. I am adding #10225 as a dependency because I feel that fixing actual errors in ReST doctests is more important than upgrading documentation tool chain. Hopefully this will bring more eyes to that issue. This said, I believe it is important for python-dev to "eat their own dogfood" and make 3.2 self-hosting. In other words, if we want to convince users that 3.x is ready, we should not require 2.x in the build process. Fortunately, Doc/tools is not shipped with python releases, so the transition can be made at any time regardless of python release schedule. ---------- dependencies: +Fix doctest runable examples in python manual stage: -> needs patch type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:16:37 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 16:16:37 +0000 Subject: [issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input In-Reply-To: <1190630936.13.0.318924236509.issue1195@psf.upfronthosting.co.za> Message-ID: <1289232997.53.0.333406447502.issue1195@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:20:16 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 08 Nov 2010 16:20:16 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1289233216.34.0.852823658728.issue10224@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree that 3.2 should eventually be independent of a 2.x Python. Since the "port to 3.x" part of Sphinx 1.1 is basically done, I might just do an early alpha release and use that for Doc/tools before 3.2 final. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:22:46 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 08 Nov 2010 16:22:46 +0000 Subject: [issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors In-Reply-To: <1289225563.5.0.586847358991.issue10360@psf.upfronthosting.co.za> Message-ID: <1289233366.07.0.33226667594.issue10360@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:25:46 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Nov 2010 16:25:46 +0000 Subject: [issue10355] SpooledTemporaryFile's name property is broken In-Reply-To: <1289218442.71.0.42635989391.issue10355@psf.upfronthosting.co.za> Message-ID: <1289233546.18.0.279902000803.issue10355@psf.upfronthosting.co.za> R. David Murray added the comment: ?ric: right, but we're talking about *Spooled*Temprorary file, which doesn't say anything about a name, and in fact says that the data is kept in memory (which implies it has no name). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:26:07 2010 From: report at bugs.python.org (Chris Gerhard) Date: Mon, 08 Nov 2010 16:26:07 +0000 Subject: [issue1236] subprocess is not thread-safe In-Reply-To: <1191533517.74.0.548071476021.issue1236@psf.upfronthosting.co.za> Message-ID: <1289233567.72.0.279837023379.issue1236@psf.upfronthosting.co.za> Changes by Chris Gerhard : ---------- nosy: +Chris.Gerhard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:28:31 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Nov 2010 16:28:31 +0000 Subject: [issue10357] ** and "mapping" are poorly defined in python docs In-Reply-To: <1289222187.72.0.886873143688.issue10357@psf.upfronthosting.co.za> Message-ID: <1289233711.1.0.35081707854.issue10357@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:35:58 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 08 Nov 2010 16:35:58 +0000 Subject: [issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors In-Reply-To: <1289225563.5.0.586847358991.issue10360@psf.upfronthosting.co.za> Message-ID: <1289234158.75.0.230104841292.issue10360@psf.upfronthosting.co.za> Georg Brandl added the comment: A result from IRC is that to be consistent with normal sets, only TypeErrors coming from ref() should be caught, but not those TypeErrors from the actual membership test (i.e. the hash functioon of the value). ---------- assignee: -> rhettinger nosy: +georg.brandl, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:39:29 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Nov 2010 16:39:29 +0000 Subject: [issue10356] decimal.py: hash of -1 In-Reply-To: <1289219643.76.0.519336821084.issue10356@psf.upfronthosting.co.za> Message-ID: <1289234369.34.0.936926342502.issue10356@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Good catch Stefan. This is a regression from Py2.6. The behavior for decimal should match that for int. IDLE 2.6.2 >>> hash(-1) -2 >>> (-1).__hash__() -2 >>> from decimal import * >>> hash(Decimal(-1)) -2 >>> Decimal(-1).__hash__() -2 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:46:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 16:46:15 +0000 Subject: [issue5819] Add PYTHONPREFIXES environment variable In-Reply-To: <1240475142.53.0.423262271042.issue5819@psf.upfronthosting.co.za> Message-ID: <1289234775.65.0.0424741882447.issue5819@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +barry, eric.araujo versions: +Python 3.2 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:52:43 2010 From: report at bugs.python.org (Tres Seaver) Date: Mon, 08 Nov 2010 16:52:43 +0000 Subject: [issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors In-Reply-To: <1289225563.5.0.586847358991.issue10360@psf.upfronthosting.co.za> Message-ID: <1289235163.69.0.663220952346.issue10360@psf.upfronthosting.co.za> Changes by Tres Seaver : Removed file: http://bugs.python.org/file19545/issue10360.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:54:03 2010 From: report at bugs.python.org (Tres Seaver) Date: Mon, 08 Nov 2010 16:54:03 +0000 Subject: [issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors In-Reply-To: <1289225563.5.0.586847358991.issue10360@psf.upfronthosting.co.za> Message-ID: <1289235243.17.0.746198606614.issue10360@psf.upfronthosting.co.za> Tres Seaver added the comment: A new version of the patch, which only traps TypeErrors raises by ref(item). The test now ensures that hashing errors are propagated, for compatibility with standard sets. ---------- Added file: http://bugs.python.org/file19546/issue10360-redux.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:57:48 2010 From: report at bugs.python.org (Tres Seaver) Date: Mon, 08 Nov 2010 16:57:48 +0000 Subject: [issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors In-Reply-To: <1289225563.5.0.586847358991.issue10360@psf.upfronthosting.co.za> Message-ID: <1289235468.39.0.957956251369.issue10360@psf.upfronthosting.co.za> Changes by Tres Seaver : Removed file: http://bugs.python.org/file19546/issue10360-redux.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:58:40 2010 From: report at bugs.python.org (Tres Seaver) Date: Mon, 08 Nov 2010 16:58:40 +0000 Subject: [issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors In-Reply-To: <1289225563.5.0.586847358991.issue10360@psf.upfronthosting.co.za> Message-ID: <1289235520.92.0.00765687709402.issue10360@psf.upfronthosting.co.za> Tres Seaver added the comment: "One more time, with feeling." Sorry for the noise, the last patch was not against the 2.7 trunk. ---------- Added file: http://bugs.python.org/file19547/issue10360-redux.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:06:44 2010 From: report at bugs.python.org (Tres Seaver) Date: Mon, 08 Nov 2010 17:06:44 +0000 Subject: [issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors In-Reply-To: <1289225563.5.0.586847358991.issue10360@psf.upfronthosting.co.za> Message-ID: <1289236004.8.0.0827307377533.issue10360@psf.upfronthosting.co.za> Tres Seaver added the comment: FTR, the patch applies cleanly to the py3k branch, too. (Michael pointed out that the original code was copied directly from there). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:07:01 2010 From: report at bugs.python.org (Tres Seaver) Date: Mon, 08 Nov 2010 17:07:01 +0000 Subject: [issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors In-Reply-To: <1289225563.5.0.586847358991.issue10360@psf.upfronthosting.co.za> Message-ID: <1289236021.92.0.941631885088.issue10360@psf.upfronthosting.co.za> Changes by Tres Seaver : ---------- versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:09:48 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 17:09:48 +0000 Subject: [issue10355] SpooledTemporaryFile's name property is broken In-Reply-To: <1289218442.71.0.42635989391.issue10355@psf.upfronthosting.co.za> Message-ID: <1289236188.32.0.163488241075.issue10355@psf.upfronthosting.co.za> ?ric Araujo added the comment: Wow, brain fail. What I actually wanted to say: SpooledTemporaryFile ?operates exactly as TemporaryFile() does?, which is not guaranteed to have a name. The definition of file-like object (linked from tempfile docs) says nothing about a name either. Therefore, I think the presence of this attribute is a bug. Adding Collin to nosy, as the committer of SpooledTemporaryFile. ---------- nosy: +collinwinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:11:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Nov 2010 17:11:11 +0000 Subject: [issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors In-Reply-To: <1289225563.5.0.586847358991.issue10360@psf.upfronthosting.co.za> Message-ID: <1289236271.99.0.532203808939.issue10360@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What is the behaviour of WeakKeyDictionary here? I don't really agree that TypeError should be silenced. ---------- nosy: +pitrou versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:15:06 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Nov 2010 17:15:06 +0000 Subject: [issue10355] SpooledTemporaryFile's name property is broken In-Reply-To: <1289218442.71.0.42635989391.issue10355@psf.upfronthosting.co.za> Message-ID: <1289236506.16.0.0113214574837.issue10355@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Also "encoding" and "mode" properties fail in the same manner. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:17:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 17:17:17 +0000 Subject: [issue10361] Fix issue 9995 - distutils forces developers to store password in cleartext (issue2874041) In-Reply-To: <90e6ba476adb7467fe04948dcbf2@google.com> Message-ID: <90e6ba476adb7467fe04948dcbf2@google.com> New submission from ?ric Araujo : Looks globally good to me. http://codereview.appspot.com/2874041/diff/2001/cmd.py File cmd.py (right): http://codereview.appspot.com/2874041/diff/2001/cmd.py#newcode55 cmd.py:55: :param distutils.dist.Distribution dist: distribution to work with Please don?t include unrelated changes in your patch. Also, Python does not use :param: in docstrings. http://codereview.appspot.com/2874041/diff/2001/command/upload.py File command/upload.py (right): http://codereview.appspot.com/2874041/diff/2001/command/upload.py#newcode53 command/upload.py:53: if not self.username and self.distribution.username: I?d prefer a clearer comparison, please use ?is [not] None? and parens. http://codereview.appspot.com/2874041/ ---------- messages: 120776 nosy: eric.araujo, techtonik priority: normal severity: normal status: open title: Fix issue 9995 - distutils forces developers to store password in cleartext (issue2874041) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:18:42 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 17:18:42 +0000 Subject: [issue9995] "setup.py register sdist upload" requires pass to be saved In-Reply-To: <1285838842.84.0.5702466564.issue9995@psf.upfronthosting.co.za> Message-ID: <1289236722.34.0.830506791468.issue9995@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the patch. Review on Rietveld. What are ?other Python distributions?? ---------- components: +Distutils2 versions: +3rd party, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:18:47 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Nov 2010 17:18:47 +0000 Subject: [issue10321] Add support for Message objects and binary data to smtplib.sendmail In-Reply-To: <1288948061.88.0.822892450886.issue10321@psf.upfronthosting.co.za> Message-ID: <1289236727.06.0.110478566517.issue10321@psf.upfronthosting.co.za> R. David Murray added the comment: Committed in r86327. ---------- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:20:21 2010 From: report at bugs.python.org (Tres Seaver) Date: Mon, 08 Nov 2010 17:20:21 +0000 Subject: [issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors In-Reply-To: <1289225563.5.0.586847358991.issue10360@psf.upfronthosting.co.za> Message-ID: <1289236821.76.0.871274702227.issue10360@psf.upfronthosting.co.za> Tres Seaver added the comment: WeakKeyDictionary's __contains__: def __contains__(self, key): try: wr = ref(key) except TypeError: return 0 return wr in self.data ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:23:19 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 17:23:19 +0000 Subject: [issue10361] Fix issue 9995 - distutils forces developers to store password in cleartext (issue2874041) In-Reply-To: <90e6ba476adb7467fe04948dcbf2@google.com> Message-ID: <1289236999.93.0.770163882022.issue10361@psf.upfronthosting.co.za> ?ric Araujo added the comment: Yay for obscure email interfaces. Sorry for the noise. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:38:17 2010 From: report at bugs.python.org (ProgVal) Date: Mon, 08 Nov 2010 17:38:17 +0000 Subject: [issue10362] AttributeError: addinfourl instance has no attribute 'tell' In-Reply-To: <1289237897.0.0.279670034262.issue10362@psf.upfronthosting.co.za> Message-ID: <1289237897.0.0.279670034262.issue10362@psf.upfronthosting.co.za> New submission from ProgVal : Hello, I had this traceback: Traceback (most recent call last): ... File "/home/progval/workspace/Supybot/Supybot-plugins/Packages/plugin.py", line 123, in extractData file = tarfile.open(fileobj=file_) File "/usr/lib/python2.6/tarfile.py", line 1651, in open saved_pos = fileobj.tell() AttributeError: addinfourl instance has no attribute 'tell' The repr(file_) is : > (the file has been downloaded with urllib). I use Python 2.6.6 (from Debian Sid repo) Best regards, ProgVal ---------- messages: 120781 nosy: Valentin.Lorentz priority: normal severity: normal status: open title: AttributeError: addinfourl instance has no attribute 'tell' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:38:51 2010 From: report at bugs.python.org (Martin Dunschen) Date: Mon, 08 Nov 2010 17:38:51 +0000 Subject: [issue10363] Embedded python, handle (memory) leak In-Reply-To: <1289237931.86.0.626938349639.issue10363@psf.upfronthosting.co.za> Message-ID: <1289237931.86.0.626938349639.issue10363@psf.upfronthosting.co.za> New submission from Martin Dunschen : I found a number of 'handle leaks' in the core code to embed python into a C/C++ application on windows. To reproduce: The simplest possible embedded application only calls: #include void entry() { Py_Initialize(); Py_Finalize(); } I found (but this does not seem important to the problem) that when the above code is compiled into a Windows DLL, and from another simple app this DLL is loaded, the entry function is called and then the DLL is unloaded, the number of handles held by the application is increasing (by 3). Calling the steps "LoadLibrary, entry, FreeLibrary" in a loop will increase the number of held handles by 3 every time. I can propose fixes for these 3 leaks, please find attached in the zip file patches for the files I have fixed. But there are some issues remaining: PyEval_InitThreads allocates 'interpreter_lock', but there is nothing in the API that allows you to free this lock again. Should there maybe a function, in the API void PyEval_FinishThreads(void) { if (!interpreter_lock) return; PyThread_free_lock(interpreter_lock); } That would get rid of another handle leak if a DLL embedding python would use PyEval_InitThreads. In a specific DLL I am debugging just now I observe 2 more handle leaks (The 4 I report here, and 2 more I have not yet found). I hope my report is comprehensive and can be reproduced. I am happy to be of assistance if there are any questions. Martin ---------- components: Interpreter Core messages: 120782 nosy: martind priority: normal severity: normal status: open title: Embedded python, handle (memory) leak type: resource usage versions: Python 2.5, Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:47:27 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 08 Nov 2010 17:47:27 +0000 Subject: [issue10362] AttributeError: addinfourl instance has no attribute 'tell' In-Reply-To: <1289237897.0.0.279670034262.issue10362@psf.upfronthosting.co.za> Message-ID: <1289238447.87.0.332601815827.issue10362@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: With a socket file you cannot rely on autodetection of the format. I suggest to try tarfile.open(fileobj=file_, mode='r:') or tarfile.open(fileobj=file_, mode='r:gz') ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:57:33 2010 From: report at bugs.python.org (ProgVal) Date: Mon, 08 Nov 2010 17:57:33 +0000 Subject: [issue10362] AttributeError: addinfourl instance has no attribute 'tell' In-Reply-To: <1289237897.0.0.279670034262.issue10362@psf.upfronthosting.co.za> Message-ID: <1289239053.64.0.633477328864.issue10362@psf.upfronthosting.co.za> ProgVal added the comment: Thanks for your answer. Sorry, no change... ---------- components: +Library (Lib) versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:58:22 2010 From: report at bugs.python.org (Typo) Date: Mon, 08 Nov 2010 17:58:22 +0000 Subject: [issue10364] Color coding fails after running program. In-Reply-To: <1289239102.42.0.620564801896.issue10364@psf.upfronthosting.co.za> Message-ID: <1289239102.42.0.620564801896.issue10364@psf.upfronthosting.co.za> New submission from Typo : Whenever I run a program in Python 3.1.2 (windows), the color coding disappears. print() is no longer purple, def is no longer orange, etc. It all turns black, and there doesn't seem to be a way to repair this. I've installed and uninstalled Python 3.1.2 several times and it's done nothing. Loading previous programs also causes this. Only if I am making a new program is the coding separated by color. Can anyone help? ---------- components: None messages: 120785 nosy: Typo priority: normal severity: normal status: open title: Color coding fails after running program. type: performance versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 19:04:06 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 08 Nov 2010 18:04:06 +0000 Subject: [issue10362] AttributeError: addinfourl instance has no attribute 'tell' In-Reply-To: <1289237897.0.0.279670034262.issue10362@psf.upfronthosting.co.za> Message-ID: <1289239446.46.0.583303965648.issue10362@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I'm sure the traceback changed then? mode='r:' uses a different code path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 19:16:37 2010 From: report at bugs.python.org (ProgVal) Date: Mon, 08 Nov 2010 18:16:37 +0000 Subject: [issue10362] AttributeError: addinfourl instance has no attribute 'tell' In-Reply-To: <1289237897.0.0.279670034262.issue10362@psf.upfronthosting.co.za> Message-ID: <1289240197.27.0.463671873303.issue10362@psf.upfronthosting.co.za> ProgVal added the comment: Here is the new traceback: Traceback (most recent call last): ... File "/home/progval/workspace/Supybot/Supybot-plugins/Packages/plugin.py", line 123, in extractData file = tarfile.open(fileobj=file_, mode='r:') File "/usr/lib/python2.6/tarfile.py", line 1671, in open return func(name, filemode, fileobj, **kwargs) File "/usr/lib/python2.6/tarfile.py", line 1698, in taropen return cls(name, mode, fileobj, **kwargs) File "/usr/lib/python2.6/tarfile.py", line 1563, in __init__ self.offset = self.fileobj.tell() AttributeError: addinfourl instance has no attribute 'tell' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 19:30:08 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 08 Nov 2010 18:30:08 +0000 Subject: [issue10361] Fix issue 9995 - distutils forces developers to store password in cleartext (issue2874041) In-Reply-To: <90e6ba476adb7467fe04948dcbf2@google.com> Message-ID: <20cf30549dcb03b06604948ed077@google.com> anatoly techtonik added the comment: Reviewers: merwok, Message: I don't know when where will be time to redo the patch, but it would be nice to get some answers in meanwhile. http://codereview.appspot.com/2874041/diff/2001/cmd.py File cmd.py (right): http://codereview.appspot.com/2874041/diff/2001/cmd.py#newcode55 cmd.py:55: :param distutils.dist.Distribution dist: distribution to work with On 2010/11/08 17:17:11, merwok wrote: > Please don?t include unrelated changes in your patch. > Also, Python does not use :param: in docstrings. Including this in another patch is too much work to ever happen. What Python uses? http://codereview.appspot.com/2874041/diff/2001/command/upload.py File command/upload.py (right): http://codereview.appspot.com/2874041/diff/2001/command/upload.py#newcode53 command/upload.py:53: if not self.username and self.distribution.username: On 2010/11/08 17:17:11, merwok wrote: > I?d prefer a clearer comparison, please use ?is [not] None? and parens. Are you sure you want an empty username in config file to override name set from 'register' command? Please review this at http://codereview.appspot.com/2874041/ Affected files: M cmd.py M command/register.py M command/upload.py M dist.py M tests/test_register.py Index: tests/test_register.py =================================================================== --- tests/test_register.py (revision 86138) +++ tests/test_register.py (working copy) @@ -152,6 +152,26 @@ # therefore used afterwards by other commands self.assertEquals(cmd.distribution.password, 'password') + def test_password_set_with_no_config(self): + # check credentials are saved in dist if user chooses not to save them + # in config file. they are used afterwards by other commands + cmd = self._get_cmd() + + # patching raw_input and getpass.getpass. We are faking: + # use your existing login (choice 1.) + # Username : 'tarek' + # Password : 'password' + # Save your login (y/N)? : 'y' + inputs = RawInputs('1', 'tarek', 'n') + register_module.raw_input = inputs.__call__ + try: + cmd.run() + finally: + del register_module.raw_input + + self.assertEquals(cmd.distribution.username, 'tarek') + self.assertEquals(cmd.distribution.password, 'password') + def test_registering(self): # this test runs choice 2 cmd = self._get_cmd() Index: command/register.py =================================================================== --- command/register.py (revision 86138) +++ command/register.py (working copy) @@ -172,11 +172,11 @@ # possibly save the login if code == 200: - if self.has_config: - # sharing the password in the distribution instance - # so the upload command can reuse it - self.distribution.password = password - else: + # sharing credentials in the distribution instance + # so the upload command can reuse it + self.distribution.username = username + self.distribution.password = password + if not self.has_config: self.announce(('I can store your PyPI login so future ' 'submissions will be faster.'), log.INFO) self.announce('(the login will be stored in %s)' % \ Index: command/upload.py =================================================================== --- command/upload.py (revision 86138) +++ command/upload.py (working copy) @@ -48,8 +48,10 @@ self.repository = config['repository'] self.realm = config['realm'] - # getting the password from the distribution + # getting credentials from the distribution # if previously set by the register command + if not self.username and self.distribution.username: + self.username = self.distribution.username if not self.password and self.distribution.password: self.password = self.distribution.password Index: dist.py =================================================================== --- dist.py (revision 86138) +++ dist.py (working copy) @@ -206,6 +206,7 @@ self.extra_path = None self.scripts = None self.data_files = None + self.username = '' self.password = '' # And now initialize bookkeeping stuff that can't be supplied by Index: cmd.py =================================================================== --- cmd.py (revision 86138) +++ cmd.py (working copy) @@ -51,6 +51,8 @@ invokes the 'initialize_options()' method, which is the real initializer and depends on the actual command being instantiated. + + :param distutils.dist.Distribution dist: distribution to work with """ # late import because of mutual dependence between these classes from distutils.dist import Distribution ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 19:42:42 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Nov 2010 18:42:42 +0000 Subject: [issue10364] Color coding fails after running program. In-Reply-To: <1289239102.42.0.620564801896.issue10364@psf.upfronthosting.co.za> Message-ID: <1289241762.33.0.127505850145.issue10364@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is an editor rather than Python problem. Are you using the IDLE editor or something else. Which version of Windows? Orange and purple are IDLE's default for keywords and built-in names. But running 3.1.2 under XP, I have no problem as you describe, either after running or loading. ---------- nosy: +terry.reedy type: performance -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 19:44:09 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 08 Nov 2010 18:44:09 +0000 Subject: [issue9995] "setup.py register sdist upload" requires pass to be saved In-Reply-To: <1285838842.84.0.5702466564.issue9995@psf.upfronthosting.co.za> Message-ID: <1289241849.24.0.277328627297.issue9995@psf.upfronthosting.co.za> anatoly techtonik added the comment: This fix is needed for 2.6 releases also to be able to upload packages from Linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 19:47:43 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 18:47:43 +0000 Subject: [issue10361] Fix issue 9995 - distutils forces developers to store password in cleartext (issue2874041) In-Reply-To: <90e6ba476adb7467fe04948dcbf2@google.com> Message-ID: <20cf30549fdff9f64d04948f0e7a@google.com> ?ric Araujo added the comment: Further replies. There?s still one comment in test_register you haven?t addressed yet. Tarek, I?d like to have your decision about one line in the upload command. (Don?t read the diff in this mail, it?s incomplete, go to Rietveld.) Thanks in advance. http://codereview.appspot.com/2874041/diff/2001/cmd.py File cmd.py (right): http://codereview.appspot.com/2874041/diff/2001/cmd.py#newcode55 cmd.py:55: :param distutils.dist.Distribution dist: distribution to work with > Including this in another patch is too much work to ever happen. We?ll have to revert it before committing then. Something like ?*dist* is an instance of blah?. http://codereview.appspot.com/2874041/diff/2001/command/upload.py File command/upload.py (right): http://codereview.appspot.com/2874041/diff/2001/command/upload.py#newcode53 command/upload.py:53: if not self.username and self.distribution.username: This is a crazy case. PyPI won?t allow it to pass, so I?m okay with it. Tarek, what do you think? http://codereview.appspot.com/2874041/diff/2001/tests/test_register.py File tests/test_register.py (right): http://codereview.appspot.com/2874041/diff/2001/tests/test_register.py#newcode165 tests/test_register.py:165: inputs = RawInputs('1', 'tarek', 'n') It looks like you?re replying to ?username? and ?save your login? but not ?password?. http://codereview.appspot.com/2874041/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 19:58:33 2010 From: report at bugs.python.org (Typo) Date: Mon, 08 Nov 2010 18:58:33 +0000 Subject: [issue10364] Color coding fails after running program. In-Reply-To: <1289239102.42.0.620564801896.issue10364@psf.upfronthosting.co.za> Message-ID: <1289242713.02.0.679471293082.issue10364@psf.upfronthosting.co.za> Typo added the comment: I am using Windows Vista. The problem is not within Idle but within the screen where you create and save coding to use in Idle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 20:03:01 2010 From: report at bugs.python.org (William Barr) Date: Mon, 08 Nov 2010 19:03:01 +0000 Subject: [issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened In-Reply-To: <1289242981.94.0.545258182692.issue10365@psf.upfronthosting.co.za> Message-ID: <1289242981.94.0.545258182692.issue10365@psf.upfronthosting.co.za> New submission from William Barr : Steps for reproduction: 1. Open IDLE (Python 3.1.2) 2. Open a .py file 3. With the code window (not the shell window) in focus, Ctrl + O to bring up the open file dialog. Do not select a file or press open. 4. Close the code window. 5. Select a file and try to open it. 6. The IDLE process will terminate. This test was performed on Windows 7 Professional 32-bit as well as Windows XP Professional 32-bit. Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32 ---------- components: IDLE, Windows messages: 120793 nosy: william.barr priority: normal severity: normal status: open title: IDLE Crashes on File Open Dialog when code window closed before other file opened type: crash versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 20:09:10 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Nov 2010 19:09:10 +0000 Subject: [issue10327] Abnormal SSL timeouts when using socket timeouts - once again In-Reply-To: <1288967513.64.0.717673746201.issue10327@psf.upfronthosting.co.za> Message-ID: <1289243350.02.0.966625525392.issue10327@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> invalid stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 20:13:04 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 08 Nov 2010 19:13:04 +0000 Subject: [issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened In-Reply-To: <1289242981.94.0.545258182692.issue10365@psf.upfronthosting.co.za> Message-ID: <1289243584.75.0.758706300634.issue10365@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Reproduced in a console window: C:\>c:\python31\python.exe -m idlelib.idle Exception in Tkinter callback Traceback (most recent call last): File "c:\python31\lib\tkinter\__init__.py", line 1399, in __call__ return self.func(*args) File "c:\python31\lib\idlelib\IOBinding.py", line 177, in open self.editwin.flist.open(filename) AttributeError: 'NoneType' object has no attribute 'flist' ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 20:19:12 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Nov 2010 19:19:12 +0000 Subject: [issue10366] Remove unneeded '(object)' from 3.x class examples In-Reply-To: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> Message-ID: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> New submission from Terry J. Reedy : In 3.x, "(object)" is now superfluous in class statements. Reference manual 7.7. Class definitions has simply class Foo: pass In library manual 2. Built-in Functions, class examples for classmethod and staticmethod are the same. Class examples for dir, property, and type still have '(object)' in their class examples. Section 5.11.4. Methods example omits it. I cannot think of anywhere else there should be such examples. I think we should be consistent and remove the remaining occurrences of '(object)' in the function examples. They can only confuse newcomers. This part is easy. I also think the doc for 'class' should say that the default inheritance is from the base class *object* (I presume this should be true in all implementations) and that class Foo(object): pass is the same as the above (unless the name 'object' has been rebound!). ---------- assignee: docs at python components: Documentation keywords: easy messages: 120795 nosy: docs at python, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Remove unneeded '(object)' from 3.x class examples versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 20:27:52 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 08 Nov 2010 19:27:52 +0000 Subject: [issue5819] Add PYTHONPREFIXES environment variable In-Reply-To: <1240475142.53.0.423262271042.issue5819@psf.upfronthosting.co.za> Message-ID: <1289244472.11.0.416940010982.issue5819@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'll look at this in more detail, but I can at least answer one question right now: "The bona-fide known bug: the Debian package mantainer for Python decided to change "site-packages" to "dist-packages" in 2.6, for reasons I still don't quite understand." This was done as an accommodation to upstream Python developers. A from-source build of Python installs into /usr/local by default, with a site-packages situated there. But the Debian interpretation of the FHS states that site-installed (i.e. not through the package manager) add-ons to Python should also live in /usr/local, and /usr/local/lib/pythonX.Y/site-packages was chosen as the most obvious place for that. Unfortunately, this meant that if you installed Python from source using the defaults, it was possible to clobber either your system Python or your from-source installed Python by installing third party packages to an unintentionally shared directory. This was a real problem. Now, the Debian answer (probably rightly so) was that Python's from-source defaults should install into /opt not /usr/local, but this broke a decade's (at least) convention from upstream. The compromise was to keep Debian's /usr/local interpretation of the FHS, but to choose a directory that would not conflict with a from-source installation of Python. Thus dist-packages was chosen. To keep the system Python consistent, Python packages installed via apt are installed to /usr/lib/pythonX.Y/dist-packages too. I've had discussions with developers on both sides. It's not an ideal solution to anyone, but I thought it was the best compromise available at that time, and still do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 20:32:36 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Nov 2010 19:32:36 +0000 Subject: [issue10364] Color coding fails after running program. In-Reply-To: <1289239102.42.0.620564801896.issue10364@psf.upfronthosting.co.za> Message-ID: <1289244756.5.0.04727037866.issue10364@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If it is an editor window that you launch from IDLE, with a red script Tk in the upper left corner, with 'About IDLE' on the help menu, then it is an IDLE editor window and part of IDLE -- and appropriate for bug reports here ;-). This could be something specific to Vista; I do not know how well interactive things are tested there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 20:51:38 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 19:51:38 +0000 Subject: [issue10366] Remove unneeded '(object)' from 3.x class examples In-Reply-To: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> Message-ID: <1289245898.06.0.770831802804.issue10366@psf.upfronthosting.co.za> ?ric Araujo added the comment: Other unneeded uses of object, courtesy of grep: library/sqlite3.rst:713: class Point(object): library/multiprocessing.rst:1335: class MathsClass(object): library/functions.rst:281: >>> class Foo(object): library/functions.rst:897: class C(object): library/functions.rst:916: class Parrot(object): library/functions.rst:933: class C(object): library/functions.rst:1237: >>> class X(object): library/argparse.rst:1315: >>> class C(object): library/ctypes.rst:372: >>> class Bottles(object): library/itertools.rst:326: class groupby(object): howto/descriptor.rst:156: class RevealAccess(object): howto/descriptor.rst:173: >>> class MyClass(object): howto/descriptor.rst:205: class C(object): howto/descriptor.rst:214: class Property(object): howto/descriptor.rst:250: class Cell(object): howto/descriptor.rst:278: class Function(object): howto/descriptor.rst:286: >>> class D(object): howto/descriptor.rst:358: >>> class E(object): howto/descriptor.rst:371: class StaticMethod(object): howto/descriptor.rst:384: >>> class E(object): howto/descriptor.rst:419: class ClassMethod(object): howto/sorting.rst:228: class K(object): reference/datamodel.rst:1990: >>> class C(object): includes/sqlite3/adapter_point_2.py:3:class Point(object): includes/sqlite3/converter_point.py:3:class Point(object): includes/sqlite3/adapter_point_1.py:3:class Point(object): includes/mp_newtype.py:15:class Foo(object): ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 20:52:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 08 Nov 2010 19:52:51 +0000 Subject: [issue10366] Remove unneeded '(object)' from 3.x class examples In-Reply-To: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> Message-ID: <1289245971.18.0.60126809886.issue10366@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 20:55:01 2010 From: report at bugs.python.org (Prabhu Gurumurthy) Date: Mon, 08 Nov 2010 19:55:01 +0000 Subject: [issue10349] Error in Module/python.c when building on OpenBSD 4.8 In-Reply-To: <1289199143.28.0.506984185363.issue10349@psf.upfronthosting.co.za> Message-ID: <1289246101.36.0.962937550771.issue10349@psf.upfronthosting.co.za> Prabhu Gurumurthy added the comment: I was building it just the way python2.x is being built, should I try it without cxx-main? But, does it solve the actual problem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 20:59:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 19:59:07 +0000 Subject: [issue9995] "setup.py register sdist upload" requires pass to be saved In-Reply-To: <1285838842.84.0.5702466564.issue9995@psf.upfronthosting.co.za> Message-ID: <1289246347.82.0.617398579609.issue9995@psf.upfronthosting.co.za> ?ric Araujo added the comment: Security issues are for example buffer overflows that can be used to cause rights escalation or system corruption. They?re typically discovered by third parties who publish notices like CVE or DSA. What your patch is addressing is a behavior bug, not a security issue. ---------- type: security -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 22:02:43 2010 From: report at bugs.python.org (Philippe Devalkeneer) Date: Mon, 08 Nov 2010 21:02:43 +0000 Subject: [issue8033] sqlite: broken long integer handling for arguments to user-defined functions In-Reply-To: <1267408991.73.0.408537758811.issue8033@psf.upfronthosting.co.za> Message-ID: <1289250162.98.0.509326643576.issue8033@psf.upfronthosting.co.za> Philippe Devalkeneer added the comment: The regression tests do not work anymore in test_sqlite with the patch, I will check more in details why... sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 22:23:06 2010 From: report at bugs.python.org (Philippe Devalkeneer) Date: Mon, 08 Nov 2010 21:23:06 +0000 Subject: [issue8033] sqlite: broken long integer handling for arguments to user-defined functions In-Reply-To: <1267408991.73.0.408537758811.issue8033@psf.upfronthosting.co.za> Message-ID: <1289251386.03.0.842270111733.issue8033@psf.upfronthosting.co.za> Philippe Devalkeneer added the comment: No, I made a mistake in my build, test_sqlite runs actually fine before and after the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 22:29:52 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Nov 2010 21:29:52 +0000 Subject: [issue1466065] base64 module ignores non-alphabet characters Message-ID: <1289251792.0.0.898508479726.issue1466065@psf.upfronthosting.co.za> R. David Murray added the comment: Here is an updated patch that addresses the concerns I noted. I modified the tests: given that I've changed the code to raise binascii.Error as discussed, we don't really care from an API point of view what the error text is, just that the error is raised in the cases given. Nor do we care (again, from an API point of view) if the first error detected is the invalid character or the invalid padding. I made the new test test the validate=False case, so all of the invalid character tests are now correctly padded if you ignore the invalid characters. ---------- Added file: http://bugs.python.org/file19548/binascii-validate.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 22:36:52 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 08 Nov 2010 21:36:52 +0000 Subject: [issue10367] "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment" In-Reply-To: <1289252212.79.0.124730407849.issue10367@psf.upfronthosting.co.za> Message-ID: <1289252212.79.0.124730407849.issue10367@psf.upfronthosting.co.za> New submission from Jes?s Cea Avi?n : Uploading a new release of one of my libraries to PYPI I got this error: """ Submitting dist/bsddb3-5.1.1.tar.gz to http://pypi.python.org/pypi Upload failed (400): A file named "bsddb3-5.1.1.tar.gz" already exists for bsddb3-5.1.1. To fix problems with that file you should create a new release. Traceback (most recent call last): File "setup.py", line 5, in import setup2 File "/home/pybsddb/setup2.py", line 415, in 'Programming Language :: Python :: 3.2', File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup dist.run_commands() File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/local/lib/python2.7/distutils/command/upload.py", line 60, in run self.upload_file(command, pyversion, filename) File "/usr/local/lib/python2.7/distutils/command/upload.py", line 189, in upload_file self.announce('-'*75, result.read(), '-'*75) UnboundLocalError: local variable 'result' referenced before assignment """ Checking the code, I see this: """ # send the data try: result = urlopen(request) status = result.getcode() reason = result.msg except socket.error, e: self.announce(str(e), log.ERROR) return except HTTPError, e: status = e.code reason = e.msg if status == 200: self.announce('Server response (%s): %s' % (status, reason), log.INFO) else: self.announce('Upload failed (%s): %s' % (status, reason), log.ERROR) if self.show_response: self.announce('-'*75, result.read(), '-'*75) """ Here, if we selected "show_response" *AND* some error happens, "result" will be undefined and the last line will fail. This bug was introduced in Python 2.7. It used to work correctly under Python 2.6. I didn't check Python 3.x. I think this bug is trivial to reproduce: just try to upload any file with no permissions for it, using "--show_response" command line option. ---------- keywords: easy messages: 120804 nosy: jcea priority: high severity: normal stage: needs patch status: open title: "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment" type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 22:41:39 2010 From: report at bugs.python.org (Typo) Date: Mon, 08 Nov 2010 21:41:39 +0000 Subject: [issue10364] Color coding fails after running program. In-Reply-To: <1289239102.42.0.620564801896.issue10364@psf.upfronthosting.co.za> Message-ID: <1289252499.69.0.0271157028851.issue10364@psf.upfronthosting.co.za> Typo added the comment: Ah I see. I didn't know that the editor window was part of Idle. Sorry for the confusion. I am also receiving this problem in Python 2.5.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 22:43:58 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 08 Nov 2010 21:43:58 +0000 Subject: [issue10368] "python setup.py sdist upload --show-response" fails In-Reply-To: <1289252638.8.0.398810501872.issue10368@psf.upfronthosting.co.za> Message-ID: <1289252638.8.0.398810501872.issue10368@psf.upfronthosting.co.za> New submission from Jes?s Cea Avi?n : Uploading a new module/update to PYPI, when requesting "--show_response" in the command line, will fail: """ Traceback (most recent call last): File "setup.py", line 5, in import setup2 File "/home/pybsddb/setup2.py", line 415, in 'Programming Language :: Python :: 3.2', File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup dist.run_commands() File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/local/lib/python2.7/distutils/command/upload.py", line 60, in run self.upload_file(command, pyversion, filename) File "/usr/local/lib/python2.7/distutils/command/upload.py", line 194, in upload_file self.announce('-'*75, result, '-'*75) TypeError: announce() takes at most 3 arguments (4 given) """ This works correctly under Python 2.6. I haven't checked Python 3.x. ---------- keywords: easy messages: 120806 nosy: jcea priority: high severity: normal stage: needs patch status: open title: "python setup.py sdist upload --show-response" fails type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 22:52:46 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 08 Nov 2010 21:52:46 +0000 Subject: [issue10331] test_gdb failure when warnings printed out In-Reply-To: <1288992626.81.0.692321873477.issue10331@psf.upfronthosting.co.za> Message-ID: <1289253166.64.0.511994812297.issue10331@psf.upfronthosting.co.za> Dave Malcolm added the comment: Closing "won't fix", since this was misconfiguration; filtering out such warnings might mask a security issue. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 22:56:46 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 21:56:46 +0000 Subject: [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1289253406.51.0.866400371005.issue10299@psf.upfronthosting.co.za> ?ric Araujo added the comment: Using cell spanning breaks ?make latex? (and thus PDF), you may want to rework the reST table markup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 22:57:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 21:57:11 +0000 Subject: [issue10196] distutils.get_python_lib() returns /usr/local/python3/dist-packages on Ubuntu 10.10 In-Reply-To: <1288071198.84.0.0625228182395.issue10196@psf.upfronthosting.co.za> Message-ID: <1289253431.08.0.991056890398.issue10196@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: tarek -> nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 23:00:32 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 22:00:32 +0000 Subject: [issue10367] "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment" In-Reply-To: <1289252212.79.0.124730407849.issue10367@psf.upfronthosting.co.za> Message-ID: <1289253632.75.0.750837007473.issue10367@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. Can you paste your message and exact Python version on #9199? ---------- nosy: +eric.araujo resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> distutils upload command crashes when displaying server response type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 23:01:22 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 22:01:22 +0000 Subject: [issue9199] distutils upload command crashes when displaying server response In-Reply-To: <1278596334.3.0.531936724428.issue9199@psf.upfronthosting.co.za> Message-ID: <1289253682.55.0.937964479374.issue9199@psf.upfronthosting.co.za> ?ric Araujo added the comment: Reopening because of #10367. ---------- nosy: +jcea resolution: fixed -> stage: committed/rejected -> commit review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 23:02:48 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Nov 2010 22:02:48 +0000 Subject: [issue10364] Color coding fails after running program. In-Reply-To: <1289239102.42.0.620564801896.issue10364@psf.upfronthosting.co.za> Message-ID: <1289253768.14.0.573865301374.issue10364@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I take that as a yes, IDLE edit window. 2.5 is beyond fixing at this point, but that is useful data. I will look out for this problem when I load Python on Win7. ---------- components: +IDLE versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 23:05:22 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 08 Nov 2010 22:05:22 +0000 Subject: [issue10363] Embedded python, handle (memory) leak In-Reply-To: <1289237931.86.0.626938349639.issue10363@psf.upfronthosting.co.za> Message-ID: <1289253922.88.0.00517722620866.issue10363@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- versions: -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 23:06:56 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 08 Nov 2010 22:06:56 +0000 Subject: [issue10349] Error in Module/python.c when building on OpenBSD 4.8 In-Reply-To: <1289199143.28.0.506984185363.issue10349@psf.upfronthosting.co.za> Message-ID: <1289254016.86.0.0846290588751.issue10349@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It should certainly work around the problem you are reporting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 23:14:42 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 22:14:42 +0000 Subject: [issue10368] "python setup.py sdist upload --show-response" fails In-Reply-To: <1289252638.8.0.398810501872.issue10368@psf.upfronthosting.co.za> Message-ID: <1289254482.63.0.173039815827.issue10368@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment" type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 23:21:02 2010 From: report at bugs.python.org (Prabhu Gurumurthy) Date: Mon, 08 Nov 2010 22:21:02 +0000 Subject: [issue10349] Error in Module/python.c when building on OpenBSD 4.8 In-Reply-To: <1289199143.28.0.506984185363.issue10349@psf.upfronthosting.co.za> Message-ID: <1289254862.14.0.457924192967.issue10349@psf.upfronthosting.co.za> Prabhu Gurumurthy added the comment: You may be correct, (since I have not tested it), but isn't the error that gcc complains about, an issue? a minor one I am sure. I have gotten around it by just updating the file. Correct me if I am wrong here please, --with-cxx_main is not a supported option for compiling in OpenBSD? Ill test it without cxx_main option tonight. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 23:24:36 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 08 Nov 2010 22:24:36 +0000 Subject: [issue10196] distutils.get_python_lib() returns /usr/local/python3/dist-packages on Ubuntu 10.10 In-Reply-To: <1288071198.84.0.0625228182395.issue10196@psf.upfronthosting.co.za> Message-ID: <1289255076.44.0.754670758383.issue10196@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: This makes some sense (I think ;). Include files are going to be tied specifically to the Python version but Python 3 packages are (with the addition of PEPs 3147 and 3149) sharable between Python 3 versions. The plan IIUC is to backport those PEPs to Python 3.1 on Debian (and thus inherited by Ubuntu). In any case, this is not a valid bug in Python because it's one area that Debian/Ubuntu makes distribution-specific changes to upstream. See http://wiki.debian.org/Python and scroll down to "Deviations from upstream". If there's an actual bug here (of which I'm not convinced ;) then it should be submitted at bugs.debian.org. ---------- resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 23:26:43 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 08 Nov 2010 22:26:43 +0000 Subject: [issue10349] Error in Module/python.c when building on OpenBSD 4.8 In-Reply-To: <1289199143.28.0.506984185363.issue10349@psf.upfronthosting.co.za> Message-ID: <1289255203.53.0.513475612147.issue10349@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I wasn't really discussing (yet) whether this is a bug. I was just trying to find out what specifically made you use this configure option. The need for it should have gone away ten years ago or so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 23:33:25 2010 From: report at bugs.python.org (Rodrigo Bernardo Pimentel) Date: Mon, 08 Nov 2010 22:33:25 +0000 Subject: [issue5131] pprint doesn't know how to print a defaultdict In-Reply-To: <1233592442.21.0.0563262599933.issue5131@psf.upfronthosting.co.za> Message-ID: <1289255605.02.0.445066450039.issue5131@psf.upfronthosting.co.za> Changes by Rodrigo Bernardo Pimentel : ---------- nosy: +rbp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 23:35:32 2010 From: report at bugs.python.org (Prabhu Gurumurthy) Date: Mon, 08 Nov 2010 22:35:32 +0000 Subject: [issue10349] Error in Module/python.c when building on OpenBSD 4.8 In-Reply-To: <1289199143.28.0.506984185363.issue10349@psf.upfronthosting.co.za> Message-ID: <1289255732.71.0.47388196859.issue10349@psf.upfronthosting.co.za> Prabhu Gurumurthy added the comment: I understand, Ill run it without cxx_main option tonight. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 23:38:41 2010 From: report at bugs.python.org (Fergal Daly) Date: Mon, 08 Nov 2010 22:38:41 +0000 Subject: [issue10357] ** and "mapping" are poorly defined in python docs In-Reply-To: <1289222187.72.0.886873143688.issue10357@psf.upfronthosting.co.za> Message-ID: <1289255921.24.0.228310493256.issue10357@psf.upfronthosting.co.za> Fergal Daly added the comment: Even if the glossary pointed to collections.html, there are far more methods specified there than are needed to be **able. The code just calls into the same code as dict.update(dict) (although .update can also work on a sequence of twouples). dict.update's doc string is explicit about what it requires from the argument: | update(...) | D.update(E, **F) -> None. Update D from dict/iterable E and F. | If E has a .keys() method, does: for k in E: D[k] = E[k] | If E lacks .keys() method, does: for (k, v) in E: D[k] = v | In either case, this is followed by: for k in F: D[k] = F[k] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 00:07:25 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2010 23:07:25 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1289257645.37.0.436853286677.issue6011@psf.upfronthosting.co.za> STINNER Victor added the comment: > Fatal Python error: Py_Initialize: Unable to get the locale encoding > SystemError: NULL result without error in PyObject_Call Gotcha! r86341 fixes PyUnicode_EncodeFS(): raise an error if _Py_char2wchar_() fails. The real problem is that PREFIX is not decoded using _Py_charw2char(), but using a C hack: >L"" PREFIX<. It should use _Py_charw2char() as I did for VPATH in r85800. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 00:13:21 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Nov 2010 23:13:21 +0000 Subject: [issue10357] ** and "mapping" are poorly defined in python docs In-Reply-To: <1289222187.72.0.886873143688.issue10357@psf.upfronthosting.co.za> Message-ID: <1289258001.62.0.623259608123.issue10357@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Even if the glossary pointed to collections.html, > there are far more methods specified there than > are needed to be **able. That is an implementation detail and is subject to change. If someone supplies an argument satisfying collections.Mapping, that should be sufficient across all implementations. > dict.update's doc string is explicit about what > it requires from the argument: Duck-typing is still allowed when explicit requirements have been exposed (we do this a lot with .readline() for example). For the most part though, we want to specify "needs a Mapping" in the sense of collections.Mapping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 00:21:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 23:21:31 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1289258491.57.0.658888473301.issue6011@psf.upfronthosting.co.za> ?ric Araujo added the comment: Sorry: gcc -pthread -Xlinker -export-dynamic -o python Modules/python.o libpython3.2dmu.a -lpthread -ldl -lutil -lm Fatal Python error: Py_Initialize: Unable to get the locale encoding SystemError: NULL result without error in PyObject_Call Aborted make: *** [sharedmods] Error 134 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 00:25:50 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 23:25:50 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1289258750.7.0.812455241867.issue6011@psf.upfronthosting.co.za> ?ric Araujo added the comment: I should have worn my Stupid Hat today, because I?ve made stupid commits and emails. I hadn?t updated my checkout when I made my test. The bad news is that I still have a bug after svn up: gcc -pthread -Xlinker -export-dynamic -o python Modules/python.o libpython3.2dmu.a -lpthread -ldl -lutil -lm Fatal Python error: Py_Initialize: Unable to get the locale encoding UnicodeEncodeError: 'filesystemencoding' codec can't encode character '\xe9' in position 35: Invalid or incomplete multibyte or wide character Aborted make: *** [sharedmods] Error 134 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 00:26:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 23:26:07 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1289258767.03.0.764162571729.issue6011@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- Removed message: http://bugs.python.org/msg120820 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 00:42:07 2010 From: report at bugs.python.org (Dan Stromberg) Date: Mon, 08 Nov 2010 23:42:07 +0000 Subject: [issue10369] tarfile requires an actual file on disc; a file-like object is insufficient In-Reply-To: <1289259727.33.0.210981520326.issue10369@psf.upfronthosting.co.za> Message-ID: <1289259727.33.0.210981520326.issue10369@psf.upfronthosting.co.za> New submission from Dan Stromberg : The tarfile module's gettarinfo callable insists on stat'ing the file in question, preventing one from dynamically generating file content by passing a file-like object for addfile's fileobj argument. I believe the attached patch fixes this issue. I generated the patch against 2.7 and tested it with 2.7, but it applies cleanly against 3.1 and "feels innocuous". I've also included my test code at the bottom of this comment. Why would you want to do this? Imagine you've stored a file in three smaller files (perhaps to save the pieces on small external media, or as part of a deduplication system), with the content divided up into thirds. To subsequently put this file as a whole into a tar archive, it'd be nice if you could just create a file-like object to emit the catenation, rather than having to create a temporary file holding that catenation. It's occurred to me that this should be done in a more object oriented style, but that feels a bit inconsistent given that fstat is in the os module, and not provided as an attribute of a file(-like) object. Comments? Here's the test code: #!/usr/local/cpython-2.7/bin/python import os import sys import copy import array import stat_tarfile def my_stat(filename): class mutable_stat: pass readonly_statobj = os.lstat(filename) mutable_statobj = mutable_stat() for attribute in dir(readonly_statobj): if not attribute.startswith('_'): value = getattr(readonly_statobj, attribute) setattr(mutable_statobj, attribute, value) return mutable_statobj class generate_file_content: def __init__(self, number): self._multiplier = 100 self._multipleno = 0 self._number = str(number) self._buffer = '' def read(self, length): while self._multipleno < self._multiplier and len(self._buffer) < length: self._buffer += self._number self._multipleno += 1 if self._buffer == '': return '' else: result = self._buffer[:length] self._buffer = self._buffer[length:] return result def main(): with stat_tarfile.open(fileobj = sys.stdout, mode = "w|") as tar: for number in xrange(100): #string = str(number) * 100 fileobj = generate_file_content(number) statobj = my_stat('/etc/passwd') statobj.st_size = len(str(number)) * 100 filename = 'file-%d.txt' % number tarinfo = tar.gettarinfo(filename, statobj = statobj) tarinfo.uid = 1000 tarinfo.gid = 1000 tarinfo.uname = "dstromberg" tarinfo.gname = "dstromberg" tar.addfile(tarinfo, fileobj) main() ---------- components: Library (Lib) files: tarfile.diff keywords: patch messages: 120822 nosy: strombrg priority: normal severity: normal status: open title: tarfile requires an actual file on disc; a file-like object is insufficient versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file19549/tarfile.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 01:07:25 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 09 Nov 2010 00:07:25 +0000 Subject: [issue9199] distutils upload command crashes when displaying server response In-Reply-To: <1278596334.3.0.531936724428.issue9199@psf.upfronthosting.co.za> Message-ID: <1289261245.97.0.626451552912.issue9199@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: ?ric, I see this in Python 2.7, standard release. Your fix in SVN seems OK, but I am not sure that using "\n" be very platform agnostic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 01:10:19 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 09 Nov 2010 00:10:19 +0000 Subject: [issue10367] "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment" In-Reply-To: <1289252212.79.0.124730407849.issue10367@psf.upfronthosting.co.za> Message-ID: <1289261419.74.0.470687827749.issue10367@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: This is not issue9199, even covering the same line code. In this case the problem is an exception leaving a local variable undefined, crashing later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 01:11:46 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 09 Nov 2010 00:11:46 +0000 Subject: [issue9199] distutils upload command crashes when displaying server response In-Reply-To: <1278596334.3.0.531936724428.issue9199@psf.upfronthosting.co.za> Message-ID: <1289261506.34.0.726992762834.issue9199@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: This fix doesn't solve issue10367. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 01:25:47 2010 From: report at bugs.python.org (Tom Pinckney) Date: Tue, 09 Nov 2010 00:25:47 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1289262347.49.0.474439494991.issue2927@psf.upfronthosting.co.za> Tom Pinckney added the comment: New patch attached, tested against Python 3.2. This is my first Python patch so apologies if I've done something wrong here. Feedback appreciated! Changes: * fit everything to 80 cols * just made changes to the HTMLParser.unescape function instead of providing a standalone unescape function * fixed test case to fix string literals to work in python 3k * left the cp1252 hacks in there since it looks like they work still, but if there's a problem with them let me know. In practice I have to this at work in order to make unescaping actual web pages work. ---------- Added file: http://bugs.python.org/file19550/unescape.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 01:30:12 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Nov 2010 00:30:12 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1289262612.74.0.479401908632.issue6011@psf.upfronthosting.co.za> STINNER Victor added the comment: > The real problem is that PREFIX is not decoded using _Py_charw2char() ... Fixed by r86345. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 01:55:54 2010 From: report at bugs.python.org (Eric Smith) Date: Tue, 09 Nov 2010 00:55:54 +0000 Subject: [issue10354] tempfile.template is broken In-Reply-To: <1289215695.29.0.553789101836.issue10354@psf.upfronthosting.co.za> Message-ID: <1289264154.83.0.248073724129.issue10354@psf.upfronthosting.co.za> Eric Smith added the comment: I sort of agree with David. The global "template" is a bad name and a bad design. And since it doesn't work I don't think anything would be lost by modifying the code to ignore it; document that it's unused and deprecated; and remove it in a future version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 01:56:04 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Nov 2010 00:56:04 +0000 Subject: [issue10369] tarfile requires an actual file on disc; a file-like object is insufficient In-Reply-To: <1289259727.33.0.210981520326.issue10369@psf.upfronthosting.co.za> Message-ID: <1289264164.0.0.849389000238.issue10369@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- type: -> feature request versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 01:59:26 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Nov 2010 00:59:26 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1289264366.83.0.851365085265.issue6011@psf.upfronthosting.co.za> STINNER Victor added the comment: Now I get an error in copy_scripts() function of Lib/distutils/command/build_scripts.py: this function adjusts Python shebang of installed Python scripts. The problem is that the shebang contains a non-ASCII character whereas the script is written into the locale encoding, which is ASCII in my test. test_httpservers has a similar issue: CGIHTTPServerTestCase fails if the Python executable full path is not encodable to utf-8. I fixed simply this issue by skipping the test: try: # The python executable path is written as the first line of the # CGI Python script. The encoding cookie cannot be used, and so the # path should be encodable to the default script encoding (utf-8) self.pythonexe.encode('utf-8') except UnicodeEncodeError: self.tearDown() raise self.skipTest( "Python executable path is not encodable to utf-8") -- Attached patch, copy_script.patch, fixes this issue by reading the Python script in binary mode. It ensures that the shebang is decodable from utf-8 and the script encoding. It checks with utf-8 because the shebang is always written before the encoding cookie, and so the parser reads the shebang with the default parser encoding, which is utf-8. Eg. with a shebang not decodable from utf-8: --- File "./test.py", line 1 SyntaxError: Non-UTF-8 code starting with '\xff' in file ./blo.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details --- It checks with the script encoding because when the parser hits the encoding cookie, it restarts to read the whole file with the encoding, and so the parser decodes the shebang from the script encoding. ---------- Added file: http://bugs.python.org/file19551/copy_script.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 02:05:16 2010 From: report at bugs.python.org (Brian Warner) Date: Tue, 09 Nov 2010 01:05:16 +0000 Subject: [issue10370] py3 readlines() reports wrong offset for UnicodeDecodeError In-Reply-To: <1289264715.81.0.326279765732.issue10370@psf.upfronthosting.co.za> Message-ID: <1289264715.81.0.326279765732.issue10370@psf.upfronthosting.co.za> New submission from Brian Warner : I noticed that the UnicodeDecodeError exception produced by trying to do open(fn).readlines() (i.e. using the default ASCII encoding) on a file that's actually UTF-8 reports the wrong offset for the first undecodeable character. From what I can tell, it reports (offset%4096) instead of the actual offset. I've attached a test case. It emits "all good" when run against py2.x (well, after converting the print() expressions back into statements), but reports an error at offset 4096 (reported as "0") on py3.1.2 and py3.2a3 . I'm running on a debian (sid) x86 box. The misreported offset does not occur with read(), just with readlines(). ---------- components: IO files: test.py messages: 120830 nosy: warner priority: normal severity: normal status: open title: py3 readlines() reports wrong offset for UnicodeDecodeError type: behavior versions: Python 3.1, Python 3.2 Added file: http://bugs.python.org/file19552/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 02:06:55 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Nov 2010 01:06:55 +0000 Subject: [issue10370] py3 readlines() reports wrong offset for UnicodeDecodeError In-Reply-To: <1289264715.81.0.326279765732.issue10370@psf.upfronthosting.co.za> Message-ID: <1289264815.28.0.0657478005426.issue10370@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 02:12:04 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Nov 2010 01:12:04 +0000 Subject: [issue10335] tokenize.open(): open a file with encoding detected from a coding cookie In-Reply-To: <1289040579.7.0.473143443383.issue10335@psf.upfronthosting.co.za> Message-ID: <1289265124.07.0.196480917841.issue10335@psf.upfronthosting.co.za> STINNER Victor added the comment: Commited to Python 3.2 (r86346 + r86347). Thanks for your reviews. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 02:44:07 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Nov 2010 01:44:07 +0000 Subject: [issue10370] py3 readlines() reports wrong offset for UnicodeDecodeError In-Reply-To: <1289264715.81.0.326279765732.issue10370@psf.upfronthosting.co.za> Message-ID: <1289267047.62.0.152857515884.issue10370@psf.upfronthosting.co.za> STINNER Victor added the comment: The error occurs in .readline(): .readline() fills a buffer by reading the file chunk by chunk. Each time a chunk is read, it is decoded by the stateful decoder. The problem is that the decoder doesn't know the file offset. Even if it knew, start and end attributes of UnicodeDecodeError are indexes in the (bytes) object. > but reports an error at offset 4096 (reported as "0") 4096 is the buffer_size attribute of BufferedReader: .readline() -> ._read_chunk() -> .buffer.read1(). > The misreported offset does not occur with read(), just with readlines(). .read() is special: it reads the whole file at once, and decode binary content at once. -- I don't consider this issue as a bug, and so I'm closing it as invalid. -- Use .readline() to locate an invalid byte is not the right algorithm. If you would like to do that, you should open the file in binary mode and decodes the content yourself, chunk by chunk. Or if you manipulate small files, you can use .read() as you wrote. ---------- nosy: +haypo resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 03:32:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 02:32:32 +0000 Subject: [issue10371] Deprecate trace module undocumented API In-Reply-To: <1289269952.54.0.146506315747.issue10371@psf.upfronthosting.co.za> Message-ID: <1289269952.54.0.146506315747.issue10371@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Following python-dev discussion on the issue, I would like to propose trace-deprecations.diff patch for review. I would like to make these changes before turning to issue10342 which will require changing many of these APIs that take a source path to take a module object (or possibly a loader). Note that CoverageResults presents an interesting case of a class that does not need to be public, but its methods, particularly write_results() need to be documented. ---------- assignee: belopolsky components: Library (Lib) files: trace-deprecations.diff keywords: patch messages: 120833 nosy: belopolsky priority: normal severity: normal stage: patch review status: open title: Deprecate trace module undocumented API type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file19553/trace-deprecations.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 03:33:01 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Nov 2010 02:33:01 +0000 Subject: [issue10354] tempfile.template is broken In-Reply-To: <1289215695.29.0.553789101836.issue10354@psf.upfronthosting.co.za> Message-ID: <1289269981.48.0.886190355126.issue10354@psf.upfronthosting.co.za> R. David Murray added the comment: It has been documented as deprecated since 2.0. I'm sure the intent was for all mention of it to have been deleted from the 3.x docs already, but that first paragraph was overlooked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 03:41:50 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 Nov 2010 02:41:50 +0000 Subject: [issue10354] tempfile.template is broken In-Reply-To: <1289215695.29.0.553789101836.issue10354@psf.upfronthosting.co.za> Message-ID: <1289270510.07.0.0588075884321.issue10354@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 for just deleting it. nothing is lost by deleting code that never worked in the first place ;-) ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 03:56:18 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 09 Nov 2010 02:56:18 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1289271378.47.0.742299344887.issue10142@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: This is far more complicated that expected, because I would like to modify "file.seek()" to be able to support these flags too. Analizing "Modules/_io/bufferedio.c:buffered_seek()", the logic is pretty convoluted and the ramifications are extensible. Should I limit myself to "os.lseek()"/"os.read()"/"os.write()"?. This flags are obscure, but useful enough to be useful even with this limitation. Fut I don't feel comfy with this partial support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 03:56:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 02:56:23 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289271383.15.0.956065974254.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: >From IRC (raymondh): in the turtle docs, can you add a quick start guide (like we have in the unittest docs) the turtle docs have grown into a small book and is intimidating to get started with. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 03:56:31 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Nov 2010 02:56:31 +0000 Subject: [issue10205] Can't have two tags with the same QName In-Reply-To: <1288122049.66.0.916624044666.issue10205@psf.upfronthosting.co.za> Message-ID: <1289271391.12.0.068388962296.issue10205@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in r86348 for py3k and r86349 for release27-maint. In release31-maint, I see that there are missing features, like support for xml_declaration and default_namespace, which are however available in release27-maint. This is not a desirable scenario and I not sure why this difference exists. Additionally, the tests in release31-maint are lacking QName tests which are present in py3k and release27-maint. Only after these changes, can this be backported to release31-maint. ---------- assignee: -> orsenthil resolution: -> fixed stage: -> committed/rejected type: -> behavior versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 04:13:31 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Nov 2010 03:13:31 +0000 Subject: [issue3620] test_smtplib is flaky In-Reply-To: <1219244969.03.0.636728598981.issue3620@psf.upfronthosting.co.za> Message-ID: <1289272411.97.0.51805565329.issue3620@psf.upfronthosting.co.za> R. David Murray added the comment: Looking back over the logs (via bbreport) I don't see any failures of test_smtplib that match the report in this issue. There were three in the last while, two of which look like network issues on the same machine (and thus probably not a test problem per se) and one of which (solaris) had multiple errors but succeeded when rerun immediately. While there maybe a remaining flakiness issue with test_smtplib, it doesn't seem to be the error described here, and I don't think it rates critical. ---------- keywords: +buildbot priority: critical -> normal resolution: fixed -> stage: committed/rejected -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 04:22:42 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 03:22:42 +0000 Subject: [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289272962.34.0.541980259342.issue7061@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- title: Improve 24.5. turtle doc -> Improve turtle module documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 04:30:10 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 03:30:10 +0000 Subject: [issue10342] trace module cannot produce coverage reports for zipped modules In-Reply-To: <1289057209.7.0.964126417973.issue10342@psf.upfronthosting.co.za> Message-ID: <1289273410.84.0.81383726684.issue10342@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- dependencies: +Deprecate trace module undocumented API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 05:40:47 2010 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 09 Nov 2010 04:40:47 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1289277647.39.0.365630113439.issue2001@psf.upfronthosting.co.za> Nick Coghlan added the comment: As per python-dev discussion, we'll keep the old server and GUI implementations intact (but deprecated). The -g command line option will start the old implementation, -p and -b will start the new one. The APIs to activate the new implementation will start with a leading underscore and can be whatever makes the most sense for what you're doing (the example signatures in my last message are one possibility, but don't take them as mandatory). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 06:46:40 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Nov 2010 05:46:40 +0000 Subject: [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1289281600.35.0.541717392784.issue10318@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 07:06:21 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Nov 2010 06:06:21 +0000 Subject: [issue10319] SocketServer.TCPServer truncates responses on close (in some situations) In-Reply-To: <1288935519.72.0.951711716225.issue10319@psf.upfronthosting.co.za> Message-ID: <1289282781.95.0.376561587453.issue10319@psf.upfronthosting.co.za> Senthil Kumaran added the comment: jrodman2, in the socketserver TCPServer code you will find that shutdown_request does a socket.SHUT_WR before calling close_request. If the application or code in your description used shutdown_request, instead of close_request would you still require the kind of drain code? ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 07:37:06 2010 From: report at bugs.python.org (jrodman2) Date: Tue, 09 Nov 2010 06:37:06 +0000 Subject: [issue10319] SocketServer.TCPServer truncates responses on close (in some situations) In-Reply-To: <1288935519.72.0.951711716225.issue10319@psf.upfronthosting.co.za> Message-ID: <1289284626.99.0.626958095636.issue10319@psf.upfronthosting.co.za> jrodman2 added the comment: shutdown isn't the same as close. I'm not sure that's correct behavior in BaseHTTPServer depending upon whether it wants to keep the door open to weird pipeline behaviors. Honestly, I'm having to read through tcp/ip illustrated because of this, so I'm not really the proper person to make the call. Perhaps the bug is, as you imply, in BaseHTTPServer, not TCPServer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 07:44:41 2010 From: report at bugs.python.org (Prabhu Gurumurthy) Date: Tue, 09 Nov 2010 06:44:41 +0000 Subject: [issue10349] Error in Module/python.c when building on OpenBSD 4.8 In-Reply-To: <1289199143.28.0.506984185363.issue10349@psf.upfronthosting.co.za> Message-ID: <1289285081.99.0.280656258007.issue10349@psf.upfronthosting.co.za> Prabhu Gurumurthy added the comment: I ran the build "without" cxx_main, I did _not_ see the same error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 09:40:16 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Tue, 09 Nov 2010 08:40:16 +0000 Subject: [issue10325] PY_LLONG_MAX & co - preprocessor constants or not? In-Reply-To: Message-ID: Hallvard B Furuseth added the comment: No, PY_LLONG_MAX lacks a paren. Found by the revolutionary method of actually testing it (made the previous branches #if 0's). bugs.python.org is not responding, but here's what I'm using now: Index: Include/pyport.h =================================================================== --- Include/pyport.h (revision 86319) +++ Include/pyport.h (working copy) @@ -62,15 +62,20 @@ #define PY_LLONG_MAX LLONG_MAX #define PY_ULLONG_MAX ULLONG_MAX #elif defined(__LONG_LONG_MAX__) -/* Otherwise, if GCC has a builtin define, use that. */ +/* Otherwise, if GCC has a builtin define, use that. (Definition of + * PY_LLONG_MIN assumes two's complement with no trap representation.) */ #define PY_LLONG_MAX __LONG_LONG_MAX__ -#define PY_LLONG_MIN (-PY_LLONG_MAX-1) -#define PY_ULLONG_MAX (__LONG_LONG_MAX__*2ULL + 1ULL) -#else -/* Otherwise, rely on two's complement. */ -#define PY_ULLONG_MAX (~0ULL) -#define PY_LLONG_MAX ((long long)(PY_ULLONG_MAX>>1)) -#define PY_LLONG_MIN (-PY_LLONG_MAX-1) +#define PY_LLONG_MIN (-PY_LLONG_MAX - 1) +#define PY_ULLONG_MAX (PY_LLONG_MAX * Py_ULL(2) + 1) +#elif defined(SIZEOF_LONG_LONG) +/* Otherwise compute from SIZEOF_LONG_LONG, assuming two's complement, no + padding bits, and no trap representation. Note: PY_ULLONG_MAX was + previously #defined as (~0ULL) here; but that'll give the wrong value in a + preprocessor expression on systems where long long != intmax_t. */ +#define PY_LLONG_MAX \ + (1 + 2 * ((Py_LL(1) << (CHAR_BIT * SIZEOF_LONG_LONG - 2)) - 1)) +#define PY_LLONG_MIN (-PY_LLONG_MAX - 1) +#define PY_ULLONG_MAX (PY_LLONG_MAX * Py_ULL(2) + 1) #endif /* LLONG_MAX */ #endif #endif /* HAVE_LONG_LONG */ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 09:42:25 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Tue, 09 Nov 2010 08:42:25 +0000 Subject: [issue10312] intcatcher() can deadlock In-Reply-To: <1288874942.68.0.464773855859.issue10312@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: Sorry, my patch is useless if the OS calls the handler with the signal blocked. It should also unblock the signal before doing anything which can do FILE* operations. And set the handler again? Or just leave the next signal to abort the process? I dunno... Anyway, if you don't do that, just apply the save/restore of errno. Drop the 'if (errno != save_errno)' before restoring, that bit of paranoia was turned down in Issue10311. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 09:45:33 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Tue, 09 Nov 2010 08:45:33 +0000 Subject: [issue10359] ISO C cleanup In-Reply-To: <1289228397.65.0.662013581372.issue10359@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: ,AIric Araujo writes: > By the way, do these changes actually fix errors or are they just > cleanups and pedantic (not a slight) fixes? I've used compilers where they'd be compile errors, though I found them just with gcc -pedantic in an idle moment. > If the latter, I think they won?t go into stable branches. Not until someone has better time anyway... About the .zip, it's 3 files (diff against python 3, 2, and both), I'll upload them as an ascii file with '#####'s between when bugs.python.org responds again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 09:51:38 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 09 Nov 2010 08:51:38 +0000 Subject: [issue10361] Fix issue 9995 - distutils forces developers to store password in cleartext (issue2874041) In-Reply-To: <90e6ba476adb7467fe04948dcbf2@google.com> Message-ID: <20cf30549ad507f12004949a88b3@google.com> anatoly techtonik added the comment: Fixed docstring. http://codereview.appspot.com/2874041/diff/2001/cmd.py File cmd.py (right): http://codereview.appspot.com/2874041/diff/2001/cmd.py#newcode55 cmd.py:55: :param distutils.dist.Distribution dist: distribution to work with On 2010/11/08 18:47:39, merwok wrote: > > Including this in another patch is too much work to ever happen. > We?ll have to revert it before committing then. > > What Python uses? > Something like ?*dist* is an instance of blah?. I thought Python uses all Sphinx capabilities. Done. http://codereview.appspot.com/2874041/diff/2001/command/upload.py File command/upload.py (right): http://codereview.appspot.com/2874041/diff/2001/command/upload.py#newcode53 command/upload.py:53: if not self.username and self.distribution.username: On 2010/11/08 18:47:39, merwok wrote: > This is a crazy case. That's why I don't want to make distinction between "None" username and empty username. They are both the same in this context. http://codereview.appspot.com/2874041/diff/2001/tests/test_register.py File tests/test_register.py (right): http://codereview.appspot.com/2874041/diff/2001/tests/test_register.py#newcode165 tests/test_register.py:165: inputs = RawInputs('1', 'tarek', 'n') On 2010/11/08 18:47:39, merwok wrote: > It looks like you?re replying to ?username? and ?save your login? but not > ?password?. That's magically patched in setUp method. http://codereview.appspot.com/2874041/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 09:54:55 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Nov 2010 08:54:55 +0000 Subject: [issue10359] ISO C cleanup In-Reply-To: <1289225493.06.0.31753137713.issue10359@psf.upfronthosting.co.za> Message-ID: <1289292895.32.0.47140896285.issue10359@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Hallvard, if it going be a rather huge diff, you may make it available at http://bugs.python.org/review, so that it is easy for review. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 10:22:05 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Nov 2010 09:22:05 +0000 Subject: [issue10245] Fix resource warnings in test_telnetlib In-Reply-To: <1288441077.58.0.74967624488.issue10245@psf.upfronthosting.co.za> Message-ID: <1289294525.31.0.859042759805.issue10245@psf.upfronthosting.co.za> Senthil Kumaran added the comment: conn.close() was done in the finally method in r86228 by brian.curtin. The other change in your patch in very minor space addition after comma. We can leave it to place along with some other code change. ---------- nosy: +brian.curtin, orsenthil resolution: -> invalid stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 10:44:59 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Nov 2010 09:44:59 +0000 Subject: [issue10359] ISO C cleanup In-Reply-To: <1289225493.06.0.31753137713.issue10359@psf.upfronthosting.co.za> Message-ID: <1289295899.43.0.275178242611.issue10359@psf.upfronthosting.co.za> STINNER Victor added the comment: I commited a part of your patches: r86353 Remove ";" after function definition, invalid in ISO C r86354: [array] int => Py_UNICODE (my commit is a little bit different, but it is based on your patch) r86355: [_pickle] Remove useless comma, invalid in ISO C r86356: [_csv] Remove useless (duplicate) initialization I attach the uncommit part of your patches for 3.2. -- For libffi, the project is maintained outside Python: you should also post your patch to http://sourceware.org/libffi/ Python-ast.c: why do you move req_name and req_type outside PyAST_obj2mod()? ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file19554/iso_c_32.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 10:54:44 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Tue, 09 Nov 2010 09:54:44 +0000 Subject: [issue10359] ISO C cleanup In-Reply-To: <1289295899.43.0.275178242611.issue10359@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: STINNER Victor writes: > Python-ast.c: why do you move req_name and req_type outside PyAST_obj2mod()? Because there's no need to initialize the arrays each time PyAST_obj2mod is called. C90-friendly code inside PyAST_obj2mod would be PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode) { mod_ty res; static char *const req_name[] = {"Module", "Expression", "Interactive"}; PyObject *req_type[]; req_type[0] = (PyObject*)Module_type; req_type[1] = (PyObject*)Expression_type; req_type[2] = (PyObject*)Interactive_type; ... } which is what the current code actually executes. (I moved req_name to keep it next to req_type in the code.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 10:56:27 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Tue, 09 Nov 2010 09:56:27 +0000 Subject: [issue10359] ISO C cleanup In-Reply-To: Message-ID: Hallvard B Furuseth added the comment: Hallvard B Furuseth writes: > (...) which is what the current code actually executes. Er, I mean, that's what it does with req_type. The 'static' for req_name is an optimization of the current code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 11:02:58 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Nov 2010 10:02:58 +0000 Subject: [issue10324] Modules/binascii.c: simplify expressions In-Reply-To: <1288960282.63.0.36896617849.issue10324@psf.upfronthosting.co.za> Message-ID: <1289296978.32.0.0239137514828.issue10324@psf.upfronthosting.co.za> Senthil Kumaran added the comment: At first, I was worried if this simplification would cause any harm to readability of the algorithm. Fortunately, it didn't. Committed in r86357. ---------- nosy: +orsenthil resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 11:05:50 2010 From: report at bugs.python.org (Ismail Donmez) Date: Tue, 09 Nov 2010 10:05:50 +0000 Subject: [issue10372] [REGRESSION] test_gc fails on Mac OSX 10.6 In-Reply-To: <1289297149.99.0.674795586662.issue10372@psf.upfronthosting.co.za> Message-ID: <1289297149.99.0.674795586662.issue10372@psf.upfronthosting.co.za> New submission from Ismail Donmez : py3k r86351, ====================================================================== FAIL: test_garbage_at_shutdown (__main__.GCTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "./Lib/test/test_gc.py", line 500, in test_garbage_at_shutdown b"shutdown; use", stderr) AssertionError: b'ResourceWarning: gc: 2 uncollectable objects at shutdown; use' not found in b'' ---------------------------------------------------------------------- Ran 28 tests in 0.226s FAILED (failures=1) restoring automatic collection Traceback (most recent call last): File "./Lib/test/test_gc.py", line 682, in test_main() File "./Lib/test/test_gc.py", line 669, in test_main run_unittest(GCTests, GCTogglingTests) File "/Users/cartman/Sources/py3k/Lib/test/support.py", line 1141, in run_unittest _run_suite(suite) File "/Users/cartman/Sources/py3k/Lib/test/support.py", line 1124, in _run_suite raise TestFailed(err) test.support.TestFailed: Traceback (most recent call last): File "./Lib/test/test_gc.py", line 500, in test_garbage_at_shutdown b"shutdown; use", stderr) AssertionError: b'ResourceWarning: gc: 2 uncollectable objects at shutdown; use' not found in b'' ---------- components: Tests messages: 120854 nosy: cartman priority: normal severity: normal status: open title: [REGRESSION] test_gc fails on Mac OSX 10.6 type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 11:26:07 2010 From: report at bugs.python.org (Valery Khamenya) Date: Tue, 09 Nov 2010 10:26:07 +0000 Subject: [issue10351] Add autocompletion for keys in dictionaries In-Reply-To: <1289208160.65.0.489934250712.issue10351@psf.upfronthosting.co.za> Message-ID: <1289298367.59.0.916130623053.issue10351@psf.upfronthosting.co.za> Valery Khamenya added the comment: Hi ?ric, thanks for guiding. So, attached is the concatenation of two forward unified diffs for rlcompleter.py and test_rlcompleter.py -- both as of py3k trunk. Tested against Python 3.1.2 though. P.S. hm, py3k code appeared to be surprisingly nicer -- no unicode troubles and work-arounds at all... regards Valery ---------- assignee: -> docs at python components: +Documentation keywords: +patch nosy: +docs at python Added file: http://bugs.python.org/file19555/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 11:36:16 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 09 Nov 2010 10:36:16 +0000 Subject: [issue10363] Embedded python, handle (memory) leak In-Reply-To: <1289237931.86.0.626938349639.issue10363@psf.upfronthosting.co.za> Message-ID: <1289298976.22.0.00727772450539.issue10363@psf.upfronthosting.co.za> Stefan Krah added the comment: I don't see a file attached. Could you attach your patches in plain text? It is the preferred method, since files can be easily viewed in the browser. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 11:37:29 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Tue, 09 Nov 2010 10:37:29 +0000 Subject: [issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally In-Reply-To: <1284643512.64.0.708677047597.issue9873@psf.upfronthosting.co.za> Message-ID: <1289299049.91.0.838429042617.issue9873@psf.upfronthosting.co.za> Hallvard B Furuseth added the comment: urlunparse(url or params = bytes object) produces a result with the repr of the bytes object if params is set. urllib.parse.urlunparse(['http', 'host', '/dir', b'params', '', '']) --> "http://host/dir;b'params'" That's confusing since urllib/parse.py goes to a lot of trouble to support both bytes and str. Simplest fix is to only accept str: Index: Lib/urllib/parse.py @@ -219,5 +219,5 @@ def urlunparse(components): scheme, netloc, url, params, query, fragment = components if params: - url = "%s;%s" % (url, params) + url = ';'.join((url, params)) return urlunsplit((scheme, netloc, url, query, fragment)) Some people at comp.lang.python tell me code shouldn't anyway do str() just in case it is needed like urllib does, not that I can make much sense of that discussion. (Subject: harmful str(bytes)). BTW, the str vs bytes code doesn't have to be quite as painful as in urllib.parse. Here is a patch which just rearranges and factors out some code. http://bugs.python.org/file19525/parse.diff ---------- nosy: +hfuru _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 11:42:41 2010 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Tue, 09 Nov 2010 10:42:41 +0000 Subject: [issue10369] tarfile requires an actual file on disc; a file-like object is insufficient In-Reply-To: <1289259727.33.0.210981520326.issue10369@psf.upfronthosting.co.za> Message-ID: <1289299361.4.0.0116687672033.issue10369@psf.upfronthosting.co.za> Lars Gust?bel added the comment: Hm, why don't you just do this: with stat_tarfile.open(fileobj = sys.stdout, mode = "w|") as tar: for number in xrange(100): fileobj = generate_file_content(number) tarinfo = tar.gettarinfo(fileobj=open("/etc/passwd")) tarinfo.name = 'file-%d.txt' % number tarinfo.size = len(str(number)) * 100 tarinfo.uid = 1000 tarinfo.gid = 1000 tarinfo.uname = "dstromberg" tarinfo.gname = "dstromberg" tar.addfile(tarinfo, fileobj) Wouldn't that work, too? Or am I missing something? ---------- assignee: -> lars.gustaebel nosy: +lars.gustaebel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 11:45:26 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 09 Nov 2010 10:45:26 +0000 Subject: [issue9857] SkipTest in tearDown is reported an as an error In-Reply-To: <1284500719.22.0.435536478708.issue9857@psf.upfronthosting.co.za> Message-ID: <1289299526.37.0.210755657675.issue9857@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 12:10:44 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 09 Nov 2010 11:10:44 +0000 Subject: [issue9709] test_distutils warning: initfunc exported twice on Windows In-Reply-To: <1283101838.76.0.73949668593.issue9709@psf.upfronthosting.co.za> Message-ID: <1289301044.66.0.529952563296.issue9709@psf.upfronthosting.co.za> Stefan Krah added the comment: This is the history of the issue: In r16757 the current version of get_export_symbols() was added to distutils. This function adds /EXPORT initfunc to the command line. In 27697 PyMODINIT_FUNC was defined as __declspec(dllexport) void. I'd suggest to remove get_export_symbols(). This would only affect extensions that do not use PyMODINIT_FUNC, but that can be easily repaired. ---------- keywords: +patch nosy: +loewis, mhammond Added file: http://bugs.python.org/file19556/initfunc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 12:13:51 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Tue, 09 Nov 2010 11:13:51 +0000 Subject: [issue10361] Fix issue 9995 - distutils forces developers to store password in cleartext (issue2874041) In-Reply-To: <90e6ba476adb7467fe04948dcbf2@google.com> Message-ID: <1289301231.42.0.806494772051.issue10361@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Looks good to me: the upload command will get the credentials from the session instead of using the existing config at all. I remember that we changed the behavior to you'd had to set ONLY the user in the rc file, but allowing to pass the user is better since it make the config file optional ---------- components: +Demos and Tools nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 12:46:23 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 09 Nov 2010 11:46:23 +0000 Subject: [issue10359] ISO C cleanup In-Reply-To: <1289225493.06.0.31753137713.issue10359@psf.upfronthosting.co.za> Message-ID: <1289303183.03.0.302158839287.issue10359@psf.upfronthosting.co.za> ?ric Araujo added the comment: > I've used compilers where they'd be compile errors, though I found > them just with gcc -pedantic in an idle moment. If Victor accepts the patches then they?re useful :) >> If the latter, I think they won?t go into stable branches. > Not until someone has better time anyway... It?s not a question of time but policy: Stable branches (2.7 and 3.1) only get bug fixes, not new features or code cleanups. > About the .zip, it's 3 files (diff against python 3, 2, and both), > I'll upload them as an ascii file with '#####'s between It?s actually easier: ?svn diff file1 dir/file2 dir/file3? produces one valid diff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 13:35:28 2010 From: report at bugs.python.org (Martin Dunschen) Date: Tue, 09 Nov 2010 12:35:28 +0000 Subject: [issue10363] Embedded python, handle (memory) leak In-Reply-To: <1289237931.86.0.626938349639.issue10363@psf.upfronthosting.co.za> Message-ID: <1289306128.52.0.542835880355.issue10363@psf.upfronthosting.co.za> Martin Dunschen added the comment: Here my suggested changes in plain text (I generated these as patches from a diff to the current code): thread.c: 353a354,359 > void PyThread_fini() > { > // should assert here that nkeys == 0 > PyThread_free_lock(keymutex); > } > pystate.c: 38a39 > #define HEAD_RELEASE() PyThread_free_lock(head_mutex); 48a50 > #define HEAD_RELEASE() /* Nothing */ 140a143 > HEAD_RELEASE(); 422a426,427 > void PyThread_fini(); // forward > 428c433,434 < autoInterpreterState = NULL;; --- > autoInterpreterState = NULL; > PyThread_fini(); // this frees a lock called keymutex in thread.c import.c 473a474,475 > > PyThread_free_lock(import_lock); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 14:09:06 2010 From: report at bugs.python.org (Kirk Clendinning) Date: Tue, 09 Nov 2010 13:09:06 +0000 Subject: [issue10373] Setup Script example incorrect In-Reply-To: <1289308146.55.0.869173171863.issue10373@psf.upfronthosting.co.za> Message-ID: <1289308146.55.0.869173171863.issue10373@psf.upfronthosting.co.za> New submission from Kirk Clendinning : In 2.7. Installing Additional Files the example shows: setup(..., data_files=[('bitmaps', ['bm/b1.gif', 'bm/b2.gif']), ('config', ['cfg/data.cfg']), ('/etc/init.d', ['init-script'])] ) However, running easy_install with setuptools results in a error: Setup script exited with error: SandboxViolation: open('/etc/init.d/init-script', 'wb') {} Perhaps the documentation should be changed and more explanation added. ---------- assignee: docs at python components: Documentation messages: 120863 nosy: docs at python, lensart priority: normal severity: normal status: open title: Setup Script example incorrect type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 14:11:29 2010 From: report at bugs.python.org (Geoffrey Bache) Date: Tue, 09 Nov 2010 13:11:29 +0000 Subject: [issue10374] setup.py caches outdated scripts in the build tree In-Reply-To: <1289308289.62.0.579780588392.issue10374@psf.upfronthosting.co.za> Message-ID: <1289308289.62.0.579780588392.issue10374@psf.upfronthosting.co.za> New submission from Geoffrey Bache : I have the following setup.py script: #!/usr/bin/env python from distutils.core import setup scripts=["hello.py"] setup(scripts=scripts) I have two different python installations (using virtualenv) where I wish to install this program. So I do ~/tmp/test_setup/python1/bin/python setup.py install which creates a file at /users/geoff/tmp/test_setup/python1/bin/hello.py, that looks like this: #!/users/geoff/tmp/test_setup/python1/bin/python print "Hello" So far so good. But then I also install it somewhere else: ~/tmp/test_setup/python2/bin/python setup.py install which creates a file at /users/geoff/tmp/test_setup/python2/bin/hello.py which refers to "python1", i..e it has the same contents as the first one. Which is clearly not what I want. The cached script in the build tree appears not to get updated once it exists. ---------- assignee: tarek components: Distutils messages: 120864 nosy: eric.araujo, gjb1002, tarek priority: normal severity: normal status: open title: setup.py caches outdated scripts in the build tree type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:05:12 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Tue, 09 Nov 2010 14:05:12 +0000 Subject: [issue10070] 2to3 wishes for already-2to3'ed files In-Reply-To: <1286882661.81.0.431457664283.issue10070@psf.upfronthosting.co.za> Message-ID: <1289311512.85.0.23260550621.issue10070@psf.upfronthosting.co.za> Hallvard B Furuseth added the comment: Hi, I'm back... I've been reading your last message a few times and I'm not sure what I'm to reconsider. We've had a way of talking past each toerh before, as far as I can remember. I think my request still now translates to: - keep the current behavior by default, - add some option which does not translate certain code blocks, - these code blocks could be the syntax we've already discussed, or something else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:12:22 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Tue, 09 Nov 2010 14:12:22 +0000 Subject: [issue10375] 2to3 print(single argument) In-Reply-To: <1289311942.35.0.609245522343.issue10375@psf.upfronthosting.co.za> Message-ID: <1289311942.35.0.609245522343.issue10375@psf.upfronthosting.co.za> New submission from Hallvard B Furuseth : Could 2to3 without -p notice more cases of print(single argument), to avoid slapping another () around them? For example: print(2*3) print(", ".join(dir)) print(very + long + single + argument) My internal bug detector zooms in on ((foo)) when I read Python code - I'm seeing code where something was apparently left out, maybe an inner comma to make it a tuple. [Copied from Issue10070.] ---------- components: 2to3 (2.x to 3.0 conversion tool) messages: 120866 nosy: hfuru priority: normal severity: normal status: open title: 2to3 print(single argument) type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:18:12 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Tue, 09 Nov 2010 14:18:12 +0000 Subject: [issue960325] "--require " option for configure/make (fail if building not possible) In-Reply-To: <1288899875.17.0.241244944921.issue960325@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: Just for the record, I think you read this a bit too fast before closing: Terry J. Reedy writes: > I am closing this as some combination of wrong, inapplicable, > out-of-date, and postponed. > > 1. (...) For bz2, there is "This module provides a > comprehensive interface for the bz2 compression library." If the library > is not there, then the module obviously cannot function. The point of the request was to move that error from runtime to compile time. As a configuration option, not by default, since as you say: > 2. I think the current default build process is right for most users. Indeed. > 4. This seems to have become pretty much a non-issue. The OP says he has > no further concrete interest because "It's been a while since I had a > computer without these libraries...". I am suspecting this is pretty > much true for everyone who might otherwise care enough to provide a > patch. Half right - actually I _would_ still prefer that bit of safety, but OTOH I probably won't be providing a patch anytime soon. (Still, I can always reopen the issue if I do write one.) ---------- title: "--require " option for configure/make (fail if building not possible) -> "--require " option for configure/make (fail if building not possible) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:53:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 14:53:23 +0000 Subject: [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289314403.14.0.241318159497.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: As a follow-up to Raymond's suggestion, I am attaching a patch that will add a sidebar to the introduction section of the turtle documentation section. While it is not common to include screenshots in python documentation, I think it is very appropriate for a visual module such as turtle. I considered a "Basic example" subsection similar to that in unittest module documentation, but turtle introduction already has a basic example (forward(15); left(25) embedded in the prose, so I think a sidebar like this is more appropriate. Since svn does not include binary files in the patch, I will have to attach the embedded image separately. I will also post a screenshot of the rendered HTML page. ---------- Added file: http://bugs.python.org/file19557/turtle-star-sidebar.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:54:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 14:54:09 +0000 Subject: [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289314449.77.0.782139895946.issue7061@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file19558/turtle-star.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:55:05 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 14:55:05 +0000 Subject: [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289314505.01.0.140886537984.issue7061@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file19559/turtle-sidebar-screenshot.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:26:52 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Nov 2010 15:26:52 +0000 Subject: [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289316412.39.0.522687617612.issue7061@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I like it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:39:24 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Nov 2010 15:39:24 +0000 Subject: [issue960325] "--require " option for configure/make (fail if building not possible) Message-ID: <1289317164.73.0.619259225577.issue960325@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes, this could be reopened with a patch. Someone else would have to judge its usefulness and acceptability. So no guarantees. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:48:22 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 09 Nov 2010 15:48:22 +0000 Subject: [issue8315] ./python -m unittest test.test_importlib doesn't work In-Reply-To: <1270481793.28.0.468676978723.issue8315@psf.upfronthosting.co.za> Message-ID: <1289317702.62.0.545697318229.issue8315@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:51:55 2010 From: report at bugs.python.org (James Hutchison) Date: Tue, 09 Nov 2010 15:51:55 +0000 Subject: [issue10376] ZipFile unzip is unbuffered In-Reply-To: <1289317915.09.0.657677437465.issue10376@psf.upfronthosting.co.za> Message-ID: <1289317915.09.0.657677437465.issue10376@psf.upfronthosting.co.za> New submission from James Hutchison : The Unzip module is always unbuffered (tested v.3.1.2 Windows XP, 32-bit). This means that if one has to do many small reads it is a lot slower than reading a chunk of data to a buffer and then reading from that buffer. It seems logical that the unzip module should default to buffered reading and/or have a buffered argument. Likewise, the documentation should clarify that there is no buffering involved when doing a read, which runs contrary to the default behavior of a normal read. start Zipfile read done 27432 reads done took 0.859 seconds start buffered Zipfile read done 27432 reads done took 0.072 seconds start normal read (default buffer) done 27432 reads done took 0.139 seconds start buffered normal read done 27432 took 0.137 seconds ---------- assignee: docs at python components: Documentation, IO, Library (Lib) messages: 120871 nosy: Jimbofbx, docs at python priority: normal severity: normal status: open title: ZipFile unzip is unbuffered type: performance versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:52:54 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 15:52:54 +0000 Subject: [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289317974.74.0.0517596923335.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On Sat, Oct 30, 2010 at 8:27 PM, Terry J. Reedy wrote: .. > Sections about 2.x changes should not be in 3.x docs. I agree. Neither "Changes since Python 2.6" nor "Changes since Python 2.6" belong in this section. The first belongs to "What's new in Python 2.7" and the second to "What's new in Python 3.1". Do we edit these files retroactively? I don't want to simply remove these sections. Raymond, can you advise? On a similar note, I don't think the introduction section should refer to "the old turtle module". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:55:17 2010 From: report at bugs.python.org (James Hutchison) Date: Tue, 09 Nov 2010 15:55:17 +0000 Subject: [issue10376] ZipFile unzip is unbuffered In-Reply-To: <1289317915.09.0.657677437465.issue10376@psf.upfronthosting.co.za> Message-ID: <1289318117.85.0.369237202019.issue10376@psf.upfronthosting.co.za> James Hutchison added the comment: I should clarify that this is the zipfile constructor I am using: zipfile.ZipFile(filename, mode='r', allowZip64=True); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:08:41 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Nov 2010 16:08:41 +0000 Subject: [issue10372] [REGRESSION] test_gc fails in non-debug mode. In-Reply-To: <1289297149.99.0.674795586662.issue10372@psf.upfronthosting.co.za> Message-ID: <1289318921.42.0.728596263446.issue10372@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For some reason, this starts happening with the Lib/tokenize.py change in r86346. Resource warnings don't get enabled by -Wd: With r86345: $ ./python -Wd -c "open('LICENSE')" -c:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='LICENSE' encoding='UTF-8'> With r86346: $ ./python -Wd -c "open('LICENSE')" But enabling warnings programmatically still works: $ ./python -c "import warnings; warnings.simplefilter('default'); open('LICENSE')" -c:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='LICENSE' encoding='UTF-8'> ---------- assignee: -> haypo components: +Library (Lib) nosy: +georg.brandl, haypo, pitrou priority: normal -> high stage: -> needs patch title: [REGRESSION] test_gc fails on Mac OSX 10.6 -> [REGRESSION] test_gc fails in non-debug mode. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:14:54 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 09 Nov 2010 16:14:54 +0000 Subject: [issue9995] "setup.py register sdist upload" requires pass to be saved In-Reply-To: <1285838842.84.0.5702466564.issue9995@psf.upfronthosting.co.za> Message-ID: <1289319294.14.0.457776996542.issue9995@psf.upfronthosting.co.za> anatoly techtonik added the comment: Eric, interested parties will not fill CVE or DSA requests. They will just steal the pass of PyPI uploaders and use it to inject malicious code into popular packages. If you need a CVE or DSA to evaluate if an issue imposes a security risk, then better leave this task to somebody else. ---------- type: behavior -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:17:56 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 09 Nov 2010 16:17:56 +0000 Subject: [issue9995] "setup.py register sdist upload" requires pass to be saved In-Reply-To: <1285838842.84.0.5702466564.issue9995@psf.upfronthosting.co.za> Message-ID: <1289319476.51.0.0230764045798.issue9995@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- type: security -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:19:08 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Tue, 09 Nov 2010 16:19:08 +0000 Subject: [issue9995] "setup.py register sdist upload" requires pass to be saved In-Reply-To: <1285838842.84.0.5702466564.issue9995@psf.upfronthosting.co.za> Message-ID: <1289319548.94.0.498709945691.issue9995@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Please stop changing this flag. If you want to have a more secure PyPI transaction, you should first send a feature request on Catalog-SIG so pypi.python.org forces https. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:22:43 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Nov 2010 16:22:43 +0000 Subject: [issue10372] [REGRESSION] test_gc fails in non-debug mode. In-Reply-To: <1289297149.99.0.674795586662.issue10372@psf.upfronthosting.co.za> Message-ID: <1289319763.44.0.311316741809.issue10372@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Weirdly, this patch fixes the issue, but I'm unable to say why: diff -r cd1de1ff2657 Lib/tokenize.py --- a/Lib/tokenize.py Tue Nov 09 02:08:59 2010 +0100 +++ b/Lib/tokenize.py Tue Nov 09 17:16:21 2010 +0100 @@ -24,12 +24,12 @@ __author__ = 'Ka-Ping Yee __credits__ = ('GvR, ESR, Tim Peters, Thomas Wouters, Fred Drake, ' 'Skip Montanaro, Raymond Hettinger, Trent Nelson, ' 'Michael Foord') +import io import re import sys from token import * from codecs import lookup, BOM_UTF8 import collections -from io import TextIOWrapper cookie_re = re.compile("coding[:=]\s*([-\w.]+)") import token @@ -336,16 +336,14 @@ def detect_encoding(readline): return default, [first, second] -_builtin_open = open - def open(filename): """Open a file in read only mode using the encoding detected by detect_encoding(). """ - buffer = _builtin_open(filename, 'rb') + buffer = io.open(filename, 'rb') encoding, lines = detect_encoding(buffer.readline) buffer.seek(0) - text = TextIOWrapper(buffer, encoding, line_buffering=True) + text = io.TextIOWrapper(buffer, encoding, line_buffering=True) text.mode = 'r' return text ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:25:33 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Tue, 09 Nov 2010 16:25:33 +0000 Subject: [issue10374] setup.py caches outdated scripts in the build tree In-Reply-To: <1289308289.62.0.579780588392.issue10374@psf.upfronthosting.co.za> Message-ID: <1289319933.95.0.569710873626.issue10374@psf.upfronthosting.co.za> Tarek Ziad? added the comment: As described in distutils-SIG, we need to work on a clever way to update the build tree. For Distutils1, removing it completely (possibly via the clean command) is what people can do. ---------- components: +Distutils2 -Distutils type: behavior -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:34:45 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Nov 2010 16:34:45 +0000 Subject: [issue10372] [REGRESSION] test_gc fails in non-debug mode. In-Reply-To: <1289297149.99.0.674795586662.issue10372@psf.upfronthosting.co.za> Message-ID: <1289320485.67.0.222625931628.issue10372@psf.upfronthosting.co.za> Antoine Pitrou added the comment: One observation is that when the -W option is used, the "warnings" module gets loaded very early and itself imports linecache which then imports tokenize. At this point, the standard IO streams have not been initialized (_io is imported later) and the builtin "open" may not exist at all. So when tokenize references "open", it is a NameError at that point (which explains why the "weird fix" above is actually correct). As an additional annoyance, when importing Lib/warnings.py fails (for example if you sneak in a "1/0" at the beginning of the file), the exception gets silenced: the NameError above doesn't get printed. ---------- nosy: +benjamin.peterson, brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:45:36 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 Nov 2010 16:45:36 +0000 Subject: [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289321136.23.0.232260553624.issue7061@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The mini change log is harmless. I would leave it as is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:46:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 16:46:32 +0000 Subject: [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1289321192.07.0.380272666306.issue10318@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I would like to add my +1 to Eric's msg120485 above. What I really find puzzling is why some scripts in Tools/ have hashbangs, but don't have execute permission. Tools/scripts/cleanfuture.py Tools/scripts/combinerefs.py Tools/scripts/db2pickle.py Tools/scripts/find_recursionlimit.py Tools/scripts/md5sum.py Tools/scripts/pickle2db.py Tools/scripts/pysource.py Tools/scripts/svneol.py I suggest a simple rule: no execute bit set in permissions - no hashbang line. And I don't think stdlib modules should have execute bit: -rwxr-xr-x Lib/base64.py -rwxr-xr-x Lib/cProfile.py -rwxr-xr-x Lib/cgi.py -rwxr-xr-x Lib/keyword.py -rwxr-xr-x Lib/pdb.py -rwxr-xr-x Lib/platform.py -rwxr-xr-x Lib/profile.py -rwxr-xr-x Lib/pydoc.py -rwxr-xr-x Lib/quopri.py -rwxr-xr-x Lib/smtpd.py -rwxr-xr-x Lib/smtplib.py -rwxr-xr-x Lib/symbol.py -rwxr-xr-x Lib/tabnanny.py -rwxr-xr-x Lib/token.py -rwxr-xr-x Lib/uu.py -rwxr-xr-x Lib/test/pystone.py -rwxr-xr-x Lib/test/re_tests.py -rwxr-xr-x Lib/test/regrtest.py -rwxr-xr-x Lib/test/test_array.py -rwxr-xr-x Lib/test/test_binhex.py -rwxr-xr-x Lib/test/test_dbm_gnu.py -rwxr-xr-x Lib/test/test_dbm_ndbm.py -rwxr-xr-x Lib/test/test_errno.py -rwxr-xr-x Lib/test/test_userstring.py ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 18:01:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 17:01:13 +0000 Subject: [issue7061] Improve turtle module documentation In-Reply-To: <1289321136.23.0.232260553624.issue7061@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Tue, Nov 9, 2010 at 11:45 AM, Raymond Hettinger wrote: .. > Raymond Hettinger added the comment: > > The mini change log is harmless. ?I would leave it as is. It is not entirely harmless. First, it occupies valuable easy to scroll to end-of-page real estate which is better used for the "Demo scripts" section. Second, "Changes since 3.0" in 3.2 documentation without "Changes since 3.1" give a feel of unmaintained module. Third, "Changes since 3.0" refers to the Demo directory which no longer exists and I don't want to add "Changes since 3.1" to fix that. However, I don't feel too strongly about removing them. I would leave this for the "What's new" editor to decide and if that's Raymond, I guess the decision has been made. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 18:25:30 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 17:25:30 +0000 Subject: [issue10371] Deprecate trace module undocumented API In-Reply-To: <1289269952.54.0.146506315747.issue10371@psf.upfronthosting.co.za> Message-ID: <1289323530.52.0.160179864775.issue10371@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +brett.cannon, eli.bendersky, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 19:04:50 2010 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Tue, 09 Nov 2010 18:04:50 +0000 Subject: [issue10329] trace.py and unicode in Python 3 In-Reply-To: <1289213297.51.0.299688121399.issue10329@psf.upfronthosting.co.za> Message-ID: <4CD98D13.1020908@livinglogic.de> Walter D?rwald added the comment: > STINNER Victor added the comment: > >> ... it complicates handling of the output of trace.py. >> For each file you have to do the encoding detection dance again ... > > What? You just have to call one function! tokenize.open() :-) Well, ok, > it's not commited yet, but it looks like most people agree: #10335. The problem is that the script that downloads and builds the Python source and generates the HTML for http://coverage.livinglogic.de/ isn't ported to Python 3 yet (and can't be ported easily). However *running* the test suite of course uses the current Python checkout, so an option that lets me specify which encoding trace.py/regrtest.py should output would be helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 19:07:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Nov 2010 18:07:49 +0000 Subject: [issue10372] [REGRESSION] test_gc fails in non-debug mode. In-Reply-To: <1289297149.99.0.674795586662.issue10372@psf.upfronthosting.co.za> Message-ID: <1289326069.9.0.226774829423.issue10372@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch. It moves warnings initialization after io initialization (the latter being arguably more critical than the former). Also adds two tests. ---------- assignee: haypo -> keywords: +patch stage: needs patch -> patch review versions: +Python 2.7, Python 3.1 Added file: http://bugs.python.org/file19560/warnboot.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 19:12:15 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Nov 2010 18:12:15 +0000 Subject: [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289326335.49.0.526130164544.issue7061@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To me, the mini change logs are both distracting noise and contrary to the general start-fresh policy for 3.x docs, stated somewhere by Georg B, which I really like. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 19:17:49 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Nov 2010 18:17:49 +0000 Subject: [issue10371] Deprecate trace module undocumented API In-Reply-To: <1289269952.54.0.146506315747.issue10371@psf.upfronthosting.co.za> Message-ID: <1289326669.46.0.316850126015.issue10371@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Looks good in a cursory reading. I presume trace test still passes. If you change the signature of the renamed functions, that would break the current wrappings. Would you use new private functions with different names, or change the wrappings where possible? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 19:20:53 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Nov 2010 18:20:53 +0000 Subject: [issue10372] [REGRESSION] test_gc fails in non-debug mode. In-Reply-To: <1289297149.99.0.674795586662.issue10372@psf.upfronthosting.co.za> Message-ID: <1289326853.94.0.140234354684.issue10372@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I also wrote a patch for the warnings error silently ignored: import_warnings_error.patch. ---------- Added file: http://bugs.python.org/file19561/import_warnings_error.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 19:46:33 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 18:46:33 +0000 Subject: [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289328393.98.0.900190004869.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed a slightly modified turtle-star-sidebar.diff in revision 86364. Note that I've included both pdf and postscript files in case someone would want to run postscript through a better distiller than the OSX preview that I used. The postscript was produced using postscript() method of the tkinter canvas and bbox was manually adjusted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 19:59:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Nov 2010 18:59:49 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1201200095.82.0.748607504278.issue1926@psf.upfronthosting.co.za> Message-ID: <1289329189.71.0.807362825459.issue1926@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I have committed the patch in r86365, and I've made usenetrc False by default in r86366. Thanks for contributing! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 20:15:57 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Tue, 09 Nov 2010 19:15:57 +0000 Subject: [issue10377] cProfile incorrectly labels its output In-Reply-To: <1289330157.64.0.804847448743.issue10377@psf.upfronthosting.co.za> Message-ID: <1289330157.64.0.804847448743.issue10377@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : Consider this transcript: >>> cProfile.run("import time; time.sleep(1)") 4 function calls in 1.012 CPU seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 0.011 0.011 1.012 1.012 :1() 1 0.000 0.000 1.012 1.012 {built-in method exec} 1 1.001 1.001 1.001 1.001 {built-in method sleep} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} >>> It is not the case that the profiled code uses >1 CPU seconds. It spends the entire time sleeping. The default timer for cProfile is a wallclock timer. The output should reflect this. ---------- messages: 120890 nosy: exarkun priority: normal severity: normal status: open title: cProfile incorrectly labels its output type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 20:31:44 2010 From: report at bugs.python.org (Phillip J. Eby) Date: Tue, 09 Nov 2010 19:31:44 +0000 Subject: [issue10367] "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment" In-Reply-To: <1289252212.79.0.124730407849.issue10367@psf.upfronthosting.co.za> Message-ID: <1289331104.86.0.332942102504.issue10367@psf.upfronthosting.co.za> Phillip J. Eby added the comment: To better show what the problem is, here's a change that would fix the problem (albeit in an ugly way): --- upload.py 2010-07-07 20:16:33.000000000 -0400 +++ /home/pje/upload.new 2010-11-09 14:30:21.000000000 -0500 @@ -167,6 +167,9 @@ request = Request(self.repository, data=body, headers=headers) + + result = None + # send the data try: result = urlopen(request) @@ -186,4 +189,4 @@ self.announce('Upload failed (%s): %s' % (status, reason), log.ERROR) if self.show_response: - self.announce('-'*75, result.read(), '-'*75) + self.announce('-'*75, result.read() if result is not None else 'ERROR', '-'*75) ---------- nosy: +pje resolution: duplicate -> stage: committed/rejected -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 20:33:40 2010 From: report at bugs.python.org (Brian Warner) Date: Tue, 09 Nov 2010 19:33:40 +0000 Subject: [issue10370] py3 readlines() reports wrong offset for UnicodeDecodeError In-Reply-To: <1289264715.81.0.326279765732.issue10370@psf.upfronthosting.co.za> Message-ID: <1289331220.96.0.543093969258.issue10370@psf.upfronthosting.co.za> Brian Warner added the comment: > Use .readline() to locate an invalid byte is not the right algorithm. If > you would like to do that, you should open the file in binary mode and > decodes the content yourself, chunk by chunk. Or if you manipulate small > files, you can use .read() as you wrote. Oh, I agree that readline() is inappropriate as a validation tool. My specific complaint is that the error message is misleading. I hit a message like this: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 26: ordinal not in range(128) and wanted to know if the file was UTF-8, or latin-1, or some other encoding, so I wanted to see that 0xe2 in context. The message said to look at offset 26, but the actual problem might be at 4122, or 8218, etc. It took me several minutes (and hexdump and grepping for ' e2 ') to find the character and figure out what was going on. Perhaps, if the error message cannot report a correct offset, then it shouldn't be reporting an offset at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 20:34:40 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 09 Nov 2010 19:34:40 +0000 Subject: [issue10370] py3 readlines() reports wrong offset for UnicodeDecodeError In-Reply-To: <1289264715.81.0.326279765732.issue10370@psf.upfronthosting.co.za> Message-ID: <1289331280.11.0.0864480857139.issue10370@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 20:36:36 2010 From: report at bugs.python.org (Phillip J. Eby) Date: Tue, 09 Nov 2010 19:36:36 +0000 Subject: [issue10367] "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment" In-Reply-To: <1289252212.79.0.124730407849.issue10367@psf.upfronthosting.co.za> Message-ID: <1289331396.29.0.671588433352.issue10367@psf.upfronthosting.co.za> Phillip J. Eby added the comment: Btw, a quick review of the 3.x trunk code for this shows that it does *not* have this problem; this is specific to 2.7 and AFAICT *only* 2.7. (This problem was introduced in r73436, btw, as of the move to urllib2 vs. httplib.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 20:37:12 2010 From: report at bugs.python.org (Phillip J. Eby) Date: Tue, 09 Nov 2010 19:37:12 +0000 Subject: [issue9199] distutils upload command crashes when displaying server response In-Reply-To: <1278596334.3.0.531936724428.issue9199@psf.upfronthosting.co.za> Message-ID: <1289331432.76.0.217821992154.issue9199@psf.upfronthosting.co.za> Phillip J. Eby added the comment: Confirmed - issue10367 is not a dupe. This bug was that a *successful* upload would crash; issue10367 occurs only in the HTTPError case, and isn't fixed by this issue's patch. Reclosing this and reopening 10367. ---------- stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 20:47:29 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 09 Nov 2010 19:47:29 +0000 Subject: [issue10070] 2to3 wishes for already-2to3'ed files In-Reply-To: <1286882661.81.0.431457664283.issue10070@psf.upfronthosting.co.za> Message-ID: <1289332049.46.0.37828514943.issue10070@psf.upfronthosting.co.za> Martin v. L?wis added the comment: And I still don't understand the rationale for this request. Can you please post an example Python module that has this markup you are asking for, so I can show you how to achieve what you want without the markup? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 21:10:42 2010 From: report at bugs.python.org (Andrew Vant) Date: Tue, 09 Nov 2010 20:10:42 +0000 Subject: [issue1926] NNTPS support in nntplib In-Reply-To: <1289329189.71.0.807362825459.issue1926@psf.upfronthosting.co.za> Message-ID: <4CD9AAB9.13847.1061EAF5@ajvant.gmail.com> Andrew Vant added the comment: On 9 Nov 2010 at 18:59, Antoine Pitrou wrote: > I have committed the patch in r86365, and I've made usenetrc > False by default in r86366. Thanks for contributing! Woot. I thank you. Regarding usenetrc, the NNTP.login and NNTP.starttls documentation assumed it was true by default (correct when I wrote it) and mentioned it had to be forced false for starttls to work in some cases. I'm glad that's not the case anymore but the documentation as I wrote it is wrong now. :-) -- Andrew ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 21:21:39 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Nov 2010 20:21:39 +0000 Subject: [issue10022] Emit more information in decoded SSL certificates In-Reply-To: <1286209935.64.0.606028166295.issue10022@psf.upfronthosting.co.za> Message-ID: <1289334099.62.0.00545175649357.issue10022@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Fixed in r86369. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 21:28:39 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Tue, 09 Nov 2010 20:28:39 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1289334519.29.0.191497756659.issue7978@psf.upfronthosting.co.za> Vetoshkin Nikita added the comment: Any news on this? Could we possibly apply patch as is? If I'm not mistaken timeout issue is the only one left unresolved. About timeout. The most elegant way, would be to use select's syscall timeout parameter, but man 2 select says: "On Linux, select() modifies timeout to reflect the amount of time not slept; most other implementations do not do this. (POSIX.1-2001 permits either behavior.) This causes problems both when Linux code which reads timeout is ported to other operating systems, and when code is ported to Linux that reuses a struct timeval for multiple select()s in a loop without reinitializing it. Consider timeout to be undefined after select() returns." I'm ready to adapt Yaniv's patch to 2.7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 21:40:53 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Tue, 09 Nov 2010 20:40:53 +0000 Subject: [issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input In-Reply-To: <1190630936.13.0.318924236509.issue1195@psf.upfronthosting.co.za> Message-ID: <1289335253.53.0.254756506179.issue1195@psf.upfronthosting.co.za> Vetoshkin Nikita added the comment: Confirming that issue is present in latest svn checkout and Ralf's fix helps. ---------- nosy: +nvetoshkin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 22:00:53 2010 From: report at bugs.python.org (Richard Fuhr) Date: Tue, 09 Nov 2010 21:00:53 +0000 Subject: [issue10378] Typo in results of help(divmod) In-Reply-To: <1289336453.31.0.743925531352.issue10378@psf.upfronthosting.co.za> Message-ID: <1289336453.31.0.743925531352.issue10378@psf.upfronthosting.co.za> New submission from Richard Fuhr : When running Python 2.7 if you invoke help(divmod) the first line of the resulting help displays Help on built-in function divmod in module __builtin__: but I believe that the name of the module is __builtins__ so the line should say Help on built-in function divmod in module __builtinsq__: ---------- assignee: docs at python components: Documentation messages: 120900 nosy: docs at python, rdfuhr priority: normal severity: normal status: open title: Typo in results of help(divmod) type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 22:04:41 2010 From: report at bugs.python.org (Richard Fuhr) Date: Tue, 09 Nov 2010 21:04:41 +0000 Subject: [issue10378] Typo in results of help(divmod) In-Reply-To: <1289336453.31.0.743925531352.issue10378@psf.upfronthosting.co.za> Message-ID: <1289336681.15.0.303453593026.issue10378@psf.upfronthosting.co.za> Richard Fuhr added the comment: I had a typo in my own bug report that was reporting a typo; what I intended to say was the following ( the q should not have been there at the end ) When running Python 2.7 if you invoke help(divmod) the first line of the resulting help displays Help on built-in function divmod in module __builtin__: but I believe that the name of the module is __builtins__ so the line should say Help on built-in function divmod in module __builtins__: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 00:02:50 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Nov 2010 23:02:50 +0000 Subject: [issue4471] IMAP4 missing support for starttls In-Reply-To: <1228062796.45.0.215183772699.issue4471@psf.upfronthosting.co.za> Message-ID: <1289343770.98.0.519288969698.issue4471@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed some of the remote tests in r86380, which also helped me fix a bug in login() in 3.x. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 00:17:44 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Nov 2010 23:17:44 +0000 Subject: [issue4471] IMAP4 missing support for starttls In-Reply-To: <1228062796.45.0.215183772699.issue4471@psf.upfronthosting.co.za> Message-ID: <1289344664.7.0.0762793874476.issue4471@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The shutdown change was committed in r86383. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 00:30:02 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Nov 2010 23:30:02 +0000 Subject: [issue4471] IMAP4 missing support for starttls In-Reply-To: <1228062796.45.0.215183772699.issue4471@psf.upfronthosting.co.za> Message-ID: <1289345402.65.0.361767850556.issue4471@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is an updated STARTTLS patch for py3k. ---------- stage: -> patch review type: -> feature request versions: +Python 3.2 -Python 2.6 Added file: http://bugs.python.org/file19562/imaptls.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 00:33:27 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 09 Nov 2010 23:33:27 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> New submission from Barry A. Warsaw : @mission[~:1001]% python2.7 -c "import locale; print locale.format('%.0f KB', 100)" Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/locale.py", line 189, in format "format specifier, %s not valid") % repr(percent)) ValueError: format() must be given exactly one %char format specifier, '%.0f KB' not valid @mission[~:1002]% python2.6 -c "import locale; print locale.format('%.0f KB', 100)" 100 KB ---------- messages: 120905 nosy: barry priority: normal severity: normal status: open title: locale.format() input regression versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 00:54:04 2010 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Tue, 09 Nov 2010 23:54:04 +0000 Subject: [issue10378] Typo in results of help(divmod) In-Reply-To: <1289336453.31.0.743925531352.issue10378@psf.upfronthosting.co.za> Message-ID: <1289346844.12.0.932480546757.issue10378@psf.upfronthosting.co.za> Andreas St?hrk added the comment: __builtin__ is the correct name for the module (see http://docs.python.org/library/__builtin__.html, especially the note at the end which is the cause of the confusion), hence this is not a bug. ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 00:55:00 2010 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Tue, 09 Nov 2010 23:55:00 +0000 Subject: [issue10351] Add autocompletion for keys in dictionaries In-Reply-To: <1289208160.65.0.489934250712.issue10351@psf.upfronthosting.co.za> Message-ID: <1289346900.33.0.253759613798.issue10351@psf.upfronthosting.co.za> Changes by Andreas St?hrk : ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 00:55:58 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 09 Nov 2010 23:55:58 +0000 Subject: [issue10378] Typo in results of help(divmod) In-Reply-To: <1289336453.31.0.743925531352.issue10378@psf.upfronthosting.co.za> Message-ID: <1289346958.6.0.00890771514439.issue10378@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 00:56:07 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 09 Nov 2010 23:56:07 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289346967.65.0.862857105947.issue10379@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This was changed by issue2522 on purpose; no suffix is allowed in locale.format(). ---------- nosy: +amaury.forgeotdarc, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 00:58:54 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 09 Nov 2010 23:58:54 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289347134.38.0.332414176414.issue10379@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Okay, so line 187 of locale.py has this test: if not match or len(match.group())!= len(percent): the problematic part is the len test. When format string is '%.0f KB' match.group() is '%.0f' but of course percent is the full string. This seems like a bogus test, since clearly the given input is a valid format string. I'm not sure what the intent of this test is. The Python 2.6 test is: if percent[0] != '%': which is perhaps too naive. I guess I don't understand why this test is here. Wouldn't it make more sense to either just let any TypeError from _format() to percolate up, or to catch that TypeError and transform it into the ValueError? Why try to replicate the logic of str.__mod__()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 00:59:30 2010 From: report at bugs.python.org (Eric Smith) Date: Tue, 09 Nov 2010 23:59:30 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289347170.89.0.637982914048.issue10379@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 01:01:57 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 10 Nov 2010 00:01:57 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289347317.6.0.51615279945.issue10379@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Hmm. So I guess the answer is to use locale.format_string() instead. But the documentation for locale.format() is not entirely clear about the prohibition on trailing text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 01:06:37 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 10 Nov 2010 00:06:37 +0000 Subject: [issue2522] locale.format() problems with decimal separator In-Reply-To: <1206983289.11.0.844443108334.issue2522@psf.upfronthosting.co.za> Message-ID: <1289347597.02.0.0154113222849.issue2522@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Hmm. See bug 10379 for fallout from this change. I'm not saying it should be reverted but see that issue for further discussion. ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 01:06:55 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 10 Nov 2010 00:06:55 +0000 Subject: [issue2522] locale.format() problems with decimal separator In-Reply-To: <1206983289.11.0.844443108334.issue2522@psf.upfronthosting.co.za> Message-ID: <1289347615.63.0.0962216232263.issue2522@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I mean issue 10379 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 01:08:02 2010 From: report at bugs.python.org (Eric Smith) Date: Wed, 10 Nov 2010 00:08:02 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289347682.23.0.70062365803.issue10379@psf.upfronthosting.co.za> Eric Smith added the comment: I agree the documentation isn't terribly clear on what a "%char specifier" or "whole format string" is. FWIW, this is also a 3.1 and greater issue. ---------- versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 01:08:19 2010 From: report at bugs.python.org (Eric Smith) Date: Wed, 10 Nov 2010 00:08:19 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289347699.5.0.278971738962.issue10379@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 07:29:25 2010 From: report at bugs.python.org (Peda Venkateswarlu Pola) Date: Wed, 10 Nov 2010 06:29:25 +0000 Subject: [issue10380] AttributeError: 'module' object has no attribute 'exc_traceback' In-Reply-To: <1289370565.38.0.315034311665.issue10380@psf.upfronthosting.co.za> Message-ID: <1289370565.38.0.315034311665.issue10380@psf.upfronthosting.co.za> New submission from Peda Venkateswarlu Pola : As we have some new requirements in standard logging, We have written wrapper logger. This includes find caller which gives information about filename , line number , class name and method name. As i found that python logger doesn't give class name so we get the code from python logger and modified to our requirement. We end up with the following error intermittently from the function "currentframe()" . "AttributeError: 'module' object has no attribute 'exc_traceback'" def currentframe(): """Return the frame object for the caller's stack frame.""" try: raise Exception except: return sys.exc_traceback.tb_frame.f_back Please help me out ASAP. Great thanks in advance. ---------- components: None files: findcaller_modi.py messages: 120913 nosy: polavenki priority: normal severity: normal status: open title: AttributeError: 'module' object has no attribute 'exc_traceback' type: crash versions: Python 2.5 Added file: http://bugs.python.org/file19563/findcaller_modi.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 07:35:18 2010 From: report at bugs.python.org (Richard Fuhr) Date: Wed, 10 Nov 2010 06:35:18 +0000 Subject: [issue10378] Typo in results of help(divmod) In-Reply-To: <1289346844.12.0.932480546757.issue10378@psf.upfronthosting.co.za> Message-ID: <584C9BFA-ED59-4B31-9AC1-FF1D2DC8494F@gmail.com> Richard Fuhr added the comment: OK, thanks for the clarification. I am new to Python. Sent from my iPod On Nov 9, 2010, at 3:54 PM, Andreas St?hrk wrote: > > Andreas St?hrk added the comment: > > __builtin__ is the correct name for the module (see http://docs.python.org/library/__builtin__.html, especially the note at the end which is the cause of the confusion), hence this is not a bug. > > ---------- > nosy: +Trundle > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 08:24:21 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 10 Nov 2010 07:24:21 +0000 Subject: [issue10380] AttributeError: 'module' object has no attribute 'exc_traceback' In-Reply-To: <1289370565.38.0.315034311665.issue10380@psf.upfronthosting.co.za> Message-ID: <1289373861.22.0.632327646704.issue10380@psf.upfronthosting.co.za> Georg Brandl added the comment: sys.exc_traceback is deprecated, please use sys.exc_info(). Also note that this tracker is not a place to get help; the python-list mailing list (a.k.a. comp.lang.python newsgroup) is the right place for that. ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 08:58:32 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 10 Nov 2010 07:58:32 +0000 Subject: [issue10358] Doc styles for print should only use dark colors In-Reply-To: <1289224086.88.0.0372722217541.issue10358@psf.upfronthosting.co.za> Message-ID: <1289375912.54.0.081138180798.issue10358@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree and will add a print-media stylesheet. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 20:55:37 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Nov 2010 19:55:37 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1289418937.29.0.496299213015.issue2986@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 09:02:39 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Thu, 11 Nov 2010 08:02:39 +0000 Subject: [issue9520] Add Patricia Trie high performance container In-Reply-To: <1280969963.37.0.950740145402.issue9520@psf.upfronthosting.co.za> Message-ID: <1289462559.98.0.375652901802.issue9520@psf.upfronthosting.co.za> Changes by Dirkjan Ochtman : ---------- nosy: +djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 03:54:05 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Nov 2010 02:54:05 +0000 Subject: [issue10385] Mark up "subprocess" as module in its doc In-Reply-To: <1289444045.02.0.247018067393.issue10385@psf.upfronthosting.co.za> Message-ID: <1289444045.02.0.247018067393.issue10385@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : I was going to commit this patch, but decided to ask for a second opinion. I think module names in section titles should be marked up with :mod:. ---------- assignee: belopolsky components: Documentation files: subprocess-doc.diff keywords: patch messages: 120937 nosy: belopolsky priority: normal severity: normal stage: commit review status: open title: Mark up "subprocess" as module in its doc versions: Python 3.2 Added file: http://bugs.python.org/file19567/subprocess-doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 21:31:26 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 10 Nov 2010 20:31:26 +0000 Subject: [issue10383] test_os leaks under Windows In-Reply-To: <1289421086.3.0.902677944517.issue10383@psf.upfronthosting.co.za> Message-ID: <1289421086.3.0.902677944517.issue10383@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Y:\>py3k\__svn__\PCbuild\python_d.exe -m test.regrtest -R 3:2 test_os [1/1] test_os [33558 refs] beginning 5 repetitions 12345 [33558 refs] .[33558 refs] .[33558 refs] .[33558 refs] .[33558 refs] . test_os leaked [3, 3] references, sum=6 1 test failed: test_os [117612 refs] ---------- components: Library (Lib), Windows messages: 120931 nosy: amaury.forgeotdarc, brian.curtin, ocean-city, pitrou, rhettinger, tim.golden priority: normal severity: normal status: open title: test_os leaks under Windows type: resource usage versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 19:14:56 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Nov 2010 18:14:56 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1289412896.4.0.227142458792.issue2986@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Tim told me to continue with this as he has no time. rev86401 - apply 3.1 doc fix ---------- assignee: tim_one -> terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 01:05:58 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Nov 2010 00:05:58 +0000 Subject: [issue10382] Command line error marker misplaced on unicode entry In-Reply-To: <1289417775.52.0.418272995538.issue10382@psf.upfronthosting.co.za> Message-ID: <1289433958.33.0.737688451975.issue10382@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a patch that seems to fix the issue. Note that I considered fixing the problem in parsetok.c where offset is originally computed, but this is part of pgen which has to be compiled without unicode support. The test case suitable to be included in unittests is: try: eval(b'\xc2\xa1'.decode('utf-8')) except SyntaxError as err: assert(err.offset == 1) ---------- assignee: -> belopolsky keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file19565/issue10382.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 15:29:28 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Nov 2010 14:29:28 +0000 Subject: [issue10308] Modules/getpath.c bugs In-Reply-To: <1288870063.75.0.834981100194.issue10308@psf.upfronthosting.co.za> Message-ID: <1289399368.31.0.51116551548.issue10308@psf.upfronthosting.co.za> STINNER Victor added the comment: r86399 fixes the code checking PyUnicode_AsWideChar() failure. The following change is useless, it cannot overflow: - if (n + k > MAXPATHLEN) + if (k > MAXPATHLEN - n) k = MAXPATHLEN - n; n and k maximum values are MAXPATHLEN (and the maximum value of MAXPATHLEN is 4096), whereas n and k type maximum values are at least 2^31. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 09:24:10 2010 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 11 Nov 2010 08:24:10 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1289463850.48.0.807139206404.issue2986@psf.upfronthosting.co.za> Eli Bendersky added the comment: Attaching a new patch for 2.7 freshly generated vs. current 2.7 maintenance branch from SVN. ---------- Added file: http://bugs.python.org/file19569/issue2986.fix27.5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 18:05:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 10 Nov 2010 17:05:07 +0000 Subject: [issue10205] Can't have two tags with the same QName In-Reply-To: <1288122049.66.0.916624044666.issue10205@psf.upfronthosting.co.za> Message-ID: <1289408707.73.0.571141041472.issue10205@psf.upfronthosting.co.za> ?ric Araujo added the comment: 3.1 was released before 2.7, so there are some features in 2.7 that aren?t in 3.1. Tests are probably candidate for backport. (BTW, I don?t understand the fix :) I guess I fail at boolean logic tonight.) ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 19:22:48 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Nov 2010 18:22:48 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1289413368.59.0.0417033956655.issue2986@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Tim told me to continue with this as he has no time. rev86401 - apply 3.1 doc fix I cannot apply 2.7 patch. I has different header lines. In particular, TortoiseSVN cannot fetch nonexistent revision "Mon Aug 30 06:37:52 2010 +0300". Please regenerate against current 2.7 with method used for 2.6/3.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 17:34:04 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Nov 2010 16:34:04 +0000 Subject: [issue10358] Doc styles for print should only use dark colors In-Reply-To: <1289224086.88.0.0372722217541.issue10358@psf.upfronthosting.co.za> Message-ID: <1289406844.44.0.538464663696.issue10358@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 20:36:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 10 Nov 2010 19:36:15 +0000 Subject: [issue10382] Command line error marker misplaced on unicode entry In-Reply-To: <1289417775.52.0.418272995538.issue10382@psf.upfronthosting.co.za> Message-ID: <1289417775.52.0.418272995538.issue10382@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : >>> ?????????? File "", line 1 ?????????? ^ SyntaxError: invalid character in identifier It looks like strlen() is used instead of number of characters in the decoded string. ---------- components: Interpreter Core messages: 120930 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: Command line error marker misplaced on unicode entry type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 01:17:27 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Nov 2010 00:17:27 +0000 Subject: [issue10382] Command line error marker misplaced on unicode entry In-Reply-To: <1289417775.52.0.418272995538.issue10382@psf.upfronthosting.co.za> Message-ID: <1289434647.49.0.579397410122.issue10382@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 21:14:55 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 10 Nov 2010 20:14:55 +0000 Subject: [issue7434] general pprint rewrite In-Reply-To: <1259944363.21.0.149882342014.issue7434@psf.upfronthosting.co.za> Message-ID: <1289420095.93.0.423389503838.issue7434@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 01:23:01 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 11 Nov 2010 00:23:01 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1289434981.26.0.945870240359.issue10142@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : Removed file: http://bugs.python.org/file19356/z _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 02:37:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Nov 2010 01:37:09 +0000 Subject: [issue10384] SyntaxError should contain exact location of the invalid character in identifier In-Reply-To: <1289439285.11.0.506002899946.issue10384@psf.upfronthosting.co.za> Message-ID: <1289439429.76.0.854497369587.issue10384@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- dependencies: +Command line error marker misplaced on unicode entry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 14:55:53 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Nov 2010 13:55:53 +0000 Subject: [issue10372] [REGRESSION] test_gc fails in non-debug mode. In-Reply-To: <1289297149.99.0.674795586662.issue10372@psf.upfronthosting.co.za> Message-ID: <1289397353.82.0.592698270679.issue10372@psf.upfronthosting.co.za> STINNER Victor added the comment: > Here is a patch. It moves warnings initialization after > io initialization (the latter being arguably more critical > than the former). Also adds two tests. initstdio() and initmain() may emit warnings. Eg. issue #8766 (which now have a test in test_warnings). It's possible to initialize warnings before initstdio() by rewriting more warnings functions in C (into _warnings). But I don't think that it would solve all issues: emit a warning may write text into stderr, and if stderr is not ready yet, it doesn't work anyway. So I'm ok to exchange initstdio() and warnings initialization: we may loose some warnings, but at least, the warnings machinery will be operational. But Antoine, could you please add a comment to explain why warnings is initialized after initstdio()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 21:57:44 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 10 Nov 2010 20:57:44 +0000 Subject: [issue10382] Command line error marker misplaced on unicode entry In-Reply-To: <1289417775.52.0.418272995538.issue10382@psf.upfronthosting.co.za> Message-ID: <1289422664.64.0.344626019117.issue10382@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +ezio.melotti, haypo, lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 01:30:18 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 11 Nov 2010 00:30:18 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1289435418.44.0.00157683785628.issue10142@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Please, review this. I had changed IO to support the new flags too. To do it, I must relax error control in IO, a bit. So, the new flag are supported both in "os.lseek()" and in standard file objects. Please, Antoine, could you review?. I have checked the patch manually, but I can't think a way to automate it. We don't have any ZFS machine in buildbot. I would love to commit this next week. Thanks for your time. ---------- assignee: loewis -> pitrou keywords: +patch Added file: http://bugs.python.org/file19566/z.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 18:10:13 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 10 Nov 2010 17:10:13 +0000 Subject: [issue10372] [REGRESSION] test_gc fails in non-debug mode. In-Reply-To: <1289297149.99.0.674795586662.issue10372@psf.upfronthosting.co.za> Message-ID: <1289409013.23.0.0917823849788.issue10372@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r86395 (3.x); I've only backported the tests to 2.7 and 3.1. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 09:50:36 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Thu, 11 Nov 2010 08:50:36 +0000 Subject: [issue10308] Modules/getpath.c bugs In-Reply-To: <1289399368.31.0.51116551548.issue10308@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: STINNER Victor writes: > The following change is useless, it cannot overflow: > - if (n + k > MAXPATHLEN) > + if (k > MAXPATHLEN - n) > k = MAXPATHLEN - n; > > n and k maximum values are MAXPATHLEN (and the maximum value of > MAXPATHLEN is 4096), (...) OK. I could only tell that for n, not for k. But even so it would certainly be an unlikely overflow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 16:16:21 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 10 Nov 2010 15:16:21 +0000 Subject: [issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate In-Reply-To: <1197387663.32.0.0598513497038.issue1589@psf.upfronthosting.co.za> Message-ID: <1289402181.98.0.765765993302.issue1589@psf.upfronthosting.co.za> anatoly techtonik added the comment: Should we escalate this issue to CVA for Python 2.x? ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 19:20:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 10 Nov 2010 18:20:23 +0000 Subject: [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289413223.13.0.236219045402.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On Sun, Oct 31, 2010 at 8:00 PM, ?ric Araujo wrote: .. > ?Python? is lower-cased only when referring to the executable (as a > file) itself. ?When talking about the language, the implementation or > the VM in an abstract way (not a file), It think it?s always ?Python?. For the record, this is covered in the Python documentation style guide: """ Python The name of our favorite programming language is always capitalized. """ http://docs.python.org/dev/documenting/style.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 15:44:39 2010 From: report at bugs.python.org (Martin Dunschen) Date: Wed, 10 Nov 2010 14:44:39 +0000 Subject: [issue10363] Embedded python, handle (memory) leak In-Reply-To: <1289237931.86.0.626938349639.issue10363@psf.upfronthosting.co.za> Message-ID: <1289400279.7.0.0359982947027.issue10363@psf.upfronthosting.co.za> Martin Dunschen added the comment: I have identified 5 cases where objects of type PyThread_type_lock are allocated but never freed again: import.c: import_lock pystate.c: head_mutex thread.c: key_mutex ceval.c: interpreter_lock zliblock.c: zlib_lock This leads to a handle leak on windows (PyThread_type_lock) is mapped to PNRMUTEX, a structure that contains a HANDLE to an event, created by CreateEvent, but never released with CloseHandle. As I can see it, common to all thread implementations (in thread.c) is the PyThread_allocate_lock call for the above locks, but it is not matched by a PyThread_free_lock. I can imagine there are similar memory leaks in other thread implementations for different OS. Additionally there is one directly created event in timemodule.c hInterruptEvent And finally in myreadline.c: _PyOS_ReadmeLock no matching PyThread_free_lock for the call to PyThread_allocate_lock. All these memory or handle leaks could easily be fixed by using some C++ smart pointer implementations without requiring any changes to the API for embedding/extending python. On windows it requires some minor changes to allow compiling thread.c and timemodule.c as C++ code. I am happy to post my version here, for other more knowledgeable python programmers to review them. I see my suggestions as a patch, but in an ideal world a lot of the code in pythoncore could be reimplemented using proper C++. Martin ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 05:08:44 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Nov 2010 04:08:44 +0000 Subject: [issue10386] token module should define __all__ In-Reply-To: <1289448524.33.0.684332419929.issue10386@psf.upfronthosting.co.za> Message-ID: <1289448524.33.0.684332419929.issue10386@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : The token module appears to be designed to be used with import *. In fact it is used this way in the tokenize module. However it does not define __all__ and as a result, from token import * leaks symbol "main": >>> import tokenize >>> tokenize.main.__module__ 'token' Attached patch adds token.__all__ and "modernizes" generation of the tok_name dictionary. I also renamed main to _main because it is hard to imagine that any user code would ever want to use it. ---------- components: Library (Lib) files: token-all.diff keywords: patch messages: 120938 nosy: belopolsky priority: normal severity: normal stage: patch review status: open title: token module should define __all__ versions: Python 3.2 Added file: http://bugs.python.org/file19568/token-all.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 09:53:44 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Nov 2010 08:53:44 +0000 Subject: [issue10382] Command line error marker misplaced on unicode entry In-Reply-To: <1289417775.52.0.418272995538.issue10382@psf.upfronthosting.co.za> Message-ID: <1289465624.79.0.757407544081.issue10382@psf.upfronthosting.co.za> STINNER Victor added the comment: See also #2382: I wrote patches two years ago for this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 19:50:57 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 10 Nov 2010 18:50:57 +0000 Subject: [issue10381] Add timezone support to datetime C API In-Reply-To: <1289415057.12.0.111170767809.issue10381@psf.upfronthosting.co.za> Message-ID: <1289415057.12.0.111170767809.issue10381@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : With timezone class added to datetime module, C API should be extended to at the minimum support efficient creation of timezone instances and access to the singleton UTC instance. I am not sure whether PyDateTime_TimeZone details should be exposed in datetime.h because presumably programmers should access it through the abstract tzinfo interface. ---------- assignee: belopolsky components: Extension Modules messages: 120928 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: Add timezone support to datetime C API type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 01:41:05 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 11 Nov 2010 00:41:05 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1289436065.5.0.570833891551.issue10142@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: """ >>> import os >>> f=open("XX","w+b") >>> f.seek(1024*1024) 1048576 >>> f.write(b"hello") 5 >>> f.seek(1024*1024*2) 2097152 >>> f.write(b"bye") 3 >>> f.seek(0,os.SEEK_HOLE) 0 >>> f.seek(0,os.SEEK_DATA) 1048576 >>> f.seek(1048576,os.SEEK_HOLE) 1179648 >>> f.seek(1179648,os.SEEK_DATA) 2097152 >>> f.seek(2097152,os.SEEK_HOLE) 2097155 >>> fd=f.fileno() >>> os.lseek(fd,0,os.SEEK_HOLE) 0 >>> os.lseek(fd,0,os.SEEK_DATA) 1048576 >>> os.lseek(fd,1048576,os.SEEK_HOLE) 1179648 >>> os.lseek(fd,1179648,os.SEEK_DATA) 2097152 """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 16:26:48 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Nov 2010 15:26:48 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289402808.72.0.397703728938.issue10379@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah, obviously that language can be improved. 'exactly' was meant to imply 'nothing but', but clearly it doesn't. If we want to restore more stringent backward compatibility and allow trailing text, it would be possible to make format an alias for format_string. I'm not sure this is a good idea, but it is the most sensible way to restore backward compatibility while still fixing the original bug that I can think of. Or...perhaps there is little need of both 'format' and 'format_string' as public APIs, and we could deprecate (without removing) one of them. On the other hand, I believe the original bug affects the Ubuntu code that triggered this report...in other words, absent this fix chances are there would eventually have been a bug report against that code that would have necessitated that it change to use format_string anyway in order to get the correct locale-specific number formatting. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 22:18:59 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 10 Nov 2010 21:18:59 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1289423939.4.0.729298938627.issue9807@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Attached is the remaining patch against py3k. This installs the symlinks, fixes the distutils 'install_headers' location, and uses abiflags in the python3.pc path. I think this branch is done, pending approval and commit. ---------- Added file: http://bugs.python.org/file19564/9807.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 02:34:45 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Nov 2010 01:34:45 +0000 Subject: [issue10384] SyntaxError should contain exact location of the invalid character in identifier In-Reply-To: <1289439285.11.0.506002899946.issue10384@psf.upfronthosting.co.za> Message-ID: <1289439285.11.0.506002899946.issue10384@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Can you see the error in the following? >>> inv?alid = 5 File "", line 1 inv?alid = 5 ^ SyntaxError: invalid character in identifier The problem is that an invisible space character crept into the identifier: >>> repr("inv?alid") "'inv\\u200balid'" With full unicode available in most OSes, the potential for errors like this (accidental or as a result of a practical joke) increases. It would be much easier to spot the offending character if ^ marker pointed at the exact location rather than at the end of the identifier. See also issue #10382. ---------- components: Interpreter Core messages: 120936 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: SyntaxError should contain exact location of the invalid character in identifier type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 17:09:41 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 10 Nov 2010 16:09:41 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289405381.44.0.108076468519.issue10379@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Please use the deprecation process when possible. That would mean creating an alias for the function you want to remove somewhat like this (taken from configparser): def readfp(self, fp, filename=None): """Deprecated, use read_file instead.""" warnings.warn( "This method will be removed in future versions. " "Use 'parser.read_file()' instead.", PendingDeprecationWarning, stacklevel=2 ) self.read_file(fp, source=filename) ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 19:55:39 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 10 Nov 2010 18:55:39 +0000 Subject: [issue7434] general pprint rewrite In-Reply-To: <1259944363.21.0.149882342014.issue7434@psf.upfronthosting.co.za> Message-ID: <1289415339.38.0.850585406405.issue7434@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From aaron.hosford at west.com Wed Nov 10 21:51:19 2010 From: aaron.hosford at west.com (Hosford, Aaron Michael) Date: Wed, 10 Nov 2010 14:51:19 -0600 Subject: Issue Tracker issues, and a bug in Python Message-ID: <141880ED99B1B24FB9D83A42E485970C030B6A6435@oma00cexmbx05.corp.westworlds.com> Hi all, I found a bug in Python 2.7 involving dictionary comprehensions. I repeatedly tried to register on the Issue Tracker (http://bugs.python.org/) but never received a confirmation email, so I still can't log in and post it there. Maybe someone on this list can post it on my behalf: >>> functions = {x : lambda y: x + y for x in xrange(10)} >>> functions[0](0) 9 >>> The expression "functions[0](0)" should return 0, not 9. It looks like the scope for variable x is shared across the entire dictionary comprehension rather than having separate scope for each generated item. -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Wed Nov 10 20:54:59 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Nov 2010 19:54:59 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1289418899.88.0.185137177646.issue2986@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- Removed message: http://bugs.python.org/msg120925 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 20:08:04 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 10 Nov 2010 19:08:04 +0000 Subject: [issue5412] extend configparser to support mapping access(__*item__) In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1289416084.06.0.292662358952.issue5412@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Committed in r86402. Documentation changes pending, to be made after Fred's detailed review. Fred, you can review using trunk. Reassigned as a reminder. ---------- assignee: lukasz.langa -> fdrake keywords: +needs review -patch stage: unit test needed -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 12:13:21 2010 From: report at bugs.python.org (5houston) Date: Thu, 11 Nov 2010 11:13:21 +0000 Subject: [issue8028] self.terminate() from a multiprocessing.Process raises AttributeError exception In-Reply-To: <1267300713.42.0.457825051385.issue8028@psf.upfronthosting.co.za> Message-ID: <1289474001.64.0.74840836922.issue8028@psf.upfronthosting.co.za> 5houston added the comment: If you will choose the former way, I think it would be better to write in the "multiprocessing.Process" documentation that sys.exit is the function to use to break the process execution inside itself, but maybe it would be better to wrap sys.exit with a new "multiprocessing.Process" method: multiprocessing.Process.exit([arg]) for example. Maybe it would be better to modify the sys.exit documentation too. >From "Exit from Python" to "Exit from python process which it is called in". Or, finally, you could modify "multiprocessing.Process.terminate" in this way (using pseudo-code): self.terminate(): if caller is self: sys.exit() else: -the current code- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 13:06:24 2010 From: report at bugs.python.org (Felix Laurie von Massenbach) Date: Thu, 11 Nov 2010 12:06:24 +0000 Subject: [issue10387] ConfigParser's getboolean method is broken In-Reply-To: <1289477184.84.0.648837356177.issue10387@psf.upfronthosting.co.za> Message-ID: <1289477184.84.0.648837356177.issue10387@psf.upfronthosting.co.za> New submission from Felix Laurie von Massenbach : If the config file has a boolean formatted as either True or False, python raises an attribute error when doing str.lower() on it. In my code I've worked around this in the following way: class MyConfigParser(ConfigParser.RawConfigParser): def getboolean(self, section, option): result = self.get(section, option) try: trues = ["1", "yes", "true", "on"] falses = ["0", "no", "false", "off"] if result in trues: return True if result in falses: return False except AttributeError as err: if str(err) == "\'bool\' object has no attribute \'lower\'": return result raise err Felix (p.s. first bug report, sorry if it's a bit of a mess...) ---------- components: Extension Modules messages: 120943 nosy: Felix.Laurie.von.Massenbach priority: normal severity: normal status: open title: ConfigParser's getboolean method is broken type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 13:11:58 2010 From: report at bugs.python.org (Felix Laurie von Massenbach) Date: Thu, 11 Nov 2010 12:11:58 +0000 Subject: [issue10387] ConfigParser's getboolean method is broken In-Reply-To: <1289477184.84.0.648837356177.issue10387@psf.upfronthosting.co.za> Message-ID: <1289477518.97.0.775148363339.issue10387@psf.upfronthosting.co.za> Felix Laurie von Massenbach added the comment: Oops, that was the broken first version. Let's try again: class MyConfigParser(ConfigParser.RawConfigParser): def getboolean(self, section, option): result = self.get(section, option) try: trues = ["1", "yes", "true", "on"] falses = ["0", "no", "false", "off"] if result.lower() in trues: return True if result.lower() in falses: return False except AttributeError as err: if str(err) == "\'bool\' object has no attribute \'lower\'": return result raise err Felix ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 13:31:31 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Nov 2010 12:31:31 +0000 Subject: [issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate In-Reply-To: <1289402181.98.0.765765993302.issue1589@psf.upfronthosting.co.za> Message-ID: <1289478687.3549.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > Should we escalate this issue to CVA for Python 2.x? It's more of a missing feature than a security issue in itself, although the missing feature has to do with security. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 13:52:34 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 11 Nov 2010 12:52:34 +0000 Subject: [issue10387] ConfigParser's getboolean method is broken In-Reply-To: <1289477184.84.0.648837356177.issue10387@psf.upfronthosting.co.za> Message-ID: <1289479954.34.0.32015526971.issue10387@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> lukasz.langa nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 13:52:40 2010 From: report at bugs.python.org (david) Date: Thu, 11 Nov 2010 12:52:40 +0000 Subject: [issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate In-Reply-To: <1289478687.3549.1.camel@localhost.localdomain> Message-ID: david added the comment: On 11 November 2010 23:31, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> Should we escalate this issue to CVA for Python 2.x? > > It's more of a missing feature than a security issue in itself, although > the missing feature has to do with security. Still it would be nice to see in python 2.x at some point don't you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 14:10:26 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Nov 2010 13:10:26 +0000 Subject: [issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate In-Reply-To: Message-ID: <1289481021.3549.14.camel@localhost.localdomain> Antoine Pitrou added the comment: > > > > It's more of a missing feature than a security issue in itself, although > > the missing feature has to do with security. > > Still it would be nice to see in python 2.x at some point don't you think? Well, lots of things would be nice to see in python 2.x, but that's not how things work :) That said, someone else is maintaining a backport (thank him): http://pypi.python.org/pypi/backports.ssl_match_hostname/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 14:12:40 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 11 Nov 2010 13:12:40 +0000 Subject: [issue10387] ConfigParser's getboolean method is broken In-Reply-To: <1289477184.84.0.648837356177.issue10387@psf.upfronthosting.co.za> Message-ID: <1289481160.12.0.659539657626.issue10387@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Felix, thanks for your report! :) I believe you misunderstood that all ConfigParser objects by design should hold *only strings* inside. The same problem would appear if you tried to write() configuration from a parser with booleans or numbers to a file. You should convert values to strings before putting them on the parser. This is a design deficiency in RawConfigParser that it allows setting values to other types. If you would use SafeConfigParser you'd see that it doesn't let assigning anything other than strings as option values. As much as we would love straightening it out (ensuring that values must be strings in RawConfigParsers), we can't do that because of backwards compatibility concerns. As for holding strings internally, this is a design decision that may look strange at first but when you look at it from the consistency perspective, it's better: when you load values from an INI file parser can't tell whether some specific value should be considered boolean or a string. "yes" is a valid string and a valid boolean value for the parser. Which one to hold internally? We don't know. So we store strings and let the user decide when he's using get(). The same should happen when you put values into a parser on your own. I hope that explains it. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 14:47:32 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 11 Nov 2010 13:47:32 +0000 Subject: [issue10386] token module should define __all__ In-Reply-To: <1289448524.33.0.684332419929.issue10386@psf.upfronthosting.co.za> Message-ID: <1289483252.53.0.265086285251.issue10386@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: Normally, I'd recommend leaving the "main" name alone, but in the case of modules that use it as an tool for module maintenance (symbol, token), I don't think it matters either way. Ok to commit. ---------- assignee: -> belopolsky nosy: +fdrake resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 15:03:12 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 11 Nov 2010 14:03:12 +0000 Subject: [issue10388] spwd returning different value depending on privileges In-Reply-To: <1289484192.53.0.424683719192.issue10388@psf.upfronthosting.co.za> Message-ID: <1289484192.53.0.424683719192.issue10388@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : As root: >>> import spwd >>> spwd.getspall() [spwd.struct_spwd(sp_nam='root', sp_pwd='!', sp_lstchg=14895, sp_min=0, sp_max=99999, sp_warn=7, sp_inact=-1, sp_expire=-1, sp_flag=-1) ... ] As limited user: >>> import spwd >>> spwd.getspall() [] >>> Wouldn't it be better for consistency to raise OSError EACCES instead? ---------- messages: 120950 nosy: giampaolo.rodola priority: normal severity: normal status: open title: spwd returning different value depending on privileges versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 15:08:25 2010 From: report at bugs.python.org (Felix Laurie von Massenbach) Date: Thu, 11 Nov 2010 14:08:25 +0000 Subject: [issue10387] ConfigParser's getboolean method is broken In-Reply-To: <1289477184.84.0.648837356177.issue10387@psf.upfronthosting.co.za> Message-ID: <1289484505.2.0.961365575039.issue10387@psf.upfronthosting.co.za> Felix Laurie von Massenbach added the comment: Perhaps I don't understand fully, but I am reading, for example, "option = True" from a config file. When doing this getboolean raises: AttributeError: 'bool' object has no attribute 'lower' Is it intended that you cannot store "True" and "False" as values in the config file? Apologies if I'm being dense. Felix ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 15:10:43 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Nov 2010 14:10:43 +0000 Subject: [issue10386] token module should define __all__ In-Reply-To: <1289448524.33.0.684332419929.issue10386@psf.upfronthosting.co.za> Message-ID: <1289484643.21.0.611228236338.issue10386@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed revision 86410. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 15:11:27 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Nov 2010 14:11:27 +0000 Subject: [issue10386] token module should define __all__ In-Reply-To: <1289448524.33.0.684332419929.issue10386@psf.upfronthosting.co.za> Message-ID: <1289484687.89.0.139916147182.issue10386@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 15:22:26 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 11 Nov 2010 14:22:26 +0000 Subject: [issue10387] ConfigParser's getboolean method is broken In-Reply-To: <1289477184.84.0.648837356177.issue10387@psf.upfronthosting.co.za> Message-ID: <1289485346.38.0.078755363134.issue10387@psf.upfronthosting.co.za> ?ukasz Langa added the comment: No problem Felix. But look: Python 2.7 (r27:82500, Sep 24 2010, 12:26:28) [GCC 4.3.4 20090804 (release) 1] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> config = """ ... [section] ... does_it_work = True ... is_it_broken = False ... """ >>> from ConfigParser import RawConfigParser >>> from StringIO import StringIO >>> parser = RawConfigParser() >>> sio = StringIO(config) >>> parser.readfp(sio) >>> parser.sections() ['section'] >>> parser.get('section', 'does_it_work') 'True' >>> parser.get('section', 'is_it_broken') 'False' >>> parser.getboolean('section', 'does_it_work') True >>> parser.getboolean('section', 'is_it_broken') False So, reading configuration options from files definitely works. And as you see in the first get() pair, it stores values internally as strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 15:40:01 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 11 Nov 2010 14:40:01 +0000 Subject: [issue5412] extend configparser to support mapping access(__*item__) In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1289486401.17.0.324217990295.issue5412@psf.upfronthosting.co.za> ?ric Araujo added the comment: In my experience of cfg files, it?s uncommon to have leading spaces (and also, may I add, ugly). It?s great that configparser supports them now, but I wouldn?t have put them in the basic examples. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 15:58:32 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 11 Nov 2010 14:58:32 +0000 Subject: [issue10388] spwd returning different value depending on privileges In-Reply-To: <1289484192.53.0.424683719192.issue10388@psf.upfronthosting.co.za> Message-ID: <1289487512.72.0.1717664058.issue10388@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 16:05:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Nov 2010 15:05:56 +0000 Subject: [issue10389] Document rules for use of case in section titles In-Reply-To: <1289487956.63.0.138476981778.issue10389@psf.upfronthosting.co.za> Message-ID: <1289487956.63.0.138476981778.issue10389@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Following a brief and consensual discussion on docs at python and #python-dev, I am proposing attached patch for the Python documentation style guide. ---------- assignee: belopolsky components: Documentation files: style-guide.diff keywords: patch messages: 120955 nosy: belopolsky priority: normal severity: normal stage: patch review status: open title: Document rules for use of case in section titles versions: Python 3.2 Added file: http://bugs.python.org/file19570/style-guide.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 16:15:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 11 Nov 2010 15:15:16 +0000 Subject: [issue10387] ConfigParser's getboolean method is broken In-Reply-To: <1289477184.84.0.648837356177.issue10387@psf.upfronthosting.co.za> Message-ID: <1289488516.65.0.175096996472.issue10387@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 16:15:29 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 11 Nov 2010 15:15:29 +0000 Subject: [issue10387] ConfigParser's getboolean method is broken In-Reply-To: <1289477184.84.0.648837356177.issue10387@psf.upfronthosting.co.za> Message-ID: <1289488529.97.0.0606687010091.issue10387@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Library (Lib) -Extension Modules stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 16:19:50 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 11 Nov 2010 15:19:50 +0000 Subject: [issue10385] Mark up "subprocess" as module in its doc In-Reply-To: <1289444045.02.0.247018067393.issue10385@psf.upfronthosting.co.za> Message-ID: <1289488790.04.0.0731248768133.issue10385@psf.upfronthosting.co.za> ?ric Araujo added the comment: Marking up each and every instance of a module name is not mandatory IMO. What?s important is that each document title starts with the :mod: construct, so that the HTML titles and index (at /library) be consistently useful. See for example ast (which also suffers from non-standard markup in its docstring, but that?s another issue). In addition, there are hierarchy problems in the index. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 16:21:43 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 11 Nov 2010 15:21:43 +0000 Subject: [issue5412] extend configparser to support mapping access(__*item__) In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1289488903.39.0.164316507639.issue5412@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Yup, most config parsers don't support that so there are not so many INI type files in the wild with this kind of formatting. On the other hand, Samba, XULRunner, mke2fs and others all use this. I mean, you're not forced to use that ugly feature but it's good to have it exposed so people don't later say they knew not that it was possible. Of course, I'm open for suggestions on better examples :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 16:23:23 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 11 Nov 2010 15:23:23 +0000 Subject: [issue10377] cProfile incorrectly labels its output In-Reply-To: <1289330157.64.0.804847448743.issue10377@psf.upfronthosting.co.za> Message-ID: <1289489003.42.0.24346351928.issue10377@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 16:24:39 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 11 Nov 2010 15:24:39 +0000 Subject: [issue10375] 2to3 print(single argument) In-Reply-To: <1289311942.35.0.609245522343.issue10375@psf.upfronthosting.co.za> Message-ID: <1289489079.55.0.547831774096.issue10375@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +benjamin.peterson, eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 16:32:10 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 11 Nov 2010 15:32:10 +0000 Subject: [issue10389] Document rules for use of case in section titles In-Reply-To: <1289487956.63.0.138476981778.issue10389@psf.upfronthosting.co.za> Message-ID: <1289489530.43.0.686056074351.issue10389@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1 about the patch, if you add an example: ?sentence case? may not be obvious for everyone. If it?s ?modulename ? Module description?, I agree. Also, s/white space/whitespace/. ---------- nosy: +docs at python, eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 16:55:16 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Nov 2010 15:55:16 +0000 Subject: [issue8804] http.client should support SSL contexts In-Reply-To: <1274716924.32.0.357648768076.issue8804@psf.upfronthosting.co.za> Message-ID: <1289490916.08.0.907381149513.issue8804@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Fixed as part of #9003. ---------- resolution: -> duplicate status: open -> closed superseder: -> urllib.request and http.client should allow certificate checking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 17:50:05 2010 From: report at bugs.python.org (Jeffrey Finkelstein) Date: Thu, 11 Nov 2010 16:50:05 +0000 Subject: [issue10390] json.load should handle bytes input In-Reply-To: <1289494205.74.0.417330108965.issue10390@psf.upfronthosting.co.za> Message-ID: <1289494205.74.0.417330108965.issue10390@psf.upfronthosting.co.za> New submission from Jeffrey Finkelstein : The following code produces an error: # APIKEY defined above r = urllib.request.urlopen('http://api.billboard.com/apisvc/chart/v1/' 'list/spec?api_key={}&format=JSON' .format(APIKEY)) j = json.load(r) Specifically, the urlopen() function returns a request object that can be read, the request object returns a bytes object containing JSON, and the json.load() function tries to mix str and bytes objects when using the re module. json.load() should convert bytes to str. It is reasonable that one should be able to open a url and pass the result directly to json.load(). ---------- components: Library (Lib) messages: 120960 nosy: jfinkels priority: normal severity: normal status: open title: json.load should handle bytes input type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 17:53:23 2010 From: report at bugs.python.org (Jeffrey Finkelstein) Date: Thu, 11 Nov 2010 16:53:23 +0000 Subject: [issue10390] json.load should handle bytes input In-Reply-To: <1289494205.74.0.417330108965.issue10390@psf.upfronthosting.co.za> Message-ID: <1289494403.56.0.871246535814.issue10390@psf.upfronthosting.co.za> Jeffrey Finkelstein added the comment: Nevermind. ---------- resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 17:57:21 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 11 Nov 2010 16:57:21 +0000 Subject: [issue10383] test_os leaks under Windows In-Reply-To: <1289421086.3.0.902677944517.issue10383@psf.upfronthosting.co.za> Message-ID: <1289494641.12.0.0413748349165.issue10383@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This leaks one reference every time: os.write(123456, b"b") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 18:01:31 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 11 Nov 2010 17:01:31 +0000 Subject: [issue10383] test_os leaks under Windows In-Reply-To: <1289421086.3.0.902677944517.issue10383@psf.upfronthosting.co.za> Message-ID: <1289494891.59.0.0860882319692.issue10383@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This looks suspect (in function posix_write):: if (!PyArg_ParseTuple(args, "iy*:write", &fd, &pbuf)) return NULL; if (!_PyVerify_fd(fd)) return posix_error(); I'd prefer a "PyBuffer_Release(&pbuf);" before returning... Many other occurrences of _PyVerify_fd have this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 18:45:20 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Nov 2010 17:45:20 +0000 Subject: [issue9520] Add Patricia Trie high performance container In-Reply-To: <1280969963.37.0.950740145402.issue9520@psf.upfronthosting.co.za> Message-ID: <1289497520.69.0.684174599571.issue9520@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 19:03:22 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 11 Nov 2010 18:03:22 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1289498602.61.0.95373854824.issue10142@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: - The patch modifies the _io module but not _pyio, why? (try f=_pyio.open("XX","w+b") at the beginning of the script above) - One test was *removed*, but nothing was added to test this new feature. This is the most likely way to lose it in future versions! An idea for the test is to do like the MockRawIO class in test_io.py, which "implements" a file but fakes all system calls, and can be wrapped in a BufferedReader. - The feature seems to be not applicable to text files, this should be tested. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 20:40:16 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Nov 2010 19:40:16 +0000 Subject: [issue10390] json.load should handle bytes input In-Reply-To: <1289494205.74.0.417330108965.issue10390@psf.upfronthosting.co.za> Message-ID: <1289504416.48.0.973989419657.issue10390@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 20:40:44 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Nov 2010 19:40:44 +0000 Subject: [issue10389] Document rules for use of case in section titles In-Reply-To: <1289487956.63.0.138476981778.issue10389@psf.upfronthosting.co.za> Message-ID: <1289504444.19.0.770961014835.issue10389@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The new patch, issue10389.diff, addresses ?ric's comments and adds an entry for "reST". ---------- Added file: http://bugs.python.org/file19571/issue10389.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 21:12:55 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Nov 2010 20:12:55 +0000 Subject: [issue1466065] base64 module ignores non-alphabet characters Message-ID: <1289506375.8.0.282347490104.issue1466065@psf.upfronthosting.co.za> R. David Murray added the comment: Committed in r86414. ---------- nosy: -BreamoreBoy resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 21:53:43 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 11 Nov 2010 20:53:43 +0000 Subject: [issue10391] obj2ast's error handling can lead to python crashing with a C-level assertion failure In-Reply-To: <1289508823.86.0.760663346752.issue10391@psf.upfronthosting.co.za> Message-ID: <1289508823.86.0.760663346752.issue10391@psf.upfronthosting.co.za> New submission from Dave Malcolm : In various places within the generated Python/Python-ast.c, error handling generates a repr() and raises exceptions accordingly. Currently in py3k the generated code uses PyBytes_AS_STRING() on the repr. My understanding is that repr() should be a PyUnicodeObject, not a PyBytesObject. This seems to be unchanged from r63682, which was a mass-change of PyString to PyBytes from 2 years ago. This leads to a python crashing with an assertion failure: test_compile_ast (__main__.TestSpecifics) ... python: Python/Python-ast.c:5835: obj2ast_expr: Assertion `((((((PyObject*)(tmp))->ob_type))->tp_flags & ((1L<<27))) != 0)' failed. when invoking compile() on certain (malformed) trees of ast objects. ---------- components: Interpreter Core messages: 120967 nosy: dmalcolm priority: normal severity: normal status: open title: obj2ast's error handling can lead to python crashing with a C-level assertion failure type: crash versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 21:56:15 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 11 Nov 2010 20:56:15 +0000 Subject: [issue10391] obj2ast's error handling can lead to python crashing with a C-level assertion failure In-Reply-To: <1289508823.86.0.760663346752.issue10391@psf.upfronthosting.co.za> Message-ID: <1289508975.06.0.131207802246.issue10391@psf.upfronthosting.co.za> Dave Malcolm added the comment: The attached patch: - extends the ast error-handling selftest with code that triggers this crash (on unpatched code) - fixes Parser/asdl_c.py to generate code using _PyUnicode_AS_STRING instead - contains the generated changes to Python/Python-ast.c FWIW, it's not clear to what extent _PyUnicode_AS_STRING is deprecated, Include/unicodeobject.h currently has: *** This API is for interpreter INTERNAL USE ONLY and will likely *** be removed or changed for Python 3.1. but I hope it won't be, it's far too useful. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file19572/py3k-issue-10391-fix-ast-error-handling.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 21:57:28 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 11 Nov 2010 20:57:28 +0000 Subject: [issue10391] obj2ast's error handling can lead to python crashing with a C-level assertion failure In-Reply-To: <1289508823.86.0.760663346752.issue10391@psf.upfronthosting.co.za> Message-ID: <1289509048.7.0.0433785946442.issue10391@psf.upfronthosting.co.za> Changes by Dave Malcolm : ---------- nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 22:00:51 2010 From: report at bugs.python.org (Alex Willmer) Date: Thu, 11 Nov 2010 21:00:51 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1289010171.3.0.24257538874.issue2636@psf.upfronthosting.co.za> Message-ID: Alex Willmer added the comment: The re module throws an exception for re.compile(r'[\A\w]'). latest regex doesn't, but I don't think the pattern is matching correctly. Shouldn't findall(r'[\A]\w', 'a b c') return ['a'] and findall(r'[\A\s]\w', 'a b c') return ['a', ' b', ' c'] ? Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> for s in [r'\A\w', r'[\A]\w', r'[\A\s]\w']: print re.findall(s, 'a b c') ... ['a'] [] Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/re.py", line 177, in findall return _compile(pattern, flags).findall(string) File "/usr/lib/python2.6/re.py", line 245, in _compile raise error, v # invalid expression sre_constants.error: internal: unsupported set operator >>> import regex >>> for s in [r'\A\w', r'[\A]\w', r'[\A\s]\w']: print regex.findall(s, 'a b c') ... ['a'] [] [' b', ' c'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 22:17:46 2010 From: report at bugs.python.org (Stephen Hansen) Date: Thu, 11 Nov 2010 21:17:46 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1289510266.56.0.641456089077.issue7900@psf.upfronthosting.co.za> Stephen Hansen added the comment: This test is failing again, and IIUC, largely due to the same sort of issues: http://www.python.org/dev/buildbot/all/builders/AMD64%20Leopard%203.1/builds/65 I was able to track down what exactly caused it to fail in this case on my box, though. Whatever "posix.getgroups()" ends up calling, appears to be tied to the current users login -- or at least, doesn't get updated when new groups are added to the user. This failure happened because at some point after the buildbot was up and running, I added a new user to the machine (totally unconnected to the existing buildbot runner): this caused a new group to be added to the buildbot runner's user. "id -G" starts returning that group immediately, but "posix.getgroups()" returns the same list as it had before. I was able to further reproduce it in Terminal, by having a console open, and compiling 3.1 there then adding a user, and running the test. It fails. Opening up a new terminal window, running the test-- and it succeeds. The original console continues to fail. ---------- nosy: +ixokai versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 22:22:46 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 11 Nov 2010 21:22:46 +0000 Subject: [issue10391] obj2ast's error handling can lead to python crashing with a C-level assertion failure In-Reply-To: <1289508823.86.0.760663346752.issue10391@psf.upfronthosting.co.za> Message-ID: <1289510566.54.0.389761541449.issue10391@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: IMO a better patch would be to use the %R format specification: PyErr_Format( PyExc_TypeError, "expected some sort of mod, but got %R", obj); And no need to use PyObject_Repr and the temporary variable! ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 22:24:20 2010 From: report at bugs.python.org (Stephen Hansen) Date: Thu, 11 Nov 2010 21:24:20 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1289510660.06.0.517930316112.issue7900@psf.upfronthosting.co.za> Changes by Stephen Hansen : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 22:36:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 11 Nov 2010 21:36:15 +0000 Subject: [issue10389] Document rules for use of case in section titles In-Reply-To: <1289487956.63.0.138476981778.issue10389@psf.upfronthosting.co.za> Message-ID: <1289511375.82.0.658148166264.issue10389@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good. I wouldn?t say reST is WYSIWYG, since it?s transformed, contrary to word processors where you make text bold to get it bold. (If you?re looking for other things to fix in that file, look at the entry for Unicode ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 22:39:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 11 Nov 2010 21:39:15 +0000 Subject: [issue5412] extend configparser to support mapping access(__*item__) In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1289511555.67.0.398605022731.issue5412@psf.upfronthosting.co.za> ?ric Araujo added the comment: Well, I suggest removing the leading spaces in the examples, except maybe in one place if you think it?s needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 23:03:37 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 11 Nov 2010 22:03:37 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1289510266.56.0.641456089077.issue7900@psf.upfronthosting.co.za> Message-ID: <6DBF6F2C-3C00-4122-93E8-DE52D2FFD71A@mac.com> Ronald Oussoren added the comment: This is the expected behavior on OSX. Apple has a pretty odd interpretation of the standards wrt getgroups and setgroups behavior. This behavior is not a bug in python Sent from my iPhone On 11 nov. 2010, at 22:17, Stephen Hansen wrote: > > Stephen Hansen added the comment: > > This test is failing again, and IIUC, largely due to the same sort of issues: http://www.python.org/dev/buildbot/all/builders/AMD64%20Leopard%203.1/builds/65 > > I was able to track down what exactly caused it to fail in this case on my box, though. Whatever "posix.getgroups()" ends up calling, appears to be tied to the current users login -- or at least, doesn't get updated when new groups are added to the user. > > This failure happened because at some point after the buildbot was up and running, I added a new user to the machine (totally unconnected to the existing buildbot runner): this caused a new group to be added to the buildbot runner's user. > > "id -G" starts returning that group immediately, but "posix.getgroups()" returns the same list as it had before. I was able to further reproduce it in Terminal, by having a console open, and compiling 3.1 there then adding a user, and running the test. It fails. Opening up a new terminal window, running the test-- and it succeeds. The original console continues to fail. > > ---------- > nosy: +ixokai > versions: +Python 3.1, Python 3.2 > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 23:09:10 2010 From: report at bugs.python.org (Stephen Hansen) Date: Thu, 11 Nov 2010 22:09:10 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1289513350.7.0.390784384287.issue7900@psf.upfronthosting.co.za> Stephen Hansen added the comment: Well, yes: the result of posix.getgroups is not a bug in Python, but is it a bug in the test? Should it be skipped on OSX, or some other solution? Having buildbots fail because of something that's expected behavior is bad, isn't it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 23:20:15 2010 From: report at bugs.python.org (Vlastimil Brom) Date: Thu, 11 Nov 2010 22:20:15 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1289514015.98.0.45902801935.issue2636@psf.upfronthosting.co.za> Vlastimil Brom added the comment: Maybe I am missing something, but the result in regex seem ok to me: \A is treated like A in a character set; when the test string is changed to "A b c" or in the case insensitive search the A is matched. [\A\s]\w doesn't match the starting "a", as it is not followed by any word character: >>> for s in [r'\A\w', r'[\A]\w', r'[\A\s]\w']: print regex.findall(s, 'A b c') ... ['A'] [] [' b', ' c'] >>> for s in [r'\A\w', r'(?i)[\A]\w', r'[\A\s]\w']: print regex.findall(s, 'a b c') ... ['a'] [] [' b', ' c'] >>> In the original re there seem to be a bug/limitation in this regard (\A and also \Z in character sets aren't supported in some combinations... vbr ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 23:39:20 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Nov 2010 22:39:20 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1289515160.63.0.195760456454.issue7900@psf.upfronthosting.co.za> R. David Murray added the comment: Right, regardless of whether or not it is a bug in python, IMO it *is* a bug in the python test suite, since we *expect* buildbots to be long running processes and therefore they are going to get hit by this failure on OSX periodically with a pretty high likelyhood. Yes it is easily fixable (restart the builder), but it seems to me the test should be fixed somehow instead of putting that burden on the buildbot owner. A skip on OSX would certainly be the simplest solution, and we could thereby indicate that we consider this behavior to be a bug in OSX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 23:39:36 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Nov 2010 22:39:36 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1289515176.79.0.21154633763.issue7900@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 23:42:52 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 11 Nov 2010 22:42:52 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289515372.58.0.806307086146.issue10379@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: The bug has been fixed upstream by replacing .format() with .format_string(). I'm not sure I understand why there are two different methods - .format() seems kind of pointless to me, but then I don't use the locale module enough to say what's useful. For Python 2.7 I think the only thing we can do is to update the docs so that the distinction and restrictions are clear. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 23:44:19 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Nov 2010 22:44:19 +0000 Subject: [issue10389] Document rules for use of case in section titles In-Reply-To: <1289487956.63.0.138476981778.issue10389@psf.upfronthosting.co.za> Message-ID: <1289515459.77.0.58810681291.issue10389@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in revision 86417. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 23:58:37 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 11 Nov 2010 22:58:37 +0000 Subject: [issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True In-Reply-To: <1266401759.12.0.600282213979.issue7950@psf.upfronthosting.co.za> Message-ID: <1289516317.34.0.280355031956.issue7950@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good to me, except the last two lines which I would reword or just remove. I wonder how many people use shell=True merely for the convenience of passing a string instead of a list. What do you think about adding a mention of str.split and shlex.split? ---------- nosy: +eric.araujo type: security -> behavior versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 00:03:20 2010 From: report at bugs.python.org (Chris Rebert) Date: Thu, 11 Nov 2010 23:03:20 +0000 Subject: [issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True In-Reply-To: <1266401759.12.0.600282213979.issue7950@psf.upfronthosting.co.za> Message-ID: <1289516600.22.0.848265420585.issue7950@psf.upfronthosting.co.za> Chris Rebert added the comment: "the above Note" mentioned in those last two lines demonstrates shlex.split() and correct tokenization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 00:05:54 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Nov 2010 23:05:54 +0000 Subject: [issue10382] Command line error marker misplaced on unicode entry In-Reply-To: <1289417775.52.0.418272995538.issue10382@psf.upfronthosting.co.za> Message-ID: <1289516754.09.0.284658362081.issue10382@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: haypo> See also #2382: I wrote patches two years ago for this issue. Yes, this is the same issue. I don't want to close this as a duplicate because #2382 contains a much more ambitious set of patches. What I am trying to achieve here is similar to the adjust_offset.patch there. I am attaching a patch that takes an alternative approach and computes the number of characters in the parser. I strongly believe that the buffer in the tokenizer always contains UTF-8 encoded text. If it is not so already, I would consider making it so by replacing a call to _PyUnicode_AsDefaultEncodedString() with a call to PyUnicode_AsUTF8String(). (if that matters) The patch still needs unittests and possibly has some off-by-one issues, but I would like to get to an agreement that this is the right level at which the problem should be fixed first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 00:06:14 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Nov 2010 23:06:14 +0000 Subject: [issue10382] Command line error marker misplaced on unicode entry In-Reply-To: <1289417775.52.0.418272995538.issue10382@psf.upfronthosting.co.za> Message-ID: <1289516774.99.0.231995894993.issue10382@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file19573/issue10382a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 00:11:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 11 Nov 2010 23:11:47 +0000 Subject: [issue9286] email.utils.parseaddr returns garbage for invalid input In-Reply-To: <1279377359.55.0.199569408455.issue9286@psf.upfronthosting.co.za> Message-ID: <1289517107.57.0.438589237466.issue9286@psf.upfronthosting.co.za> ?ric Araujo added the comment: Having no time to read email RFCs, I?ll defer to you here. Please reject this report or save it for later as you prefer. ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 00:13:59 2010 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 11 Nov 2010 23:13:59 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1289517239.69.0.525762867929.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: It looks like a similar problem to msg116252 and msg116276. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 00:24:59 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Nov 2010 23:24:59 +0000 Subject: [issue9286] email.utils.parseaddr returns garbage for invalid input In-Reply-To: <1279377359.55.0.199569408455.issue9286@psf.upfronthosting.co.za> Message-ID: <1289517899.01.0.247297168348.issue9286@psf.upfronthosting.co.za> R. David Murray added the comment: In connection with another bug report I found a rather basic error in parseaddr, so I'm going to eventually dig far enough into the RFC to have a real opinion on the elided-space issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 00:48:58 2010 From: report at bugs.python.org (Alex Willmer) Date: Thu, 11 Nov 2010 23:48:58 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1289514015.98.0.45902801935.issue2636@psf.upfronthosting.co.za> Message-ID: Alex Willmer added the comment: On Thu, Nov 11, 2010 at 10:20 PM, Vlastimil Brom wrote: > Maybe I am missing something, but the result in regex seem ok to me: > \A is treated like A in a character set; I think it's me who missed something. I'd assumed that all backslash patterns (including \A for beginning of string) maintain their meaning in a character class. AFAICT that assumption was wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:03:01 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 00:03:01 +0000 Subject: [issue3931] codecs.charmap_build is untested and undocumented In-Reply-To: <1222085190.52.0.690275455212.issue3931@psf.upfronthosting.co.za> Message-ID: <1289520181.14.0.632408994295.issue3931@psf.upfronthosting.co.za> ?ric Araujo added the comment: I see charmap_build used in encodings too, so it may be useful to make it officially public for the use of third-party encodings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:11:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 00:11:06 +0000 Subject: [issue7219] Unhelpful error message when a distutils package install fails due to a permissions error In-Reply-To: <1256647071.1.0.815334810123.issue7219@psf.upfronthosting.co.za> Message-ID: <1289520666.95.0.624080725997.issue7219@psf.upfronthosting.co.za> ?ric Araujo added the comment: I wonder if this is IronPython-specific. Could you temporarily make the site-packages directory of a py3k CPython read-only and try to install a distribution with that CPython? I can try the same thing on unix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:15:26 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Nov 2010 00:15:26 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289520926.49.0.88713925474.issue10379@psf.upfronthosting.co.za> R. David Murray added the comment: Well, the distinction is that, before the bug fix that caused your issue, the 'format_string' method would use a regex to extract the % specifiers from the input string, and call 'format' to replace that % specifier with a properly localized result string. That is, 'format' was designed to handle a single % specifier with no extra text, basically as a helper method for format_string. The fact that it didn't reject extra text was, according to an internal comment, a defect of the implementation. (Passing any extra text would cause the implementation to fail to do the internationalization that was the entire reason for calling it.) When I fixed the bug I extracted the 'replace a single % specifier' code into an internal method, and made the format method live up to what I perceived to be its documented interface by rejecting extra input characters so that it could safely call the new internal substitution routine. Now, from the perspective of a *user* of the locale module, I fail to see the point in having both 'format' and 'format_string' exposed. If you want to format a single % specifier, just pass it to format_string. Thus my suggestion to make them both do the same thing (to cater to other code that may be calling format incorrectly) and then deprecate one of them (presumably format). To bad I didn't think of that when I fixed the original bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:15:33 2010 From: report at bugs.python.org (Felix Laurie von Massenbach) Date: Fri, 12 Nov 2010 00:15:33 +0000 Subject: [issue10387] ConfigParser's getboolean method is broken In-Reply-To: <1289477184.84.0.648837356177.issue10387@psf.upfronthosting.co.za> Message-ID: <1289520933.69.0.415283878009.issue10387@psf.upfronthosting.co.za> Felix Laurie von Massenbach added the comment: Ok, so I understand the issue, but why doesn't the set method simply convert to a string? >>> from ConfigParser import RawConfigParser >>> from StringIO import StringIO >>> parser = RawConfigParser() >>> config = """ [section] test = True """ >>> parser.readfp(StringIO(config)) >>> parser.get("section", "test") 'True' >>> parser.getboolean("section", "test") True >>> parser.set("section", "test", True) >>> parser.get("section", "test") True >>> parser.getboolean("section", "test") Traceback (most recent call last): File "", line 1, in parser.getboolean("section", "test") File "C:\Python27\lib\ConfigParser.py", line 361, in getboolean if v.lower() not in self._boolean_states: AttributeError: 'bool' object has no attribute 'lower' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:18:23 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 00:18:23 +0000 Subject: [issue9313] distutils error on MSVC older than 8 In-Reply-To: <1279624042.03.0.724891043691.issue9313@psf.upfronthosting.co.za> Message-ID: <1289521103.62.0.387287900947.issue9313@psf.upfronthosting.co.za> ?ric Araujo added the comment: Re-opening to remind myself about the forward-port. ---------- assignee: ocean-city -> eric.araujo components: -Tests status: closed -> open versions: +3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:22:44 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 00:22:44 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1289521364.99.0.0571288946678.issue2986@psf.upfronthosting.co.za> Terry J. Reedy added the comment: issue2986.fix27.5.patch applied, with version note added to doc, as rev86418 Only thing left is patch for 3.2, which Eli and I will produce. ---------- stage: commit review -> needs patch versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:24:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 00:24:44 +0000 Subject: [issue8989] email.utils.make_msgid: specify domain In-Reply-To: <1276442137.97.0.787561293748.issue8989@psf.upfronthosting.co.za> Message-ID: <1289521484.67.0.14428798733.issue8989@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the patch, which looks good to me, except for the test: ?eq? will raise a NameError, since this does not exist. Other test methods bind eq to self.assertEqual to save typing, which is not really needed in your case: Just use self.assertEqual :) To run the tests, ./python -m email.test.test_email ---------- stage: unit test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:25:37 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 12 Nov 2010 00:25:37 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289520926.49.0.88713925474.issue10379@psf.upfronthosting.co.za> Message-ID: <20101111192526.39c3ff9a@mission> Barry A. Warsaw added the comment: On Nov 12, 2010, at 12:15 AM, R. David Murray wrote: >Now, from the perspective of a *user* of the locale module, I fail to see the >point in having both 'format' and 'format_string' exposed. If you want to >format a single % specifier, just pass it to format_string. Thus my >suggestion to make them both do the same thing (to cater to other code that >may be calling format incorrectly) and then deprecate one of them (presumably >format). +1 >To bad I didn't think of that when I fixed the original bug. Dang. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:35:49 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 12 Nov 2010 00:35:49 +0000 Subject: [issue10387] ConfigParser's getboolean method is broken In-Reply-To: <1289477184.84.0.648837356177.issue10387@psf.upfronthosting.co.za> Message-ID: <1289522149.13.0.856042245941.issue10387@psf.upfronthosting.co.za> ?ukasz Langa added the comment: This is unfortunately a backwards compatibility concern. Originally it wasn't made so that set() converts to string or accepts only strings and when the developers realized this mistake, it was too late (there were programs using this misfeature). That's one of the reasons SafeConfigParser was created (hence the name). As I said in my original answer, SafeConfigParser doesn't let you set() anything but a string and this is how it should have been from the start. But we won't break backwards compatibility now, it's far too late for that I'm afraid. Storing non-string data was misused by some programs by using set() and get() (not getboolean() or getint() etc. but bare get()). I'm closing this as Won't Fix. Thanks for your input, it's very much appreciated. ---------- resolution: -> wont fix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:36:45 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Nov 2010 00:36:45 +0000 Subject: [issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True In-Reply-To: <1266401759.12.0.600282213979.issue7950@psf.upfronthosting.co.za> Message-ID: <1289522205.17.0.433931803126.issue7950@psf.upfronthosting.co.za> R. David Murray added the comment: Committed (as a warning) in r86419. Thanks, Chris. ---------- stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:39:53 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 00:39:53 +0000 Subject: [issue644744] bdist_rpm fails when installing man pages Message-ID: <1289522393.1.0.39335010322.issue644744@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thomas, sorry if my message was short and unclear. The freeze policy means that distutils does not get new features, only bug fixes. The goal is to free time so that the developers (especially Tarek) can work on distutils2, the next generation. When I said that ?changing even internal details breaks third-party tools?, I was talking about tools written in Python that use distutils as a library; they rely on implementation details, internal functions and old bugs, which means distutils can?t get the changes we need to significantly improve the state of Python packaging. That?s why Tarek has started distutils2, where compatibility can be broken to fix design mistakes and add disruptive new features. Like I said, we?ve removed bdist_rpm in distutils2; it now lives as an external project: https://pypi.python.org/pypi/pypi2rpm/0.3 . When distutils2 is merged back into the standard library, bdist_rpm2 can have shorter release cycles to comply with policy changes on rpm-based systems. In this case, the freeze does not apply: This bug should be fixed in distutils. Can you update your patch to address Toshio?s remarks? Thanks. ---------- assignee: tarek -> eric.araujo nosy: -BreamoreBoy stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:41:48 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 00:41:48 +0000 Subject: [issue9006] xml-rpc Server object does not propagate the encoding to Unmarshaller In-Reply-To: <1276680036.39.0.0895862907842.issue9006@psf.upfronthosting.co.za> Message-ID: <1289522508.79.0.222262217519.issue9006@psf.upfronthosting.co.za> ?ric Araujo added the comment: Could you reupload your fix as a diff instead of a whole file? See http://www.python.org/dev/patches/ for some help. ---------- nosy: +loewis type: crash -> behavior versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:46:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 00:46:31 +0000 Subject: [issue3243] Support iterable bodies in httplib In-Reply-To: <1214848938.76.0.928668674728.issue3243@psf.upfronthosting.co.za> Message-ID: <1289522791.61.0.921896270383.issue3243@psf.upfronthosting.co.za> ?ric Araujo added the comment: The patch needs to be ported to the py3k branch. ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:51:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 00:51:11 +0000 Subject: =?utf-8?q?=5Bissue9322=5D_Don=E2=80=99t_fail_silently_if_ext=5Fmodules_us?= =?utf-8?q?e_absolute_paths?= In-Reply-To: <1279721130.09.0.919872519995.issue9322@psf.upfronthosting.co.za> Message-ID: <1289523071.77.0.521620040613.issue9322@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: tarek -> eric.araujo components: +Distutils2 stage: -> needs patch title: bdist_rpm ext_modules absolute source path fail -> Don?t fail silently if ext_modules use absolute paths versions: +3rd party, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:53:24 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 12 Nov 2010 00:53:24 +0000 Subject: [issue9520] Add Patricia Trie high performance container In-Reply-To: <1280969963.37.0.950740145402.issue9520@psf.upfronthosting.co.za> Message-ID: <1289523204.92.0.489058547111.issue9520@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:57:37 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 12 Nov 2010 00:57:37 +0000 Subject: [issue5412] extend configparser to support mapping access(__*item__) In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1289523457.11.0.493132463395.issue5412@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Fred, while you're at it have a look at your message here: http://bugs.python.org/issue9421#msg115558 (also documentation remarks on an otherwise closed issue). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:58:47 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 12 Nov 2010 00:58:47 +0000 Subject: [issue10387] ConfigParser's getboolean method is broken In-Reply-To: <1289477184.84.0.648837356177.issue10387@psf.upfronthosting.co.za> Message-ID: <1289523527.37.0.651902805574.issue10387@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:58:50 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 00:58:50 +0000 Subject: [issue7186] Document specialness of __doc__, and possibly other "special" attributes In-Reply-To: <1256240855.61.0.550470965616.issue7186@psf.upfronthosting.co.za> Message-ID: <1289523530.96.0.438072553683.issue7186@psf.upfronthosting.co.za> ?ric Araujo added the comment: Is this obsoleted by #9451? ---------- nosy: +eric.araujo versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:59:13 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 12 Nov 2010 00:59:13 +0000 Subject: [issue9421] configparser.ConfigParser's getint, getboolean and getfloat don't accept `vars` In-Reply-To: <1280428369.21.0.84678458473.issue9421@psf.upfronthosting.co.za> Message-ID: <1289523553.59.0.0602572291325.issue9421@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:11:10 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:11:10 +0000 Subject: [issue6226] Inconsistent 'file' vs 'stream' kwarg in pprint, other stdlibs In-Reply-To: <1244325728.64.0.945262534879.issue6226@psf.upfronthosting.co.za> Message-ID: <1289524270.84.0.865111721752.issue6226@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m afraid backward compatibility binds us here. For new code however, it would be nice to use one name consistently. My preference goes to ?file?, because I really like the print function, but I suspect this could turn into bikeshedding quickly :) I think this is too little an issue to warrant a line in the style guide. Maybe just watch python-checkins and comment when someone adds a function using ?stream?, ?fp? or ?fileobj?. I suggest closing this report as wontfix. You may want to open a new report about the matter of pprint and print having incompatible signatures. How about proposing a new function, say pprint.print, which could be a drop-in replacement for builtins.print? ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:12:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:12:31 +0000 Subject: [issue1109602] Need some setup.py sanity Message-ID: <1289524351.67.0.774798120597.issue1109602@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:13:22 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:13:22 +0000 Subject: [issue9523] Improve dbm modules In-Reply-To: <1281021837.96.0.764638089257.issue9523@psf.upfronthosting.co.za> Message-ID: <1289524402.4.0.405200746406.issue9523@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo title: Improve dbm module -> Improve dbm modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:14:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:14:52 +0000 Subject: [issue8634] get method for dbm interface In-Reply-To: <1273133367.38.0.142877532423.issue8634@psf.upfronthosting.co.za> Message-ID: <1289524492.95.0.334140746155.issue8634@psf.upfronthosting.co.za> ?ric Araujo added the comment: The other bug report adds the get method as part of MutableMapping compliance, so I?m closing this as a obsoleted. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Improve dbm modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:15:08 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:15:08 +0000 Subject: [issue9523] Improve dbm modules In-Reply-To: <1281021837.96.0.764638089257.issue9523@psf.upfronthosting.co.za> Message-ID: <1289524508.87.0.204518197596.issue9523@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +Kain94, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:23:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:23:17 +0000 Subject: [issue962772] when both maintainer and author provided, author discarded Message-ID: <1289524997.62.0.958691917031.issue962772@psf.upfronthosting.co.za> ?ric Araujo added the comment: >From PEP 345: ?Note that this field is intended for use when a project is being maintained by someone other than the original author: it should be omitted if it is identical to Author.? It?s therefore logical that maintainer wins over author: The metadata file wants a contact point, so if the original author is not active anymore and there is another person acting as maintainer, the maintainer is the contact. This is IMO a documentation bug, which I?m assigning to distutils2 (distutils docs only get quick fixes for things that don?t work at all). ---------- components: +Distutils2, Documentation -Distutils versions: +3rd party -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:26:48 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:26:48 +0000 Subject: [issue4972] context managerment support in imaplib, smtplib, ftplib In-Reply-To: <1232213338.37.0.108210239108.issue4972@psf.upfronthosting.co.za> Message-ID: <1289525208.87.0.00827366234753.issue4972@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: -> needs patch title: let's equip ftplib.FTP with __enter__ and __exit__ -> context managerment support in imaplib, smtplib, ftplib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:27:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:27:15 +0000 Subject: [issue6320] Standard string encodings should include GSM0.38 In-Reply-To: <1245612481.83.0.685402230855.issue6320@psf.upfronthosting.co.za> Message-ID: <1289525235.39.0.759860936103.issue6320@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:35:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:35:15 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1289525715.82.0.801420622793.issue7976@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: unit test needed -> needs patch versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:36:27 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:36:27 +0000 Subject: [issue5616] Distutils 2to3 support doesn't have the doctest_only flag. In-Reply-To: <1238452498.24.0.140926416369.issue5616@psf.upfronthosting.co.za> Message-ID: <1289525787.22.0.748847486654.issue5616@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Distutils2 -2to3 (2.x to 3.0 conversion tool) stage: -> unit test needed versions: +3rd party, Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:36:38 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:36:38 +0000 Subject: [issue5616] Distutils 2to3 support doesn't have the doctest_only flag. In-Reply-To: <1238452498.24.0.140926416369.issue5616@psf.upfronthosting.co.za> Message-ID: <1289525798.45.0.363321947149.issue5616@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: tarek -> eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:42:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:42:09 +0000 Subject: [issue10149] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1289526129.73.0.198422720452.issue10149@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the patch. There are a few typos (pices, recive) and markup glitches, which you can fix if you?d like to learn more about the markup, or else leave to someone else. Those glitches are: bad indentation, missing blank line to make a new paragraph, text in backquotes without a :role: (or double backquotes for False). From a checkout, run ?make html? to see the result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:43:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:43:06 +0000 Subject: [issue10149] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1289526186.42.0.493118879703.issue10149@psf.upfronthosting.co.za> ?ric Araujo added the comment: Also, s/receive few calls/receive more than one call/ (clearer IMO). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:47:48 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:47:48 +0000 Subject: [issue1051216] make distutils.core.run_setup re-entrant Message-ID: <1289526468.76.0.296960154497.issue1051216@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hi Bob, thanks for the report and patch. Could you add a test for this behavior? (This is irrelevant for distutils2, where run_setup is gone.) ---------- assignee: -> eric.araujo nosy: +eric.araujo type: feature request -> behavior versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:54:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:54:05 +0000 Subject: [issue1051216] make distutils.core.run_setup re-entrant Message-ID: <1289526845.37.0.365465542981.issue1051216@psf.upfronthosting.co.za> ?ric Araujo added the comment: To clarify my position: This does not look like a sane use case, but if the code does not behave as documented it?s a bug that should be fixed. Do you remember how you discovered the bug? On second thought, I wonder if it?s useful to fix this. Since there is a bug, are people using the function? If not, is it worth fixing, since the function is removed in distutils2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:57:39 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Nov 2010 01:57:39 +0000 Subject: [issue6226] Inconsistent 'file' vs 'stream' kwarg in pprint, other stdlibs In-Reply-To: <1244325728.64.0.945262534879.issue6226@psf.upfronthosting.co.za> Message-ID: <1289527059.86.0.726829451856.issue6226@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, simply saying "make it consistent" is a won't fix, because of backward compatibility issues. Specific proposals for specific functions in a way that deals with the backward compatibility issues should be opened as new issues. ---------- nosy: +r.david.murray resolution: -> wont fix stage: needs patch -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 03:01:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 02:01:12 +0000 Subject: [issue8561] Install .exes generated with distutils to not do a CRC check In-Reply-To: <1272482067.44.0.313764636607.issue8561@psf.upfronthosting.co.za> Message-ID: <1289527272.61.0.646497031549.issue8561@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. I think this is not specific to .exe installers, but an issue that may happen with any kind of download. PyPI publishes MD5 checksums of distributions, which should be checked by tools that download distributions. distutils2 does, and I?m sure other tools like pip are doing the same thing. Does that address your concern? ---------- components: +Distutils2 -Distutils nosy: +alexis, eric.araujo versions: +3rd party -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 03:01:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 02:01:47 +0000 Subject: [issue8561] Install .exes generated with distutils to not do a CRC check In-Reply-To: <1272482067.44.0.313764636607.issue8561@psf.upfronthosting.co.za> Message-ID: <1289527307.62.0.634881613817.issue8561@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: tarek -> eric.araujo status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 03:16:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 02:16:12 +0000 Subject: [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1289528172.26.0.794153522344.issue9312@psf.upfronthosting.co.za> ?ric Araujo added the comment: I hope the patch is not outdated. Terry, Georg, are you okay with it? ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 03:28:26 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Nov 2010 02:28:26 +0000 Subject: [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1289528906.55.0.445908032336.issue9312@psf.upfronthosting.co.za> Ezio Melotti added the comment: Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 03:29:23 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 02:29:23 +0000 Subject: [issue6226] Inconsistent 'file' vs 'stream' kwarg in pprint, other stdlibs In-Reply-To: <1244325728.64.0.945262534879.issue6226@psf.upfronthosting.co.za> Message-ID: <1289528963.91.0.515420465753.issue6226@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 03:32:42 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 02:32:42 +0000 Subject: [issue9338] argparse optionals with nargs='+' can't be followed by positionals In-Reply-To: <1279881989.28.0.725806934086.issue9338@psf.upfronthosting.co.za> Message-ID: <1289529162.68.0.254333441207.issue9338@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good to me. Do you want to propose a code patch too, and/or more tests for non-simple cases? ---------- versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:04:26 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Nov 2010 03:04:26 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1289531066.93.0.526360056574.issue1553375@psf.upfronthosting.co.za> R. David Murray added the comment: Vinay, your example with communicate only works because you removed the [:-1]. If you run your version against a debug build, the tests will fail. I'm updating the patch with a version that works with both a non-debug and a debug build, and adds an additional test that shows that the chained full traceback fails even if the exception handler is not at the top level. Tomorrow I'll post a request for help to python-dev, since I've nowhere near the knowledge of the CPython internals needed to figure out what is going on here. (It is possible the traceback is in fact correct, but if so it is certainly unexpected and makes allframes a bit less useful.) ---------- Added file: http://bugs.python.org/file19574/full_traceback6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:05:47 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 03:05:47 +0000 Subject: [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1289531147.77.0.0882669267029.issue9312@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ok with me also to commit and backport for next releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:08:44 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 03:08:44 +0000 Subject: [issue10008] Two links point to same place In-Reply-To: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> Message-ID: <1289531324.13.0.136199737647.issue10008@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Georg, do you have any idea what the source of the index glitch is? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 05:20:25 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 12 Nov 2010 04:20:25 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1289535625.21.0.918785331701.issue10142@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Amaury, thanks for your valuable feedback. 1. I forgot about the python implementation. I am not familiar with the new IO framework. Implemented now. 3. These new SEEK modes should not be used in text mode. In my new patch the modes are rejected in text mode, allowed in binary mode. 2. I have spend the last 3 hours studying "test_io.py", and I don't understand the Mock* usage. Your MockRawIO hint is valuable, but I can't think a way to test that C/Python implementation passes the new flags to the OS. If I understand correctly, any method implemented in the Mock will be hit instead of the IO implementation, and anything that reach IO implementation will not go back to the Mock. I don't understand... :-?. Or can you magically insert the Mock between the IO module and the OS?. I know something like this is happening, but I don't understand the mechanism. How do you choose what Mock* are you using in each test?. I have read about Mock testing in the past, but I don't understand the use here. Are they actually Mocks, as explained in http://agiletesting.blogspot.com/2009/07/python-mock-testing-techniques-and.html , for example? Sorry. Could you provide some hint?. Maybe in python-dev, for more audience?. I have implemented a test "test_posix", if your OS can report holes in a file (so far modern Solaris/OpenSolaris/OpenIndiana, don't know about *bsd). Other OSs will ignore the test. I know your time is valuable. Thanking for investing in me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 05:20:39 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 12 Nov 2010 04:20:39 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1289535639.67.0.404347020572.issue10142@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- assignee: pitrou -> amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 05:36:30 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 04:36:30 +0000 Subject: [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1289536590.09.0.446455777731.issue10304@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 1. I decided to add '\' since this is what I normally do and also add one sentence explanation. 2. I changed ending from ' ' to ','. Uploaded patch committed in rev86422, rev86423 ---------- keywords: +patch resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: +Python 3.1 Added file: http://bugs.python.org/file19575/Issue 10304.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 05:49:51 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 04:49:51 +0000 Subject: [issue1437699] allow unicode arguments for robotparser.can_fetch Message-ID: <1289537391.46.0.234891520845.issue1437699@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The .../orig.html link now works and was last updated in August. It has a link to .../robotstext.html. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 05:54:45 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 04:54:45 +0000 Subject: [issue1654974] Binding annotations in tracebacks. Message-ID: <1289537685.1.0.551471632899.issue1654974@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> out of date status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 05:57:25 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 04:57:25 +0000 Subject: [issue1733259] ZipFile CallBack Needed... Message-ID: <1289537845.51.0.739185700102.issue1733259@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 05:59:34 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 04:59:34 +0000 Subject: [issue1777134] minidom pretty xml output improvement Message-ID: <1289537974.8.0.553390188878.issue1777134@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: -terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 06:26:20 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 05:26:20 +0000 Subject: [issue3720] segfault in for loop with evil iterator In-Reply-To: <1219983572.61.0.35264499467.issue3720@psf.upfronthosting.co.za> Message-ID: <1289539580.41.0.467639662827.issue3720@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Too late for 2.6.6 ;-) ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 06:31:10 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 05:31:10 +0000 Subject: [issue4015] Make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1289539870.93.0.246713166254.issue4015@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: -terry.reedy versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 06:33:12 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 05:33:12 +0000 Subject: [issue4037] doctest.py should include method descriptors when looking inside a class __dict__ In-Reply-To: <1223079206.04.0.17382541424.issue4037@psf.upfronthosting.co.za> Message-ID: <1289539992.11.0.109987722136.issue4037@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 06:58:03 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 05:58:03 +0000 Subject: [issue5578] unqualified exec in class body In-Reply-To: <1238164857.67.0.53034733648.issue5578@psf.upfronthosting.co.za> Message-ID: <1289541483.31.0.647429631458.issue5578@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 06:58:44 2010 From: report at bugs.python.org (Brad Greenlee) Date: Fri, 12 Nov 2010 05:58:44 +0000 Subject: [issue10392] GZipFile crash when fileobj.mode is None In-Reply-To: <1289541524.38.0.073026896043.issue10392@psf.upfronthosting.co.za> Message-ID: <1289541524.38.0.073026896043.issue10392@psf.upfronthosting.co.za> New submission from Brad Greenlee : If GZipFile.__init_ is passed a fileobj that has a mode attribute set to None, it will crash with a "'NoneType' object is unsubscriptable" error when it tries to read the first character of the mode. I ran across this when trying to pass GZipFile an uploaded file in Django 1.2.3. Django produced an InMemoryUploadedFile object that has a mode attribute set to None. The attached patch fixes the issue by only using fileobj.mode if it exists and is not None. (The patch is against 2.7, although the issue exists in all versions I've looked at.) ---------- components: Library (Lib) files: gzip_mode_fix.diff keywords: patch messages: 121021 nosy: bgreenlee priority: normal severity: normal status: open title: GZipFile crash when fileobj.mode is None type: crash versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file19576/gzip_mode_fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 07:03:38 2010 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 12 Nov 2010 06:03:38 +0000 Subject: [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1289531147.77.0.0882669267029.issue9312@psf.upfronthosting.co.za> Message-ID: Eli Bendersky added the comment: On Fri, Nov 12, 2010 at 05:05, Terry J. Reedy wrote: Please let me know if there are problems applying it and with which versions, I will fix it up to bring it up to date. It's a tricky patch (affects many files in many places), so there might be difficulties. ---------- Added file: http://bugs.python.org/file19577/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
On Fri, Nov 12, 2010 at 05:05, Terry J. Reedy <report at bugs.python.org> wrote:

Terry J. Reedy <tjreedy at udel.edu> added the comment:

Ok with me also to commit and backport for next releases.


Please let me know if there are problems applying it and with which versions, I will fix it up to bring it up to date. It's a tricky patch (affects many files in many places), so there might be difficulties.



From report at bugs.python.org Fri Nov 12 07:06:24 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 06:06:24 +0000 Subject: [issue6216] Raise Unicode KEEPALIVE_SIZE_LIMIT from 9 to 32? In-Reply-To: <1244246653.62.0.629764911773.issue6216@psf.upfronthosting.co.za> Message-ID: <1289541984.85.0.740077186625.issue6216@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Two weeks left for 3.2 ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 07:07:58 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 06:07:58 +0000 Subject: [issue6335] Add support for mingw In-Reply-To: <1245849042.65.0.399048729588.issue6335@psf.upfronthosting.co.za> Message-ID: <1289542078.59.0.690385821935.issue6335@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 07:14:07 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 12 Nov 2010 06:14:07 +0000 Subject: [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1289542447.68.0.138607324448.issue9312@psf.upfronthosting.co.za> Changes by Georg Brandl : Removed file: http://bugs.python.org/file19577/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 07:14:43 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 06:14:43 +0000 Subject: [issue6942] email.generator.Generator memory consumption In-Reply-To: <1253318032.63.0.187743524666.issue6942@psf.upfronthosting.co.za> Message-ID: <1289542483.91.0.931750381533.issue6942@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: -terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 07:16:05 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 12 Nov 2010 06:16:05 +0000 Subject: [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1289542565.98.0.578209555831.issue9312@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes, please apply. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 07:21:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 12 Nov 2010 06:21:02 +0000 Subject: [issue10008] Two links point to same place In-Reply-To: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> Message-ID: <1289542862.14.0.272360268507.issue10008@psf.upfronthosting.co.za> Georg Brandl added the comment: It is indeed what Hirokazu suggested: there were two ".. class:: ZipFile" entries in the docs. I've added ":noindex:" now to one of them in r86425. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 08:23:35 2010 From: report at bugs.python.org (Collin Winter) Date: Fri, 12 Nov 2010 07:23:35 +0000 Subject: [issue1625576] add ability to specify name to os.fdopen Message-ID: <1289546615.58.0.11948683674.issue1625576@psf.upfronthosting.co.za> Collin Winter added the comment: Christian: yes, that sounds fine. ---------- assignee: collinwinter -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 08:57:03 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 12 Nov 2010 07:57:03 +0000 Subject: [issue1625576] add ability to specify name to os.fdopen Message-ID: <1289548623.59.0.17768007689.issue1625576@psf.upfronthosting.co.za> Georg Brandl added the comment: Collin: I doubt Christian will do much about this anymore :) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 10:17:39 2010 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 12 Nov 2010 09:17:39 +0000 Subject: [issue10371] Deprecate trace module undocumented API In-Reply-To: <1289269952.54.0.146506315747.issue10371@psf.upfronthosting.co.za> Message-ID: <1289553459.22.0.698088431451.issue10371@psf.upfronthosting.co.za> Eli Bendersky added the comment: Alexander, http://bugs.python.org/file19553/trace-deprecations.diff looks good to me ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 10:26:38 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 12 Nov 2010 09:26:38 +0000 Subject: [issue962772] when both maintainer and author provided, author discarded Message-ID: <1289553998.59.0.765859902412.issue962772@psf.upfronthosting.co.za> Stefan Krah added the comment: I think this might be more than a documentation bug. Akira's example shows that the maintainer is erroneously listed as the author. This does not seem fair to an author who in general will have written most of a package. I'd prefer a separate maintainer field. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 10:55:06 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 12 Nov 2010 09:55:06 +0000 Subject: [issue962772] when both maintainer and author provided, author discarded Message-ID: <1289555706.77.0.973306781254.issue962772@psf.upfronthosting.co.za> Tarek Ziad? added the comment: PEP 345 adds a Maintainer field to fix this, and this is now present and active in Ditsutils2. You can now have both. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 11:03:36 2010 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 12 Nov 2010 10:03:36 +0000 Subject: [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1289556216.88.0.568978866353.issue9264@psf.upfronthosting.co.za> Eli Bendersky added the comment: Alexander, I'm submitting a patch for Doc/library/trace.rst for 3.2, incorporating the stylistic changes you propose. It would be really great to see this fixed for the next release of 3.2, since the documentation improvement is major, and it's already in for 2.6 Perhaps if this is found acceptable, the same patch could be applied to 2.7 as well. Let me know if any more fixes are needed, I will make my best attempt to respond promptly. ---------- Added file: http://bugs.python.org/file19578/issue9264.py32.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 11:17:56 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Fri, 12 Nov 2010 10:17:56 +0000 Subject: [issue10359] ISO C cleanup In-Reply-To: <1289295899.43.0.275178242611.issue10359@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: STINNER Victor writes: > Python-ast.c: why do you move req_name and req_type outside PyAST_obj2mod()? Eh, in case I've managed to be sufficiently unclear: The reason I modified it at all was because the initialization is not valid in C90, only in C99. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 11:33:56 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Fri, 12 Nov 2010 10:33:56 +0000 Subject: [issue10070] 2to3 wishes for already-2to3'ed files In-Reply-To: <1289332049.46.0.37828514943.issue10070@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: Martin v. L??wis writes: > And I still don't understand the rationale for this request. Can you > please post an example Python module that has this markup you are asking > for, so I can show you how to achieve what you want without the markup? Eh. I thought you said you did understand. But here is one: http://folk.uio.no/hbf/ZipHTTPServer.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 14:15:56 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 13:15:56 +0000 Subject: [issue10070] 2to3 wishes for already-2to3'ed files In-Reply-To: <1286882661.81.0.431457664283.issue10070@psf.upfronthosting.co.za> Message-ID: <1289567756.65.0.0739373793952.issue10070@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think 2to3 is designed to take 2.x code and turn it into 3.x code. Codebases using tricks and hacks to support both 2.x and 3.x (like the example you linked to) cannot be handled by 2to3. You have to make a choice between manual maintenance of parallel codebases, automatic 2to3 translation or cross-version compatibility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 15:04:00 2010 From: report at bugs.python.org (Abyx) Date: Fri, 12 Nov 2010 14:04:00 +0000 Subject: [issue10393] "with" statement isn't thread-safe In-Reply-To: <1289570640.39.0.977918718998.issue10393@psf.upfronthosting.co.za> Message-ID: <1289570640.39.0.977918718998.issue10393@psf.upfronthosting.co.za> New submission from Abyx : Code to reproduce the bug: #include #include DWORD WINAPI thread_fn(void* code) { PyGILState_STATE state = PyGILState_Ensure(); PyRun_SimpleString("with sync: print('.')\n"); PyGILState_Release(state); return 0; } int main() { PyEval_InitThreads(); Py_Initialize(); PyRun_SimpleString("import _thread\n"); PyRun_SimpleString("sync = _thread.allocate_lock()\n"); PyThreadState* mainstate = PyEval_SaveThread(); HANDLE hThread1 = CreateThread(0, 0, thread_fn, 0, 0, 0); HANDLE hThread2 = CreateThread(0, 0, thread_fn, 0, 0, 0); WaitForSingleObject(hThread1, INFINITE); WaitForSingleObject(hThread2, INFINITE); PyEval_RestoreThread(mainstate); Py_Finalize(); } ------------ Output ------ . . Traceback (most recent call last): File "", line 2, in NameError: name '_[1]' is not defined ----------- End of output ----- Probably both threads uses the same "_" global variable. First thread releases GIL in "print" function, then second thread overwrites "_", and then first thread raises the NameError accessing "_" later. Sometimes (not ever) the "sync" kept locked, and program deadlocks on next "sync.acquire()" call from another thread (if any). ---------- components: Interpreter Core messages: 121035 nosy: Abyx priority: normal severity: normal status: open title: "with" statement isn't thread-safe type: crash versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 15:05:08 2010 From: report at bugs.python.org (Christoph Mathys) Date: Fri, 12 Nov 2010 14:05:08 +0000 Subject: [issue10394] subprocess Popen deadlock In-Reply-To: <1289570708.02.0.0744739807294.issue10394@psf.upfronthosting.co.za> Message-ID: <1289570708.02.0.0744739807294.issue10394@psf.upfronthosting.co.za> New submission from Christoph Mathys : The ctor of subprocess.Popen has a race condition, which the attached program should demonstrate (on my computer a few seconds are enough). Program One sleeps for 2 seconds, Program Two exits right after execve. Now I would expect Program Two to take a very short time between Popen and the completion of wait(), but it regularly takes about 2 seconds. The problem is this: Popen._execute_child opens a pipe and sets the FD_CLOEXEC flag. If thread_1 just finished creating the pipe but could not yet set FD_CLOEXEC when thread_2 fork()s, thread_1 will lock up when it reads on the pipe (errpipe_read). The process forked by thread_1 will close the pipe, but the process forked by thread_2 will only close the pipe when it exits, blocking thread_1 inside the read function until then. I see different options: Linux has the platform specific flag O_CLOEXEC to set this flag during open() (the manpage of open says since 2.6.23, so highly platform dependent) To just solve the problem for Popens ctor it is enough to serialize all code from before pipe() until after fork(). This can still lead to problems if fork is called in other contexts than Popens ctor. A general solution would be to use a socket which can be shutdown(). If close_fds is set for Popens ctor, the problem does not occur because the extra pipe of the forked process will be closed. ---------- components: Library (Lib) files: deadlock.py messages: 121036 nosy: Christoph.Mathys priority: normal severity: normal status: open title: subprocess Popen deadlock type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file19579/deadlock.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 15:39:32 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 12 Nov 2010 14:39:32 +0000 Subject: [issue10393] "with" statement isn't thread-safe In-Reply-To: <1289570640.39.0.977918718998.issue10393@psf.upfronthosting.co.za> Message-ID: <1289572772.08.0.897826498851.issue10393@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Agreed. There was a similar issue in python2.6 with list comprehensions. The issue is that both threads run the code with the same globals dictionary, and top-level code use the same dict for locals and globals. This is already fixed in 2.7 and 3.2, temporary variables are no more used. Meanwhile, I can see two workarounds: - Run the code in a python function; the _[1] variable will be local to the function, and distinct for each thread. - Use PyRun_String(), and pass a different dictionary for each thread:: PyObject *d, *v; d = PyDict_New(); v = PyRun_String(command, Py_file_input, d, d); Py_XDECREF(v); Py_XDECREF(d); But the 3.2 fix cannot be ported to 3.1: it needs a new opcode. ---------- nosy: +amaury.forgeotdarc resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 16:14:07 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 12 Nov 2010 15:14:07 +0000 Subject: [issue10395] os.path.commonprefix broken by design In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> New submission from Ronald Oussoren : The documentation for os.path.commonprefix notes: os.path.commonprefix(list) Return the longest path prefix (taken character-by-character) that is a prefix of all paths in list. If list is empty, return the empty string (''). Note that this may return invalid paths because it works a character at a time. And indeed: >>> os.path.commonprefix(['/usr/bin', '/usr/bicycle']) '/usr/bi' This is IMHO useless behaviour for a function in the os.path namespace, I'd expect that os.path.commonprefix works with path elements (e.g. that the call above would have returned '/usr'). ---------- components: Library (Lib) messages: 121038 nosy: ronaldoussoren priority: low severity: normal status: open title: os.path.commonprefix broken by design versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 16:38:00 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 12 Nov 2010 15:38:00 +0000 Subject: [issue10395] os.path.commonprefix broken by design In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1289576280.62.0.63141469767.issue10395@psf.upfronthosting.co.za> Eric Smith added the comment: Indeed, that behavior seems completely useless. I've verified that it works the same in 2.5.1. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 16:48:20 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 12 Nov 2010 15:48:20 +0000 Subject: [issue10395] os.path.commonprefix broken by design In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1289576900.32.0.558648730696.issue10395@psf.upfronthosting.co.za> Eric Smith added the comment: Although there are test cases in test_genericpath that verify this behavior, so apparently it's intentional. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 17:03:02 2010 From: report at bugs.python.org (Abyx) Date: Fri, 12 Nov 2010 16:03:02 +0000 Subject: [issue10393] "with" statement isn't thread-safe In-Reply-To: <1289570640.39.0.977918718998.issue10393@psf.upfronthosting.co.za> Message-ID: <1289577782.37.0.694067186499.issue10393@psf.upfronthosting.co.za> Abyx added the comment: Thanks. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 17:04:38 2010 From: report at bugs.python.org (Typo) Date: Fri, 12 Nov 2010 16:04:38 +0000 Subject: [issue10364] Color coding fails after running program. In-Reply-To: <1289239102.42.0.620564801896.issue10364@psf.upfronthosting.co.za> Message-ID: <1289577878.4.0.691833732174.issue10364@psf.upfronthosting.co.za> Typo added the comment: Hey, I found out what the problem was. I wasn't saving the files as a .py file. As soon as I did that the color came back. Sorry to have wasted your time >.< ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 17:18:08 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 12 Nov 2010 16:18:08 +0000 Subject: [issue10395] os.path.commonprefix broken by design In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1289578688.42.0.606225414262.issue10395@psf.upfronthosting.co.za> Ronald Oussoren added the comment: That's why I write 'broken by design' in the title. A "fix" for this will have to a new function, if any get added (I've written a unix implementation that finds the longest shared path several times and can provide an implementation and tests when others agree that this would be useful) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 17:47:08 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 16:47:08 +0000 Subject: [issue10364] Color coding fails after running program. In-Reply-To: <1289239102.42.0.620564801896.issue10364@psf.upfronthosting.co.za> Message-ID: <1289580428.69.0.354513265923.issue10364@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thank you for reporting back. This could be closed as invalid, but since I think this is something I should have known or guessed, I will leave it open for now as a reminder to look at the docs sometime and see if anything should be added somewhere. ---------- assignee: -> terry.reedy components: +Documentation -None stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:07:03 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Nov 2010 17:07:03 +0000 Subject: [issue10359] ISO C cleanup In-Reply-To: <1289225493.06.0.31753137713.issue10359@psf.upfronthosting.co.za> Message-ID: <1289581623.07.0.11049998428.issue10359@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Stable branches (2.7 and 3.1) only get bug fixes, not new features or > code cleanups. ?ric, making code compliant *is* a bug fix (admittedly of minor importance here, since all modern compilers accept the non-compliant code anyway). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:10:39 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Nov 2010 17:10:39 +0000 Subject: [issue1625576] add ability to specify name to os.fdopen Message-ID: <1289581839.66.0.278179718811.issue1625576@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The requested feature would require an additional argument to fdopen() and open(), which already have many args. It would be better IMO to make the `name` attribute on file objects writeable. By the way, right now (in 3.x) fdopen() gives you the file descriptor number, which is better than nothing: >>> import os >>> f = os.fdopen(2, "w") >>> f <_io.TextIOWrapper name=2 encoding='UTF-8'> ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:22:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 17:22:09 +0000 Subject: [issue10373] Setup Script example incorrect In-Reply-To: <1289308146.55.0.869173171863.issue10373@psf.upfronthosting.co.za> Message-ID: <1289582529.08.0.914212432047.issue10373@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. Setuptools is not a part of Python, and distutils docs don?t mention issues specific to third-party tools. I think I will reject this bug. ---------- assignee: docs at python -> eric.araujo nosy: +eric.araujo status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:25:42 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 12 Nov 2010 17:25:42 +0000 Subject: [issue8332] regrtest single TestClass/test_method In-Reply-To: <1270631958.05.0.652340331128.issue8332@psf.upfronthosting.co.za> Message-ID: <1289582742.17.0.978804521808.issue8332@psf.upfronthosting.co.za> anatoly techtonik added the comment: Yes. You're missing the second case. In: > regrtest [options] test_file.test_method You don't specify class name. This saves some time you need to navigate and copy/paste name of container class. It will save more time if masks are used by default. To illustrate this let's introduce '-l' key that lists all found tests to test test discovery (no errors in this sentence). > regrtest -l *des* test_file.FancyRenameTests.test_no_*des*t_exists test_file.FancyRenameTests.test_*des*t_exists test_file.FancyRenameTests.test_*des*t_opened test_file.GitFile*des*tTests.test_invalid test_file.GitFile*des*tTests.test_readonly test_*des*t.SomeClass.some_test .... *stars* in results highlight matched substring. Rationale: The most common operation when looking for tests to run is grep. You don't need to remember option name to specify mask - just use mask - it will run discovery and execute only tests found. '-l' key in test runner can be used to quickly grep available tests to find the exact name and run only it. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:50:21 2010 From: report at bugs.python.org (Michael Hoffman) Date: Fri, 12 Nov 2010 17:50:21 +0000 Subject: [issue10396] stdin argument to pdb.Pdb doesn't work unless you also set Pdb.use_rawinput = False In-Reply-To: <1289584221.71.0.586527779083.issue10396@psf.upfronthosting.co.za> Message-ID: <1289584221.71.0.586527779083.issue10396@psf.upfronthosting.co.za> New submission from Michael Hoffman : If you create a Pdb instance with an stdin argument, the default behavior is for commands to be retrieved using raw_input(), which uses sys.stdin instead, thereby causing the stdin argument to be without effect. You can work around this by setting the use_rawinput attribute of the instance to False, but this should be done whenever an stdin argument is given to the constructor. ---------- components: Library (Lib) files: testcase.py messages: 121050 nosy: hoffman priority: normal severity: normal status: open title: stdin argument to pdb.Pdb doesn't work unless you also set Pdb.use_rawinput = False type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file19580/testcase.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:51:12 2010 From: report at bugs.python.org (Michael Hoffman) Date: Fri, 12 Nov 2010 17:51:12 +0000 Subject: [issue10396] stdin argument to pdb.Pdb doesn't work unless you also set Pdb.use_rawinput = False In-Reply-To: <1289584221.71.0.586527779083.issue10396@psf.upfronthosting.co.za> Message-ID: <1289584272.26.0.0570002980197.issue10396@psf.upfronthosting.co.za> Changes by Michael Hoffman : Added file: http://bugs.python.org/file19581/expected_behavior.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:54:17 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 17:54:17 +0000 Subject: [issue10342] trace module cannot produce coverage reports for zipped modules In-Reply-To: <1289057209.7.0.964126417973.issue10342@psf.upfronthosting.co.za> Message-ID: <1289584457.06.0.80240927502.issue10342@psf.upfronthosting.co.za> Terry J. Reedy added the comment: >What is the best way to pass around source code? > - file-like objects, line iterators, readline-like function? Line iterator (list of lines) as returned by open().readlines. Memory should not be an issue. Read disk once and close. with open('file', ...) as f: src = f.readlines() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 19:00:05 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 18:00:05 +0000 Subject: [issue10344] codecs.readline doesn't care buffering=0 In-Reply-To: <1289084418.05.0.231852584468.issue10344@psf.upfronthosting.co.za> Message-ID: <1289584805.92.0.77981929031.issue10344@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Please suggest a specific alteration in the codecs.readline doc that we can then discuss. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 19:34:53 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 18:34:53 +0000 Subject: [issue10356] decimal.py: hash of -1 In-Reply-To: <1289219643.76.0.519336821084.issue10356@psf.upfronthosting.co.za> Message-ID: <1289586893.41.0.221416127267.issue10356@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 19:50:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Nov 2010 18:50:01 +0000 Subject: [issue4471] IMAP4 missing support for starttls In-Reply-To: <1228062796.45.0.215183772699.issue4471@psf.upfronthosting.co.za> Message-ID: <1289587801.98.0.750840096289.issue4471@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The starttls patch has been committed in r86431. Thank you very much for writing the initial patch. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 19:50:29 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 18:50:29 +0000 Subject: [issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened In-Reply-To: <1289242981.94.0.545258182692.issue10365@psf.upfronthosting.co.za> Message-ID: <1289587829.09.0.429597016654.issue10365@psf.upfronthosting.co.za> Terry J. Reedy added the comment: That suggests that the last statement needs to be guarded somehow. I re-versioned to 3.2 because 3.1.final will be out very soon. I expect 3.2 and 2.7 should have same problem. ---------- nosy: +terry.reedy versions: +Python 3.2 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 19:57:24 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 18:57:24 +0000 Subject: [issue10375] 2to3 print(single argument) In-Reply-To: <1289311942.35.0.609245522343.issue10375@psf.upfronthosting.co.za> Message-ID: <1289588244.4.0.608123742555.issue10375@psf.upfronthosting.co.za> Terry J. Reedy added the comment: >[Copied from Issue10070.] which is to say (for the benefit of other reviewers): This was a minor sub-issue mentioned there in passing and independent of the main issue and ignored in the extensive discussion thereof. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 20:00:06 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 12 Nov 2010 19:00:06 +0000 Subject: [issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate In-Reply-To: <1197387663.32.0.0598513497038.issue1589@psf.upfronthosting.co.za> Message-ID: <1289588406.95.0.896698401792.issue1589@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 20:09:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 12 Nov 2010 19:09:08 +0000 Subject: [issue10342] trace module cannot produce coverage reports for zipped modules In-Reply-To: <1289584457.06.0.80240927502.issue10342@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, Nov 12, 2010 at 12:54 PM, Terry J. Reedy wrote: .. >>What is the best way to pass around source code? >> - file-like objects, line iterators, readline-like function? > > Line iterator (list of lines) as returned by open().readlines. > Memory should not be an issue. Read disk once and close. > > with open('file', ...) as f: > ?src = f.readlines() Line iterator does not carry the information about source encoding which may be important for annotating the source code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 20:09:49 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 19:09:49 +0000 Subject: [issue10385] Mark up "subprocess" as module in its doc In-Reply-To: <1289444045.02.0.247018067393.issue10385@psf.upfronthosting.co.za> Message-ID: <1289588989.7.0.267240001369.issue10385@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 1. Does the markup make any visual difference? 2. Does the markup affect the index? 3. What do other module docs do? I notice that 'Tkinter' appears in several section headings. Is it marked? (Is the upper case a holdover that should be lowercased?) 'Turtle' also appears in several section headers. That could be interpreted as a reference to the class rather than the module. ---------- nosy: +georg.brandl, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 20:16:56 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 12 Nov 2010 19:16:56 +0000 Subject: [issue10070] 2to3 wishes for already-2to3'ed files In-Reply-To: <1286882661.81.0.431457664283.issue10070@psf.upfronthosting.co.za> Message-ID: <1289589416.97.0.797537733451.issue10070@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't understand the example, either. If I run 2to3 on it, I get, as the only change if sys.version_info[0] < 3: # Python 2 - from urllib import quote, unquote - from urlparse import urlparse, urlunparse - from BaseHTTPServer import HTTPServer - from SimpleHTTPServer import SimpleHTTPRequestHandler + from urllib.parse import quote, unquote + from urllib.parse import urlparse, urlunparse + from http.server import HTTPServer + from http.server import SimpleHTTPRequestHandler def str2data(s, is_nonascii=re.compile("[^\0-\x7F]").search): As this code is in a Python 2.x block: why does this change cause problems to you? You are supposed to run the 2to3 result in Python 3, and this conversion result will run correctly in Python 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 20:17:43 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 19:17:43 +0000 Subject: [issue10384] SyntaxError should contain exact location of the invalid character in identifier In-Reply-To: <1289439285.11.0.506002899946.issue10384@psf.upfronthosting.co.za> Message-ID: <1289589463.83.0.676532714207.issue10384@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I see the marker pointing to the space after '=', which is *really* not helpful. If '5' were instead an identifier, one might be really misdirected. So best would be "Invalid char '0xnnnn' at position n in identifier 'something'" +1 to any improvement in SyntaxError reports. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 20:21:51 2010 From: report at bugs.python.org (Bobby Impollonia) Date: Fri, 12 Nov 2010 19:21:51 +0000 Subject: [issue10397] Unified Benchmark Suite fails on py3k with --track-memory In-Reply-To: <1289589711.2.0.279349979417.issue10397@psf.upfronthosting.co.za> Message-ID: <1289589711.2.0.279349979417.issue10397@psf.upfronthosting.co.za> New submission from Bobby Impollonia : Steps to reproduce (requires linux because the --track-memory (-m) option to perf.py is linux-only): hg clone http://hg.python.org/benchmarks/ py2benchmarks mkdir py3benchmarks cd py3benchmarks ../py2benchmarks/make_perf3.sh ../py2benchmarks py3k perf.py -f -m -b normal_startup old_py3k new_py3k With --track-memory, the normal_startup benchmark (which is part of the py3k benchmark group) invokes the interpreter under test as: py3k -c 'for _ in xrange(200000): pass' This fails on py3k due to the use of xrange, which is not caught by 2to3 since it appears inside a quoted string (the command line argument). A patch is attached that resolves the issue by changing the for loop with xrange into a while loop. ---------- assignee: collinwinter components: Benchmarks files: perf.patch keywords: patch messages: 121060 nosy: bobbyi, collinwinter, pitrou priority: normal severity: normal status: open title: Unified Benchmark Suite fails on py3k with --track-memory type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file19582/perf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 20:27:36 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 12 Nov 2010 19:27:36 +0000 Subject: [issue10385] Mark up "subprocess" as module in its doc In-Reply-To: <1289588989.7.0.267240001369.issue10385@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, Nov 12, 2010 at 2:09 PM, Terry J. Reedy wrote: .. > 1. Does the markup make any visual difference? It does on my browser. (I wouldn't have noticed it otherwise.) See http://docs.python.org/dev/contents.html > 2. Does the markup affect the index? I don't think so because module names are already in the index. This is either holdover or title-case. In either case it should be fixed. Note that in some section titles it is lower case and marked up properly. > 'Turtle' also appears in several section headers. That could be interpreted > as a reference to the class rather than the module. In "Turtle graphics" it is neither -- just part of the name of the graphics framework. When it is a name of the class, as in " Overview of available Turtle and Screen methods," is should be marked up with :class: IMO. In "Tell Turtle?s state", I think "turtle" should be lower-cased. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 20:32:12 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 19:32:12 +0000 Subject: [issue10350] errno is read too late In-Reply-To: <1289206098.51.0.17539694799.issue10350@psf.upfronthosting.co.za> Message-ID: <1289590332.36.0.347389142952.issue10350@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This stuff is hard to write automated tests for, hence there are none. The patch is mostly straightforward: capture errno with new variable err at point of possible error when intervening calculation is needed before testing the value of errno. This seems like a good idea. There is one relocation of memory freeing and the additions of + if (res >= 0) + break; which I cannot evaluate. ---------- nosy: +terry.reedy stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 20:35:37 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 12 Nov 2010 19:35:37 +0000 Subject: [issue10395] os.path.commonprefix broken by design In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1289590537.91.0.571008177506.issue10395@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This goes back to issue400788 and http://mail.python.org/pipermail/python-dev/2000-July/005897.html http://mail.python.org/pipermail/python-dev/2000-August/008385.html Skip changed it to do something meaningful (more than ten years ago), Mark Hammond complained that it was backwards incompatible, Tim Peters argued that you shouldn't change a function if the documented behavior matches the implementation, and Skip reverted the change and added more documentation to make the actual behavior more explicit. It may be useless, but it's certainly not broken. In addition, it's very likely that applications of it rely on the very semantics that it has. In any case, anybody proposing a change should go back and re-read the old threads. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 20:36:08 2010 From: report at bugs.python.org (Jani Poikela) Date: Fri, 12 Nov 2010 19:36:08 +0000 Subject: [issue10398] errors in docs re module initialization vs self arg to functions In-Reply-To: <1289590568.94.0.655390055242.issue10398@psf.upfronthosting.co.za> Message-ID: <1289590568.94.0.655390055242.issue10398@psf.upfronthosting.co.za> New submission from Jani Poikela : Copy of issue 6421 Affects 2.7 too... ---------- assignee: docs at python components: Documentation messages: 121064 nosy: Jani.Poikela, aleax, docs at python, georg.brandl priority: normal severity: normal status: open title: errors in docs re module initialization vs self arg to functions type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 20:46:06 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 12 Nov 2010 19:46:06 +0000 Subject: [issue10398] errors in docs re module initialization vs self arg to functions In-Reply-To: <1289590568.94.0.655390055242.issue10398@psf.upfronthosting.co.za> Message-ID: <1289591166.72.0.0722964115999.issue10398@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, done in r86432. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 20:48:25 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 12 Nov 2010 19:48:25 +0000 Subject: [issue10385] Mark up "subprocess" as module in its doc In-Reply-To: <1289444045.02.0.247018067393.issue10385@psf.upfronthosting.co.za> Message-ID: <1289591305.39.0.518633031194.issue10385@psf.upfronthosting.co.za> Georg Brandl added the comment: Eric: any :mod: role never affects the index. Only the module directive does. Otherwise, I concur that it's not mandatory to mark up every occurrence of the module name, but it's nice in section headings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:08:00 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 20:08:00 +0000 Subject: [issue10342] trace module cannot produce coverage reports for zipped modules In-Reply-To: <1289057209.7.0.964126417973.issue10342@psf.upfronthosting.co.za> Message-ID: <1289592480.61.0.0462681141639.issue10342@psf.upfronthosting.co.za> Terry J. Reedy added the comment: >Line iterator does not carry the information about source encoding which may be important for annotating the source code. I would pass around both encoding and lines, possibly as a tuple. A person heavily into OO might define a _Source class and turn the private functions into methods. But that would not play well with the deprecation process until it is done with. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:16:53 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 12 Nov 2010 20:16:53 +0000 Subject: [issue10399] AST Optimization: inlining of function calls In-Reply-To: <1289593012.28.0.71054855235.issue10399@psf.upfronthosting.co.za> Message-ID: <1289593012.28.0.71054855235.issue10399@psf.upfronthosting.co.za> New submission from Dave Malcolm : In msg#120541 of issue#1346238 Raymond suggested to "aim high", so here goes... I'm opening this as a separate bug as it's a very different approach to the patches in that bug; adding those on the nosy list for that bug. Sorry in advance about the epic length of this comment. I've been experimenting with AST optimizations, and have a (very) primitive implementation of function-call inlining. As is, it's deeply flawed, but in a spirit of "Release Early, Release Often" I though I'd post what I have so far, and try to enumerate the rest of the work that would need doing to get this into, say Python 3.3 The attached patch adds an AST optimization pass to Python/compiler.c. It does this by adding an __optimizer__.py module: the compiler converts the AST to a Python representation using ast2mod, and calls out to __optimizer__.optimize_ast(). This can then (potentially) apply a series of manipulations to the tree. The result is then converted back from python to ast objects, and compilation proceeds as normal on the modified AST tree. I initially was experimenting with a .c implementation, but moving to .py makes things _much_ easier to develop and debug. In particular, I'm using graphviz's "dot" tool to generate before/after visualizations of the AST. The optimizer doesn't try to optimize itself (or anything that it imports), to avoid infinite recursion when we have a cold .pyo cache. Currently I'm doing the AST optimization before symbol table generation. This means that the inlining is deeply flawed, as it has no knowledge of the scope of names. A robust implementation would compare the scopes of the callsite and that of the function body, and remap locals accordingly. The current implementation renames all name references in the function body, which is clearly wrong for e.g. references to globals. See below for notes on that. Here's my test code:: def function_to_be_inlined(x, y, z): return (2 * x * y) + z print(function_to_be_inlined(3, 4, 5)) Here's what it compiles to after going through the inliner (clearly, line numbering needs some work). Note the removal of the CALL_FUNCTION of our target call site; the remaining CALL_FUNCTION is to "print": 2 0 LOAD_CONST 0 (", line 2>) 3 MAKE_FUNCTION 0 6 STORE_NAME 0 (function_to_be_inlined) 4 9 LOAD_CONST 1 (3) 12 STORE_NAME 1 (__inline1f22840__x) 15 LOAD_CONST 2 (4) 18 STORE_NAME 2 (__inline1f22840__y) 21 LOAD_CONST 3 (5) 24 STORE_NAME 3 (__inline1f22840__z) 259 27 LOAD_CONST 4 (2) 30 LOAD_NAME 1 (__inline1f22840__x) 33 BINARY_MULTIPLY 34 LOAD_NAME 2 (__inline1f22840__y) 37 BINARY_MULTIPLY 38 LOAD_NAME 3 (__inline1f22840__z) 41 BINARY_ADD 42 STORE_NAME 4 (__inline1f22840____returnval__) 260 45 LOAD_NAME 5 (print) 48 LOAD_NAME 4 (__inline1f22840____returnval__) 51 CALL_FUNCTION 1 54 POP_TOP 55 LOAD_CONST 5 (None) 58 RETURN_VALUE The idea is that a further optimization pass would go through and ellide the unnecessary store-to-local/load-from-local instructions, followed by const folding, getting this down to: LOAD_CONST () MAKE_FUNCTION STORE_NAME (function_to_be_inlined) ; inlined callsite: LOAD_NAME (print) LOAD_CONST (29) CALL_FUNCTION 1 The biggest issue here is dealing with runtime differences between which function was inlined, and which function is being called, either via monkeypatching, or in method calls - we can inline intra-method calls within one class, but we have to cope with overriding of those methods in subclasses. Thinking aloud of a way of solving this (this isn't implemented yet): add to AST: Specialize(expr name, stmt* specialized, stmt* generalized) where you have some interpretation of name (e.g. "self.do_something"), and carry two different implementations. so that e.g. class Something: def foo(self, x, y, z): ... # some code self.bar(x, y, z) ... # more code the: Call(Attribute(Name(id='self'), id='bar'), args=[etc]) becomes Specialize(name=Attribute(Name(id='self'), id='bar'), specialized=[inlined implementation of Something.bar for "self"], generalized=[Call(Attribute(Name(id='self'), id='bar'), args=[etc])]) Similarly, would need a new bytecode, say "JUMP_IF_SPECIALIZABLE" LOAD_NAME (self) GET_ATTR ('bar') ; method self.bar is now on top of stack LOAD_CONST () JUMP_IF_SPECIALIZABLE -> label_inline_body ; Start of non-inlined call eval and push args CALL_FUNCTION JUMP_ABSOLUTE -> label_after ; ...end of non-inlined call; return value is top-of-stack label_inline_body: eval args (potentially optimizing with knowledge of what's to come) inlined call push "return value" ; ...end of inlined call; "return value" is top-of-stack label_after: ; etc JUMP_IF_SPECIALIZABLE Inputs: TOS : A: code object we inlined for (via a LOAD_CONST, injected by the inliner) TOS -1 : B: function object via runtime lookup (LOAD_GLOBAL, or e.g. LOAD_LOCAL "self"; GET_ATTR "do_something") Action: if B's __code__ is A, we can specialize: PC += oparg POP else: PC += 1 POP POP I'm not sure if this covers all cases (e.g. specializing a CFunction such as the builtins), or if this a sane approach that actually works; need to have a standard interpretation of what a name lookup means, and to inject LOAD_CONST of that value into the bytecode, for use by the JUMP_IF_SPECIALIZABLE operation. As I understand it, functions are "name-resolved" before the arguments are evaluated, so if argument evaluation leads to the name being bound to a different function (as a side effect), the status quo in CPython currently is that the old function is used for that call; JUMP_IF_SPECIALIZABLE would preserve that behavior. It could also slightly slow down overridden method calls, as it would add a test for "am I overridden" that would generally take the "overridden" branch; perhaps we could detect classes with subclasses in the same AST and suppress inlining for this case. Similarly, it could spot the def override_me(self): raise NotImplementedError pattern and not try to inline. Other issues: - Somehow need to tie together symbol tables with ast2mod. One approach: do the symtable generation first, then adjust ast2mod so that it adds PySymtableEntry references to the generated python tree as appopriate. This would expose the name scope structure. But after the tree changes, do we need to regenerate the symbol table? Or we could annotate the python ast.Name objects with scope information, and the ast optimizer would be responsible for keeping this correct. The compiler could then rerun the symtable analysis on the returned AST, or could trust the optimizer's info. - What to do with the "locals()" builtin? Inlined functions could save a copy of locals with duplicate names, keeping their existing names for the locals in the inlined copy. This would lead to "locals()" having additional items when called from an inlined function. - Many optimizations would have to assume that locals don't change value. Can we assume that in an optimized build that it's acceptable that code that use the inspect module and manipulates the f_locals of a frame may have surprising behavior in the face of optimization? (e.g. I'd like to be able to optimize away locals if we can prove that absence of side-effects). - PyAST_obj2mod enforces checking for a particular top-level element. To cope with this, I needed to pass this around in a few places, so I introduced "enum PyCompilationMode" to avoid having the magic 0, 1, or 2 to designate the grammar variant. This better distinguishes these values from other places which use the ID of the start token: semantically equivalent, but with different constants. I haven't yet fixed this up in Modules/parsermodule.c - Plenty of FIXMEs in the code, many of which are in themselves major issues - I'm not yet checking the optimization flag; that should probably be required to be on for this to be called. - Is "__optimizer__" a sane name? perhaps just "optimizer" - Too unstable to benchmark as yet. - There are probably other issues I haven't thought of yet. Notes: - the patch also contains a fix for issue 10391 (error handling is important when manipulating the AST) - potentially could add an optimize_cfg() hook, and expose the CFG struct basicblock and struct instr as Python objects in a similar way, as a later optimization pass Thanks to Red Hat for giving me time to experiment on this ---------- components: Interpreter Core files: py3k-ast-optimization-inlining-2010-11-12-001.patch keywords: patch messages: 121068 nosy: alex, belopolsky, benjamin.peterson, dmalcolm, jhylton, nnorwitz, rhettinger, sdahlbac, thomas.lee, titanstar priority: normal severity: normal status: open title: AST Optimization: inlining of function calls type: performance versions: Python 3.3 Added file: http://bugs.python.org/file19583/py3k-ast-optimization-inlining-2010-11-12-001.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:18:28 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 12 Nov 2010 20:18:28 +0000 Subject: [issue10399] AST Optimization: inlining of function calls In-Reply-To: <1289593012.28.0.71054855235.issue10399@psf.upfronthosting.co.za> Message-ID: <1289593108.27.0.162260584419.issue10399@psf.upfronthosting.co.za> Changes by Dave Malcolm : Added file: http://bugs.python.org/file19584/before.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:18:58 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 12 Nov 2010 20:18:58 +0000 Subject: [issue10399] AST Optimization: inlining of function calls In-Reply-To: <1289593012.28.0.71054855235.issue10399@psf.upfronthosting.co.za> Message-ID: <1289593138.03.0.477564512105.issue10399@psf.upfronthosting.co.za> Changes by Dave Malcolm : Added file: http://bugs.python.org/file19585/after.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:22:15 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 20:22:15 +0000 Subject: [issue10385] Mark up "subprocess" as module in its doc In-Reply-To: <1289444045.02.0.247018067393.issue10385@psf.upfronthosting.co.za> Message-ID: <1289593335.09.0.327017096802.issue10385@psf.upfronthosting.co.za> Terry J. Reedy added the comment: >http://docs.python.org/dev/contents.html The only thing I see there is the bold-facing of *PEP 3101*. Is that what you are referring to? In any case, with Georg's concurrence go ahead with this and any other modules you care about. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:23:08 2010 From: report at bugs.python.org (Vlastimil Brom) Date: Fri, 12 Nov 2010 20:23:08 +0000 Subject: [issue10400] updating unicodedata to Unicode 6 In-Reply-To: <1289593388.77.0.423367709943.issue10400@psf.upfronthosting.co.za> Message-ID: <1289593388.77.0.423367709943.issue10400@psf.upfronthosting.co.za> New submission from Vlastimil Brom : I'd like to suggest updating the unicodedata module according to the recent Unicode standard 6.0 http://www.unicode.org/versions/Unicode6.0.0/ I'm sorry to bother, in case this is planned automatically, I just wasn't able to find the respective information. Would it be possible to apply such update also for the upcomming python 2.7.1, or are there some showstoppers/incompatibilities... with regard to the new unicode version? regards, vbr ---------- components: Unicode messages: 121070 nosy: vbr priority: normal severity: normal status: open title: updating unicodedata to Unicode 6 type: feature request versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:30:06 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 12 Nov 2010 20:30:06 +0000 Subject: [issue10400] updating unicodedata to Unicode 6 In-Reply-To: <1289593388.77.0.423367709943.issue10400@psf.upfronthosting.co.za> Message-ID: <1289593806.22.0.914824707755.issue10400@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The database had been updated already in r85371. Backporting this change to maintenance branches is not allowed by policy. ---------- nosy: +loewis resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:35:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 20:35:44 +0000 Subject: [issue10252] Fix resource warnings in distutils In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1289594144.83.0.527824547156.issue10252@psf.upfronthosting.co.za> ?ric Araujo added the comment: Ported to 3.1 and 2.7 in r86433 and r86434. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:43:41 2010 From: report at bugs.python.org (William Barr) Date: Fri, 12 Nov 2010 20:43:41 +0000 Subject: [issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened In-Reply-To: <1289242981.94.0.545258182692.issue10365@psf.upfronthosting.co.za> Message-ID: <1289594621.4.0.893416094439.issue10365@psf.upfronthosting.co.za> William Barr added the comment: Ok. I'll see if I can get some protection around that then. I did test the issue with 2.7, and I didn't find it. The window didn't open, but it didn't generate an exception that would kill the IDLE process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:49:39 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Nov 2010 20:49:39 +0000 Subject: [issue10397] Unified Benchmark Suite fails on py3k with --track-memory In-Reply-To: <1289589711.2.0.279349979417.issue10397@psf.upfronthosting.co.za> Message-ID: <1289594979.46.0.331662906682.issue10397@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Please note that some benchmarks are now natively py3k-compatible, you don't have to run make_perf3.sh. Anyway, the patch is now pushed to http://hg.python.org/benchmarks/rev/7c7dc1c4d8d4, thank you! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:50:11 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 20:50:11 +0000 Subject: [issue1376292] Write user's version of the reference guide Message-ID: <1289595011.3.0.92184029357.issue1376292@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Not likely to be worked on, and whether to write such a guide is a question for the docs editor (or the Doc-SIG). ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:55:46 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 20:55:46 +0000 Subject: [issue2212] Cookie.BaseCookie has ambiguous unicode handling In-Reply-To: <1204315669.5.0.476777122389.issue2212@psf.upfronthosting.co.za> Message-ID: <1289595346.23.0.784059353604.issue2212@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:55:56 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 20:55:56 +0000 Subject: [issue2209] mailbox module doesn't support compressed mbox In-Reply-To: <1204283686.29.0.398991298124.issue2209@psf.upfronthosting.co.za> Message-ID: <1289595356.99.0.359929261617.issue2209@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:56:07 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 20:56:07 +0000 Subject: [issue2657] Curses sometimes fails to initialize terminal In-Reply-To: <1208559068.96.0.196247088071.issue2657@psf.upfronthosting.co.za> Message-ID: <1289595367.7.0.632999348763.issue2657@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:57:22 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 20:57:22 +0000 Subject: [issue3786] _curses, _curses_panel & _multiprocessing can't be build in 2.6b3 w/ SunStudio 12 In-Reply-To: <1220608521.1.0.66106932182.issue3786@psf.upfronthosting.co.za> Message-ID: <1289595442.14.0.223372549467.issue3786@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:57:33 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 20:57:33 +0000 Subject: [issue1687125] cannot catch KeyboardInterrupt when using curses getkey() Message-ID: <1289595453.98.0.302005638527.issue1687125@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:57:57 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 20:57:57 +0000 Subject: [issue5368] curses patch add color_set and wcolor_set , and addchstr family of functions In-Reply-To: <1235583031.0.0.493464972804.issue5368@psf.upfronthosting.co.za> Message-ID: <1289595477.63.0.908121615038.issue5368@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:58:34 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 20:58:34 +0000 Subject: [issue4254] _cursesmodule.c callable update_lines_cols() In-Reply-To: <1225724529.97.0.843166149521.issue4254@psf.upfronthosting.co.za> Message-ID: <1289595514.59.0.037175960415.issue4254@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:59:07 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 20:59:07 +0000 Subject: [issue9557] test_mailbox failure under a Windows VM In-Reply-To: <1281447971.09.0.314164589839.issue9557@psf.upfronthosting.co.za> Message-ID: <1289595547.86.0.856779521709.issue9557@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:59:14 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 20:59:14 +0000 Subject: [issue1723038] Curses Menu Message-ID: <1289595554.76.0.140210660724.issue1723038@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:59:41 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 20:59:41 +0000 Subject: [issue1512163] mailbox (2.5b1): locking doesn't work (esp. on FreeBSD) Message-ID: <1289595581.5.0.948337247239.issue1512163@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:59:49 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 20:59:49 +0000 Subject: [issue1745108] 2.5.1 curses panel segfault in new_panel on aix 5.3 Message-ID: <1289595589.27.0.486778310995.issue1745108@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:59:58 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 20:59:58 +0000 Subject: [issue1671676] test_mailbox is hanging while doing gmake test on HP-UX v3 Message-ID: <1289595598.69.0.234946286203.issue1671676@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:00:10 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 21:00:10 +0000 Subject: [issue1751519] curses - new window methods: addchstr and addchnstr Message-ID: <1289595610.69.0.790567115994.issue1751519@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:00:18 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 21:00:18 +0000 Subject: [issue1599254] mailbox: other programs' messages can vanish without trace Message-ID: <1289595618.38.0.0874315027611.issue1599254@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:00:53 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 21:00:53 +0000 Subject: [issue1488934] file.write + closed pipe = no error Message-ID: <1289595653.91.0.324692143389.issue1488934@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:01:46 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Nov 2010 21:01:46 +0000 Subject: [issue10399] AST Optimization: inlining of function calls In-Reply-To: <1289593012.28.0.71054855235.issue10399@psf.upfronthosting.co.za> Message-ID: <1289595706.38.0.682342517393.issue10399@psf.upfronthosting.co.za> Antoine Pitrou added the comment: As I understand it, functions are "name-resolved" before the arguments are evaluated, There is no difference between resolution of function names and of other names. For example, global names (LOAD_GLOBAL) are resolved entirely at runtime (just before the function gets called). The specialization issue means this would cooperate well with a globals cache (I've got a lingering patch for this, will post in a separate issue). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:02:21 2010 From: report at bugs.python.org (Vlastimil Brom) Date: Fri, 12 Nov 2010 21:02:21 +0000 Subject: [issue10400] updating unicodedata to Unicode 6 In-Reply-To: <1289593388.77.0.423367709943.issue10400@psf.upfronthosting.co.za> Message-ID: <1289595741.34.0.967106624881.issue10400@psf.upfronthosting.co.za> Vlastimil Brom added the comment: Thanks for the clarification; I obviously looked in an inappropriate branch before. Sorry for the noise... vbr ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:02:45 2010 From: report at bugs.python.org (Roumen Petrov) Date: Fri, 12 Nov 2010 21:02:45 +0000 Subject: [issue3754] cross-compilation support for python build In-Reply-To: <1220305759.82.0.468834426074.issue3754@psf.upfronthosting.co.za> Message-ID: <1289595765.53.0.132697187285.issue3754@psf.upfronthosting.co.za> Changes by Roumen Petrov : Added file: http://bugs.python.org/file19586/python-2.7-20101112-CROSS.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:03:08 2010 From: report at bugs.python.org (Roumen Petrov) Date: Fri, 12 Nov 2010 21:03:08 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289595788.76.0.421873627813.issue3871@psf.upfronthosting.co.za> Changes by Roumen Petrov : Added file: http://bugs.python.org/file19587/python-2.7-20101112-MINGW.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:03:19 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 21:03:19 +0000 Subject: [issue2124] xml.sax and xml.dom fetch DTDs by default In-Reply-To: <1203086575.38.0.209227458245.issue2124@psf.upfronthosting.co.za> Message-ID: <1289595799.44.0.649655848077.issue2124@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:03:50 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 21:03:50 +0000 Subject: [issue1028088] Cookies without values are silently ignored (by design?) Message-ID: <1289595830.0.0.676541588258.issue1028088@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:03:57 2010 From: report at bugs.python.org (Roumen Petrov) Date: Fri, 12 Nov 2010 21:03:57 +0000 Subject: [issue3754] cross-compilation support for python build In-Reply-To: <1220305759.82.0.468834426074.issue3754@psf.upfronthosting.co.za> Message-ID: <1289595837.17.0.593855810255.issue3754@psf.upfronthosting.co.za> Changes by Roumen Petrov : Added file: http://bugs.python.org/file19588/python-py3k-20101112-CROSS.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:04:04 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 21:04:04 +0000 Subject: [issue1483] xml.sax.saxutils.prepare_input_source ignores character stream in InputSource In-Reply-To: <1195653795.8.0.542576278207.issue1483@psf.upfronthosting.co.za> Message-ID: <1289595844.53.0.507777705231.issue1483@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:04:11 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 21:04:11 +0000 Subject: [issue1665333] Documentation missing for OptionGroup class in optparse Message-ID: <1289595851.19.0.491657894265.issue1665333@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:05:35 2010 From: report at bugs.python.org (Roumen Petrov) Date: Fri, 12 Nov 2010 21:05:35 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289595935.11.0.370484933074.issue3871@psf.upfronthosting.co.za> Roumen Petrov added the comment: And the patch for py3k (future 3.2) . Note require python-py3k-20101112-CROSS.patch from issue 3754 to be applied first. ---------- Added file: http://bugs.python.org/file19589/python-py3k-20101112-MINGW.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:11:02 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 21:11:02 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1289596262.65.0.556940978924.issue2986@psf.upfronthosting.co.za> Terry J. Reedy added the comment: r86437 - correct and replicate version-added message ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:13:46 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 21:13:46 +0000 Subject: [issue2657] Curses sometimes fails to initialize terminal In-Reply-To: <1208559068.96.0.196247088071.issue2657@psf.upfronthosting.co.za> Message-ID: <1289596426.07.0.915660570758.issue2657@psf.upfronthosting.co.za> Terry J. Reedy added the comment: That should be, for 2.7 or 3.2, as 3.1 is nearly finished. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:24:41 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Nov 2010 21:24:41 +0000 Subject: [issue10401] Globals / builtins cache In-Reply-To: <1289597080.96.0.9732660757.issue10401@psf.upfronthosting.co.za> Message-ID: <1289597080.96.0.9732660757.issue10401@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Here is the Nth patch for a globals/builtins cache. As other caches at the same kind, it shows very small to no gain on non-micro benchmarks, showing that contrary to popular belief, globals/builtins lookup are not a major roadblock in today's Python performance. However, this patch could be useful in combination with other optimizations such as issue10399. Indeed, using the globals/builtins version id, it is easy and very cheap to detect whether the function pointed to by a global name has changed or not. As for micro-benchmarks, they show that there is indeed a good improvement on builtins lookups: $ ./python -m timeit "x=len;x=len;x=len;x=len;x=len;x=len;x=len;x=len;x=len;x=len;" -> without patch: 1000000 loops, best of 3: 0.282 usec per loop -> with patch: 10000000 loops, best of 3: 0.183 usec per loop ---------- components: Interpreter Core files: globcache5.patch keywords: patch messages: 121081 nosy: alex, belopolsky, benjamin.peterson, dmalcolm, jhylton, nnorwitz, pitrou, rhettinger, sdahlbac, thomas.lee, titanstar priority: low severity: normal stage: patch review status: open title: Globals / builtins cache type: performance versions: Python 3.3 Added file: http://bugs.python.org/file19590/globcache5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:30:26 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Nov 2010 21:30:26 +0000 Subject: [issue10399] AST Optimization: inlining of function calls In-Reply-To: <1289593012.28.0.71054855235.issue10399@psf.upfronthosting.co.za> Message-ID: <1289597426.65.0.821834222994.issue10399@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Globals cache patch posted on issue10401. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:53:44 2010 From: report at bugs.python.org (Kirk Clendinning) Date: Fri, 12 Nov 2010 21:53:44 +0000 Subject: [issue10373] Setup Script example incorrect In-Reply-To: <1289582529.08.0.914212432047.issue10373@psf.upfronthosting.co.za> Message-ID: <35DAEBAE-3158-48FF-9AAD-E0A04876634E@heliospectra.se> Kirk Clendinning added the comment: Interesting... the link at the bottom of the page for reporting bugs went to the python bug tracker.. perhaps the web page should be checked for an incorrect link. -k- On Nov 12, 2010, at 18:22 , ?ric Araujo wrote: > > ?ric Araujo added the comment: > > Thanks for the report. Setuptools is not a part of Python, and distutils docs don?t mention issues specific to third-party tools. I think I will reject this bug. > > ---------- > assignee: docs at python -> eric.araujo > nosy: +eric.araujo > status: open -> pending > > _______________________________________ > Python tracker > > _______________________________________ ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 23:00:50 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Fri, 12 Nov 2010 22:00:50 +0000 Subject: [issue10373] Setup Script example incorrect In-Reply-To: <1289308146.55.0.869173171863.issue10373@psf.upfronthosting.co.za> Message-ID: <1289599250.09.0.723910410775.issue10373@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: > perhaps the web page should be checked for an incorrect link. The link from the Python documentation to the Python bug tracker is fine. If you were using distutils directly, it would be an issue for the Python tracker. You're not. setuptools is a separate project; you should refer to it's documentation and it's tracker. ---------- nosy: +fdrake resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 23:04:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 22:04:25 +0000 Subject: [issue10373] Setup Script example incorrect In-Reply-To: <1289308146.55.0.869173171863.issue10373@psf.upfronthosting.co.za> Message-ID: <1289599465.08.0.671716338048.issue10373@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: rejected -> invalid stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 23:39:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 22:39:16 +0000 Subject: [issue10252] Fix resource warnings in distutils In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1289601556.76.0.225071443565.issue10252@psf.upfronthosting.co.za> ?ric Araujo added the comment: No file object was created for stdin, so my patch was buggy. Fixed in r86438, r86439, r86440. Thanks to Antoine and Brian. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 23:59:26 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 12 Nov 2010 22:59:26 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289602766.4.0.473835828527.issue3871@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I'm trying to read the patch. It contains many interesting things (and others I have no opinon about), but it is very large, and makes it difficult to comment or find why some change were made etc. I do believe that better supporting the mingw32 platform is a worthy goal, but a single large patch, even after review, is something difficult to trust. I suggest to present this work in another form. Maybe something like a Mercurial Patch Queue? This would give us a collection of smaller patches, each with its own interest. Each one can be discussed, modified, reviewed separately and by different people. Large easy tasks (like a massive rename) are distinct from small-but-hard changes. And when something is updated, the reviewers don't have to parse the whole file again; they just look at the recent patches. As an example: among the many changes, you had to handle the Modules/getpath.c vs. PC/getpathp.c inconsistency. You chose to have both filenames in the Makefile, but in my opinion it would be better to try to merge the files. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 00:09:54 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 23:09:54 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289603394.7.0.318475259287.issue3871@psf.upfronthosting.co.za> ?ric Araujo added the comment: Let?s try again. The current situation is that building with mingw32 is not supported. Adding support for mingw32 is by definition a new feature. You seem to agree on that: ?a NEW compiler and linker type - an ADDITIONAL compiler and linker type?. Second, distutils is frozen. That?s the policy decided by Tarek, who?s spent literal months working on PEPs to move the situation forward. It?s just not possible to fix things in distutils, so it?s frozen and new work happens in distutils2, at the suggestion of Python creator Guido van Rossum. Please accept the feature freeze. In conclusion, such pervasive changes will not happen in distutils. ---------- assignee: -> tarek components: +Distutils2 versions: +3rd party, Python 3.3 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 00:34:32 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Fri, 12 Nov 2010 23:34:32 +0000 Subject: [issue10284] NNTP should accept bytestrings for username and password In-Reply-To: <1288642960.68.0.00972306001487.issue10284@psf.upfronthosting.co.za> Message-ID: <1289604872.15.0.357130822508.issue10284@psf.upfronthosting.co.za> Julien ?LIE added the comment: RFC 4616 about SASL PLAIN: The mechanism consists of a single message, a string of [UTF-8] encoded [Unicode] characters, from the client to the server. The client presents the authorization identity (identity to act as), followed by a NUL (U+0000) character, followed by the authentication identity (identity whose password will be used), followed by a NUL (U+0000) character, followed by the clear-text password. As with other SASL mechanisms, the client does not provide an authorization identity when it wishes the server to derive an identity from the credentials and use that as the authorization identity. [...] The authorization identity (authzid), authentication identity (authcid), password (passwd), and NUL character deliminators SHALL be transferred as [UTF-8] encoded strings of [Unicode] characters. That's one of the reasons why AUTHINFO SASL is better than AUTHINFO USER. It also allows whitespaces (a few news servers do not parse well whitespaces in user names or passwords after AUTHINFO USER/PASS -- imagine " test" with a leading space). Solved with SASL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 00:39:22 2010 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Fri, 12 Nov 2010 23:39:22 +0000 Subject: [issue3781] warnings.catch_warnings fails gracelessly when recording warnings but no warnings are emitted In-Reply-To: <1220566209.35.0.614126643007.issue3781@psf.upfronthosting.co.za> Message-ID: <1289605162.94.0.221305055633.issue3781@psf.upfronthosting.co.za> Luke Kenneth Casson Leighton added the comment: erik, i'm really sorry, but the freeze on distutils simply cannot be accepted: there really is no other way, as you can see from the previous walkthrough analysis, and is reinforced by the further analysis below. simply put: if the freeze on distutils is not lifted, then this entire set of work, which has been going on for years and _precedes_ the distutils freeze by at least 18 months, is completely, utterly and totally wasted. let's walk through the situation where distutils2 is forced to be used. what you're asking for is, basically, that every single third party package, of which there must be tens of thousands, must be patched for compilation on mingw32... _just_ so that it says "if sys.platform == 'mingw32': from distutils2.core import setup else: from distutils.core import setup", is that correct? does that strike you as being completely and utterly unreasonable an expectation, to ask third parties to modify setup.py scripts which have worked perfectly well for years, many of which are likely to no longer even have a maintainer? that leaves patching - which should be nothing more than _adding_ to - not "changing existing compilers" - ADDING an extra compiler - distutils as the only option. now, that can be done monkey-patch style (i.e. at runtime, by adding in code very early on in python startup, or perhaps by patching the import system to replace the word "distutils" with "distutilsmingw32") or it can be done... by lifting the distutils freeze. perhaps i should ask: what _exactly_ is the problem, and why do several teams complete and utter failure to do the correct thing by making changes to _existing_ compile platforms have anything to do with _this_ team's patches which add a new totally separate platform that has absolutely nothing to do with any of the other platforms? i could say more, but i believe the point is clear: none of the people involved in seeing mingw32 added as a platform had _anything_ to do with the past failures, so why "punish" and mis-trust the python-mingw32 for other peoples' failures? ---------- nosy: +lkcl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 00:41:06 2010 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Fri, 12 Nov 2010 23:41:06 +0000 Subject: [issue3781] warnings.catch_warnings fails gracelessly when recording warnings but no warnings are emitted In-Reply-To: <1220566209.35.0.614126643007.issue3781@psf.upfronthosting.co.za> Message-ID: <1289605266.18.0.604167356944.issue3781@psf.upfronthosting.co.za> Luke Kenneth Casson Leighton added the comment: NUTS. many apologies: my comments should have gone to issue 3871 not 3781. arse! is it possible to delete comments? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 00:41:54 2010 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Fri, 12 Nov 2010 23:41:54 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289605314.24.0.0110028173196.issue3871@psf.upfronthosting.co.za> Luke Kenneth Casson Leighton added the comment: erik, i'm really sorry, but the freeze on distutils simply cannot be accepted: there really is no other way, as you can see from the previous walkthrough analysis, and is reinforced by the further analysis below. simply put: if the freeze on distutils is not lifted, then this entire set of work, which has been going on for years and _precedes_ the distutils freeze by at least 18 months, is completely, utterly and totally wasted. let's walk through the situation where distutils2 is forced to be used. what you're asking for is, basically, that every single third party package, of which there must be tens of thousands, must be patched for compilation on mingw32... _just_ so that it says "if sys.platform == 'mingw32': from distutils2.core import setup else: from distutils.core import setup", is that correct? does that strike you as being completely and utterly unreasonable an expectation, to ask third parties to modify setup.py scripts which have worked perfectly well for years, many of which are likely to no longer even have a maintainer? that leaves patching - which should be nothing more than _adding_ to - not "changing existing compilers" - ADDING an extra compiler - distutils as the only option. now, that can be done monkey-patch style (i.e. at runtime, by adding in code very early on in python startup, or perhaps by patching the import system to replace the word "distutils" with "distutilsmingw32") or it can be done... by lifting the distutils freeze. perhaps i should ask: what _exactly_ is the problem, and why do several teams complete and utter failure to do the correct thing by making changes to _existing_ compile platforms have anything to do with _this_ team's patches which add a new totally separate platform that has absolutely nothing to do with any of the other platforms? i could say more, but i believe the point is clear: none of the people involved in seeing mingw32 added as a platform had _anything_ to do with the past failures, so why "punish" and mis-trust the python-mingw32 for other peoples' failures? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 00:44:10 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Nov 2010 23:44:10 +0000 Subject: [issue10351] Add autocompletion for keys in dictionaries In-Reply-To: <1289208160.65.0.489934250712.issue10351@psf.upfronthosting.co.za> Message-ID: <1289605450.47.0.890839932015.issue10351@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 00:44:25 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Nov 2010 23:44:25 +0000 Subject: [issue10284] NNTP should accept bytestrings for username and password In-Reply-To: <1289604872.15.0.357130822508.issue10284@psf.upfronthosting.co.za> Message-ID: <1289605456.3525.3.camel@localhost.localdomain> Antoine Pitrou added the comment: Hello Julien, > That's one of the reasons why AUTHINFO SASL is better than AUTHINFO > USER. It also allows whitespaces (a few news servers do not parse > well whitespaces in user names or passwords after AUTHINFO USER/PASS > -- imagine " test" with a leading space). Solved with SASL. If you want to contribute SASL auth for NNTP, it might make sense to have a dedicated module to provide SASL mechanisms (and then let imaplib reuse that module). Of course, not all mechanisms need to be provided at the start. (FWIW, I had written a patch providing generic SASL support for Twisted years ago: http://twistedmatrix.com/trac/ticket/2015 ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 00:50:26 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Nov 2010 23:50:26 +0000 Subject: [issue10385] Mark up "subprocess" as module in its doc In-Reply-To: <1289444045.02.0.247018067393.issue10385@psf.upfronthosting.co.za> Message-ID: <1289605826.53.0.811046848136.issue10385@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think that using e.g. :mod:`subprocess` in the subprocess page is redundant because there's no need to add a link to the page you are already reading. I'm also not sure that it looks too nice in the headers (iirc the font is different), but I haven't tried to apply the patch and see how it looks. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 00:51:31 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 12 Nov 2010 23:51:31 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289605891.44.0.65538805089.issue3871@psf.upfronthosting.co.za> Tarek Ziad? added the comment: We don't punish anyone here. We try to avoid breaking distutils because it's really easy to get broken and get people upset. (you ask me) This bug has been opened for years and no one commited it because it's very very hard to review. it involves many parts, many people. I am not sure how we should do this, but here's my proposal for distutils2 at least: - make this new feature a standalone package that patches distutils - release it for 2.x - let's add your work in distutils2 as well, so it's back in the stdlib in 3.x ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 00:52:29 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Nov 2010 23:52:29 +0000 Subject: [issue10384] SyntaxError should contain exact location of the invalid character in identifier In-Reply-To: <1289439285.11.0.506002899946.issue10384@psf.upfronthosting.co.za> Message-ID: <1289605949.76.0.0804417333624.issue10384@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 00:53:31 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Nov 2010 23:53:31 +0000 Subject: [issue10395] os.path.commonprefix broken by design In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1289606011.37.0.33750960507.issue10395@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 00:55:31 2010 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Fri, 12 Nov 2010 23:55:31 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289606131.06.0.264231340532.issue3871@psf.upfronthosting.co.za> Luke Kenneth Casson Leighton added the comment: > I'm trying to read the patch. It contains many interesting things (and > others I have no opinon about), but it is very large, and makes it > difficult to comment or find why some change were made etc. amaury: unfortunately, the development on adding mingw32 as a platform has been ongoing for well over three years, with absolute silence and rejection of its existence. it was only when a fourth person showed interest in it (LRN) that it became "accepted" - but that was... only two months ago! basically, this situation should never have been allowed to get this far: the very first patch that was created, three nearly four years ago, should have been accepted, and then an incremental process could have been taken, _and_ the silly situation in which distutils gets frozen during the time when people have been completely ignoring this ongoing work would never have occurred. but, that's the situation: the bed has been made, and now developers have to lie in it. sorry to be the one that's pointing this out, but... anyway. your idea to split this into a series has merit: personally i much prefer git, because of git-format-patch, but i have to say i've never done "patch regeneration" based on a "review / change-patch-in-middle-of-series / regenerate git-format-patch" cycle. should be fun! :) but the very very first thing that has to happen - before any of this work is begun - is for the distutils freeze to be lifted, or for someone to come up with a _sensible_ alternative solution. if that cannot be done, then roumen and LRN won't _stop_ working on python-mingw32: the end result will be that they just... continue to create a single patch file that will just get larger and larger. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 00:59:49 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 12 Nov 2010 23:59:49 +0000 Subject: [issue10401] Globals / builtins cache In-Reply-To: <1289597080.96.0.9732660757.issue10401@psf.upfronthosting.co.za> Message-ID: <1289606389.9.0.573110675561.issue10401@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 01:02:45 2010 From: report at bugs.python.org (Bobby Impollonia) Date: Sat, 13 Nov 2010 00:02:45 +0000 Subject: [issue10070] 2to3 wishes for already-2to3'ed files In-Reply-To: <1286882661.81.0.431457664283.issue10070@psf.upfronthosting.co.za> Message-ID: <1289606565.9.0.191900990967.issue10070@psf.upfronthosting.co.za> Bobby Impollonia added the comment: > Can you please post an example Python module that has this markup you are asking for, so I can show you how to achieve what you want without the markup? Hi, Martin. Here's a real-world example: http://www.sqlalchemy.org/trac/browser/lib/sqlalchemy/types.py?rev=6884:b181f1e53603 The syntax is: # Py3K # # Py2K # end Py2K For example, starting on line 152 we have, # Py3K #return unicode(self.compile()) # Py2K return unicode(self.compile()).\ encode('ascii', 'backslashreplace') # end Py2K When the code is converted with 2to3, the py3k code on line 153 will be uncommented and used to replace the py2k code on lines 155-156. Having the py3k version commented before conversion resolves the issue that "you must not use syntax that is exclusively Python 3 in an if-python3 block". Here is their modified version of 2to3 to support this syntax: http://www.sqlalchemy.org/trac/browser/sa2to3.py Their explanation is: "This tool monkeypatches a preprocessor onto lib2to3.refactor.RefactoringTool, so that conditional sections can replace non-fixable Python 2 code sections for the appropriate Python 3 version before 2to3 is run." ---------- nosy: +bobbyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 01:03:10 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 13 Nov 2010 00:03:10 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289606590.01.0.841766637827.issue3871@psf.upfronthosting.co.za> Tarek Ziad? added the comment: I understand your frustration, but I can't lift the freeze because any change to distutils potentially break third party projects out there. We suffered from that in the past and we decided to proceed on a new version and freeze this one. Having this compiler released on its own project is absolutely possible and acceptable and can be done in a way that works with distutils1 and distutils2, and I'd happily integrate it to distutils2 today once we manage to review it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 01:14:57 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Nov 2010 00:14:57 +0000 Subject: [issue3781] warnings.catch_warnings fails gracelessly when recording warnings but no warnings are emitted In-Reply-To: <1220566209.35.0.614126643007.issue3781@psf.upfronthosting.co.za> Message-ID: <1289607297.41.0.660935015738.issue3781@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- Removed message: http://bugs.python.org/msg121089 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 01:15:08 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Nov 2010 00:15:08 +0000 Subject: [issue3781] warnings.catch_warnings fails gracelessly when recording warnings but no warnings are emitted In-Reply-To: <1220566209.35.0.614126643007.issue3781@psf.upfronthosting.co.za> Message-ID: <1289607308.54.0.374026607981.issue3781@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- Removed message: http://bugs.python.org/msg121090 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 01:17:15 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 13 Nov 2010 00:17:15 +0000 Subject: [issue10070] 2to3 wishes for already-2to3'ed files In-Reply-To: <1289606565.9.0.191900990967.issue10070@psf.upfronthosting.co.za> Message-ID: <4CDDD907.4030906@v.loewis.de> Martin v. L?wis added the comment: > For example, starting on line 152 we have, > # Py3K > #return unicode(self.compile()) > # Py2K > return unicode(self.compile()).\ > encode('ascii', 'backslashreplace') > # end Py2K Ok, I can propose two different spellings of this without any macro processor: A. conditionally encode for 2.x def __str__(self): res = unicode(self.compile()) if sys.version_info < (3,): res = res.encode('ascii', 'backslashreplace') return res B. (if A is deemed to incur too much per-call cost, due to the version test) if sys.version_info >= (3,): def __str__(self): return unicode(self.compile()) else: def __str__(self): return unicode(self.compile()). \ encode('ascii', 'backslashreplace') In addition, I fail to see how the markup hfuru proposed can be used to express this case. IIUC, he asks for markup that can tell 2to3 to leave a certain piece of code alone, i.e. unmodified. I fail to see how this would help in this sqlalchemy example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 01:19:16 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 13 Nov 2010 00:19:16 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289607556.71.0.79118963899.issue3871@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > but the very very first thing that has to happen - before any of this > work is begun - is for the distutils freeze to be lifted, or for > someone to come up with a _sensible_ alternative solution. Tarek's approach looks right to me: mingw32 support in distutils should take the form of an external module that subclasses (when possible) or monkeypatches (on last resort) the standard distutils behavior. The current patch makes too many changes in core distutils functions; it cannot be accepted in this form. I'm sure that most of the needed changes can be made in a subclass of the present Mingw32CCompiler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 01:51:37 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Nov 2010 00:51:37 +0000 Subject: [issue10402] sporadic test_bsddb3 failures In-Reply-To: <1289609497.28.0.489511317462.issue10402@psf.upfronthosting.co.za> Message-ID: <1289609497.28.0.489511317462.issue10402@psf.upfronthosting.co.za> New submission from Antoine Pitrou : test_bsddb3 often produces the following failure under the Windows buildbots. It could probably be solved by choosing a larger timeout (time.time() on Windows is rather imprecise): test test_bsddb3 failed -- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\bsddb\test\test_lock.py", line 139, in test04_lock_timeout2 self.assertTrue((end_time-start_time) >= 0.0999) AssertionError: False is not True ---------- assignee: jcea components: Library (Lib), Tests keywords: buildbot messages: 121100 nosy: jcea, pitrou priority: normal severity: normal stage: needs patch status: open title: sporadic test_bsddb3 failures type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 02:18:08 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 13 Nov 2010 01:18:08 +0000 Subject: [issue10377] cProfile incorrectly labels its output In-Reply-To: <1289330157.64.0.804847448743.issue10377@psf.upfronthosting.co.za> Message-ID: <20101113011756.GA1313@rubuntu> Senthil Kumaran added the comment: On Tue, Nov 09, 2010 at 07:15:57PM +0000, Jean-Paul Calderone wrote: > >>> cProfile.run("import time; time.sleep(1)") > 4 function calls in 1.012 CPU seconds > > It is not the case that the profiled code uses >1 CPU seconds. It > spends the entire time sleeping. The default timer for cProfile is > a wallclock timer. The output should reflect this. So, It should just be 1.012 seconds, instead of 1.012 CPU seconds. Correct? Or is there any other technically more accurate way to say? ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From orsenthil at gmail.com Sat Nov 13 02:17:56 2010 From: orsenthil at gmail.com (Senthil Kumaran) Date: Sat, 13 Nov 2010 09:17:56 +0800 Subject: [issue10377] cProfile incorrectly labels its output Message-ID: <20101113011756.GA1313@rubuntu> On Tue, Nov 09, 2010 at 07:15:57PM +0000, Jean-Paul Calderone wrote: > >>> cProfile.run("import time; time.sleep(1)") > 4 function calls in 1.012 CPU seconds > > It is not the case that the profiled code uses >1 CPU seconds. It > spends the entire time sleeping. The default timer for cProfile is > a wallclock timer. The output should reflect this. So, It should just be 1.012 seconds, instead of 1.012 CPU seconds. Correct? Or is there any other technically more accurate way to say? From report at bugs.python.org Sat Nov 13 02:18:21 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 13 Nov 2010 01:18:21 +0000 Subject: [issue10387] ConfigParser's getboolean method is broken In-Reply-To: <1289477184.84.0.648837356177.issue10387@psf.upfronthosting.co.za> Message-ID: <20101113011812.GB1313@rubuntu> Senthil Kumaran added the comment: On Fri, Nov 12, 2010 at 12:35:49AM +0000, ?ukasz Langa wrote: > This is unfortunately a backwards compatibility concern. Originally > it wasn't made so that set() converts to string or accepts only > strings and when the developers realized this mistake, it was too > late (there were programs using this misfeature). That's one of the Where would coercing to str() for set methods result in failures or backward compatibility problems? I think get() methods always return strings. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From orsenthil at gmail.com Sat Nov 13 02:18:12 2010 From: orsenthil at gmail.com (Senthil Kumaran) Date: Sat, 13 Nov 2010 09:18:12 +0800 Subject: [issue10387] ConfigParser's getboolean method is broken Message-ID: <20101113011812.GB1313@rubuntu> On Fri, Nov 12, 2010 at 12:35:49AM +0000, ?ukasz Langa wrote: > This is unfortunately a backwards compatibility concern. Originally > it wasn't made so that set() converts to string or accepts only > strings and when the developers realized this mistake, it was too > late (there were programs using this misfeature). That's one of the Where would coercing to str() for set methods result in failures or backward compatibility problems? I think get() methods always return strings. From report at bugs.python.org Sat Nov 13 02:20:45 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 13 Nov 2010 01:20:45 +0000 Subject: [issue10387] ConfigParser's getboolean method is broken In-Reply-To: <1289477184.84.0.648837356177.issue10387@psf.upfronthosting.co.za> Message-ID: <1289611245.62.0.317083076863.issue10387@psf.upfronthosting.co.za> ?ukasz Langa added the comment: You think wrong. Try it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 02:28:54 2010 From: report at bugs.python.org (Bobby Impollonia) Date: Sat, 13 Nov 2010 01:28:54 +0000 Subject: [issue10070] 2to3 wishes for already-2to3'ed files In-Reply-To: <1286882661.81.0.431457664283.issue10070@psf.upfronthosting.co.za> Message-ID: <1289611734.06.0.674944392154.issue10070@psf.upfronthosting.co.za> Bobby Impollonia added the comment: Consider here: http://www.sqlalchemy.org/trac/browser/lib/sqlalchemy/engine/base.py?rev=6884:b181f1e53603#L1329 the py3k code uses the "raise ... from" syntax which isn't legal in Python 2. Using either "Approach A" or "Approach B" would prevent the program from working in py2k due to syntax errors. I agree that the markup hrufu proposed didn't solve that problem either. SQLA's trick of having the py3k code commented out is the critical part that they add. Additionally, the runtime cost prevents Approach A from being general solution for libraries like SQLA who have put a lot of work into reducing the number of function calls and checks in their critical paths. Approach B isn't a general solution because it requires you to replace entire functions at a time. If you have a 25 line function where only 1 line needs to be changed for py3k, you either end up with 24 duplicated lines of code, or you have to factor that single line out into its own function, confusing the flow of the code and incurring runtime cost. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 02:56:15 2010 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 13 Nov 2010 01:56:15 +0000 Subject: [issue10401] Globals / builtins cache In-Reply-To: <1289597080.96.0.9732660757.issue10401@psf.upfronthosting.co.za> Message-ID: <1289613375.16.0.796942466004.issue10401@psf.upfronthosting.co.za> Skip Montanaro added the comment: Might such a cache lay the groundwork for more aggressive optimizations by JITs like Unladen Swallow? ---------- nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 04:12:41 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Nov 2010 03:12:41 +0000 Subject: [issue10395] new os.path function to extract common prefix based on path components In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1289617961.86.0.393136955962.issue10395@psf.upfronthosting.co.za> R. David Murray added the comment: Indeed, as I remember it there are people using commonprefix as a string function in situations having nothing to do with os paths. I'm changing the title to reflect the fact that this is really a feature request for a new function. IMO it is a reasonable feature request. Finding a name for it ought to be an interesting exercise. I think that this should only be accepted if there is also a windows implementation. ---------- nosy: +r.david.murray stage: -> needs patch title: os.path.commonprefix broken by design -> new os.path function to extract common prefix based on path components type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 04:24:27 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Nov 2010 03:24:27 +0000 Subject: [issue10392] GZipFile crash when fileobj.mode is None In-Reply-To: <1289541524.38.0.073026896043.issue10392@psf.upfronthosting.co.za> Message-ID: <1289618667.28.0.265413497029.issue10392@psf.upfronthosting.co.za> R. David Murray added the comment: Why do you consider this a bug in GZipFile rather than a bug in Django? GZipFile is already careful to consider mode only when it is defined as an attribute. It seems to me that if it is defined, it should be meaningful. ---------- nosy: +pitrou, r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> pending type: crash -> behavior versions: -Python 2.5, Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 04:50:22 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Nov 2010 03:50:22 +0000 Subject: [issue8332] regrtest single TestClass/test_method In-Reply-To: <1270631958.05.0.652340331128.issue8332@psf.upfronthosting.co.za> Message-ID: <1289620222.25.0.806301385469.issue8332@psf.upfronthosting.co.za> R. David Murray added the comment: I'm -1 on your second case. That syntax is too magical, especially since a test method can appear on more than one test case. The additional pattern matching suggestion is more interesting, but it would be necessary to implement that in unittest, since test classes and methods can be created on the fly. I suggest opening a new issue against unittest to extend pattern matching to test case and test method names if you think that feature is valuable enough to add. I agree with Sandro, I think the valid part of this request is satisfied by the unittest CLI. It is true that more work needs to be done before all Python tests can be run successfully in this fashion, since some depend on regrtest features. But making those fixes (moving useful regrtest features to unittest and eliminating the non-useful regrtest dependencies) is a better investment of resources than adding run-single-test support directly to regrtest, IMO. If you want to submit a patch for first case, though, feel free to reopen this. I doubt we'd reject it if you want to do the work. ---------- nosy: +r.david.murray resolution: fixed -> works for me stage: -> committed/rejected status: open -> closed versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 05:22:18 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Nov 2010 04:22:18 +0000 Subject: [issue10396] stdin argument to pdb.Pdb doesn't work unless you also set Pdb.use_rawinput = False In-Reply-To: <1289584221.71.0.586527779083.issue10396@psf.upfronthosting.co.za> Message-ID: <1289622138.26.0.876423648405.issue10396@psf.upfronthosting.co.za> R. David Murray added the comment: This is a duplicate of issue 2571. If after reading that discussion you have ideas about and interest in working on the feature request as suggested, you may either comment on that one or open a new feature request, whichever seems clearer to you. Note that the pdb docs direct you the cmd docs, which clearly document the need to set use_rawinput, so this is not even a doc bug. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected superseder: -> cmd.py always uses raw_input, even when another stdin is specified _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 05:37:22 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Sat, 13 Nov 2010 04:37:22 +0000 Subject: [issue10403] Use "member" consistently In-Reply-To: <1289623042.93.0.830099606418.issue10403@psf.upfronthosting.co.za> Message-ID: <1289623042.93.0.830099606418.issue10403@psf.upfronthosting.co.za> New submission from Fred L. Drake, Jr. : Some portions of the documentation are using the term "member" to mean "data attribute". This appears to be an aberration at this time, but occurrences should be identified and corrected, and "Documenting Python" updated to note correct usage. Example use: http://docs.python.org/dev/py3k/library/xmlrpc.client.html#fault-objects http://docs.python.org/dev/py3k/library/urllib.request.html#basehandler-objects (paragraph starting "The following members and methods should") "Members and methods" should just be "attributes". ---------- assignee: docs at python components: Documentation messages: 121110 nosy: docs at python, fdrake priority: normal severity: normal status: open title: Use "member" consistently _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 05:37:52 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Sat, 13 Nov 2010 04:37:52 +0000 Subject: [issue10403] Use "member" consistently In-Reply-To: <1289623042.93.0.830099606418.issue10403@psf.upfronthosting.co.za> Message-ID: <1289623072.04.0.306829376162.issue10403@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 05:54:55 2010 From: report at bugs.python.org (Brad Greenlee) Date: Sat, 13 Nov 2010 04:54:55 +0000 Subject: [issue10392] GZipFile crash when fileobj.mode is None In-Reply-To: <1289541524.38.0.073026896043.issue10392@psf.upfronthosting.co.za> Message-ID: <1289624095.5.0.411066207834.issue10392@psf.upfronthosting.co.za> Brad Greenlee added the comment: GzipFile.__init__ considers mode == None to be the equivalent of undefined, and sets it to the default of 'rb'. I see fileobj.mode == None as the same thing. That said, it is probably a bug in Django as well; I'll look into that. I still think that GzipFile should handle this gracefully. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 06:00:08 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Nov 2010 05:00:08 +0000 Subject: [issue10392] GZipFile crash when fileobj.mode is None In-Reply-To: <1289541524.38.0.073026896043.issue10392@psf.upfronthosting.co.za> Message-ID: <1289624408.59.0.292883495746.issue10392@psf.upfronthosting.co.za> R. David Murray added the comment: No, the __init__ argument default value is the standard way of indicating "this argument was not specified". It is not in any way a value for 'mode'. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 06:11:15 2010 From: report at bugs.python.org (Brad Greenlee) Date: Sat, 13 Nov 2010 05:11:15 +0000 Subject: [issue10392] GZipFile crash when fileobj.mode is None In-Reply-To: <1289541524.38.0.073026896043.issue10392@psf.upfronthosting.co.za> Message-ID: <1289625075.59.0.02591690802.issue10392@psf.upfronthosting.co.za> Brad Greenlee added the comment: Yes, but if I actually passed mode=None in, the behavior would be the same, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 06:39:29 2010 From: report at bugs.python.org (Alex) Date: Sat, 13 Nov 2010 05:39:29 +0000 Subject: [issue10399] AST Optimization: inlining of function calls In-Reply-To: <1289593012.28.0.71054855235.issue10399@psf.upfronthosting.co.za> Message-ID: <1289626769.03.0.540415476979.issue10399@psf.upfronthosting.co.za> Alex added the comment: Just a thought: it's possible to cover all the cases properly with inlining (locals, globals (even with cross module inlining), tracebacks, sys._getframe(), etc.), however I think you're going to find that manually managing all of those is going to quickly drive you up a tree if you want to also get meaningful speedups (from removing frame allocation, argument parsing, etc.). My 2?. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 06:51:15 2010 From: report at bugs.python.org (Xuanji Li) Date: Sat, 13 Nov 2010 05:51:15 +0000 Subject: [issue10366] Remove unneeded '(object)' from 3.x class examples In-Reply-To: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> Message-ID: <1289627475.66.0.857852085705.issue10366@psf.upfronthosting.co.za> Xuanji Li added the comment: Attached a patch to implement the suggested changes on 3.2. If the patch is ok I can do the same for 3.1. ---------- keywords: +patch nosy: +xuanji Added file: http://bugs.python.org/file19591/issue10366_remove_unneeded_object_py3.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 07:33:07 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 13 Nov 2010 06:33:07 +0000 Subject: [issue8746] os.chflags() and os.lchflags() are not built when they should be be In-Reply-To: <1274173521.53.0.771933425772.issue8746@psf.upfronthosting.co.za> Message-ID: <1289629987.33.0.588035011214.issue8746@psf.upfronthosting.co.za> Georg Brandl added the comment: Same for a4. ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 07:53:13 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 13 Nov 2010 06:53:13 +0000 Subject: [issue10070] 2to3 wishes for already-2to3'ed files In-Reply-To: <1289611734.06.0.674944392154.issue10070@psf.upfronthosting.co.za> Message-ID: <4CDE35D6.6020103@v.loewis.de> Martin v. L?wis added the comment: > Consider here: > http://www.sqlalchemy.org/trac/browser/lib/sqlalchemy/engine/base.py?rev=6884:b181f1e53603#L1329 > the py3k code uses the "raise ... from" syntax which isn't legal in Python 2. In this case, I would write error = exc.DBAPIError.instance(statement, parameters, e, connection_invalidated=is_disconnect) if sys.version_info < (3,): raise error, None, sys.exc_info()[2] else: error.__cause__ = e raise error You don't *have* to use the from syntax to set the cause. > Approach B isn't a general solution because it requires you to replace entire functions at a time. I don't claim that. However, I claim that there will be always an appropriate solution using existing techniques, so that such a macro processing wouldn't be necessary. IOW, I'm not aware of a case where using such preprocessing would be appropriate and better than what you can do without. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 07:58:00 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 13 Nov 2010 06:58:00 +0000 Subject: [issue10396] stdin argument to pdb.Pdb doesn't work unless you also set Pdb.use_rawinput = False In-Reply-To: <1289584221.71.0.586527779083.issue10396@psf.upfronthosting.co.za> Message-ID: <1289631480.35.0.904504028068.issue10396@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 07:59:25 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 13 Nov 2010 06:59:25 +0000 Subject: [issue10401] Globals / builtins cache In-Reply-To: <1289597080.96.0.9732660757.issue10401@psf.upfronthosting.co.za> Message-ID: <1289631565.41.0.307832722325.issue10401@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 09:39:23 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Nov 2010 08:39:23 +0000 Subject: [issue10404] IDLE on OS X popup menus do not work: cannot set/clear breakpoints In-Reply-To: <1289637563.28.0.230524563263.issue10404@psf.upfronthosting.co.za> Message-ID: <1289637563.28.0.230524563263.issue10404@psf.upfronthosting.co.za> New submission from Ned Deily : In several contexts, IDLE binds clicking of the right mouse button to context popup menus, most importantly, to provide the Set Breakpoint and Clear Breakpoint actions in edit windows. On OS X systems, however, one cannot assume there will be more than one (e.g. the left) mouse button. Further, Aqua Tk, the default on OS X, binds a right button if present to , rather than as with other Tk implementations and ignores bindings. The net effect is that there is currently no way to use IDLE's breakpoint facility with Aqua Tk, with or without a multi-button mouse. ---------- assignee: ronaldoussoren components: IDLE, Macintosh messages: 121118 nosy: ned.deily, ronaldoussoren priority: critical severity: normal stage: patch review status: open title: IDLE on OS X popup menus do not work: cannot set/clear breakpoints type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 09:43:23 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Nov 2010 08:43:23 +0000 Subject: [issue10404] IDLE on OS X popup menus do not work: cannot set/clear breakpoints In-Reply-To: <1289637563.28.0.230524563263.issue10404@psf.upfronthosting.co.za> Message-ID: <1289637803.59.0.533197606881.issue10404@psf.upfronthosting.co.za> Ned Deily added the comment: The attached patch modifies IDLE on OS X to bind popup menus to Control-Click (of the main or "left" button), as is commonly done elsewhere in OS X. ---------- Added file: http://bugs.python.org/file19592/issue10404-idle_no_context_menus.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 09:45:01 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Nov 2010 08:45:01 +0000 Subject: [issue10392] GZipFile crash when fileobj.mode is None In-Reply-To: <1289541524.38.0.073026896043.issue10392@psf.upfronthosting.co.za> Message-ID: <1289637901.44.0.302454062577.issue10392@psf.upfronthosting.co.za> R. David Murray added the comment: Yes. However, if None were a valid value for mode, then the would would instead do something like: SENTINEL = object() class GZipFile... def __init__(self, filename=None, mode=SENTINEL, ... and then where None currently appears in the logic of the method, mode would be checked against SENTINEL to see if no value had been passed to the mode argument. Thus the presence of None in the __init__ signature actually indicates that None is explicitly *not* a valid value for mode (and thus can safely be used as a sentinel value). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 09:54:34 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Nov 2010 08:54:34 +0000 Subject: [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> New submission from Ned Deily : In neither the IDLE section of the Library Reference nor in IDLE's own help file is there any documentation on how to use its breakpoint capability. Since the menu options only appear if the user knows to Right-click (or Control-click on OS X - see issue10404), it would be easy for a user to never realize that the breakpoint capability exists. ---------- assignee: docs at python components: Documentation, IDLE messages: 121121 nosy: docs at python, kbk, ned.deily, taleinat, terry.reedy priority: normal severity: normal status: open title: IDLE breakpoint facility undocumented versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 09:55:31 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Nov 2010 08:55:31 +0000 Subject: [issue10404] IDLE on OS X popup menus do not work: cannot set/clear breakpoints In-Reply-To: <1289637563.28.0.230524563263.issue10404@psf.upfronthosting.co.za> Message-ID: <1289638531.69.0.881424486959.issue10404@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +Bruce.Sherwood, kbk, taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 10:01:02 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Nov 2010 09:01:02 +0000 Subject: [issue10356] decimal.py: hash of -1 In-Reply-To: <1289219643.76.0.519336821084.issue10356@psf.upfronthosting.co.za> Message-ID: <1289638862.43.0.825485837238.issue10356@psf.upfronthosting.co.za> Mark Dickinson added the comment: Okay; go ahead and apply (preferably in two separate commits, since you're fixing two only marginally related issues here). ---------- assignee: -> skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 10:26:42 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Nov 2010 09:26:42 +0000 Subject: [issue10406] IDLE 2.7 on OS X does not enable Rstrip extension by default In-Reply-To: <1289640402.26.0.448285710534.issue10406@psf.upfronthosting.co.za> Message-ID: <1289640402.26.0.448285710534.issue10406@psf.upfronthosting.co.za> New submission from Ned Deily : r73001 for Issue5150 added the Rstrip extension to IDLE and modified the extensions configuration file, config-extensions.def, to enable it by default. For Python 2 OS X installs, however, the config-extensions.def file from Lib/idlelib is replaced by a tailored one from Mac/IDLE and the changes for Issue5101 are lost. The attached patch updates the Mac/IDLE version appropriately. Note, for Python 3 installs, this is not a problem as there is no longer a separate Mac-only copy of the file. ---------- assignee: ronaldoussoren components: IDLE, Macintosh messages: 121123 nosy: Bruce.Sherwood, kbk, ned.deily, ronaldoussoren, taleinat priority: normal severity: normal stage: patch review status: open title: IDLE 2.7 on OS X does not enable Rstrip extension by default type: performance versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 10:29:22 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Nov 2010 09:29:22 +0000 Subject: [issue10406] IDLE 2.7 on OS X does not enable Rstrip extension by default In-Reply-To: <1289640402.26.0.448285710534.issue10406@psf.upfronthosting.co.za> Message-ID: <1289640562.13.0.500340332429.issue10406@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file19593/issue10406-idle27-rstrip-27.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 10:31:21 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 13 Nov 2010 09:31:21 +0000 Subject: [issue10205] Can't have two tags with the same QName In-Reply-To: <1288122049.66.0.916624044666.issue10205@psf.upfronthosting.co.za> Message-ID: <1289640681.12.0.664388777212.issue10205@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Thanks for the explanation, ?ric. That helps. - Backported QName tests in r86447 to release31-maint. As for the logic of the fix, it follows like this: If True and False: #Doesn't go here elif True: # Goes here vs if True: # Goes here if False: # Does not matter elif: # Doesn't go here. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 10:54:35 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 13 Nov 2010 09:54:35 +0000 Subject: [issue10141] SocketCan support In-Reply-To: <1287449366.98.0.655876257649.issue10141@psf.upfronthosting.co.za> Message-ID: <1289642075.92.0.749866037522.issue10141@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The patch looks good at first glance, but is there a way to test the feature? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 11:29:39 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sat, 13 Nov 2010 10:29:39 +0000 Subject: [issue10260] Add a threading.Condition.wait_for() method In-Reply-To: <1288500409.32.0.639501337625.issue10260@psf.upfronthosting.co.za> Message-ID: <1289644179.94.0.488772230649.issue10260@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Ok, here is a new patch which slightly expands the documentation and improves the timeout unittest. If there are no objections I'll then commit this shortly. ---------- Added file: http://bugs.python.org/file19594/wait_for2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 11:31:01 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Nov 2010 10:31:01 +0000 Subject: [issue10356] decimal.py: hash of -1 In-Reply-To: <1289219643.76.0.519336821084.issue10356@psf.upfronthosting.co.za> Message-ID: <1289644261.92.0.937903883568.issue10356@psf.upfronthosting.co.za> Mark Dickinson added the comment: The Fraction type has the same behaviour, so I've fixed it to match the proposed new Decimal behaviour in r86448. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 11:38:25 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 13 Nov 2010 10:38:25 +0000 Subject: [issue10387] ConfigParser's getboolean method is broken In-Reply-To: <1289611245.62.0.317083076863.issue10387@psf.upfronthosting.co.za> Message-ID: <20101113103810.GA1026@rubuntu> Senthil Kumaran added the comment: On Sat, Nov 13, 2010 at 01:20:45AM +0000, ?ukasz Langa wrote: > You think wrong. Try it. Okay, I get it. Coercing would be a bad idea in RawConfigParser because there are cases where get method can have raw=True and coercing would break those behaviors. The way the OP expressed it, it looked like a bug to me. Here is one way, the OP's concern can be resolved. Index: Lib/configparser.py =================================================================== --- Lib/configparser.py (revision 86441) +++ Lib/configparser.py (working copy) @@ -892,6 +892,8 @@ """ if value.lower() not in self.BOOLEAN_STATES: raise ValueError('Not a boolean: %s' % value) + if str(value) in self.BOOLEAN_STATES: + return self.BOOLEAN_STATES[str(value)] return self.BOOLEAN_STATES[value.lower()] def _validate_value_type(self, value): But this seems specific to the special case as this bug is raised for. I am personally, +0 for this too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 11:40:00 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 13 Nov 2010 10:40:00 +0000 Subject: [issue10260] Add a threading.Condition.wait_for() method In-Reply-To: <1288500409.32.0.639501337625.issue10260@psf.upfronthosting.co.za> Message-ID: <1289644800.73.0.00989518646049.issue10260@psf.upfronthosting.co.za> Georg Brandl added the comment: Good, but please wait until after the a4 freeze. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 13:04:58 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Nov 2010 12:04:58 +0000 Subject: [issue10260] Add a threading.Condition.wait_for() method In-Reply-To: <1289644179.94.0.488772230649.issue10260@psf.upfronthosting.co.za> Message-ID: <1289649892.3572.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > Ok, here is a new patch which slightly expands the documentation and improves the timeout unittest. > If there are no objections I'll then commit this shortly. Again, I think you should use a larger timeout value than 0.1, to avoid intermittent buildbot failures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 13:25:48 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 13 Nov 2010 12:25:48 +0000 Subject: [issue1520831] urrlib2 max_redirections=0 disables redirects Message-ID: <1289651148.87.0.93352217493.issue1520831@psf.upfronthosting.co.za> Senthil Kumaran added the comment: This is an invalid bug report at the moment. In fact, aged. The redirection depends upon max_redirections and max_repeats together. Setting it to 0 explicitly (inside the code) is not a good use case under any condition. ---------- nosy: -BreamoreBoy resolution: -> wont fix stage: unit test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 13:28:48 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 13 Nov 2010 12:28:48 +0000 Subject: [issue5111] httplib: wrong Host header when connecting to IPv6 litteral URL In-Reply-To: <1233334139.62.0.259128767537.issue5111@psf.upfronthosting.co.za> Message-ID: <1289651328.17.0.382013206833.issue5111@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in r86450 (py3k). Will be back porting shortly. ---------- resolution: -> fixed stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 13:34:59 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 13 Nov 2010 12:34:59 +0000 Subject: [issue10116] Sporadic failures in test_urllibnet In-Reply-To: <1287150282.16.0.127032822399.issue10116@psf.upfronthosting.co.za> Message-ID: <1289651699.86.0.561094378663.issue10116@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 14:04:49 2010 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Sat, 13 Nov 2010 13:04:49 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289653489.93.0.489089255367.issue3871@psf.upfronthosting.co.za> Luke Kenneth Casson Leighton added the comment: > I am not sure how we should do this, but here's my proposal > for distutils2 at least: > - make this new feature a standalone package that patches distutils > - release it for 2.x > - let's add your work in distutils2 as well, so it's back in the stdlib in 3.x that would work very well: people doing new setup.py files, converting from python2 etc., will, duh, need to do _some_ conversion: they'll expect breakage and to be using distutils2 anyway. thank you tarek. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 14:11:30 2010 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Sat, 13 Nov 2010 13:11:30 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289653890.86.0.317926943336.issue3871@psf.upfronthosting.co.za> Luke Kenneth Casson Leighton added the comment: > The current patch makes too many changes in core distutils functions; > it cannot be accepted in this form. I'm sure that most of the needed > changes can be made in a subclass of the present Mingw32CCompiler. that's what i did when creating the _other_ (yet another) mingw32 patch - however _some_ minimal changes to core distutils _are_ unfortunately required. and to sys.py and os.py - this is, after all, a new platform! it starts off with "sys.platform == 'mingw32'", requiring detection of gcc compiler type BUT and os type of win32, and goes from there. right now, detection logic is: * "if gcc on win32 platform, platform MUST be cygwin" * "if msvc compiler, platform MUST be win32" both of which are... well... wrong! :) so, i found that it was necessary to start in os.py and sys.py, create a platform-type "mingw32" and _then_ it was easy to do a MingW32Compiler etc. with (mostly) additions not modifications to distutils, but _necessary_ to add in detection of the type. if distutils was designed to do "exec import distutils.compiler.%s as compiler" % sys.platform and go from there then this would be an entirely non-issue: no modifications to distutils would be required, just a completely separate module containing the new compiler... ... but distutils isn't designed that way, is it? :) l. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 14:17:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Nov 2010 13:17:47 +0000 Subject: [issue10116] Sporadic failures in test_urllibnet In-Reply-To: <1289651699.93.0.697658444558.issue10116@psf.upfronthosting.co.za> Message-ID: <1289654256.3572.1.camel@localhost.localdomain> Antoine Pitrou added the comment: There are still sporadic failures such as: ====================================================================== ERROR: testURLread (test.test_urllibnet.URLTimeoutTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/pythonbuildbot/buildarea/2.7.hansen-osx-x86/build/Lib/test/test_urllibnet.py", line 40, in testURLread x = f.read() File "/Users/pythonbuildbot/buildarea/2.7.hansen-osx-x86/build/Lib/socket.py", line 351, in read data = self._sock.recv(rbufsize) timeout: timed out which seems to show that not everything has been properly converted. (http://www.python.org/dev/buildbot/all/builders/AMD64%20Snow%20Leopard% 202.7/builds/156/steps/test/logs/stdio ) Le samedi 13 novembre 2010 ? 12:34 +0000, Senthil Kumaran a ?crit : > Changes by Senthil Kumaran : > > > ---------- > status: pending -> closed > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 14:47:29 2010 From: report at bugs.python.org (Vlastimil Brom) Date: Sat, 13 Nov 2010 13:47:29 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1289656049.29.0.161510973132.issue2636@psf.upfronthosting.co.za> Vlastimil Brom added the comment: I'd have liked to suggest updating the underlying unicode data to the latest standard 6.0, but it turns out, it might be problematic with the cross-version compatibility; according to the clarification in http://bugs.python.org/issue10400 the 3... versions are going to be updated, while it is not allowed in the 2.x series. I guess it would cause maintainance problems (as the needed properties are not available via unicodedata). Anyway, while I'd like the recent unicode data to be supported (new characters, ranges, scripts, and corrected individual properties...), I'm much happier, that there is support for the 2 series in regex... vbr ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 15:06:39 2010 From: report at bugs.python.org (Zbyszek Szmek) Date: Sat, 13 Nov 2010 14:06:39 +0000 Subject: [issue10407] missing errno import in distutils/dir_util.py In-Reply-To: <1289657199.35.0.294057606181.issue10407@psf.upfronthosting.co.za> Message-ID: <1289657199.35.0.294057606181.issue10407@psf.upfronthosting.co.za> New submission from Zbyszek Szmek : Fix is trivial: diff -r 8daacdacf720 -r 1a821081b470 Lib/distutils/dir_util.py --- a/Lib/distutils/dir_util.py Sat Nov 13 13:27:49 2010 +0100 +++ b/Lib/distutils/dir_util.py Sat Nov 13 14:37:49 2010 +0100 @@ -5,6 +5,7 @@ __revision__ = "$Id: dir_util.py 86244 2010-11-06 04:48:05Z eric.araujo $" import os, sys +import errno from distutils.errors import DistutilsFileError, DistutilsInternalError from distutils import log ---------- assignee: tarek components: Distutils messages: 121137 nosy: eric.araujo, tarek, zbysz priority: normal severity: normal status: open title: missing errno import in distutils/dir_util.py type: crash versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 15:14:01 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 13 Nov 2010 14:14:01 +0000 Subject: [issue10407] missing errno import in distutils/dir_util.py In-Reply-To: <1289657199.35.0.294057606181.issue10407@psf.upfronthosting.co.za> Message-ID: <1289657641.86.0.963703624009.issue10407@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. I?ve run pyflakes over the distutils directory and found another error in test_sysconfig. Will fix shortly. ---------- assignee: tarek -> eric.araujo status: open -> pending type: crash -> behavior versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 15:48:12 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Nov 2010 14:48:12 +0000 Subject: [issue10408] Denser dicts and linear probing In-Reply-To: <1289659692.61.0.467153013048.issue10408@psf.upfronthosting.co.za> Message-ID: <1289659692.61.0.467153013048.issue10408@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This is a patch experiment which does two things: - make dicts denser by making the resize factor 2 instead of 4 for small dicts - improve cache locality on collisions by using linear probing It should be noted that these two changes are not independent. Improving cache locality on collisions makes probing cheaper, and in turn should allow to make small dicts denser. Linear probing is motivated by the fact that collisions can happen frequently. The comments in dictobject.c seem a bit mistaken: ?If we *usually* find the key we're looking for on the first try (and, it turns out, we usually do -- the table load factor is kept under 2/3, so the odds are solidly in our favor), then it makes best sense to keep the initial index computation dirt cheap.? According to http://www.cse.ust.hk/~yike/pods10-hashing.pdf, however, things are not so rosy. The average number of probes for successful lookups, depending on the load factor "alpha", is given by: >>> c = lambda alpha: 0.5 * (1 + 1/(1-alpha)) while the average number of probes for unsuccessful lookups is: >>> cp = lambda alpha: 0.5 * (1 + 1/(1-alpha)**2) (note: this is with a perfectly random hash function; I intuitively assume an imperfect random function gives higher figures) For a load factor of 2/3, we then get: >>> c(2/3) 1.9999999999999998 >>> cp(2/3) 4.999999999999999 Since the current non-linear probing schemes guarantees that each probing will access a different cache line, the cache locality of a lookup becomes very poor. The problem with linear probing, as noted in the comments, is that it degrades performance quite a lot when the hashing function clusters results. The solution I'm proposing is to apply an *initial* perturbation, by multiplying the hash() with a prime number. Multiplication is very fast on modern CPUs, so this doesn't adversely affect performance. ---------- components: Interpreter Core files: dictopts.patch keywords: patch messages: 121139 nosy: mark.dickinson, pitrou, rhettinger, tim_one priority: normal severity: normal status: open title: Denser dicts and linear probing type: performance versions: Python 3.2 Added file: http://bugs.python.org/file19595/dictopts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 15:53:07 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Nov 2010 14:53:07 +0000 Subject: [issue10408] Denser dicts and linear probing In-Reply-To: <1289659692.61.0.467153013048.issue10408@psf.upfronthosting.co.za> Message-ID: <1289659987.29.0.746622015253.issue10408@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a benchmark adapted from another bug entry (I merely adapted the dict sizes in order to better exhibit the performance degradation when the CPU cache becomes too small to hold the whole dict). Results without the patch: 10000 words ( 9092 keys), 2928369 inserts/s, 13911456 lookups/s, 86 bytes/key (0.8MB) 20000 words ( 17699 keys), 3290037 inserts/s, 12746707 lookups/s, 44 bytes/key (0.8MB) 40000 words ( 34490 keys), 2620007 inserts/s, 7723605 lookups/s, 91 bytes/key (3.0MB) 80000 words ( 67148 keys), 2698863 inserts/s, 6573500 lookups/s, 46 bytes/key (3.0MB) 160000 words ( 130897 keys), 2401067 inserts/s, 4886971 lookups/s, 48 bytes/key (6.0MB) 320000 words ( 254233 keys), 2077558 inserts/s, 5061763 lookups/s, 49 bytes/key (12.0MB) 640000 words ( 493191 keys), 1923967 inserts/s, 4490697 lookups/s, 51 bytes/key (24.0MB) 1280000 words ( 956820 keys), 1792729 inserts/s, 4353711 lookups/s, 52 bytes/key (48.0MB) Results with the patch: 10000 words ( 9092 keys), 3324590 inserts/s, 13911456 lookups/s, 43 bytes/key (0.4MB) 20000 words ( 17699 keys), 3243603 inserts/s, 13202090 lookups/s, 44 bytes/key (0.8MB) 40000 words ( 34490 keys), 2858372 inserts/s, 10686124 lookups/s, 45 bytes/key (1.5MB) 80000 words ( 67148 keys), 2585146 inserts/s, 6917441 lookups/s, 46 bytes/key (3.0MB) 160000 words ( 130897 keys), 2395923 inserts/s, 6455817 lookups/s, 48 bytes/key (6.0MB) 320000 words ( 254233 keys), 2247141 inserts/s, 5529826 lookups/s, 49 bytes/key (12.0MB) 640000 words ( 493191 keys), 2064675 inserts/s, 5073732 lookups/s, 51 bytes/key (24.0MB) 1280000 words ( 956820 keys), 1997615 inserts/s, 4760878 lookups/s, 52 bytes/key (48.0MB) Lookups become 10% faster when the dict is bigger than the cache, and even inserts seem to benefit a bit. (not to mention that small dicts take almost half the memory) ---------- Added file: http://bugs.python.org/file19596/dcbench-py3k.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 16:31:08 2010 From: report at bugs.python.org (John J Lee) Date: Sat, 13 Nov 2010 15:31:08 +0000 Subject: [issue1520831] urrlib2 max_redirections=0 disables redirects Message-ID: <1289662268.06.0.289848789691.issue1520831@psf.upfronthosting.co.za> John J Lee added the comment: Why not? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 16:31:11 2010 From: report at bugs.python.org (Stein Magnus Jodal) Date: Sat, 13 Nov 2010 15:31:11 +0000 Subject: [issue10409] mkcfg crashes with ValueError In-Reply-To: <1289662271.73.0.0539651224408.issue10409@psf.upfronthosting.co.za> Message-ID: <1289662271.73.0.0539651224408.issue10409@psf.upfronthosting.co.za> New submission from Stein Magnus Jodal : I'm using Distutils2 1.0a3 with Python 2.6.6. To reproduce: 1. Run ``python -m distutils2.mkcfg`` 2. When you get to the Trove classifier step enter e.g. "Apache 2" as license 3. When asked to select a matching license, enter something else than a number, e.g. "Apache" 4. mkcfg crashes with a ValueError Traceback (most recent call last): File "/usr/lib/python2.6/runpy.py", line 122, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.6/runpy.py", line 34, in _run_code exec code in run_globals File "/usr/local/lib/python2.6/dist-packages/distutils2/mkcfg.py", line 415, in main() File "/usr/local/lib/python2.6/dist-packages/distutils2/mkcfg.py", line 409, in main program.query_user() File "/usr/local/lib/python2.6/dist-packages/distutils2/mkcfg.py", line 242, in query_user self.set_classifier() File "/usr/local/lib/python2.6/dist-packages/distutils2/mkcfg.py", line 254, in set_classifier self.set_license(self.classifiers) File "/usr/local/lib/python2.6/dist-packages/distutils2/mkcfg.py", line 319, in set_license foundIndex = foundList[int(troveLicense) - 1] ValueError: invalid literal for int() with base 10: 'Apache' ---------- assignee: tarek components: Distutils2 messages: 121142 nosy: eric.araujo, jodal, tarek priority: normal severity: normal status: open title: mkcfg crashes with ValueError versions: 3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 17:51:22 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 13 Nov 2010 16:51:22 +0000 Subject: [issue10409] mkcfg crashes with ValueError In-Reply-To: <1289662271.73.0.0539651224408.issue10409@psf.upfronthosting.co.za> Message-ID: <1289667082.16.0.11022674629.issue10409@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Thanks for the feedback, I can reproduce this. Fixing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 17:56:55 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 13 Nov 2010 16:56:55 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289667415.01.0.560899036562.issue3871@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > this is, after all, a new platform! it starts off with > "sys.platform == 'mingw32'" I disagree; programs compiled with mingw32 run on Windows, and use the MSVC runtime. It's the same platform as the current win32 build. It's even possible to use mingw32 to compile extensions for the VS9.0 based python.exe. A different compiler does not make a new platform. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 18:15:25 2010 From: report at bugs.python.org (Matthew Barnett) Date: Sat, 13 Nov 2010 17:15:25 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1289668525.2.0.287997234241.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-20101113.zip is a new version of the regex module. It now supports Unicode 6.0.0. ---------- Added file: http://bugs.python.org/file19597/issue2636-20101113.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 18:26:45 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 13 Nov 2010 17:26:45 +0000 Subject: [issue10409] mkcfg crashes with ValueError In-Reply-To: <1289662271.73.0.0539651224408.issue10409@psf.upfronthosting.co.za> Message-ID: <1289669205.82.0.929688422509.issue10409@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Commited in a99e29d63071 (hg.python.org) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 19:03:19 2010 From: report at bugs.python.org (Brett Cannon) Date: Sat, 13 Nov 2010 18:03:19 +0000 Subject: [issue10401] Globals / builtins cache In-Reply-To: <1289597080.96.0.9732660757.issue10401@psf.upfronthosting.co.za> Message-ID: <1289671399.73.0.815141500047.issue10401@psf.upfronthosting.co.za> Brett Cannon added the comment: Unladen actually has something like this in place for performance optimizations. Not sure how Antoine's approach differs, though. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 19:09:47 2010 From: report at bugs.python.org (Michael Hoffman) Date: Sat, 13 Nov 2010 18:09:47 +0000 Subject: [issue2571] cmd.py always uses raw_input, even when another stdin is specified In-Reply-To: <1207594702.67.0.73869549091.issue2571@psf.upfronthosting.co.za> Message-ID: <1289671787.92.0.427867164876.issue2571@psf.upfronthosting.co.za> Changes by Michael Hoffman : ---------- nosy: +hoffman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 19:13:17 2010 From: report at bugs.python.org (Michael Hoffman) Date: Sat, 13 Nov 2010 18:13:17 +0000 Subject: [issue10396] stdin argument to pdb.Pdb doesn't work unless you also set Pdb.use_rawinput = False In-Reply-To: <1289584221.71.0.586527779083.issue10396@psf.upfronthosting.co.za> Message-ID: <1289671997.72.0.220633007154.issue10396@psf.upfronthosting.co.za> Michael Hoffman added the comment: As always, it seems a bit more complicated than I originally expected. Since it's too late for a Python 2.x feature addition, I'll wait until I upgrade to 3.x to work on that. You are correct, technically this is not a docs bug but I think the clarity of the docs would be greatly improved if you would add the text from the cmd module docs to the pdb docs: "If you want a given stdin to be used, make sure to set the instance?s use_rawinput attribute to False, otherwise stdin will be ignored." I hope you will agree that this is unexpected behavior that doesn't really fit into the zen of Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 19:13:46 2010 From: report at bugs.python.org (Vlastimil Brom) Date: Sat, 13 Nov 2010 18:13:46 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1289672026.98.0.725082545791.issue2636@psf.upfronthosting.co.za> Vlastimil Brom added the comment: Thank you very much! a quick test with my custom unicodedata with 6.0 on py 2.7 seems ok. I hope, there won't be problems with "cooperation" of the more recent internal data with the original 5.2 database in python 2.x releases. vbr ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 19:14:15 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Nov 2010 18:14:15 +0000 Subject: [issue10401] Globals / builtins cache In-Reply-To: <1289597080.96.0.9732660757.issue10401@psf.upfronthosting.co.za> Message-ID: <1289672055.92.0.943585449534.issue10401@psf.upfronthosting.co.za> Antoine Pitrou added the comment: There aren't many possible approaches. The more complex variants of globals caches try to also speedup writes, which is IMO a waste of time since rebinding globals is not a good coding practice, and especially not in the middle of time-critical loops. (by the way, the patch only addresses normal functions, but generators would easily benefit from a similar treatment) And Skip is right that this would be most useful when paired with a JIT (allowing for aggressive specialization, and possibly inlining). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 19:21:56 2010 From: report at bugs.python.org (Brett Cannon) Date: Sat, 13 Nov 2010 18:21:56 +0000 Subject: [issue10399] AST Optimization: inlining of function calls In-Reply-To: <1289593012.28.0.71054855235.issue10399@psf.upfronthosting.co.za> Message-ID: <1289672516.22.0.381319619959.issue10399@psf.upfronthosting.co.za> Brett Cannon added the comment: While I have nothing to say directly about the inline optimization, I do have some stuff to say about moving to AST optimizations. First, doing in Python is a good thing. It not only makes prototyping easier, but it allows other VMs to use the optimizations w/o having to re-implement themselves. Second, the symtable pass does need to eventually get exposed (most likely as an optional pass one can do to an AST). I am actually in the middle of an AST-heavy project that will end up wanting the symbol table info as well. Third, for that Graphviz output, was anything special required? If so, I would toss the code into Tools for others to benefit from. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 20:18:29 2010 From: report at bugs.python.org (INADA Naoki) Date: Sat, 13 Nov 2010 19:18:29 +0000 Subject: [issue10410] Is iterable a container type? In-Reply-To: <1289675908.98.0.73683654885.issue10410@psf.upfronthosting.co.za> Message-ID: <1289675908.98.0.73683654885.issue10410@psf.upfronthosting.co.za> New submission from INADA Naoki : In http://docs.python.org/release/2.6.6/glossary.html, "iterable" is described as "A container object capable of returning its members one at a time." Is it correct? Is stream object like file a container type? Container ABC requires only "__contains__" abstract method. I think file is iterable but is not container. Likewise, "and objects of any classes you define with an __iter__() or __getitem__() method." is wrong because __getitem__ method is not relate to iterable. ---------- assignee: docs at python components: Documentation messages: 121152 nosy: docs at python, naoki priority: normal severity: normal status: open title: Is iterable a container type? versions: Python 2.6, Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 23:54:13 2010 From: report at bugs.python.org (Brad Greenlee) Date: Sat, 13 Nov 2010 22:54:13 +0000 Subject: [issue10392] GZipFile crash when fileobj.mode is None In-Reply-To: <1289541524.38.0.073026896043.issue10392@psf.upfronthosting.co.za> Message-ID: <1289688853.63.0.83392668585.issue10392@psf.upfronthosting.co.za> Brad Greenlee added the comment: Understood. I just felt that fileobj.mode == None should be handled the same way that GzipFile(...,mode=None) is handled. I've submitted a patch to Django: http://code.djangoproject.com/ticket/14681 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:00:37 2010 From: report at bugs.python.org (Bobby Impollonia) Date: Sat, 13 Nov 2010 23:00:37 +0000 Subject: [issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k In-Reply-To: <1289689237.0.0.348719210289.issue10411@psf.upfronthosting.co.za> Message-ID: <1289689237.0.0.348719210289.issue10411@psf.upfronthosting.co.za> New submission from Bobby Impollonia : After checking out and converting the benchmark suite to py3k, the py3k benchmark set fails because of an ImportError in bm_pickle.py. Steps to reproduce: hg clone http://hg.python.org/benchmarks/ py2benchmarks mkdir py3benchmarks cd py3benchmarks ../py2benchmarks/make_perf3.sh ../py2benchmarks py3k perf.py -f -b py3k old_py3k new_py3k The ImportError comes from the new py2k/ py3k compatibility code. bm_pickle imports "long" from compat.py. However, when 2to3 is run, it changes the import line from saying "import ... long" to saying "import ... int", which fails because compat.py does not define "int". Is this a bug in lib2to3? I would not expect names used as lvalues to get converted. I'm using lib2to3 from python 2.6.5. A similar case is that the line unicode = str in compat.py gets changed by 2to3 to: str = str This isn't currently causing any problems because no one is trying to import "unicode" from compat, but if they did, they would fail on py3k. Regardless, a patch is attached that fixes bm_pickle by using "int_" as the name for our typedef instead of "long". ---------- assignee: collinwinter components: Benchmarks files: compat.patch keywords: patch messages: 121154 nosy: bobbyi, collinwinter, pitrou priority: normal severity: normal status: open title: Pickle benchmark fails after converting Benchmark Suite to py3k type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file19598/compat.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:02:34 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Nov 2010 23:02:34 +0000 Subject: [issue10408] Denser dicts and linear probing In-Reply-To: <1289659692.61.0.467153013048.issue10408@psf.upfronthosting.co.za> Message-ID: <1289689354.8.0.363857776985.issue10408@psf.upfronthosting.co.za> Raymond Hettinger added the comment: My previous experiments along these lines showed it was a dead-end. The number of probes was the most important factor and beat-out any effort to improve cache utilization from increased density. Doing extra work (more probes) in order to improve cache effects is very difficult because most real programs have an uneven access pattern so that the most frequently accesses items are usually already in cache. So, the attempted improvement only helps the less frequently accessed items and isn't worth the extra number of probes. Another result from earlier experiments is that benchmarking the experiment is laden with pitfalls. Tight timing loops don't mirror real world programs, nor do access patterns with uniform random distributions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:12:19 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Nov 2010 23:12:19 +0000 Subject: [issue10408] Denser dicts and linear probing In-Reply-To: <1289689354.8.0.363857776985.issue10408@psf.upfronthosting.co.za> Message-ID: <1289689933.3561.7.camel@localhost.localdomain> Antoine Pitrou added the comment: > My previous experiments along these lines showed it was a dead-end. > The number of probes was the most important factor and beat-out any > effort to improve cache utilization from increased density. Can you describe your experiments? What workloads or benchmarks did you use? Do note that there are several levels of caches in modern CPUs. L1 is very fast (latency is 3 or 4 cycles) but rather small (32 or 64KB). L2, depending on the CPU, has a latency between 10 and 20+ cycles and can be 256KB to 1MB large. L3, when present, is quite larger but also quite slower (latency sometimes up to 50 cycles). So, even if access patterns are uneven, it is probably rare to have all frequently accessed data in L1 (especially with Python since objects are big). > Another result from earlier experiments is that benchmarking the > experiment is laden with pitfalls. Tight timing loops don't mirror > real world programs, nor do access patterns with uniform random > distributions. I can certainly understand that; can you suggest workloads approaching "real world programs"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:14:19 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Nov 2010 23:14:19 +0000 Subject: [issue10408] Denser dicts and linear probing In-Reply-To: <1289659692.61.0.467153013048.issue10408@psf.upfronthosting.co.za> Message-ID: <1289690059.37.0.930145765696.issue10408@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, one way to make a dict denser without increasing the number of probes is to use Brent's Variation of Algorithm D in Knuth. That optimizes the insertion order to minimize the number of collisions and lets you pack well over two-thirds full without degradation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:24:08 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Nov 2010 23:24:08 +0000 Subject: [issue10408] Denser dicts and linear probing In-Reply-To: <1289690059.37.0.930145765696.issue10408@psf.upfronthosting.co.za> Message-ID: <1289690644.3561.16.camel@localhost.localdomain> Antoine Pitrou added the comment: > FWIW, one way to make a dict denser without increasing the number of > probes is to use Brent's Variation of Algorithm D in Knuth. That > optimizes the insertion order to minimize the number of collisions and > lets you pack well over two-thirds full without degradation. He, you suggested that several years ago on python-dev and I supplied the code. Also, IIRC, it didn't bring any improvement - although I don't remember which benchmarks, if any, were run. But the experiment here is mostly to decrease the (direct and indirect) cost of collisions by improving temporal locality of lookups. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:26:41 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Nov 2010 23:26:41 +0000 Subject: [issue10403] Use "member" consistently In-Reply-To: <1289623042.93.0.830099606418.issue10403@psf.upfronthosting.co.za> Message-ID: <1289690801.57.0.235163194714.issue10403@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > "Members and methods" should just be "attributes". +1 That substitution should be made almost everywhere. Individual slot variable are still called members though and their type is a member_descriptor. And the C API still has a tp_members entry. Otherwise, it looks like the term member is out-of-date. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:27:16 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Nov 2010 23:27:16 +0000 Subject: [issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k In-Reply-To: <1289689237.0.0.348719210289.issue10411@psf.upfronthosting.co.za> Message-ID: <1289690836.75.0.993825617691.issue10411@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, since this benchmark is already 3.x compatible, there's not much sense in making a 2to3 pass, is there? So perhaps "make_perf3.sh" (which I've never used) should be a bit smarter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:31:31 2010 From: report at bugs.python.org (Maciek J) Date: Sat, 13 Nov 2010 23:31:31 +0000 Subject: [issue10149] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1289691091.33.0.848598163662.issue10149@psf.upfronthosting.co.za> Maciek J added the comment: Couldn't compile to html at the moment, but it should be fine anyway. Note that I didn't wanted to start a new paragraph (I'm guessing you meant the sentence at line 13 of the patch) as there was no new paragraph in a previous version. ---------- Added file: http://bugs.python.org/file19599/pyexpat.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:38:24 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Nov 2010 23:38:24 +0000 Subject: [issue10408] Denser dicts and linear probing In-Reply-To: <1289659692.61.0.467153013048.issue10408@psf.upfronthosting.co.za> Message-ID: <1289691504.91.0.876369065996.issue10408@psf.upfronthosting.co.za> Raymond Hettinger added the comment: See Objects/dictnotes.txt for some of the results. I spent about full month trying to optimize dict performance either by tuning parameters or using different algorithms. There were a couple wins that were not implemented. 1) Allowing users to control insertion order or at least specify which keys are frequently accessed so that we could assure a first-time hit. 2) Allowing users to pre-size a dictionary so that resizes wouldn't be needed or an so they could control density. Guido didn't want to expose these controls. The PyPy guys published a paper on their results with alternative dict implementations and specialized dicts. You might want to look at that. IIRC, they found only minor wins. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:40:42 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Nov 2010 23:40:42 +0000 Subject: [issue10408] Denser dicts and linear probing In-Reply-To: <1289691504.91.0.876369065996.issue10408@psf.upfronthosting.co.za> Message-ID: <1289691637.3561.18.camel@localhost.localdomain> Antoine Pitrou added the comment: > See Objects/dictnotes.txt for some of the results. > I spent about full month trying to optimize dict > performance either by tuning parameters or using > different algorithms. Well, I've seen those results. I'm asking about which workloads or benchmarks were used so that I can try to reproduce these experiments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:41:19 2010 From: report at bugs.python.org (Bobby Impollonia) Date: Sat, 13 Nov 2010 23:41:19 +0000 Subject: [issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k In-Reply-To: <1289689237.0.0.348719210289.issue10411@psf.upfronthosting.co.za> Message-ID: <1289691679.26.0.658528159153.issue10411@psf.upfronthosting.co.za> Bobby Impollonia added the comment: Are there any files in performance/ that need 2to3? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:41:30 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Nov 2010 23:41:30 +0000 Subject: [issue10410] Is iterable a container type? In-Reply-To: <1289675908.98.0.73683654885.issue10410@psf.upfronthosting.co.za> Message-ID: <1289691690.13.0.437384612024.issue10410@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:44:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Nov 2010 23:44:49 +0000 Subject: [issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k In-Reply-To: <1289691679.26.0.658528159153.issue10411@psf.upfronthosting.co.za> Message-ID: <1289691886.3561.20.camel@localhost.localdomain> Antoine Pitrou added the comment: > Are there any files in performance/ that need 2to3? All the ones that require external libs (such as django, spambayes, etc.). Although, of course, since they require external libs it's not sure the translation will work either. I think I've converted all the standalone benchmarks. You can select them by specifying "-b 2n3" to perf.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:51:25 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Nov 2010 23:51:25 +0000 Subject: [issue10410] Is iterable a container type? In-Reply-To: <1289675908.98.0.73683654885.issue10410@psf.upfronthosting.co.za> Message-ID: <1289692285.61.0.112137812002.issue10410@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > "iterable" is described as "A container object > capable of returning its members one at a time." That wording is confusing. I'll fix it. > Likewise, "and objects of any classes you define > with an __iter__() or __getitem__() method." is > wrong because __getitem__ method is not relate to > iterable That wording is correct. Sequences are automatically iterable even if they don't define __iter__. For example: >>> class A: ... def __getitem__(self, i): ... if i > 10: ... raise IndexError(i) ... return i * 100 >>> list(A()) [0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000] If you're curious, the details are in the PyObject_GetIter() function in http://svn.python.org/view/python/branches/release27-maint/Objects/abstract.c?view=markup . ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:55:38 2010 From: report at bugs.python.org (Bobby Impollonia) Date: Sat, 13 Nov 2010 23:55:38 +0000 Subject: [issue10412] Add py3k support for "slow" pickle benchmark in Benchmark Suite In-Reply-To: <1289692538.69.0.952593194282.issue10412@psf.upfronthosting.co.za> Message-ID: <1289692538.69.0.952593194282.issue10412@psf.upfronthosting.co.za> New submission from Bobby Impollonia : A patch is attached that does the following: 1) Add py3k support for the "slow" (pure-Python) pickle/ unpickle benchmarks. 2) Add a runtime check to the pickle benchmark verifying that we do or don't have the C accelerators as expected. 3) Rename the cPickle versions to "fastpickle"/ "fastunpickle" and add a group called "pickle" that contains all of the pickling benchmarks. 4) Add the "pickle" benchmark group to the py3k and 2n3 groups. ---------- assignee: collinwinter components: Benchmarks files: slowpickle.patch keywords: patch messages: 121167 nosy: bobbyi, collinwinter, pitrou priority: normal severity: normal status: open title: Add py3k support for "slow" pickle benchmark in Benchmark Suite type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file19600/slowpickle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 01:34:17 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 14 Nov 2010 00:34:17 +0000 Subject: [issue10413] Comments in unicode.h are out of date In-Reply-To: <1289694856.74.0.857329002017.issue10413@psf.upfronthosting.co.za> Message-ID: <1289694856.74.0.857329002017.issue10413@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Attached patch updates some comments in unicode.h mostly reflecting the fact that the default encoding is now unconditionally UTF-8. ---------- assignee: belopolsky components: Documentation, Interpreter Core files: unicode-comments.diff keywords: patch messages: 121168 nosy: belopolsky, haypo, lemburg, loewis priority: normal severity: normal stage: patch review status: open title: Comments in unicode.h are out of date versions: Python 3.2 Added file: http://bugs.python.org/file19601/unicode-comments.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 01:50:43 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Nov 2010 00:50:43 +0000 Subject: [issue9520] Add Patricia Trie high performance container In-Reply-To: <1280969963.37.0.950740145402.issue9520@psf.upfronthosting.co.za> Message-ID: <1289695843.34.0.175373600196.issue9520@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't think a Patricia Trie is going to find its way into the code distribution. It has a better chance as a third-party module listed on PyPI (much in the same way that people access memcached from Python). ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 03:03:11 2010 From: report at bugs.python.org (Matthias Klose) Date: Sun, 14 Nov 2010 02:03:11 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1289700191.84.0.509300775835.issue9807@psf.upfronthosting.co.za> Matthias Klose added the comment: this adds the modifier to the /python3.2/config directory. Now you end up with both /python3.2/config and /python3.2/ for anything else. This is not what Debian, Fedora and Ubuntu are currently doing. Is this really wanted? I'd rather like to see this as /python3.2/config- so that everything is again in one prefix. $ ls -l /lib/pkgconfig/ total 4 -rw-r--r-- 1 doko doko 282 Nov 14 02:44 python-3.2.pc lrwxrwxrwx 1 doko doko 13 Nov 14 02:44 python-3.2mu.pc -> python-3.2.pc python-3.2mu.pc should be the file, python-3.2.pc the symlink. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 03:20:35 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 14 Nov 2010 02:20:35 +0000 Subject: [issue10260] Add a threading.Condition.wait_for() method In-Reply-To: <1288500409.32.0.639501337625.issue10260@psf.upfronthosting.co.za> Message-ID: <1289701235.85.0.963473343851.issue10260@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Good point, Antoine. I'm always trying to keep those timeouts low, however, to avoid having the testsuite duration grow too much with every test :) I think we can probably fix the issue by having the lock_tests.Bunch() function only return when all threads have checked in, thus avoiding thread startup delays affecting our timeouts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 03:35:10 2010 From: report at bugs.python.org (Matthias Klose) Date: Sun, 14 Nov 2010 02:35:10 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1289702110.48.0.917444635139.issue9807@psf.upfronthosting.co.za> Matthias Klose added the comment: the change to python.pc should make the abi change to includedir, not Cflags. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 04:33:11 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 14 Nov 2010 03:33:11 +0000 Subject: [issue5111] httplib: wrong Host header when connecting to IPv6 litteral URL In-Reply-To: <1233334139.62.0.259128767537.issue5111@psf.upfronthosting.co.za> Message-ID: <1289705591.85.0.490917669327.issue5111@psf.upfronthosting.co.za> Senthil Kumaran added the comment: r86461 (release31-maint) r86462 (release27-maint) ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 05:35:18 2010 From: report at bugs.python.org (david) Date: Sun, 14 Nov 2010 04:35:18 +0000 Subject: [issue10414] socket.gethostbyname doesn't return an ipv6 address In-Reply-To: <1289709318.9.0.235139859689.issue10414@psf.upfronthosting.co.za> Message-ID: <1289709318.9.0.235139859689.issue10414@psf.upfronthosting.co.za> New submission from david : (socket.gethostbyname doesn't return an ipv6 address) So just to start with I know the documentation says [0] "and getaddrinfo() should be used instead for IPv4/v6 dual stack support." However, the getaddrinfo() method provides more information than required. Why can't getaddrinfo support ipv6 ? or a method for ipv6 added to the socket module to make getting a host address by name easier (for ipv6) ? [0] - http://docs.python.org/library/socket.html#socket.gethostbyname ---------- messages: 121174 nosy: db priority: normal severity: normal status: open title: socket.gethostbyname doesn't return an ipv6 address _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 06:27:58 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Nov 2010 05:27:58 +0000 Subject: [issue10410] Is iterable a container type? In-Reply-To: <1289675908.98.0.73683654885.issue10410@psf.upfronthosting.co.za> Message-ID: <1289712478.81.0.126349059671.issue10410@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Removed the incorrect "container" reference. See r86463. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 06:28:46 2010 From: report at bugs.python.org (Bobby Impollonia) Date: Sun, 14 Nov 2010 05:28:46 +0000 Subject: [issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k In-Reply-To: <1289689237.0.0.348719210289.issue10411@psf.upfronthosting.co.za> Message-ID: <1289712526.12.0.410093592912.issue10411@psf.upfronthosting.co.za> Bobby Impollonia added the comment: Patch is attached for make_perf3.sh to have it not convert things that don't need to be converted. This fixes the issue and with the patch all the py3k benchmarks run successfully after running the script. ---------- Added file: http://bugs.python.org/file19602/make_perf3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 07:31:47 2010 From: report at bugs.python.org (Bobby Impollonia) Date: Sun, 14 Nov 2010 06:31:47 +0000 Subject: [issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k In-Reply-To: <1289689237.0.0.348719210289.issue10411@psf.upfronthosting.co.za> Message-ID: <1289716307.5.0.070531425086.issue10411@psf.upfronthosting.co.za> Bobby Impollonia added the comment: Attached is a patch for perf.py that goes along with the previous patch for make_perf3.sh. This patch changes the py3k group to include everything in the 2n3 group since we can still run all those tests after converting. Previously, nqueens, unpack_sequance and richards weren't run as part of -b py3k ---------- Added file: http://bugs.python.org/file19603/perf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 08:12:15 2010 From: report at bugs.python.org (Justin Lebar) Date: Sun, 14 Nov 2010 07:12:15 +0000 Subject: [issue10415] readline.insert_text documentation incomplete In-Reply-To: <1289718734.94.0.0887962692453.issue10415@psf.upfronthosting.co.za> Message-ID: <1289718734.94.0.0887962692453.issue10415@psf.upfronthosting.co.za> New submission from Justin Lebar : The readline documentation currently says: > readline.insert_text(string) > Insert text into the command line. But as far as I can tell, readline.insert_text() does something only when called from startup_hook or pre_input_hook. Here's an example of someone using the module in a way that works: http://swapoff.org/svn/cly/tags/0.7/cly/interactive.py ---------- assignee: docs at python components: Documentation messages: 121178 nosy: Justin.Lebar, docs at python priority: normal severity: normal status: open title: readline.insert_text documentation incomplete versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 08:14:46 2010 From: report at bugs.python.org (Justin Lebar) Date: Sun, 14 Nov 2010 07:14:46 +0000 Subject: [issue10415] readline.insert_text documentation incomplete In-Reply-To: <1289718734.94.0.0887962692453.issue10415@psf.upfronthosting.co.za> Message-ID: <1289718886.1.0.671776354961.issue10415@psf.upfronthosting.co.za> Justin Lebar added the comment: Actually, maybe startup_hook doesn't do what it sounds like it does and insert_text() only works from startup_hook. If this is the case, then the documentation for startup_hook could also be improved: > The startup_hook function is called with no arguments just before > readline prints the first prompt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 08:26:41 2010 From: report at bugs.python.org (Ron Adam) Date: Sun, 14 Nov 2010 07:26:41 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1289719601.15.0.639950475764.issue2001@psf.upfronthosting.co.za> Ron Adam added the comment: Ok, here is the latest patch for review. "issue2001_a.diff' I restored the pydoc.py file and then put most of the new code in these two functions, _startserver(urlhandler, port) _browse(port=0, *, open_browser=True) This creates a bettor organized file, and reduces the number of names with leading underscores. As far as I know you can't import things that are located inside a function. I still need to depreciate the '-g' option and the gui() function along with the old server parts. Is there a guide on how to depreciate things? ---------- Added file: http://bugs.python.org/file19604/issue2001_a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 08:40:12 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 14 Nov 2010 07:40:12 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1289720412.26.0.75698795903.issue2001@psf.upfronthosting.co.za> Nick Coghlan added the comment: Just call warnings.warn with an appropriate message, a category of DeprecationWarning and a stacklevel of 2 (so the warning will refer to the function's caller rather than to the pydoc code). It's basically the example from the warnings.warn docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 10:33:54 2010 From: report at bugs.python.org (Julius Tuomisto) Date: Sun, 14 Nov 2010 09:33:54 +0000 Subject: [issue9991] xmlrpc client ssl check faulty In-Reply-To: <1285798534.22.0.74771320533.issue9991@psf.upfronthosting.co.za> Message-ID: <1289727234.45.0.0772663512024.issue9991@psf.upfronthosting.co.za> Julius Tuomisto added the comment: Renderfarm.fi's python based "uploader" for Blender 2.5 (GPL licensed and a part of the main distribution of Blender) is still suffering from this bug. We're hopeful that this issue would be fixed in the next versions of Python. Thank you! ---------- nosy: +Julius.Tuomisto _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 11:01:44 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 14 Nov 2010 10:01:44 +0000 Subject: [issue9991] xmlrpc client ssl check faulty In-Reply-To: <1289727234.45.0.0772663512024.issue9991@psf.upfronthosting.co.za> Message-ID: Senthil Kumaran added the comment: That's sad. The fix is very simple. We shall have it before 3.2 alpha4 or beta1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 11:25:24 2010 From: report at bugs.python.org (INADA Naoki) Date: Sun, 14 Nov 2010 10:25:24 +0000 Subject: [issue10410] Is iterable a container type? In-Reply-To: <1289692285.61.0.112137812002.issue10410@psf.upfronthosting.co.za> Message-ID: INADA Naoki added the comment: >> Likewise, "and objects of any classes you define >> with an __iter__() or __getitem__() method." is >> wrong because __getitem__ method is not relate to >> iterable > > That wording is correct. ?Sequences are automatically > iterable even if they don't define __iter__. ?For example: Wow, thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 11:30:53 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 14 Nov 2010 10:30:53 +0000 Subject: [issue10414] socket.gethostbyname doesn't return an ipv6 address In-Reply-To: <1289709318.9.0.235139859689.issue10414@psf.upfronthosting.co.za> Message-ID: <1289730653.84.0.164771082159.issue10414@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Python has a policy of exposing low-level APIs as-is, i.e. the way the operating system implements them. gethostbyname is an old BSD socket API function that is limited to IPv4, and Python exposes it as such. If you want another convenience function, I recommend to write it yourself, and then use it in your code. ---------- nosy: +loewis resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 12:20:15 2010 From: report at bugs.python.org (Peter Nielsen) Date: Sun, 14 Nov 2010 11:20:15 +0000 Subject: [issue3493] No Backslash (\) in IDLE 1.2.2 In-Reply-To: <1217703828.28.0.450562077127.issue3493@psf.upfronthosting.co.za> Message-ID: <1289733615.34.0.0253674575173.issue3493@psf.upfronthosting.co.za> Peter Nielsen added the comment: I have the same problem with a danish keyboard and OSX snowleopard.. I can use \ in both the command editor and pretty everywhere else but not in Idle. ---------- nosy: +Peter.Nielsen versions: +Python 2.6, Python 3.1 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 12:27:30 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 14 Nov 2010 11:27:30 +0000 Subject: [issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows In-Reply-To: <1277827107.42.0.0793977492373.issue9116@psf.upfronthosting.co.za> Message-ID: <1289734050.66.0.579605507198.issue9116@psf.upfronthosting.co.za> Stefan Krah added the comment: Hirokazu's patch works for me. Could this approach be taken in general to suppress all buildbot pop-ups? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 12:34:05 2010 From: report at bugs.python.org (Zbyszek Szmek) Date: Sun, 14 Nov 2010 11:34:05 +0000 Subject: [issue10416] UnicodeDecodeError when 2to3 is run on a dir with numpy .npy files In-Reply-To: <1289734445.75.0.657532915911.issue10416@psf.upfronthosting.co.za> Message-ID: <1289734445.75.0.657532915911.issue10416@psf.upfronthosting.co.za> New submission from Zbyszek Szmek : 1. 2to3 should work only only files ending with '.py', but it takes anything which has a dot and ends with 'py'. I'm having trouble with numpy .npy files. 2. 2to3 tries to decode the file and fails with traceback that is not useful: the name of the failing file is not given. A patch is attached. % ls *.npy|head -n1 S_18_7000_899811b572b309161cbb34f185b82fb618ed81da.npy % 2to3-3.2 /usr/local/bin/2to3-3.2 . RefactoringTool: Skipping implicit fixer: buffer RefactoringTool: Skipping implicit fixer: idioms RefactoringTool: Skipping implicit fixer: set_literal RefactoringTool: Skipping implicit fixer: ws_comma Traceback (most recent call last): File "/usr/local/bin/2to3-3.2", line 6, in sys.exit(main("lib2to3.fixes")) File "/usr/local/lib/python3.2/lib2to3/main.py", line 172, in main options.processes) File "/usr/local/lib/python3.2/lib2to3/refactor.py", line 699, in refactor items, write, doctests_only) File "/usr/local/lib/python3.2/lib2to3/refactor.py", line 294, in refactor self.refactor_dir(dir_or_file, write, doctests_only) File "/usr/local/lib/python3.2/lib2to3/refactor.py", line 313, in refactor_dir self.refactor_file(fullname, write, doctests_only) File "/usr/local/lib/python3.2/lib2to3/refactor.py", line 740, in refactor_file *args, **kwargs) File "/usr/local/lib/python3.2/lib2to3/refactor.py", line 335, in refactor_file input, encoding = self._read_python_source(filename) File "/usr/local/lib/python3.2/lib2to3/refactor.py", line 331, in _read_python_source return _from_system_newlines(f.read()), encoding File "/usr/local/lib/python3.2/codecs.py", line 300, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf8' codec can't decode byte 0x93 in position 0: invalid start byte ---------- components: 2to3 (2.x to 3.0 conversion tool) files: diff.diff keywords: patch messages: 121188 nosy: zbysz priority: normal severity: normal status: open title: UnicodeDecodeError when 2to3 is run on a dir with numpy .npy files type: crash versions: Python 3.2 Added file: http://bugs.python.org/file19605/diff.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 13:04:03 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 14 Nov 2010 12:04:03 +0000 Subject: [issue10416] UnicodeDecodeError when 2to3 is run on a dir with numpy .npy files In-Reply-To: <1289734445.75.0.657532915911.issue10416@psf.upfronthosting.co.za> Message-ID: <1289736243.5.0.236652540639.issue10416@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 13:04:56 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 14 Nov 2010 12:04:56 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1289736296.13.0.890430249811.issue1553375@psf.upfronthosting.co.za> Nick Coghlan added the comment: As per my response to RDM on python-dev, I think the patch is misguided as it currently stands. The traceback on an exception is built up as the stack unwinds. The stack above the frame containing the exception handler obviously hasn't been unwound yet, so it isn't included in the traceback object. Since the frame containing the exception handler is live, it and the frame stack above it reflect the state of the exception handler, while the tracebacks on the chain of exceptions currently being handled reflect the parts of the stack that have already been unwound. For explicit printing, a separate section printing the stack with print_stack() is a better option than trying to embed the information in the stack trace of the exception currently being handled. For the logging use case, a separate "stack_trace" flag to request inclusion of stack trace details independent of the exception state seems like a preferable option. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 13:09:51 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 14 Nov 2010 12:09:51 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1289736591.38.0.135236878996.issue1553375@psf.upfronthosting.co.za> Nick Coghlan added the comment: If the allframes flag is pursued further, then the stack trace should be added (with an appropriate header clause) after the entire exception chain has been printed (including the exception currently being handled). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 13:34:46 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 14 Nov 2010 12:34:46 +0000 Subject: [issue10383] test_os leaks under Windows In-Reply-To: <1289421086.3.0.902677944517.issue10383@psf.upfronthosting.co.za> Message-ID: <1289738086.82.0.59751810376.issue10383@psf.upfronthosting.co.za> Stefan Krah added the comment: I agree that the buffer should be released. The patch fixes this leak and another one. All tests pass. ---------- keywords: +patch nosy: +skrah Added file: http://bugs.python.org/file19606/posixmodule_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 13:47:15 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 14 Nov 2010 12:47:15 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1289738835.36.0.627622537486.issue1553375@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that after the loop over the values is complete, the final value of tb should correctly refer to the traceback for the exception currently being handled regardless of whether or not any chaining is involved. So moving the stack printing code that is currently inside the loop after the loop should do the right thing. With my suggested change in the display layout, I think this idea is still worthwhile (getting it right in handling code is tricky, especially if the exception is passed around before being displayed). ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 14:04:51 2010 From: report at bugs.python.org (Johannes Ammon) Date: Sun, 14 Nov 2010 13:04:51 +0000 Subject: [issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function In-Reply-To: <1289739891.46.0.690681439003.issue10417@psf.upfronthosting.co.za> Message-ID: <1289739891.46.0.690681439003.issue10417@psf.upfronthosting.co.za> New submission from Johannes Ammon : When there is a non-ASCII character in the docstring of a test function, unittest triggers an UnicodeEncodeError when called with "--verbose". I have this file unicodetest.py: ----------------------------------------- # -*- coding: utf-8 -*- import unittest class UnicodeTest(unittest.TestCase): def test_unicode_docstring(self): u"""t?st - docstring with unicode character""" self.assertEqual(1+1, 2) if __name__ == '__main__': unittest.main() ----------------------------------------- Running it normally is ok: $ python unicodetest.py . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK But with "--verbose" it breaks: $ python unicodetest.py --verbose Traceback (most recent call last): File "unicodetest.py", line 10, in unittest.main() File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 817, in __init__ self.runTests() File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 861, in runTests result = testRunner.run(self.test) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 753, in run test(result) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 464, in __call__ return self.run(*args, **kwds) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 460, in run test(result) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 464, in __call__ return self.run(*args, **kwds) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 460, in run test(result) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 300, in __call__ return self.run(*args, **kwds) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 266, in run result.startTest(self) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 693, in startTest self.stream.write(self.getDescription(test)) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 1: ordinal not in range(128) Found with Python 2.6 on MacOS X 10.6.4 ---------- components: Tests, Unicode messages: 121193 nosy: jammon priority: normal severity: normal status: open title: unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 14:13:53 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 14 Nov 2010 13:13:53 +0000 Subject: [issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function In-Reply-To: <1289739891.46.0.690681439003.issue10417@psf.upfronthosting.co.za> Message-ID: <1289740433.15.0.399664875022.issue10417@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 15:13:35 2010 From: report at bugs.python.org (Virgil Dupras) Date: Sun, 14 Nov 2010 14:13:35 +0000 Subject: [issue10418] test_io hangs on 3.1.3rc1 In-Reply-To: <1289744014.96.0.667442029835.issue10418@psf.upfronthosting.co.za> Message-ID: <1289744014.96.0.667442029835.issue10418@psf.upfronthosting.co.za> New submission from Virgil Dupras : I downloaded Python 3.1.3rc1 this morning to do my civic duty of testing it. I don't know what I'm doing wrong, but for me, test_io hangs and never completed. I'm on OS X 10.6.5. I ran it with: $ ./python.exe Lib/test/regrtest.py test_io And I got: test_io Testing large file ops skipped on darwin. It requires 2147483648 bytes and a long time. Use 'regrtest.py -u largefile test_io' to run it. Testing large file ops skipped on darwin. It requires 2147483648 bytes and a long time. Use 'regrtest.py -u largefile test_io' to run it. python.exe(12242) malloc: *** mmap(size=9223372036854775808) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug python.exe(12242) malloc: *** mmap(size=9223372036854775808) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug python.exe(12242) malloc: *** mmap(size=9223372036854775808) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug I build Python with this configuration: $ ./configure --enable-universalsdk=/ --enable-framework --with-universal-archs=intel Oh, and it's being run as 64-bit. By looking at the size being allocated, by guess that it's some kind of overflow thing or something. ---------- components: Tests messages: 121194 nosy: vdupras priority: release blocker severity: normal status: open title: test_io hangs on 3.1.3rc1 type: crash versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 15:28:35 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 14 Nov 2010 14:28:35 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1289744915.99.0.142681681941.issue9807@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Could you also fix issue #10262, which is related to this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 16:29:10 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 14 Nov 2010 15:29:10 +0000 Subject: [issue10416] UnicodeDecodeError when 2to3 is run on a dir with numpy .npy files In-Reply-To: <1289734445.75.0.657532915911.issue10416@psf.upfronthosting.co.za> Message-ID: <1289748550.85.0.553758248915.issue10416@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r86464 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 16:47:54 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 14 Nov 2010 15:47:54 +0000 Subject: [issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function In-Reply-To: <1289739891.46.0.690681439003.issue10417@psf.upfronthosting.co.za> Message-ID: <1289749674.02.0.251361289681.issue10417@psf.upfronthosting.co.za> R. David Murray added the comment: Is this a duplicate of #1293741? That issue was closed as out of date, but I'm not 100% convinced that was the correct closure. What do you think? Does it still happen with 2.7? (2.6 is in security fix only mode.) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 16:50:51 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 14 Nov 2010 15:50:51 +0000 Subject: [issue10418] test_io hangs on 3.1.3rc1 In-Reply-To: <1289744014.96.0.667442029835.issue10418@psf.upfronthosting.co.za> Message-ID: <1289749851.35.0.823332190456.issue10418@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 16:52:25 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 14 Nov 2010 15:52:25 +0000 Subject: [issue10418] test_io hangs on 3.1.3rc1 In-Reply-To: <1289744014.96.0.667442029835.issue10418@psf.upfronthosting.co.za> Message-ID: <1289749945.02.0.377528961807.issue10418@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Can you run regrtest with the -v option, to know which test case fails? (we have several OS X buildbots which run this test fine, by the way, including a Snow Leopard instance) Note: 9223372036854775808 is 2**63 or 0x8000000000000000. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 17:04:50 2010 From: report at bugs.python.org (Virgil Dupras) Date: Sun, 14 Nov 2010 16:04:50 +0000 Subject: [issue10418] test_io hangs on 3.1.3rc1 In-Reply-To: <1289744014.96.0.667442029835.issue10418@psf.upfronthosting.co.za> Message-ID: <1289750690.32.0.0682865670972.issue10418@psf.upfronthosting.co.za> Virgil Dupras added the comment: I ran the test with the -v option flag. The malloc error don't happen at the same place the hang up happens. The first one happens at: test_readline (test.test_io.PyIOTest) ... ok test_unbounded_file (test.test_io.PyIOTest) ... skipped 'test can only run in a 32-bit address space' test_with_open (test.test_io.PyIOTest) ... ok test_buffering (test.test_io.CBufferedReaderTest) ... ok test_constructor (test.test_io.CBufferedReaderTest) ... python.exe(24083) malloc: *** mmap(size=9223372036854775808) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug ok test_context_manager (test.test_io.CBufferedReaderTest) ... ok test_detach (test.test_io.CBufferedReaderTest) ... ok And the second one happens at: test_readlines (test.test_io.PyBufferedReaderTest) ... ok test_repr (test.test_io.PyBufferedReaderTest) ... ok test_threads (test.test_io.PyBufferedReaderTest) ... skipped "resource 'cpu' is not enabled" test_constructor (test.test_io.CBufferedWriterTest) ... python.exe(24083) malloc: *** mmap(size=9223372036854775808) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug ok test_context_manager (test.test_io.CBufferedWriterTest) ... ok test_destructor (test.test_io.CBufferedWriterTest) ... ok And finally, the hang: test_io_after_close (test.test_io.CMiscIOTest) ... ok test___all__ (test.test_io.PyMiscIOTest) ... ok test_abc_inheritance (test.test_io.PyMiscIOTest) ... ok test_abc_inheritance_official (test.test_io.PyMiscIOTest) ... ok test_abcs (test.test_io.PyMiscIOTest) ... ok test_attributes (test.test_io.PyMiscIOTest) ... ok test_blockingioerror (test.test_io.PyMiscIOTest) ... ok test_io_after_close (test.test_io.PyMiscIOTest) ... ok test_interrupted_write_buffered (test.test_io.CSignalsTest) ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 17:24:39 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 14 Nov 2010 16:24:39 +0000 Subject: [issue10418] test_io hangs on 3.1.3rc1 In-Reply-To: <1289750690.32.0.0682865670972.issue10418@psf.upfronthosting.co.za> Message-ID: <1289751874.3725.2.camel@localhost.localdomain> Antoine Pitrou added the comment: > I ran the test with the -v option flag. The malloc error don't happen > at the same place the hang up happens. The first one happens at: The malloc error is normal, then, it's part of that test. It's a pity OS X dumps something on stderr, though. > And finally, the hang: > > test_io_after_close (test.test_io.CMiscIOTest) ... ok > test___all__ (test.test_io.PyMiscIOTest) ... ok > test_abc_inheritance (test.test_io.PyMiscIOTest) ... ok > test_abc_inheritance_official (test.test_io.PyMiscIOTest) ... ok > test_abcs (test.test_io.PyMiscIOTest) ... ok > test_attributes (test.test_io.PyMiscIOTest) ... ok > test_blockingioerror (test.test_io.PyMiscIOTest) ... ok > test_io_after_close (test.test_io.PyMiscIOTest) ... ok > test_interrupted_write_buffered (test.test_io.CSignalsTest) ... Ok. I guess you would need to investigate what happens in that particular sub-test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 17:29:56 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sun, 14 Nov 2010 16:29:56 +0000 Subject: [issue10413] Comments in unicode.h are out of date In-Reply-To: <1289694856.74.0.857329002017.issue10413@psf.upfronthosting.co.za> Message-ID: <4CE00E81.6060906@egenix.com> Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > New submission from Alexander Belopolsky : > > Attached patch updates some comments in unicode.h mostly reflecting the fact that the default encoding is now unconditionally UTF-8. Looks good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 17:44:58 2010 From: report at bugs.python.org (Virgil Dupras) Date: Sun, 14 Nov 2010 16:44:58 +0000 Subject: [issue10418] test_io hangs on 3.1.3rc1 In-Reply-To: <1289744014.96.0.667442029835.issue10418@psf.upfronthosting.co.za> Message-ID: <1289753098.53.0.792175958776.issue10418@psf.upfronthosting.co.za> Virgil Dupras added the comment: Nobody else can reproduce the bug? I'm not sure I can fix this (although I can try). I tried to re-compile 3.1.2 with the same flags and run test_io and it passes, so something happened between 3.1.2 and 3.1.3rc1. So, I'll give it a look, but if someone more experienced can reproduce it... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 17:58:35 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 14 Nov 2010 16:58:35 +0000 Subject: [issue10418] test_io hangs on 3.1.3rc1 In-Reply-To: <1289744014.96.0.667442029835.issue10418@psf.upfronthosting.co.za> Message-ID: <1289753915.7.0.342267772224.issue10418@psf.upfronthosting.co.za> R. David Murray added the comment: Ronald hasn't replied yet and he's the most likely to be in a position to try to reproduce it. Even if you can't fix it, figuring out more about how that individual test is arriving at the hang could be useful. If you've got the chops to look at the hang in a debugger that would be even more helpful. ---------- nosy: +ned.deily, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 18:19:35 2010 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Nov 2010 17:19:35 +0000 Subject: [issue10418] test_io hangs on 3.1.3rc1 In-Reply-To: <1289744014.96.0.667442029835.issue10418@psf.upfronthosting.co.za> Message-ID: <1289755175.11.0.494449984492.issue10418@psf.upfronthosting.co.za> Ned Deily added the comment: Be careful when running a framework build from the build directory without installing it. Chances are you are actually dynamically linking to an older existing framework in /Library/Frameworks. (Try looking at sys.modules to see what I mean.) You'll either need to temporarily move the old fw out of the way and do the install or use a different fw path to configure or don't use a fw build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 18:28:09 2010 From: report at bugs.python.org (Virgil Dupras) Date: Sun, 14 Nov 2010 17:28:09 +0000 Subject: [issue10418] test_io hangs on 3.1.3rc1 In-Reply-To: <1289744014.96.0.667442029835.issue10418@psf.upfronthosting.co.za> Message-ID: <1289755689.66.0.88495150103.issue10418@psf.upfronthosting.co.za> Virgil Dupras added the comment: Ooh, darn, that was it. I installed it and afterwards, the tests passed. Sorry for the fuss, I'll keep that gotcha in mind next time. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 19:04:55 2010 From: report at bugs.python.org (Johannes Ammon) Date: Sun, 14 Nov 2010 18:04:55 +0000 Subject: [issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function In-Reply-To: <1289739891.46.0.690681439003.issue10417@psf.upfronthosting.co.za> Message-ID: <1289757895.39.0.0932494435213.issue10417@psf.upfronthosting.co.za> Johannes Ammon added the comment: Same behaviour with 2.7 ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 21:32:33 2010 From: report at bugs.python.org (=?utf-8?q?Hagen_F=C3=BCrstenau?=) Date: Sun, 14 Nov 2010 20:32:33 +0000 Subject: [issue10419] distutils command build_scripts fails with UnicodeDecodeError In-Reply-To: <1289766753.91.0.865805184241.issue10419@psf.upfronthosting.co.za> Message-ID: <1289766753.91.0.865805184241.issue10419@psf.upfronthosting.co.za> New submission from Hagen F?rstenau : As suggested in issue 9561, I'm creating a new bug for the encoding problem in build_scripts: If a script file can't be decoded with the (locale dependent) standard encoding, then "build_scripts" fails with UnicodeDecodeError. Reproducable e.g. with LANG=C and a script file containing non ASCII chars near the beginning (so that they're read on a single readline()). Attaching a patch that uses "surrogateescape", as proposed for issue 6011. ---------- assignee: tarek components: Distutils files: surrogateescape.patch keywords: patch messages: 121207 nosy: eric.araujo, hagen, tarek priority: normal severity: normal status: open title: distutils command build_scripts fails with UnicodeDecodeError type: crash versions: Python 3.1, Python 3.2 Added file: http://bugs.python.org/file19607/surrogateescape.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 22:20:48 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sun, 14 Nov 2010 21:20:48 +0000 Subject: [issue2405] Drop w9xpopen and all dependencies In-Reply-To: <1205870969.55.0.774025556957.issue2405@psf.upfronthosting.co.za> Message-ID: <1289769648.77.0.246288582322.issue2405@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It is still time to add to 3.2 a DeprecationWarning when w9xpopen is used, and remove the feature in 3.3. See attached patch ---------- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file19608/deprecate-w9xpopen.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 22:38:18 2010 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 14 Nov 2010 21:38:18 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1289770698.96.0.197646876863.issue1553375@psf.upfronthosting.co.za> Vinay Sajip added the comment: I've implemented an optional keyword argument stack_info (defaulting to False) for all logging calls. If specified as True, a line Stack (most recent call last): is printed, followed by the output of traceback.print_stack(). This is output after any exception information. Checked into py3k (r86467), please can interested parties check if it meets the logging use case mentioned when the ticket was created? Regression tests pass OK, and docs updated in this checkin. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 22:40:51 2010 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 14 Nov 2010 21:40:51 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1289770851.41.0.0664358857219.issue1553375@psf.upfronthosting.co.za> Vinay Sajip added the comment: Re. the change in r86467, you can test using this simple script: http://pastebin.com/ZXs3sXDW ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 00:01:14 2010 From: report at bugs.python.org (INADA Naoki) Date: Sun, 14 Nov 2010 23:01:14 +0000 Subject: [issue10420] Document of Bdb.effective is wrong. In-Reply-To: <1289775674.64.0.742644713798.issue10420@psf.upfronthosting.co.za> Message-ID: <1289775674.64.0.742644713798.issue10420@psf.upfronthosting.co.za> New submission from INADA Naoki : http://docs.python.org/library/bdb.html#bdb.effective >Determine if there is an effective (active) breakpoint at this line of code. >Return breakpoint number or 0 if none. bdb.effective doesn't return 0. If no breakpoint is found, it returns (None, None). ---------- assignee: docs at python components: Documentation messages: 121211 nosy: docs at python, naoki priority: normal severity: normal status: open title: Document of Bdb.effective is wrong. versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 00:30:46 2010 From: report at bugs.python.org (admin) Date: Sun, 14 Nov 2010 23:30:46 +0000 Subject: [issue10421] Failed issue tracker submission In-Reply-To: <20101114233044.91B391DB89@psf.upfronthosting.co.za> Message-ID: <20101114233044.91B391DB89@psf.upfronthosting.co.za> New submission from admin : You are not a registered user. Unknown address: Order Real Pfizer ---------- files: unnamed messages: 121212 nosy: admin priority: normal severity: normal status: open title: Failed issue tracker submission Added file: http://bugs.python.org/file19609/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Return-Path: X-Original-To: tracker at psf.upfronthosting.co.za Delivered-To: tracker at psf.upfronthosting.co.za Received: from [190.232.74.29] (unknown [190.232.74.29]) by psf.upfronthosting.co.za (Postfix) with ESMTP id 911921DE56 for ; Mon, 15 Nov 2010 00:30:42 +0100 (CET) From: "Order Real Pfizer To: tracker at psf.upfronthosting.co.za Reply-To: tracker at psf.upfronthosting.co.za Subject: Hi tracker, Best Deals. of advent were Mime-Version: 1.0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Message-Id: <20101114233043.911921DE56 at psf.upfronthosting.co.za> Date: Mon, 15 Nov 2010 00:30:42 +0100 (CET) Newsletter
View Mobile | View Webpage
Cheapest Pills. Click here
PLEASE DO NOT REPLY TO THIS MESSAGE.
This is a system-generated Newsletter email. Replies will not be read or forwarded for handling.

This message was sent to tracker at psf.upfronthosting.co.za.

Contact Us | Unsubscribe | Update Email Address | Privacy Policy

Copyright 2010 leadership of Warrior. All rights reserved.
From report at bugs.python.org Mon Nov 15 02:19:49 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 15 Nov 2010 01:19:49 +0000 Subject: [issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function In-Reply-To: <1289739891.46.0.690681439003.issue10417@psf.upfronthosting.co.za> Message-ID: <1289783989.45.0.980528080637.issue10417@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 02:22:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 15 Nov 2010 01:22:31 +0000 Subject: [issue10421] Failed issue tracker submission In-Reply-To: <20101114233044.91B391DB89@psf.upfronthosting.co.za> Message-ID: <1289784151.71.0.129595260971.issue10421@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: -admin resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 02:22:39 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 15 Nov 2010 01:22:39 +0000 Subject: [issue10421] Failed issue tracker submission In-Reply-To: <20101114233044.91B391DB89@psf.upfronthosting.co.za> Message-ID: <1289784159.11.0.265783438214.issue10421@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file19609/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 02:38:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 15 Nov 2010 01:38:16 +0000 Subject: [issue2571] cmd.py always uses raw_input, even when another stdin is specified In-Reply-To: <1207594702.67.0.73869549091.issue2571@psf.upfronthosting.co.za> Message-ID: <1289785096.02.0.796830657843.issue2571@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- status: closed -> open type: -> feature request versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 02:51:51 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 15 Nov 2010 01:51:51 +0000 Subject: [issue7140] imp.new_module does not function correctly if the module is returned from a function and used directly In-Reply-To: <1255605892.23.0.543488610886.issue7140@psf.upfronthosting.co.za> Message-ID: <1289785911.1.0.778682971569.issue7140@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: But there were r85393 (2.7) and r85394 (3.1). ---------- nosy: +Arfrever versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 05:04:36 2010 From: report at bugs.python.org (Jessica McKellar) Date: Mon, 15 Nov 2010 04:04:36 +0000 Subject: [issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified In-Reply-To: <1258226856.45.0.72736645389.issue7325@psf.upfronthosting.co.za> Message-ID: <1289793876.46.0.757680234219.issue7325@psf.upfronthosting.co.za> Jessica McKellar added the comment: Thomas, I think the weirdness you were sensing when trying to adapt the nameCheck calls in test__RandomNameSequence after adding the abspath check is that those test cases really don't need nameCheck. For example, test_get_six_char_str should be testing that _RandomNameSequence returns something that is both a string and 6 characters, not properties of some path manufactured around it. I've attached a patch based on Thomas's that factors out the string check in nameCheck and has the tests in test__RandomNameSequence just use the string check. The patch is against release27-maint. ---------- nosy: +jesstess title: tempfile.mkdtemp() does not return absolute pathname when dir is specified -> tempfile.mkdtemp() does not return absolute pathname when relative dir is specified Added file: http://bugs.python.org/file19610/issue7325.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 08:16:02 2010 From: report at bugs.python.org (=?utf-8?q?Hagen_F=C3=BCrstenau?=) Date: Mon, 15 Nov 2010 07:16:02 +0000 Subject: [issue9561] distutils: set encoding to utf-8 for input and output files In-Reply-To: <1281462699.26.0.0348702049008.issue9561@psf.upfronthosting.co.za> Message-ID: <1289805362.44.0.0987249033755.issue9561@psf.upfronthosting.co.za> Hagen F?rstenau added the comment: Created issue 10419 for the encoding problem in "build_scripts". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 09:13:31 2010 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Mon, 15 Nov 2010 08:13:31 +0000 Subject: [issue10419] distutils command build_scripts fails with UnicodeDecodeError In-Reply-To: <1289766753.91.0.865805184241.issue10419@psf.upfronthosting.co.za> Message-ID: <1289808811.24.0.987765642258.issue10419@psf.upfronthosting.co.za> Changes by Micha? G?rny : ---------- nosy: +mgorny _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 09:42:30 2010 From: report at bugs.python.org (Stephane Ruchet) Date: Mon, 15 Nov 2010 08:42:30 +0000 Subject: [issue10422] pstats.py : error when loading multiple stats files In-Reply-To: <1289810550.6.0.241071976053.issue10422@psf.upfronthosting.co.za> Message-ID: <1289810550.6.0.241071976053.issue10422@psf.upfronthosting.co.za> New submission from Stephane Ruchet : When using pstats constructor with multiple files, the add_callers method fails. Actually, add_callers need to add values of tuples, but it uses the "+" operator, that appends tuples. I submit the fix (pstats.py.fix file) and the old one (pstats.py.bug.2.5) ---------- components: Library (Lib) files: pstats.zip messages: 121216 nosy: sruchet priority: normal severity: normal status: open title: pstats.py : error when loading multiple stats files type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file19611/pstats.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 09:49:18 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Nov 2010 08:49:18 +0000 Subject: [issue10422] pstats.py : error when loading multiple stats files In-Reply-To: <1289810550.6.0.241071976053.issue10422@psf.upfronthosting.co.za> Message-ID: <1289810958.24.0.784331027804.issue10422@psf.upfronthosting.co.za> Ezio Melotti added the comment: This bug should already be fixed in Python 2.6 and 2.7 (see #7372) and 2.5 now accepts only security fixes. I suggest you to upgrade to a newer version of Python. (BTW, thanks for the report and the patch, but it's usually better to avoid zip files and prefer plain diff files) ---------- nosy: +ezio.melotti resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 09:59:24 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Mon, 15 Nov 2010 08:59:24 +0000 Subject: [issue10350] errno is read too late In-Reply-To: <1289590332.36.0.347389142952.issue10350@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: Terry J. Reedy writes: > There is one relocation of memory freeing Modules/timemodule.c does '#if,if(..errno..)' after PyMem_Free(outbuf), which can overwrite the desired errno. Instead of reading errno into a temporary, I moved the free into both branches taken by the #if,if(). > and the additions of > + if (res >= 0) > + break; > which I cannot evaluate. errno is only needed after an error., so I moved 'res < 0' out of the 'while'. if (res == MP_EXCEPTION_HAS_BEEN_SET) break; } while (res < 0 && errno == EINTR && !PyErr_CheckSignals()); --> if (res == MP_EXCEPTION_HAS_BEEN_SET) break; if (! (res < 0)) break; } while (errno == EINTR && !PyErr_CheckSignals()); --> if (res >= 0) break; err = errno; if (res == MP_EXCEPTION_HAS_BEEN_SET) break; } while (err == EINTR && !PyErr_CheckSignals()); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 11:30:35 2010 From: report at bugs.python.org (Steven Bethard) Date: Mon, 15 Nov 2010 10:30:35 +0000 Subject: [issue10423] s/args/options in arpgarse "Upgrading optparse code" In-Reply-To: <1289817035.63.0.362408496183.issue10423@psf.upfronthosting.co.za> Message-ID: <1289817035.63.0.362408496183.issue10423@psf.upfronthosting.co.za> New submission from Steven Bethard : >From a personal email: ---------------------------------------------------------------------- I'm not signed up for all the Python issue tracking stuff, but thought I'd let you know about a problem with the argparse doc page: http://docs.python.org/library/argparse.html It says at the end: Replace options, args = parser.parse_args() with args = parser.parse_args() and add additional ArgumentParser.add_argument() calls for the positional arguments. But I think it should be options = parser.parse_args(), not args. ---------------------------------------------------------------------- They're not options, so I don't like encouraging people to continue to call them options, but the docs should at least make clear that the namespace object that used to be called "options" is now called "args". ---------- assignee: docs at python components: Documentation messages: 121219 nosy: bethard, docs at python priority: normal severity: normal stage: needs patch status: open title: s/args/options in arpgarse "Upgrading optparse code" versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 11:38:44 2010 From: report at bugs.python.org (Steven Bethard) Date: Mon, 15 Nov 2010 10:38:44 +0000 Subject: [issue10424] better error message from argparse when positionals missing In-Reply-To: <1289817524.15.0.471223912613.issue10424@psf.upfronthosting.co.za> Message-ID: <1289817524.15.0.471223912613.issue10424@psf.upfronthosting.co.za> New submission from Steven Bethard : >From a private email in respect to the following class of error messages: >>> parser = argparse.ArgumentParser(prog='PROG') >>> parser.add_argument('--foo') >>> parser.add_argument('--bar') >>> parser.add_argument('ham') >>> parser.add_argument('spam', nargs='+') >>> parser.parse_args(['HAM']) usage: PROG [-h] [--foo FOO] [--bar BAR] ham spam [spam ...] PROG: error: too few arguments ---------------------------------------------------------------------- One suggestion would be that when it displays the error "too few arguments", it would nice if it said something about the argument(s) that are missing. I modified argparse's error message when there are too few arguments. I didn't examine the code a lot, so there might be cases where this doesn't work, but here's what I did: if positionals: self.error(_('too few arguments: %s is required' % positionals[0].dest)) ---------------------------------------------------------------------- This would be a nice feature - I haven't checked if the suggested approach works in general though. ---------- components: Library (Lib) messages: 121220 nosy: bethard priority: normal severity: normal stage: needs patch status: open title: better error message from argparse when positionals missing versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 12:17:03 2010 From: report at bugs.python.org (Palm Kevin) Date: Mon, 15 Nov 2010 11:17:03 +0000 Subject: [issue1326113] Letting "build_ext --libraries" take more than one lib Message-ID: <1289819823.22.0.648639065195.issue1326113@psf.upfronthosting.co.za> Palm Kevin added the comment: This one is really annoying. Could you please consider fixing this one for the next release? (=lightweight change) ---------- nosy: +palm.kevin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 12:31:13 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 15 Nov 2010 11:31:13 +0000 Subject: [issue1520831] urrlib2 max_redirections=0 disables redirects Message-ID: <1289820673.04.0.862907524646.issue1520831@psf.upfronthosting.co.za> Senthil Kumaran added the comment: John, I was trying to find out what does rfc say on "Client Ignoring the 30X REDIRECT headers". There is no point made on Client's trying to ignore it, instead it said that it should follow the Redirect and must not endlessly loop. Setting max_redirect to 0 is similar to ignoring the redirect request , which I found to be a bad idea under any case. Also, if one has to just see redirect urls coming from http server, it can be done by subclassing the HTTPRedirectHandler and logging the redirects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 12:37:39 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 15 Nov 2010 11:37:39 +0000 Subject: [issue1326113] Letting "build_ext --libraries" take more than one lib Message-ID: <1289821059.89.0.0912313497907.issue1326113@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Distutils is frozen and we fix only bugs. This case is a little bit at the edge. Can you show us an example of a call you are trying to make, and the gcc command line output that fails ? I want to see if we can find a workaround. If so, this will be changed only in Distutils2. If not I'll change this to a bug and we'll fix it in distutils too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 13:27:17 2010 From: report at bugs.python.org (=?utf-8?q?Adam_Biela=C5=84ski?=) Date: Mon, 15 Nov 2010 12:27:17 +0000 Subject: [issue10425] xmlrpclib support for None isn't compliant with XMLRPC In-Reply-To: <1289824037.0.0.671749345837.issue10425@psf.upfronthosting.co.za> Message-ID: <1289824037.0.0.671749345837.issue10425@psf.upfronthosting.co.za> New submission from Adam Biela?ski : XMLRPC standard doesn't support None/nil/null values. Element `` was added as an extension to original protocol. Currently sending None object through xmlrpclib produces `` string. This causes parsing errors in more sophisticated XMLRPC parsers (like org.apache.xmlrpc for Java) which require `` element to be declared in namespace for extensions: xmlns:ex='http://ws.apache.org/xmlrpc/namespaces/extensions' Attached patch makes xmlrpclib use that namespace for sending None values both in method calls and responses, so None value might be passed both ways. It isn't bound to use fixed prefix for extensions namespace and it also parses XML produced by original xmlrpclib (without any namespace at all), so it is backward compatible. It does its job communicating with org.apache.xmlrpc library now, using default parser on the Python side which is an improvement to original version, so I'd like to see it included in the next Python 2.x release, if possible. ---------- components: Library (Lib), XML files: xmlrpclib.diff keywords: patch messages: 121224 nosy: Adam.Biela?ski priority: normal severity: normal status: open title: xmlrpclib support for None isn't compliant with XMLRPC type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file19612/xmlrpclib.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 13:31:28 2010 From: report at bugs.python.org (Palm Kevin) Date: Mon, 15 Nov 2010 12:31:28 +0000 Subject: [issue1326113] Letting "build_ext --libraries" take more than one lib Message-ID: <1289824288.81.0.180576538796.issue1326113@psf.upfronthosting.co.za> Palm Kevin added the comment: I applied the patch proposed by slanger. This one is working. Now, I'm executing this instruction to build my extension: "%pythonRoot%\python.exe" setup.py build_ext --include-dirs "C:\MyApp\include" --library-dir "C:\MyApp\lib" --libraries "myLib1 myLib2" If I don't use the patch, then the error I get is 'unresolved external symbol _xxx referenced in function _abc'. Which is quite normal since I can only point to one library... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 13:59:40 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 15 Nov 2010 12:59:40 +0000 Subject: [issue10425] xmlrpclib support for None isn't compliant with XMLRPC In-Reply-To: <1289824037.0.0.671749345837.issue10425@psf.upfronthosting.co.za> Message-ID: <1289825980.91.0.748205106155.issue10425@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 14:53:46 2010 From: report at bugs.python.org (Joshua Purcell) Date: Mon, 15 Nov 2010 13:53:46 +0000 Subject: [issue6941] Socket error when launching IDLE In-Reply-To: <1253304050.64.0.637575348166.issue6941@psf.upfronthosting.co.za> Message-ID: <1289829226.57.0.848539961487.issue6941@psf.upfronthosting.co.za> Joshua Purcell added the comment: Sorry I've not replied to anyones thoughts until now but nothing seems to fix it ---------- components: +Windows -IDLE resolution: works for me -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:06:58 2010 From: report at bugs.python.org (Joshua Purcell) Date: Mon, 15 Nov 2010 14:06:58 +0000 Subject: [issue10426] The whole thing is NOT good In-Reply-To: <1289830018.45.0.962254835691.issue10426@psf.upfronthosting.co.za> Message-ID: <1289830018.45.0.962254835691.issue10426@psf.upfronthosting.co.za> New submission from Joshua Purcell : There is a complete FAIL in this versionand all other versions like 3.* THEY ALL FREEZE UP MY SYSTEM (Windows) HELP ---------- components: Windows messages: 121227 nosy: 08jpurcell priority: normal severity: normal status: open title: The whole thing is NOT good type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:11:06 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 15 Nov 2010 14:11:06 +0000 Subject: [issue10426] The whole thing is NOT good In-Reply-To: <1289830018.45.0.962254835691.issue10426@psf.upfronthosting.co.za> Message-ID: <1289830266.12.0.213365277464.issue10426@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:17:55 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Nov 2010 14:17:55 +0000 Subject: [issue10426] The whole thing is NOT good In-Reply-To: <1289830018.45.0.962254835691.issue10426@psf.upfronthosting.co.za> Message-ID: <1289830675.89.0.856219113.issue10426@psf.upfronthosting.co.za> Ezio Melotti added the comment: I'm closing this until you can provide more details about the problem you have. What version of Python have you used? (The one you selected (3.3) doesn't exist yet.) Are you sure that the problem is related to Python and not to Windows? If it is, how did you determine it? Is Python or Windows giving you any specific error? ---------- nosy: +ezio.melotti stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:23:46 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 15 Nov 2010 14:23:46 +0000 Subject: [issue7186] Document specialness of __doc__, and possibly other "special" attributes In-Reply-To: <1256240855.61.0.550470965616.issue7186@psf.upfronthosting.co.za> Message-ID: <1289831026.96.0.451424652126.issue7186@psf.upfronthosting.co.za> R. David Murray added the comment: No, because that patch doesn't document the special inheritance rules for __doc__ (which are uniquely special even among special methods). Now, exactly where one would want to document those rules, I'm not sure. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:38:00 2010 From: report at bugs.python.org (ingo janssen) Date: Mon, 15 Nov 2010 14:38:00 +0000 Subject: [issue10427] 24:00 Hour in DateTime In-Reply-To: <1289831880.43.0.381934582888.issue10427@psf.upfronthosting.co.za> Message-ID: <1289831880.43.0.381934582888.issue10427@psf.upfronthosting.co.za> New submission from ingo janssen : Short: make the DateTime class and related also accept 24 for the hour instead of stopping at 23:59:59. from the python doc: "class datetime.datetime(year, month, day[, hour[, minute[, second[, microsecond[, tzinfo]]]]]) The year, month and day arguments are required. tzinfo may be None, or an instance of a tzinfo subclass. The remaining arguments may be ints or longs, in the following ranges: [...] 0 <= hour < 24 [...] If an argument outside those ranges is given, ValueError is raised." from http://en.wikipedia.org/wiki/ISO_8601 : "ISO 8601 uses the 24-hour clock system. The basic format is [hh][mm][ss] and the extended format is [hh]:[mm]:[ss]. * [hh] refers to a zero-padded hour between 00 and 24 (where 24 is only used to notate midnight at the end of a calendar day). [...] Midnight is a special case and can be referred to as both "00:00" and "24:00". The notation "00:00" is used at the beginning of a calendar day and is the more frequently used. At the end of a day use "24:00". Note that "2007-04-05T24:00" is the same instant as "2007-04-06T00:00" (see Combined date and time representations below)." The use of 24:00 is very comfortable when using hourly datasets, the first set of a day is saved under 1:00, the fifth (4:00 to 5:00) under 5:00 and the last (23:00 - 24:00) under 24:00. No need to suddenly use 23:59:59 or 0:00 the next day. Actually in another part of Python SQLlite's date and time functions accept and outputs the 24:00. Adding some Python to an existing database made me aware of the problem. ---------- messages: 121230 nosy: ingo.janssen priority: normal severity: normal status: open title: 24:00 Hour in DateTime type: feature request versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:39:12 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Nov 2010 14:39:12 +0000 Subject: [issue10260] Add a threading.Condition.wait_for() method In-Reply-To: <1289701235.85.0.963473343851.issue10260@psf.upfronthosting.co.za> Message-ID: <1289831942.3553.2.camel@localhost.localdomain> Antoine Pitrou added the comment: > Good point, Antoine. I'm always trying to keep those timeouts low, > however, to avoid having the testsuite duration grow too much with > every test :) Well, better to have slower tests than intermittently failing ones, I say. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:41:30 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Nov 2010 14:41:30 +0000 Subject: [issue10427] 24:00 Hour in DateTime In-Reply-To: <1289831880.43.0.381934582888.issue10427@psf.upfronthosting.co.za> Message-ID: <1289832090.57.0.90612828552.issue10427@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Library (Lib) nosy: +belopolsky, ezio.melotti versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:51:07 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Mon, 15 Nov 2010 14:51:07 +0000 Subject: [issue10070] 2to3 wishes for already-2to3'ed files In-Reply-To: <4CDDD907.4030906@v.loewis.de> Message-ID: Hallvard B Furuseth added the comment: Martin v. L?wis writes: > As this code is in a Python 2.x block: why does this change cause > problems to you? You are supposed to run the 2to3 result in Python 3, > and this conversion result will run correctly in Python 3. As I've explained, and as the if-statement and the associated comment expresses, that piece of code is intended to work with both Python 2 and 3. 2to3 turns it into code which would break on Python 2. I've explained why I'd run 2to3 on such code, and thus why it'd be convenient if I could ask 2to3 to leave such code alone. So I requested this feature. I don't know exactly how I'm "supposed" to use 2to3. If you are its inventor, you do. Otherwise it may also be supposed to suit other workflows than yours. > Ok, I can propose two different spellings of this without any > macro processor: (...) Both your examples fit my request perfectly. Pieces of code which I presume are correct for both Python 2 and 3, and 2to3 break them for both Python versions. With "my" feature, the code would keep working with both. However, it is true that there are other cases where I'd like to shut up 2to3 but where my suggested solution would not be convenient to use. I am after all requesting a mere convenience feature, and aimed for something I hoped would be a simple matter to implement. I never imagined that merely explaining it would grow into such a discussion. Bobby, thanks for the sa2to3 reference. Doesn't quite do what I wanted, but looks useful and might also be a good starting point for what I did ask for. Hopefully I won't need to understand too much 2to3 code first... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:53:17 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Nov 2010 14:53:17 +0000 Subject: [issue7186] Document specialness of __doc__, and possibly other "special" attributes In-Reply-To: <1256240855.61.0.550470965616.issue7186@psf.upfronthosting.co.za> Message-ID: <1289832797.82.0.739261215348.issue7186@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:57:42 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Mon, 15 Nov 2010 14:57:42 +0000 Subject: [issue10070] 2to3 wishes for already-2to3'ed files In-Reply-To: Message-ID: Hallvard B Furuseth added the comment: Hallvard B Furuseth writes: >Martin v. L?wis writes: >> Ok, I can propose two different spellings of this without any >> macro processor: (...) > > Both your examples fit my request perfectly. Pieces of code which I > presume are correct for both Python 2 and 3, (...) Sorry, ignore that. I "saw" you doing what I would be doing, not what you were doing... Not example A. And Example B looks (to me) like it is intended to work unmodified for both Python 2 and 3, but doesn't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 16:24:34 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 15 Nov 2010 15:24:34 +0000 Subject: [issue10427] 24:00 Hour in DateTime In-Reply-To: <1289831880.43.0.381934582888.issue10427@psf.upfronthosting.co.za> Message-ID: <1289834674.31.0.433282212685.issue10427@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: +1 Note that in Python, semi-open intervals are favored, but specifying the last hour of the day is awkward when using datetime (as OP mentioned) and impossible using just time. Using closed intervals is not a good work-around in many cases because it requires the user to be explicit about precision: is the last hour [23:00-23:59], [23:00:00-23:59:00], or [23:00:00.999999-23:59:00.999999]? I offer to write the patch for the C implementation if someone comes up with a patch for datetime.py including tests. ---------- assignee: -> belopolsky components: +Extension Modules stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 16:43:37 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Mon, 15 Nov 2010 15:43:37 +0000 Subject: [issue10070] 2to3 wishes for already-2to3'ed files In-Reply-To: <1289567756.65.0.0739373793952.issue10070@psf.upfronthosting.co.za> Message-ID: Hallvard B Furuseth added the comment: ?ric Araujo writes: > I think 2to3 is designed to take 2.x code and turn it into 3.x code. > Codebases using tricks and hacks to support both 2.x and 3.x (like the > example you linked to) cannot be handled by 2to3. That's fair enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 17:26:23 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Nov 2010 16:26:23 +0000 Subject: [issue1326113] Letting "build_ext --libraries" take more than one lib Message-ID: <1289838383.16.0.390536887512.issue1326113@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Since "--libraries" is plural, and since the help text says: --libraries (-l) external C libraries to link with it should IMO be considered a bug. (Standard UNIX linkers have a different convention: you can specify -l several times in order to link against several libraries; however, distutils seems to ignore all but the last -l option) ---------- nosy: +eric.araujo, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 18:55:03 2010 From: report at bugs.python.org (Ron Adam) Date: Mon, 15 Nov 2010 17:55:03 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1289843703.32.0.336880844024.issue2001@psf.upfronthosting.co.za> Ron Adam added the comment: This should be done or very close to done. The -g option, gui(), and serve() functions are deprecated. The new features are browse(port, *, open_browser=True), and a '-b' option. The '-p port' option does browse(port=port, open_browser=False), so _startserver() does not need to be part of the API. If anyone wants to access the server directly, then we can discuss making it it's own module, or a submodule in a package. Because we deprecated the gui() function, I figured we need to make browse() public. The only reason it would need to be private is if we want a different name or signature. (Any thoughts?) I left Lib/urllib/parse.py, Lib/test/test_pyclbr.py, and Lib/test/test_urlparse.py alone. I presumed you fixed bugs in them that needed to be fixed anyway. ---------- Added file: http://bugs.python.org/file19613/issue2001_b.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 18:55:28 2010 From: report at bugs.python.org (Ron Adam) Date: Mon, 15 Nov 2010 17:55:28 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1289843728.97.0.995504516627.issue2001@psf.upfronthosting.co.za> Changes by Ron Adam : Removed file: http://bugs.python.org/file19604/issue2001_a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 18:55:47 2010 From: report at bugs.python.org (Ron Adam) Date: Mon, 15 Nov 2010 17:55:47 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1289843747.54.0.92448448795.issue2001@psf.upfronthosting.co.za> Changes by Ron Adam : Removed file: http://bugs.python.org/file19476/pydoc_r86133.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 19:24:46 2010 From: report at bugs.python.org (Pascal Chambon) Date: Mon, 15 Nov 2010 18:24:46 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1289845486.02.0.702888943634.issue1553375@psf.upfronthosting.co.za> Pascal Chambon added the comment: I dont understand, if we use traceback.print_stack(), it's the stack at the exception handling point which will be displayed. In my view, the interesting think was not the stack trace at the point where the exception is being handled, but where the unwinding stopped (i.e, a snapshot of the stack at the moment the exception was caught). I agree that most of the time these stacks are quite close, but if you happen to move the traceback object all around, in misc. treatment functions (or even, if it has been returned by functions to their caller - let's be fool), it can be handy to still be able to output a full exception stack, like if the exception had flowed up to the root of the program. At least that's what'd interest me for debugging. try: myfunction() #<- that's the point of which I'd likle a stack trace except Exception, e: handle_my_exception(e) #<- not of that point, some recursion levels deeper Am I the only one viewing it as this ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 19:54:26 2010 From: report at bugs.python.org (David Fraser) Date: Mon, 15 Nov 2010 18:54:26 +0000 Subject: [issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error In-Reply-To: <1275332485.24.0.0853481149333.issue8863@psf.upfronthosting.co.za> Message-ID: <1289847266.36.0.555302972896.issue8863@psf.upfronthosting.co.za> Changes by David Fraser : ---------- nosy: +davidfraser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 20:23:28 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 15 Nov 2010 19:23:28 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1289849008.33.0.821361016909.issue1553375@psf.upfronthosting.co.za> R. David Murray added the comment: I agree with you, Pascal, but I think Nick is saying that that information is not actually available. I don't fully understand why, but he knows vastly more about Python internals than I do so I'll take his word for it. It might be interesting to try saving the traceback and printing out the allframes traceback elsewhere, since that should prove to you and I that it doesn't work :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 21:49:51 2010 From: report at bugs.python.org (Eli) Date: Mon, 15 Nov 2010 20:49:51 +0000 Subject: [issue10428] IDLE Trouble shooting In-Reply-To: <1289854191.01.0.577719650425.issue10428@psf.upfronthosting.co.za> Message-ID: <1289854191.01.0.577719650425.issue10428@psf.upfronthosting.co.za> New submission from Eli : I am having trouble with python. I use python 2.5.1, and have windows 7. I used to be able to use IDLE, but now it says its opening and it never does. I also could use recovery to fix it. but that does not work now. Any Ideas? ---------- components: Windows messages: 121240 nosy: creat0r priority: normal severity: normal status: open title: IDLE Trouble shooting versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 21:55:31 2010 From: report at bugs.python.org (John J Lee) Date: Mon, 15 Nov 2010 20:55:31 +0000 Subject: [issue1520831] urrlib2 max_redirections=0 disables redirects Message-ID: <1289854531.87.0.504179043601.issue1520831@psf.upfronthosting.co.za> John J Lee added the comment: That's silly. A justification of the need for a new feature isn't needed, because this is already-implemented feature that simply does the wrong thing at the edge case. It's not high priority, but it is a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 22:00:01 2010 From: report at bugs.python.org (Roumen Petrov) Date: Mon, 15 Nov 2010 21:00:01 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1289667415.01.0.560899036562.issue3871@psf.upfronthosting.co.za> Message-ID: <4CE19F4B.2010408@roumenpetrov.info> Roumen Petrov added the comment: But different build system make new plaform ! Roumen ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 22:09:16 2010 From: report at bugs.python.org (Ralf Schmitt) Date: Mon, 15 Nov 2010 21:09:16 +0000 Subject: [issue10319] SocketServer.TCPServer truncates responses on close (in some situations) In-Reply-To: <1288935519.72.0.951711716225.issue10319@psf.upfronthosting.co.za> Message-ID: <1289855356.19.0.00906818201032.issue10319@psf.upfronthosting.co.za> Changes by Ralf Schmitt : ---------- nosy: +schmir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 22:10:13 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 15 Nov 2010 21:10:13 +0000 Subject: [issue10428] IDLE Trouble shooting In-Reply-To: <1289854191.01.0.577719650425.issue10428@psf.upfronthosting.co.za> Message-ID: <1289855413.04.0.485270856855.issue10428@psf.upfronthosting.co.za> R. David Murray added the comment: I would recommend posting to the python mailing list (see mail.python.org for a list of the mailing lists and subscribe to python-list). The bug tracker isn't a place to get help, but you might also try searching for windows idle bugs, since as I recall there are closed bugs that have some debugging suggestions in them. ---------- nosy: +r.david.murray resolution: -> works for me stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 22:14:28 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 15 Nov 2010 21:14:28 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289855668.24.0.389070144499.issue3871@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > But different build system make new plaform! Maybe, but not a new "sys.platform". VC6 and VS9.0 don't share any project file for the compilation; but they both build a sys.platform=='win32'. Distutils has to use another way to make the difference and choose the right compiler (in distutils.mscvcompiler.get_build_version()) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 23:36:18 2010 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Mon, 15 Nov 2010 22:36:18 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289860578.73.0.0243873714355.issue3871@psf.upfronthosting.co.za> Luke Kenneth Casson Leighton added the comment: > I disagree; i would say that you're entitled to disagree, but i have to point out that unless you've actually been through the process of trying to port python to mingw32 you're not really in a position of ... how can i put this best... you're entitled to say "i disagree" but that doesn't actually carry any weight. if you said "i've tried compiling this patch, and i looked at it and i disagreed with the decision to create a new platform, so i removed that code, here's an updated patch, i found it to work absolutely fine" THEN i would say that you are in a position of authority to "disagree". so - question: have you actually _tried_ compiling python with mingw32, with the latest patch? > programs compiled with mingw32 run on Windows, and use the MSVC > runtime. they do indeed. this however has absolutely no relevance. > It's the same platform as the current win32 build. > It's even possible to use mingw32 to compile extensions > for the VS9.0 based python.exe. it is indeed. the patch that i did allowed you to specify a gcc spec file which did exactly that: i added options to compile not only extensions but also the entire python.exe to use a different MSVCRT runtime. _and_ it did assemblies, too. > A different compiler does not make a new platform. ok. unfortunately, as the work that i did was well over a year ago, i'm going from memory - but basically, i'm very very sorry to have to point out that you don't know what you're talking about, here. let me try and go through it. look at the platform detection code: it parses the gcc version string. it goes "if compiler has string gcc but also has win32 then it must be cygwin platform". otherwise it goes "this must be MSVC win32 platform". this _simply_ doesn't work, hence the need to do further detection, hence the need to have a separate compiler type. ... but it doesn't end there: there are subtle differences between MSVC win32 and MINGW32 win32 (differences in the build .lib files that specify what functions are available in the DLLs. mingw32 is a reverse-engineering project, remember?) to be honest i can't remember if i actually set sys.platform to mingw32 - but the more time i spent getting more and more modules to compile, the more blindingly obvious it was that a new platform type was needed. i encountered dozens of assumptions that "if sys.platform == 'win32' then you MUST be building using visual studio: f*** off with your attempt to compile this module using gcc". over the eight to ten week period in which i focussed on this non-stop for about 13 hours a day, the list just went on and on of discrepancies that had to be solved, and if i _hadn't_ set a new platform type, it would have been necessary to add extra tests instead: "if sys.platform == 'win32' and not {something to detect mingw32}": mingw32 _really_ does fall between both worlds: not just the compiler type is different, but there are even features and functions _missing_ from mingw32 that are present in MSVC. i had to work with roumen to get patches to mingw32 upstream in some cases! so please _do_ stop putting road-blocks in the way. this is a complex enough project, having to fit half way between two disparate worlds, without it being stymied by "disagreement" when you haven't _actually_ tried compiling this code (if you have, i apologise). btw if you'd like to try compiling it, but are adamant about staying away from proprietary operating systems, i _did_ manage to get python 2.5 and 2.6 cross-compiled to run under wine. ironically there were long-standing bugs in wine that ended up getting fixed as a result of running the 25,000 python unit tests, but that's another story... :) l. p.s. msys runs under wine as well, but the configure stage takes well over an hour. the patch i created cut out most of configure and replaced it with a pcconfig.h just like win32, which i had to create by hand. this was quicker than waiting for configure to run. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 23:43:13 2010 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Mon, 15 Nov 2010 22:43:13 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289860993.83.0.0975682127817.issue3871@psf.upfronthosting.co.za> Luke Kenneth Casson Leighton added the comment: perhaps, amaury, you might like to, instead of saying "i disagree", you might like instead to say something like this: "that sounds... interesting, and a little scary - creating an entirely new platform! are you absolutely sure it's necessary?? could you please perhaps elaborate and give a good justification behind why that decision was taken?" you see how radically different that is? on the one hand you're telling three volunteers who have spent considerable time and resources - unpaid - on improving python's reach that they are, to put it bluntly, complete ignorant f*****g morons, and on the other you're engaging with them, encouraging them, and generally trusting them. i'm really sorry: i really don't like having to be the one to point these kinds of things out, but... you see what i'm saying? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 23:54:15 2010 From: report at bugs.python.org (Roumen Petrov) Date: Mon, 15 Nov 2010 22:54:15 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1289855668.24.0.389070144499.issue3871@psf.upfronthosting.co.za> Message-ID: <4CE1BA12.1040209@roumenpetrov.info> Roumen Petrov added the comment: No it is win32 for the resulting binaries. Idea is following (issue3754) . Travial patch - move method get_platform global _get_platform and variable host_platform is initialized to its return value. Then replace all calls of sys.platform and get_platform() to use host_platform. In the patch for this issue _get_platform is modiffed to return mingw32 if .... so host_platform will be 'minwg32'. Including compiler and etc. don't work well in cross-compilation environment as the build script is run with python from build system. Roumen ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 23:57:02 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 15 Nov 2010 22:57:02 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1289861822.5.0.265614938739.issue9807@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Matthias, you mean $prefix/lib/python3.2 and $prefix/lib/python3.2$abiflags, right? The latter has just a config directory, and you'd rather see that become $prefix/lib/python3.2/config-$abiflags, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 00:01:59 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 15 Nov 2010 23:01:59 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1289862119.06.0.849812784977.issue9807@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Matthias, When you say the python.pc change should change includedir instead of Cflags, that seems weird. includedir does not currently include the 'pythonX.Y' subdirectory so there's no place to put the abiflags. Or are you suggesting that we move the pythonX.Y subdir to includedir and remove it from Cflags? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 00:02:25 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 15 Nov 2010 23:02:25 +0000 Subject: [issue10262] Add --disable-abi-flags option to `configure` In-Reply-To: <1288526843.14.0.55690735161.issue10262@psf.upfronthosting.co.za> Message-ID: <1289862145.52.0.309173019259.issue10262@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: -> barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 00:23:51 2010 From: report at bugs.python.org (G2P) Date: Mon, 15 Nov 2010 23:23:51 +0000 Subject: [issue9253] argparse: optional subparsers In-Reply-To: <1279056589.03.0.566167994161.issue9253@psf.upfronthosting.co.za> Message-ID: <1289863431.63.0.271177942267.issue9253@psf.upfronthosting.co.za> G2P added the comment: Trying to spec this, here is a proposed API: parser = argparse.ArgumentParser() sub = parser.add_subparsers(default='show') sub_show = sub.add_parser('show') sub_add = sub.add_parser('add') If default isn't passed, the subcommand isn't optional. If default is passed, and no explicit subcommand is given, the default subcommand is picked. Arguments are given to the top parser; passing arguments to the subcommand requires naming it explicitly. As far as motivation, I'd like to change a program that uses --choice options (that can have a default) to use more expressive subcommands. Some programs rely on implicit subcommands a lot; the ip command on linux is a good example. ---------- nosy: +G2P _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 00:36:34 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 15 Nov 2010 23:36:34 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1289864194.42.0.305417278767.issue3871@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Luke, Please please! Don't make me say what I did not say. I just said "I disagree", without any bad word. This may have been a bit terse, but I don't consider the issue tracker as a place to express one's feelings; hey, other core developers could have written "-1" instead. I'm not trying to block this development, on the contrary, I'm getting interested in it so that we can merge it into CPython development tree. I'm here to help. Really. I did try to port python to the mingw32 compiler some years ago, and in the proposed patch I retrieve some of the changes I did at the time. IIRC I gave up because there were issues with the localtime function, and because of differences in the sprintf format. I'm glad that you found how to solve them. FYI, I'm also the maintainer of pypy on Windows, and we support both MSVC (8, 9, 10) and mingw32. > i encountered dozens of assumptions that "if sys.platform == 'win32' > then you MUST be building using visual studio: f*** off with your > attempt to compile this module using gcc". There are not so many of them in distutils. Did you see them in third-party packages? Code like this is wrong and should be changed, just like "#ifdef MS_WINDOWS" (=the platform) is not equivalent to "#ifdef _MSC_VER" (=the compiler) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 00:57:57 2010 From: report at bugs.python.org (Matthias Klose) Date: Mon, 15 Nov 2010 23:57:57 +0000 Subject: [issue10262] Add --disable-abi-flags option to `configure` In-Reply-To: <1288526843.14.0.55690735161.issue10262@psf.upfronthosting.co.za> Message-ID: <1289865477.14.0.958851993059.issue10262@psf.upfronthosting.co.za> Matthias Klose added the comment: I think this is not a good idea, because then you have different names for extension modules, which will be recognized by one configuration but not the other. This configure option should not change the sonames. If this option is to keep pathes like /usr/local/include/python3.2 (instead of /usr/local/include/python3.2mu) or /usr/local/lib/python3.2/config (instead of /usr/local/lib/python3.2mu/config), then fine with me. Although in this case we should make sure that these pathes are available in the sysconfig module. ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 00:59:16 2010 From: report at bugs.python.org (Matthias Klose) Date: Mon, 15 Nov 2010 23:59:16 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1289861822.5.0.265614938739.issue9807@psf.upfronthosting.co.za> Message-ID: <4CE1C94F.1050708@debian.org> Matthias Klose added the comment: On 15.11.2010 23:57, Barry A. Warsaw wrote: > you mean $prefix/lib/python3.2 and $prefix/lib/python3.2$abiflags, right? The latter has just a config directory, and you'd rather see that become $prefix/lib/python3.2/config-$abiflags, right? yes. ---------- title: deriving configuration information for different builds with the same prefix -> deriving configuration information for different builds with the same prefix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 01:03:48 2010 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Nov 2010 00:03:48 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1289862119.06.0.849812784977.issue9807@psf.upfronthosting.co.za> Message-ID: <4CE1CA60.2060002@debian.org> Matthias Klose added the comment: On 16.11.2010 00:01, Barry A. Warsaw wrote: > When you say the python.pc change should change includedir instead of Cflags, that seems weird. includedir does not currently include the 'pythonX.Y' subdirectory so there's no place to put the abiflags. Or are you suggesting that we move the pythonX.Y subdir to includedir and remove it from Cflags? sorry, I'm wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 01:09:13 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Nov 2010 00:09:13 +0000 Subject: [issue10429] bug in test_imaplib In-Reply-To: <1289866153.11.0.678652692288.issue10429@psf.upfronthosting.co.za> Message-ID: <1289866153.11.0.678652692288.issue10429@psf.upfronthosting.co.za> New submission from Antoine Pitrou : The following warning suggests the test is wrong: c:\buildslave-py3k\3.x.curtin-win2008-amd64\build\lib\test\test_imaplib.py:231: BytesWarning: Comparison between bytes and string self.assertFalse('LOGINDISABLED' in self.server.capabilities) ---------- assignee: pitrou components: Library (Lib), Tests messages: 121255 nosy: pitrou priority: normal severity: normal stage: needs patch status: open title: bug in test_imaplib type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 01:54:29 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 16 Nov 2010 00:54:29 +0000 Subject: [issue10134] test_email failures on Windows: end of line issue? In-Reply-To: <1287373744.55.0.18095949035.issue10134@psf.upfronthosting.co.za> Message-ID: <1289868869.65.0.997207957027.issue10134@psf.upfronthosting.co.za> Brian Curtin added the comment: > Still not sure why they were not showing up on the buildbots. Victor was working from an svn checkout and I from the binary installer, so it's not just a difference in the svn eol handling. I too had only been seeing this in my checkout, but now that I setup a build slave I brought the bad luck there. http://www.python.org/dev/buildbot/all/builders/AMD64%20Windows%20Server%202008%203.x/builds/0 (nothing new, same failures as haypo uploaded). ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 02:17:33 2010 From: report at bugs.python.org (Jessica McKellar) Date: Tue, 16 Nov 2010 01:17:33 +0000 Subject: [issue2244] urllib and urllib2 decode userinfo multiple times In-Reply-To: <1204819810.33.0.413464262118.issue2244@psf.upfronthosting.co.za> Message-ID: <1289870253.69.0.640491734214.issue2244@psf.upfronthosting.co.za> Jessica McKellar added the comment: I can confirm that the combination of urllib_issue_updated.diff and urllib_ftptests_doubleencode.patch apply cleanly against py3k, that the added tests exercise the described bug, and that the full test suite passes after applying the patches. The patches look clean and conforming to PEP 8. ---------- nosy: +jesstess _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 03:23:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 02:23:25 +0000 Subject: [issue716634] "build_ext" "libraries" subcommand not s Message-ID: <1289874205.85.0.368012224848.issue716634@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: wont fix -> duplicate superseder: -> Letting "build_ext --libraries" take more than one lib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 04:05:07 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 16 Nov 2010 03:05:07 +0000 Subject: [issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows In-Reply-To: <1277827107.42.0.0793977492373.issue9116@psf.upfronthosting.co.za> Message-ID: <1289876707.03.0.182433464537.issue9116@psf.upfronthosting.co.za> Brian Curtin added the comment: The patch works for me. Unfortunately my knowledge on this particular area is very low so I can't really evaluate the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 04:07:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 03:07:16 +0000 Subject: [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1289876836.49.0.0922055529635.issue9312@psf.upfronthosting.co.za> ?ric Araujo added the comment: Can I commit doc patches like this one despite the branch freeze? ---------- assignee: docs at python -> eric.araujo resolution: -> accepted status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 04:08:32 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 03:08:32 +0000 Subject: [issue1326113] Letting "build_ext --libraries" take more than one lib Message-ID: <1289876912.75.0.961338114717.issue1326113@psf.upfronthosting.co.za> ?ric Araujo added the comment: I agree this is a bug: it?s a broken feature, not a new one, even if it can be argued that fixing a long-standing behavior enables new usages, and is thus comparable to a new feature. I found no mention of --libraries in the docs, so I looked at the file history, and it?s clear that the intent of the code does not match its behavior. The fix is simple: - if isinstance(self.libraries, str): - self.libraries = [self.libraries] + self.ensure_string_list('libraries') I guess Greg forgot to change that line of code when he invented the ensure_* methods. No test is broken by this change. Do we need a regression test for this? It?s not strictly required IMO. FTR, in distutils2, I want to make the types and formats clear for everything. For example, build_ext.swig_opts is defined as ?a list? in the current docs, this time with an example that shows it?s space-separated (?--swig-opts="-modern -I../include"?). The code does not use ensure_string_list, and hence does not support comma-separated. IMO, any value described as list should accept space-separated and comma-separated. This is probably out of scope for distutils, but something I definitely want to improve in distutils2. Supporting multiple options (-lm -lfoo) is IMO feasible too. ---------- assignee: tarek -> eric.araujo components: +Distutils2 stage: -> unit test needed type: feature request -> behavior versions: +3rd party, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 04:18:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 03:18:11 +0000 Subject: [issue10427] 24:00 Hour in DateTime In-Reply-To: <1289831880.43.0.381934582888.issue10427@psf.upfronthosting.co.za> Message-ID: <1289877491.71.0.450835155526.issue10427@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 04:27:34 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 03:27:34 +0000 Subject: [issue10425] xmlrpclib support for None isn't compliant with XMLRPC In-Reply-To: <1289824037.0.0.671749345837.issue10425@psf.upfronthosting.co.za> Message-ID: <1289878054.43.0.2346942592.issue10425@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report and patch. You may find the following guidelines useful for your future contributions: http://www.python.org/dev/patches/ I have two questions about the proposed fix. First, this line caught my eye: if tag.split(':')[1] == 'nil': It seems wrong to handle a nil element from any namespace the same way. I think namespaces should be supported properly or not at all. Second point, can you point us to documentation about nil? The Wikipedia article about XML-RPC and http://ontosys.com/xml-rpc/extensions.php agree that nil should not be a child of value, but say nothing about a namespace. If it?s a band-aid for one specific server, I don?t think it?s acceptable. ---------- nosy: +eric.araujo, loewis versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 04:40:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 03:40:52 +0000 Subject: [issue1326113] Letting "build_ext --libraries" take more than one lib Message-ID: <1289878852.7.0.58441172832.issue1326113@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?ve reviewed other modules for the same error and found two candidates: config.libraries, the same thing as build_ext.libraries, and install.extra_path, for which I?m not sure. (More distutils2 thoughts: A number of options are split on os.pathsep, a new ensure_dirs_list method looks in order. Regarding the type system, an angry comment in build_py confirmed the need :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 05:57:47 2010 From: report at bugs.python.org (Jeffrey Finkelstein) Date: Tue, 16 Nov 2010 04:57:47 +0000 Subject: [issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function In-Reply-To: <1289739891.46.0.690681439003.issue10417@psf.upfronthosting.co.za> Message-ID: <1289883467.58.0.897995103194.issue10417@psf.upfronthosting.co.za> Jeffrey Finkelstein added the comment: I am not having this problem on Ubuntu 10.10 with the most recent Python 2.7: $ ./python unicodetest.py --verbose test_unicode_docstring (__main__.UnicodeTest) t?st - docstring with unicode character ... ok ---------------------------------------------------------------------- Ran 1 test in 0.000s OK $ ./python unicodetest.py test_unicode_docstring (__main__.UnicodeTest) t?st - docstring with unicode character ... ok ---------------------------------------------------------------------- Ran 1 test in 0.000s OK ---------- nosy: +jfinkels _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 05:59:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 04:59:52 +0000 Subject: [issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function In-Reply-To: <1289739891.46.0.690681439003.issue10417@psf.upfronthosting.co.za> Message-ID: <1289883592.42.0.533091326593.issue10417@psf.upfronthosting.co.za> ?ric Araujo added the comment: Great, thank you for the update! Closing. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 07:36:45 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 06:36:45 +0000 Subject: [issue8254] write a configure command In-Reply-To: <1269787284.51.0.353047597946.issue8254@psf.upfronthosting.co.za> Message-ID: <1289889405.49.0.0936568400944.issue8254@psf.upfronthosting.co.za> ?ric Araujo added the comment: I have turned my branch into a clean patch for default: https://bitbucket.org/Merwok/distutils2/changeset/076b15559290 Notes: - You can diff configure.py against build.py and install_dist.py from an earlier revision to see what code has been moved where. - Two tests for install_dist still fail, but this could be only the tip of the iceberg. We need more tests there. Installation paths is a tricky business, and we have to make sure configure does not break anything. - I have changed install to install_dist in the code, tests and docs, but only in the part of the docs I added for configure. The rest of the file is inaccurate, but that?s outside the scope of this patch. - Some to-do features: distribute the configure.cache file in the dist-info directory (requires adding a hook system to install_distinfo); add info about the compiler type; probably more. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 07:37:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 06:37:13 +0000 Subject: [issue8254] write a configure command In-Reply-To: <1269787284.51.0.353047597946.issue8254@psf.upfronthosting.co.za> Message-ID: <1289889433.61.0.746292693681.issue8254@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +needs review, patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 07:55:59 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 16 Nov 2010 06:55:59 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1289890559.06.0.44514442899.issue7900@psf.upfronthosting.co.za> Ronald Oussoren added the comment: If anything should be done the test that checks the output of id -G should be removed if we want the buildbot to keep running without problems when you change the buildbots account. After reading the message about the new failures again I don't think this is the OSX issue I mentioned (an which is explain in painfull detail earlier in the message list): it's just that the buildbot account got changed (unintentionally) while buildbot was running. BTW. I don't understand why adding a new account to an OSX machine adds existing accounts to a new group, I have never seen that behaviour before (on OSX). I'm -1 on changing anything for now and do not consider this to be a bug in Python or its testset. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 08:32:57 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Nov 2010 07:32:57 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1289892777.2.0.276145425631.issue7900@psf.upfronthosting.co.za> R. David Murray added the comment: Ronald, on a normal unix system if you add a user to a group, any existing process/terminal session that runs 'id -G' will return the *old* group list. Only a new process/terminal session will see the new group. On OSX, 'id -G' returns the new group when run in an existing process/terminal session, according to what you wrote. You can't just remove the 'id -G' from that test, because the test is using 'id -G' to get an independent verification of the list of group numbers as a check against what getgroups returns. On a normal unix system, these two would match. On OSX, they don't. At the moment I don't see any alternative to skipping the test on OSX with a message that 'id -G' and 'getgroups' do not return the same group list on OSX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 08:36:55 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 16 Nov 2010 07:36:55 +0000 Subject: [issue10430] _sha.sha().digest() method is endian-sensitive. and hexdigest() In-Reply-To: <1289893015.01.0.604303806999.issue10430@psf.upfronthosting.co.za> Message-ID: <1289893015.01.0.604303806999.issue10430@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : in shamodule.c, the digest() method just creates a simple bytes string of the digest. The digest is stored as an array of 32 bit integers in the native representation. Therefore, the digest will be different on big- and little-endian machines. The specification (http://en.wikipedia.org/wiki/SHA-1) suggest that the digest should actually be big endian, so the standard implementation on most home machines is actually wrong Actually, looking at the code, hexdigest() has the same problem! ---------- components: Extension Modules messages: 121268 nosy: krisvale priority: normal severity: normal status: open title: _sha.sha().digest() method is endian-sensitive. and hexdigest() type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 08:41:26 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 16 Nov 2010 07:41:26 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1289893286.5.0.66394963761.issue7900@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm still -1 on changing the test. The test only fails when run from the buildbot and the buildbot account is changed without restarting buildbot. Changing the buildbot account should happen almost never, and IMO you should restart the buildbot daemon when you do so (and that's just good practice) Disabling the test on OSX means that os.getgroups will not get tested at all on OSX, even when I run the testsuite from the command-line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 08:52:43 2010 From: report at bugs.python.org (Stephen Hansen) Date: Tue, 16 Nov 2010 07:52:43 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1289893963.26.0.408541267624.issue7900@psf.upfronthosting.co.za> Stephen Hansen added the comment: The test is clearly verifying a *wrong* assumption: that id -G will match posix.getgroups() which simply does not hold on OSX. I can reproduce this reliably on a completely clean, brand new installation of 10.5: from there the only things that have been done to the box is updating to 10.5.8, and then downloading the latest XCode tools that run on Leopard. >From here, launch Terminal: leave the console open. Run id -G; then run python and look at posix.getgroups(). Now, go into System Preferences and add a new user. Don't do anything else. Don't change anything with existing user. In the console that was already open, do id -G again. Now run python again, and do posix.getgroups() -- those no longer match. Clearly IMHO the assumption that the test is declaring to be an expected result simply is not true in a OSX-Unix environment. Yes, if I go and *edit the actual slave user* then surely I can expect failures until I restarted the buildslave. But, if by merely adding a user causes a change to the buildslaves user by no action of my own, and that causes this test to be invalid... the test itself seems to be founded on assumptions which simply are not reliably true. I understand disabling the test means os.getgroups() will no longer be tested on OSX: and yet, the current situation is a specific behavior of os.getgroups() is tested which is *not* actually the guaranteed behavior of that operation. There is at least one very easy to reproduce situation in which id -G and posix.getgroups() do not match: I don't know if there are more. But for the test to assert the truth that its only correct when they match seems to be a mistake. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 09:04:39 2010 From: report at bugs.python.org (Steven Bethard) Date: Tue, 16 Nov 2010 08:04:39 +0000 Subject: [issue9253] argparse: optional subparsers In-Reply-To: <1279056589.03.0.566167994161.issue9253@psf.upfronthosting.co.za> Message-ID: <1289894679.89.0.750107342159.issue9253@psf.upfronthosting.co.za> Steven Bethard added the comment: I think the proposed API looks fine and should be backwards compatible since add_subparsers will currently throw an exception with a default= argument. In case someone feels like writing a patch, you'll want to look at _SubParsersAction.__init__, which will need to grow the default= argument, and pass a different nargs= argument on. I think you'll need to define a new nargs type which means you probably also need to look at ArgumentParser._get_nargs_pattern as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 09:29:50 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 Nov 2010 08:29:50 +0000 Subject: [issue1028088] Cookies without values are silently ignored (by design?) Message-ID: <1289896190.73.0.788680638423.issue1028088@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Revisiting this issue. - Cookie: should contain name=value pairs - Set-Cookie: header can contain a single word like 'secure' The current design is along the same lines only. In the original comment, the request had asked to document the behavior of Cookie class ignoring the nameless values. That should be okay. ---------- assignee: -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 09:47:28 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 Nov 2010 08:47:28 +0000 Subject: [issue10394] subprocess Popen deadlock In-Reply-To: <1289570708.02.0.0744739807294.issue10394@psf.upfronthosting.co.za> Message-ID: <20101116084709.GA2103@rubuntu> Senthil Kumaran added the comment: Did you attach the correct files? You mention about two programs in the description, but you have attached only one file 'deadlock.py'. Also, it does not fail on Python 2.7.1. Please try it on the latest codeline from release27-maint too. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 09:58:02 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 Nov 2010 08:58:02 +0000 Subject: [issue10399] AST Optimization: inlining of function calls In-Reply-To: <1289593012.28.0.71054855235.issue10399@psf.upfronthosting.co.za> Message-ID: <1289897882.55.0.651502978983.issue10399@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:06:50 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 Nov 2010 09:06:50 +0000 Subject: [issue10403] Use "member" consistently In-Reply-To: <1289623042.93.0.830099606418.issue10403@psf.upfronthosting.co.za> Message-ID: <1289898410.48.0.148437208222.issue10403@psf.upfronthosting.co.za> Senthil Kumaran added the comment: It is 'attributes' instead of term 'members'. The term 'method' when it denotes methods can be left as such. ---------- assignee: docs at python -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:07:45 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 Nov 2010 09:07:45 +0000 Subject: [issue10403] Use "member" consistently In-Reply-To: <1289623042.93.0.830099606418.issue10403@psf.upfronthosting.co.za> Message-ID: <1289898465.41.0.000917586430722.issue10403@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- stage: -> needs patch type: -> behavior versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:20:40 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 16 Nov 2010 09:20:40 +0000 Subject: [issue8458] buildbot: test_cmd_line failure on Tiger: [Errno 9] Bad file descriptor In-Reply-To: <1271678026.95.0.894433016298.issue8458@psf.upfronthosting.co.za> Message-ID: <1289899240.84.0.998856949456.issue8458@psf.upfronthosting.co.za> Ned Deily added the comment: With 3.2a4, OS X 10.4 Tiger buildbot failures reported: ====================================================================== ERROR: test_run_code (test.test_cmd_line.CmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/test_cmd_line.py", line 95, in test_run_code assert_python_failure('-c') File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/script_helper.py", line 55, in assert_python_failure return _assert_python(False, *args, **env_vars) File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/script_helper.py", line 29, in _assert_python env=env) File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/subprocess.py", line 683, in __init__ self.stdin = io.open(p2cwrite, 'wb', bufsize) OSError: [Errno 9] Bad file descriptor ====================================================================== ERROR: test_run_module (test.test_cmd_line.CmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/test_cmd_line.py", line 72, in test_run_module assert_python_failure('-m') File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/script_helper.py", line 55, in assert_python_failure return _assert_python(False, *args, **env_vars) File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/script_helper.py", line 29, in _assert_python env=env) File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/subprocess.py", line 683, in __init__ self.stdin = io.open(p2cwrite, 'wb', bufsize) OSError: [Errno 9] Bad file descriptor ====================================================================== ERROR: test_version (test.test_cmd_line.CmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/test_cmd_line.py", line 48, in test_version rc, out, err = assert_python_ok('-V') File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/script_helper.py", line 48, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/script_helper.py", line 29, in _assert_python env=env) File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/subprocess.py", line 683, in __init__ self.stdin = io.open(p2cwrite, 'wb', bufsize) OSError: [Errno 9] Bad file descriptor On my 10.4 system, it seems to be a race condition: sometimes I see all three of these failures, sometimes just one, sometimes none. Again, only on 10.4 (Tiger), not 10.5 or 10.6. But the 10.4 machine I'm using is by far the slowest of the three so it is possible that could be a factor. Perhaps there is a race condition with cleaning up the p2c pipe from a previous run? ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:38:00 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 09:38:00 +0000 Subject: [issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function In-Reply-To: <1289739891.46.0.690681439003.issue10417@psf.upfronthosting.co.za> Message-ID: <1289900280.91.0.0171044012221.issue10417@psf.upfronthosting.co.za> ?ric Araujo added the comment: I have read and closed too fast, Johannes still has the bug on OS X. Can someone turn his example script into a patch adding a unit test? ---------- resolution: out of date -> stage: committed/rejected -> unit test needed status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:45:19 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 09:45:19 +0000 Subject: [issue10070] 2to3 wishes for already-2to3'ed files In-Reply-To: <1286882661.81.0.431457664283.issue10070@psf.upfronthosting.co.za> Message-ID: <1289900719.31.0.940052239207.issue10070@psf.upfronthosting.co.za> ?ric Araujo added the comment: > That's fair enough. :) Do you want to close this feature request then? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:48:56 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 09:48:56 +0000 Subject: [issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified In-Reply-To: <1258226856.45.0.72736645389.issue7325@psf.upfronthosting.co.za> Message-ID: <1289900936.4.0.241045371102.issue7325@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo versions: -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 11:00:52 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Nov 2010 10:00:52 +0000 Subject: [issue10431] Failed issue tracker submission In-Reply-To: <20101116095559.EA25110402E@psf.upfronthosting.co.za> Message-ID: <1289901652.71.0.484944508469.issue10431@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 11:02:24 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Nov 2010 10:02:24 +0000 Subject: [issue10431] Failed issue tracker submission Message-ID: <1289901744.83.0.152163994398.issue10431@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- Removed message: http://bugs.python.org/msg121278 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 11:02:20 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Nov 2010 10:02:20 +0000 Subject: [issue10431] Failed issue tracker submission In-Reply-To: <20101116095559.EA25110402E@psf.upfronthosting.co.za> Message-ID: <1289901740.02.0.00471084099635.issue10431@psf.upfronthosting.co.za> Changes by Ezio Melotti : Removed file: http://bugs.python.org/file19614/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:56:04 2010 From: report at bugs.python.org (admin) Date: Tue, 16 Nov 2010 09:56:04 +0000 Subject: [issue10431] Failed issue tracker submission In-Reply-To: <20101116095559.EA25110402E@psf.upfronthosting.co.za> Message-ID: <20101116095559.EA25110402E@psf.upfronthosting.co.za> New submission from admin : You are not a registered user. Unknown address: Order Real Pfizer ---------- files: unnamed messages: 121278 nosy: admin priority: normal severity: normal status: open title: Failed issue tracker submission Added file: http://bugs.python.org/file19614/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Return-Path: X-Original-To: report at bugs.python.org Delivered-To: roundup+tracker at psf.upfronthosting.co.za Received: from [123.26.137.99] (unknown [123.26.137.99]) by psf.upfronthosting.co.za (Postfix) with ESMTP id F017410402D for ; Tue, 16 Nov 2010 10:55:58 +0100 (CET) From: "Order Real Pfizer To: report at bugs.python.org Reply-To: report at bugs.python.org Subject: Hi report, Best Deals. one In largest In Forum Mime-Version: 1.0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Message-Id: <20101116095558.F017410402D at psf.upfronthosting.co.za> Date: Tue, 16 Nov 2010 10:55:58 +0100 (CET) Newsletter
View Mobile | View Webpage
Cheapest Pills. Click here
PLEASE DO NOT REPLY TO THIS MESSAGE.
This is a system-generated Newsletter email. Replies will not be read or forwarded for handling.

This message was sent to report at bugs.python.org.

Contact Us | Unsubscribe | Update Email Address | Privacy Policy

Copyright 2010 The For. All rights reserved.
From report at bugs.python.org Tue Nov 16 11:49:51 2010 From: report at bugs.python.org (Michael Foord) Date: Tue, 16 Nov 2010 10:49:51 +0000 Subject: [issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function In-Reply-To: <1289739891.46.0.690681439003.issue10417@psf.upfronthosting.co.za> Message-ID: <1289904591.72.0.120406555874.issue10417@psf.upfronthosting.co.za> Michael Foord added the comment: The issue is with a non-ascii character in a *Unicode* docstring. Python has to encode the string to write it to the terminal; the encode is implicit and so fails. The problem doesn't happen with Python 3 unless you run on an ascii terminal. ---------- assignee: -> michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 11:59:36 2010 From: report at bugs.python.org (Scott Dial) Date: Tue, 16 Nov 2010 10:59:36 +0000 Subject: [issue10432] concurrent.futures.as_completed() spins waiting for futures to complete In-Reply-To: <1289905176.73.0.0627045532304.issue10432@psf.upfronthosting.co.za> Message-ID: <1289905176.73.0.0627045532304.issue10432@psf.upfronthosting.co.za> New submission from Scott Dial : The code in as_completed() waits on a FIRST_COMPLETED event, which means that after the first future completes, it will no longer wait at all. The proposed patch adds a _AsCompletedWaiter and uses a lock to swap out the finished list and reset the event. This is a difficult problem to create a test case for without adding intrusive code to as_completed() to count how many times it loops or create a mock Event object that counts it, so I have not proposed a test. ---------- components: Library (Lib) files: futures-r86476.patch keywords: patch messages: 121280 nosy: scott.dial priority: normal severity: normal status: open title: concurrent.futures.as_completed() spins waiting for futures to complete type: behavior versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file19615/futures-r86476.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 12:32:03 2010 From: report at bugs.python.org (=?utf-8?q?Adam_Biela=C5=84ski?=) Date: Tue, 16 Nov 2010 11:32:03 +0000 Subject: [issue10425] xmlrpclib support for None isn't compliant with XMLRPC In-Reply-To: <1289824037.0.0.671749345837.issue10425@psf.upfronthosting.co.za> Message-ID: <1289907123.5.0.805971314279.issue10425@psf.upfronthosting.co.za> Adam Biela?ski added the comment: Ok, I apologize for being to hasty. Below you can find my answers: 1. SlowParser used in xmlrpclib doesn't deal with namespaces in any reasonable way. If there's a namespace prefix for tag, it's not separated from tag name, but passed as part of tag name. But I agree - this should be done better. 2. Well, I suppose that content of http://ws.apache.org/xmlrpc/extensions.html will only convince you that this patch is just for Java library and you reject it. I didn't find support for in Perl nor Ruby. One of PHP libraries also support (and ) - http://phpxmlrpc.sourceforge.net/, but AFAIK it doesn't require/provide any namespace at all. It just treats ex:nil as a synonym for nil, probably to be compatible with Apache library. All in all - I think that my patch should be rejected. I can send simpler patch that would work like phpxmlrpc does - just accept ex:nil as well as nil and not try to analyze namespaces at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 12:38:07 2010 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 16 Nov 2010 11:38:07 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1289907487.31.0.369365670625.issue1553375@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that my suggestion was to move the if statement out of the loop as-is: you would still be pulling the traceback to display from the caught exception rather than displaying the stack from the current point of execution. If you want the bottom most point to display where the actual exception occurred rather than the last line executed in the frame that caught it you need to be even smarter than that, though. The information to construct the full stack trace properly is actually available, but it is necessary to be very careful as to how it is stitched together at the point where the traceback and the stack trace meet up. For a full stack trace, this stitching actually needs to occur every time there is a jump from one exception to another. For finally clauses and reraised exceptions, the interpreter handles this internally so the traceback reflects the appropriate lines, but recreating a complete stack trace for the original exception in the face of PEP 3134 is going to require a bit of work in the traceback module. Alternatively, you could just provide the full stack trace for the very last exception caught, leaving it to the reader to follow the traceback chain back down to the original exception. Here's some useful code to explore this (I just spent some time playing with it to make sure I was giving the right answer here): import sys from traceback import print_exc, print_stack, print_tb def f(n): this = "F%d" % n if n: try: f(n-1) except: print("*** Traceback in", this) print_exc(chain=False) print("*** Call stack in", this) print_stack() print("*** Replacing exception in", this) raise RuntimeError(this) print("*** Call stack in", this) print_stack() raise RuntimeError(this) try: f(2) except: etype, ex, tb = sys.exc_info() "raise ex" will then show you the native display of that exception. You can then use the context attributes to see what state is available to you: >>> ex RuntimeError('F2',) >>> ex.__context__ RuntimeError('F1',) >>> ex.__context__.__context__ RuntimeError('F0',) In particular, we can see that the two inner exceptions are attached to frame objects which were used to run the nested function calls and hence have a frame that called them: >>> ex.__traceback__.tb_frame.f_back >>> ex.__context__.__traceback__.tb_frame.f_back >>> ex.__context__.__context__.__traceback__.tb_frame.f_back The issue we have is that landing in the exception handlers means the state of those frames has been altered by the stack unwinding process. Let's compare the traceback for each exception with the current state of the corresponding frame (we skip the first traceback entry for our outermost function - it is there courtesy of the interactive loop and irrelevant to the current exploration): >>> ex.__traceback__.tb_next.tb_lineno # Top level exception line 2 >>> ex.__traceback__.tb_next.tb_frame.f_lineno # Last executed line 4 >>> ex.__context__.__traceback__.tb_lineno # f(2) exception line 5 >>> ex.__context__.__traceback__.tb_frame.f_lineno # Last executed line 12 >>> ex.__context__.__context__.__traceback__.tb_lineno # f(1) exception line 5 >>> ex.__context__.__context__.__traceback__.tb_frame.f_lineno # Last executed line 12 f(0) avoids triggering the exception handler and we can see that the traceback line and the last executed line match in that case: >>> ex.__context__.__context__.__traceback__.tb_next.tb_lineno 15 >>> ex.__context__.__context__.__traceback__.tb_next.tb_frame.f_lineno 15 So yes, the idea proposed is possible, but no, a simple call to print_stack isn't going to do the right thing. ---------- keywords: -needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 12:48:51 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 Nov 2010 11:48:51 +0000 Subject: [issue10425] xmlrpclib support for None isn't compliant with XMLRPC In-Reply-To: <1289907123.5.0.805971314279.issue10425@psf.upfronthosting.co.za> Message-ID: <20101116114713.GC2103@rubuntu> Senthil Kumaran added the comment: On Tue, Nov 16, 2010 at 11:32:03AM +0000, Adam Biela?ski wrote: > just accept ex:nil as well as nil and not try to analyze namespaces at all. But even that seems specific to Java/ Apache Extension. If it is, then it might go in as part of issue8792. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 12:52:44 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 Nov 2010 11:52:44 +0000 Subject: [issue10432] concurrent.futures.as_completed() spins waiting for futures to complete In-Reply-To: <1289905176.73.0.0627045532304.issue10432@psf.upfronthosting.co.za> Message-ID: <1289908364.18.0.925585913811.issue10432@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> bquinlan nosy: +bquinlan stage: -> patch review versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 13:08:13 2010 From: report at bugs.python.org (=?utf-8?q?Adam_Biela=C5=84ski?=) Date: Tue, 16 Nov 2010 12:08:13 +0000 Subject: [issue10425] xmlrpclib support for None isn't compliant with XMLRPC In-Reply-To: <1289824037.0.0.671749345837.issue10425@psf.upfronthosting.co.za> Message-ID: <1289909293.47.0.394438235911.issue10425@psf.upfronthosting.co.za> Adam Biela?ski added the comment: It is. It might go. Didn't notice issue8792 before, thanks for pointing it out. Whole ex:nil issue is discussed there, so this issue might be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 13:10:51 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 Nov 2010 12:10:51 +0000 Subject: [issue10425] xmlrpclib support for None isn't compliant with XMLRPC In-Reply-To: <1289824037.0.0.671749345837.issue10425@psf.upfronthosting.co.za> Message-ID: <1289909451.93.0.763647772112.issue10425@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 13:33:48 2010 From: report at bugs.python.org (Eugene Kapun) Date: Tue, 16 Nov 2010 12:33:48 +0000 Subject: [issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords In-Reply-To: <1242980336.93.0.332167282409.issue6083@psf.upfronthosting.co.za> Message-ID: <1289910828.02.0.304366806556.issue6083@psf.upfronthosting.co.za> Eugene Kapun added the comment: Actually, this can't be fixed without modifying C API methods PyArg_ParseTuple and PyArg_ParseTupleAndKeywords, because it's possible to make an object deallocated before PyArg_ParseTuple returns, so Py_INCREF immediately after parsing would be already too late. Here are my test cases: test-resource.py - in Modules/resource.c, and python-bug-01.patch won't work against it. test-ctypes.py - in Modules/_ctypes/_ctypes.c. test-functools.py - in Modules/_functoolsmodule.c (py3k only). ---------- components: +Interpreter Core -Extension Modules nosy: +abacabadabacaba title: Reference counting bug in setrlimit -> Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords Added file: http://bugs.python.org/file19616/test-resource.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 13:34:29 2010 From: report at bugs.python.org (Eugene Kapun) Date: Tue, 16 Nov 2010 12:34:29 +0000 Subject: [issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords In-Reply-To: <1242980336.93.0.332167282409.issue6083@psf.upfronthosting.co.za> Message-ID: <1289910869.46.0.936929195494.issue6083@psf.upfronthosting.co.za> Changes by Eugene Kapun : Added file: http://bugs.python.org/file19617/test-ctypes.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 13:35:15 2010 From: report at bugs.python.org (Eugene Kapun) Date: Tue, 16 Nov 2010 12:35:15 +0000 Subject: [issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords In-Reply-To: <1242980336.93.0.332167282409.issue6083@psf.upfronthosting.co.za> Message-ID: <1289910915.92.0.817366617166.issue6083@psf.upfronthosting.co.za> Changes by Eugene Kapun : Added file: http://bugs.python.org/file19618/test-functools.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 13:48:55 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Nov 2010 12:48:55 +0000 Subject: [issue10070] 2to3 wishes for already-2to3'ed files In-Reply-To: <1286882661.81.0.431457664283.issue10070@psf.upfronthosting.co.za> Message-ID: <1289911735.42.0.129217904453.issue10070@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:05:08 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Nov 2010 13:05:08 +0000 Subject: [issue10134] test_email failures on Windows: end of line issue? In-Reply-To: <1287373744.55.0.18095949035.issue10134@psf.upfronthosting.co.za> Message-ID: <1289912708.24.0.0754432923259.issue10134@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:13:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 13:13:25 +0000 Subject: [issue10425] xmlrpclib support for None isn't compliant with XMLRPC In-Reply-To: <1289824037.0.0.671749345837.issue10425@psf.upfronthosting.co.za> Message-ID: <1289913205.21.0.682104981968.issue10425@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- superseder: -> Support Apache extensions to XML-RPC in xmlrpclib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:14:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 13:14:35 +0000 Subject: [issue10425] xmlrpclib support for None isn't compliant with XMLRPC In-Reply-To: <1289824037.0.0.671749345837.issue10425@psf.upfronthosting.co.za> Message-ID: <1289913275.44.0.882468079436.issue10425@psf.upfronthosting.co.za> ?ric Araujo added the comment: There's no need to apologize, we welcome contributions like your report and are open to discuss patches :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:17:41 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 13:17:41 +0000 Subject: [issue8792] Support Apache extensions to XML-RPC in xmlrpclib In-Reply-To: <1274558114.05.0.260300491762.issue8792@psf.upfronthosting.co.za> Message-ID: <1289913461.23.0.124948142632.issue8792@psf.upfronthosting.co.za> ?ric Araujo added the comment: An addition: It was reported in #10425 that None values are incorrectly serialized as , instead of just , or maybe <{namespace prefix for extensions defined by Apache}:nil/>. ---------- nosy: +Adam.Biela?ski, eric.araujo, orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:19:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 13:19:59 +0000 Subject: [issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function In-Reply-To: <1289739891.46.0.690681439003.issue10417@psf.upfronthosting.co.za> Message-ID: <1289913599.78.0.837913067674.issue10417@psf.upfronthosting.co.za> ?ric Araujo added the comment: Johannes, can you paste the output of the locale command? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:25:15 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Nov 2010 13:25:15 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1289913915.5.0.824888998033.issue7900@psf.upfronthosting.co.za> R. David Murray added the comment: I agree with Stephen. The test in question is *not a valid test* on OSX. Therefore on OSX it should be skipped. If you can think of a way to test the actual behavior of getgroups on OSX, that's even better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:26:43 2010 From: report at bugs.python.org (Michael Foord) Date: Tue, 16 Nov 2010 13:26:43 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1289914003.59.0.218714145271.issue7900@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- nosy: -michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:44:19 2010 From: report at bugs.python.org (=?utf-8?q?Adam_Biela=C5=84ski?=) Date: Tue, 16 Nov 2010 13:44:19 +0000 Subject: [issue8792] Support Apache extensions to XML-RPC in xmlrpclib In-Reply-To: <1274558114.05.0.260300491762.issue8792@psf.upfronthosting.co.za> Message-ID: <1289915059.36.0.619380641228.issue8792@psf.upfronthosting.co.za> Adam Biela?ski added the comment: To make example provided by Amaury complete I'll add that in order to support both ways you also need to replace xmlrpclib.dumps() with code from attached file. Changes to original xmlrpclib.dumps() function are outlined with comments. In short - it adds namespace declarations to methodCall and methodResponse elements and also makes Marshaller produce instead of ---------- Added file: http://bugs.python.org/file19619/dumps_with_namespace.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:44:42 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 16 Nov 2010 13:44:42 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1289915082.87.0.793994847322.issue7900@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Please explain how the failure can be reproduced. I've done some testing on my machine using Apple's copy of python 2.6.1 (on OSX 10.6), which has the same getgroups implementation as the current heads of the active branches. >>> os.getgroups() [20, 402, 204, 61, 12, 401] >>> os.system("id -G") 20 402 204 61 12 401 0 (Now open the Accounts preference pane and add a new user) >>> os.getgroups() [20, 403, 402, 204, 61, 12, 401] >>> os.system("id -G") 20 403 402 204 61 12 401 0 Note how the result of both os.getgroups and id -G changes, which should mean that tests shouldn't fail unless you happened to add a new account in the split-second between the "calls" to os.getgroups and "id -G" in a testrun. Was the buildbot started using launchd (the recipe at seems correct)? If not, how is it started? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 15:03:32 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Nov 2010 14:03:32 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1289916212.1.0.597841796459.issue7900@psf.upfronthosting.co.za> R. David Murray added the comment: Having just reread this issue more carefully, my understanding is that Ronald had elected to make the results returned from os.getgroups match that returned by "system tools" (by which I understood him to mean the 'id' command). Since Ronald reports he sees the intended behavior, Stephen's results seem to show that there is a problem with the fix in some circumstances which need to be understood. Alexander noted that this should all be documented, and I agree, so I'm opening a new issue for the doc update. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 15:06:07 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Nov 2010 14:06:07 +0000 Subject: [issue10433] Document unique behavior of 'getgroups' on OSX In-Reply-To: <1289916367.38.0.763799196023.issue10433@psf.upfronthosting.co.za> Message-ID: <1289916367.38.0.763799196023.issue10433@psf.upfronthosting.co.za> New submission from R. David Murray : Per issue 7900, os.getgroups on OSX does not behave the same way as on any other unix platform. This seems worthy of a documentation note, since anyone trying to write portable code could get bit by this. I don't really understand the relationship on OSX between what the current os.getgroups returns, what the normal unix os.getgroups returns, and what things a process can actually *do*, so I can't write that documentation. Hopefully someone else can. A doc note is probably also needed about the relationship between os.setgroups and os.getgroups on OSX, which again I do not understand and so cannot write. ---------- messages: 121293 nosy: r.david.murray priority: normal severity: normal stage: needs patch status: open title: Document unique behavior of 'getgroups' on OSX type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 15:10:07 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Nov 2010 14:10:07 +0000 Subject: [issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function In-Reply-To: <1289739891.46.0.690681439003.issue10417@psf.upfronthosting.co.za> Message-ID: <1289916607.64.0.409673641159.issue10417@psf.upfronthosting.co.za> STINNER Victor added the comment: In Python 3, sys.stderr uses the 'backslashreplace' error handler. With C locale, sys.stderr uses the ASCII encoding and so the ? unicode character is printed as \xe9. In Python 2, sys.stderr.errors is strict by default. It works if you specify the error handler: $ ./python -c "import sys; sys.stderr.write(u'\xe9\n')" ? $ PYTHONIOENCODING=ascii:backslashreplace ./python -c "import sys; sys.stderr.write(u'\xe9\n')" \xe9 But with ASCII encoding, and the default error handler (strict), it fails: $ PYTHONIOENCODING=ascii ./python -c "import sys; sys.stderr.write(u'\xe9\n')" Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 0: ordinal not in range(128) $ LANG= ./python -c "import sys; sys.stderr.write(u'\xe9\n')" Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 0: ordinal not in range(128) Change the default error handler in a minor release is not a good idea. But we can emulate the backslashreplace error handler. distutils.log does that in Python3: class Log: def __init__(self, threshold=WARN): self.threshold = threshold def _log(self, level, msg, args): if level not in (DEBUG, INFO, WARN, ERROR, FATAL): raise ValueError('%s wrong log level' % str(level)) if level >= self.threshold: if args: msg = msg % args if level in (WARN, ERROR, FATAL): stream = sys.stderr else: stream = sys.stdout if stream.errors == 'strict': # emulate backslashreplace error handler encoding = stream.encoding msg = msg.encode(encoding, "backslashreplace").decode(encoding) stream.write('%s\n' % msg) stream.flush() (...) _WritelnDecorator() of unittest.runner should maybe use the same code. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 15:24:37 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Nov 2010 14:24:37 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1289917477.72.0.3994530215.issue7900@psf.upfronthosting.co.za> R. David Murray added the comment: And it's entirely possible (even likely) that what Stephen is seeing here is a platform bug in OSX's quirky implementation of group management. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 15:34:42 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 16 Nov 2010 14:34:42 +0000 Subject: [issue10413] Comments in unicode.h are out of date In-Reply-To: <1289694856.74.0.857329002017.issue10413@psf.upfronthosting.co.za> Message-ID: <1289918082.05.0.387480525022.issue10413@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in revision 86478. Should this go in 3.1? This is a comments-only change, so it is fairly safe and merging may help future maintenance. On the other hand, it is very unlikely that the header file will need to be changed in maintenance releases. I'll close this in a few days if no one speaks up. ---------- resolution: -> accepted stage: patch review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 15:55:38 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 16 Nov 2010 14:55:38 +0000 Subject: [issue10434] Document the rules for "public names" In-Reply-To: <1289919338.9.0.394057770971.issue10434@psf.upfronthosting.co.za> Message-ID: <1289919338.9.0.394057770971.issue10434@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : As discussed in "Breaking undocumented API" thread [1] on python-dev, a definition of "public names" is buried deep in the language reference manual: """ The public names defined by a module are determined by checking the module?s namespace for a variable named __all__; if defined, it must be a sequence of strings which are names defined or imported by that module. The names given in __all__ are all considered public and are required to exist. If __all__ is not defined, the set of public names includes all names found in the module?s namespace which do not begin with an underscore character ('_'). __all__ should contain the entire public API. It is intended to avoid accidentally exporting items that are not part of the API (such as library modules which were imported and used within the module). """ [2] It has been argued that this is not the authoritative definition and alternatives have been suggested such as "any name that does not begin with an underscore except imported modules." mportant for the users and developers of cpython and other python implementations to know what names they can rely upon to stay defined between releases, the rules for "public names" should be documented. I agree that the library manual is a more appropriate place for such documentation. The definition should include the naming conventions and the set of promises that Python makes about public name availability in the future releases. [1] http://mail.python.org/pipermail/python-dev/2010-November/105490.html [2] http://docs.python.org/reference/simple_stmts.html ---------- assignee: docs at python components: Documentation messages: 121297 nosy: belopolsky, docs at python priority: normal severity: normal stage: needs patch status: open title: Document the rules for "public names" versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 16:18:17 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 16 Nov 2010 15:18:17 +0000 Subject: [issue10433] Document unique behavior of 'getgroups' on OSX In-Reply-To: <1289916367.38.0.763799196023.issue10433@psf.upfronthosting.co.za> Message-ID: <1289920697.09.0.709124894788.issue10433@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 16:19:11 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 16 Nov 2010 15:19:11 +0000 Subject: [issue10433] Document unique behavior of 'getgroups' on OSX In-Reply-To: <1289916367.38.0.763799196023.issue10433@psf.upfronthosting.co.za> Message-ID: <1289920751.49.0.89205316805.issue10433@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> docs at python components: +Documentation, Macintosh nosy: +docs at python versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 16:39:22 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 16 Nov 2010 15:39:22 +0000 Subject: [issue10413] Comments in unicode.h are out of date In-Reply-To: <1289918082.05.0.387480525022.issue10413@psf.upfronthosting.co.za> Message-ID: <4CE2A5A6.1000106@egenix.com> Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > Committed in revision 86478. Should this go in 3.1? This is a comments-only change, so it is fairly safe and merging may help future maintenance. On the other hand, it is very unlikely that the header file will need to be changed in maintenance releases. I'll close this in a few days if no one speaks up. It's essentially a documentation bug that you fixed. So yes, it should go in 3.1 as well. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 16:40:47 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 16 Nov 2010 15:40:47 +0000 Subject: [issue10413] Comments in unicode.h are out of date In-Reply-To: <1289694856.74.0.857329002017.issue10413@psf.upfronthosting.co.za> Message-ID: <1289922047.83.0.0412968750371.issue10413@psf.upfronthosting.co.za> Changes by Marc-Andre Lemburg : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 16:48:42 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 16 Nov 2010 15:48:42 +0000 Subject: [issue10434] Document the rules for "public names" In-Reply-To: <1289919338.9.0.394057770971.issue10434@psf.upfronthosting.co.za> Message-ID: <1289922522.48.0.834984663548.issue10434@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Michael Foord suggested adding the following to developer documentation such as PEP 8. [1] I am not sure PEP 8 is the right place for it. In my opinion, PEP 8 is mostly about stylistic choices that don't have a major impact on the users. In other words, unless you are developing python itself, you are unlikely to consult PEP 8. The API stability rules, however affect every user who programmed in python long enough to see a major release. I don't have objections to Michael's definitions below, but if included in the library manual, they should be reworded to address the user rather than the developer of the API. """ How about making this explicit (either pep 8 or our developer docs): If a module or package defines __all__ that authoritatively defines the public interface. Modules with __all__ SHOULD still respect the naming conventions (leading underscore for private members) to avoid confusing users. Modules SHOULD NOT export private members in __all__. Names imported into a module a never considered part of its public API unless documented to be so or included in __all__. Methods / functions / classes and module attributes whose names begin with a leading underscore are private. If a class name begins with a leading underscore none of its members are public, whether or not they begin with a leading underscore. If a module name in a package begins with a leading underscore none of its members are public, whether or not they begin with a leading underscore. If a module or package doesn't define __all__ then all names that don't start with a leading underscore are public. All public members MUST be documented. Public functions, methods and classes SHOULD have docstrings. Private members may have docstrings. """ [1] [1] http://mail.python.org/pipermail/python-dev/2010-November/105476.html ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:11:47 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 16 Nov 2010 16:11:47 +0000 Subject: [issue10413] Comments in unicode.h are out of date In-Reply-To: <1289694856.74.0.857329002017.issue10413@psf.upfronthosting.co.za> Message-ID: <1289923907.8.0.804354879942.issue10413@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed to 3.1 branch in revision 86481. ---------- status: pending -> closed type: -> behavior versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:12:20 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 16 Nov 2010 16:12:20 +0000 Subject: [issue10413] Comments in unicode.h are out of date In-Reply-To: <1289923907.8.0.804354879942.issue10413@psf.upfronthosting.co.za> Message-ID: <4CE2AD61.3060700@egenix.com> Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > Committed to 3.1 branch in revision 86481. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:16:46 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 16 Nov 2010 16:16:46 +0000 Subject: [issue10435] Document unicode C-API in reST In-Reply-To: <1289924206.67.0.561264270455.issue10435@psf.upfronthosting.co.za> Message-ID: <1289924206.67.0.561264270455.issue10435@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : The following C-APIs are only documented in comments inside unicode.h: PyUnicode_GetMax PyUnicode_Resize PyUnicode_InternImmortal PyUnicode_FromOrdinal PyUnicode_GetDefaultEncoding PyUnicode_AsDecodedObject PyUnicode_AsDecodedUnicode PyUnicode_AsEncodedObject PyUnicode_AsEncodedUnicode PyUnicode_BuildEncodingMap PyUnicode_EncodeDecimal PyUnicode_Append PyUnicode_AppendAndDel PyUnicode_Partition PyUnicode_RPartition PyUnicode_RSplit PyUnicode_IsIdentifier Py_UNICODE_strlen Py_UNICODE_strcpy Py_UNICODE_strcat Py_UNICODE_strncpy Py_UNICODE_strcmp Py_UNICODE_strncmp Py_UNICODE_strchr Py_UNICODE_strrchr ---------- assignee: belopolsky components: Documentation messages: 121302 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: Document unicode C-API in reST versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:18:41 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Nov 2010 16:18:41 +0000 Subject: [issue10433] Document unique behavior of 'getgroups' on OSX In-Reply-To: <1289916367.38.0.763799196023.issue10433@psf.upfronthosting.co.za> Message-ID: <1289924321.75.0.980620976353.issue10433@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:23:21 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 16 Nov 2010 16:23:21 +0000 Subject: [issue8649] Py_UNICODE_* functions are undocumented In-Reply-To: <1273250921.26.0.330435554177.issue8649@psf.upfronthosting.co.za> Message-ID: <1289924601.7.0.763490990035.issue8649@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: There are more undocumented functions in unicode.h. It makes sense to fix all of them in one patch. Closing this as superseded by #10435. ---------- nosy: +belopolsky resolution: -> duplicate status: open -> closed superseder: -> Document unicode C-API in reST _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:29:44 2010 From: report at bugs.python.org (Ron Adam) Date: Tue, 16 Nov 2010 16:29:44 +0000 Subject: [issue10434] Document the rules for "public names" In-Reply-To: <1289919338.9.0.394057770971.issue10434@psf.upfronthosting.co.za> Message-ID: <1289924984.42.0.499259802885.issue10434@psf.upfronthosting.co.za> Ron Adam added the comment: You may also want to update help topics. help("PRIVATENAMES"). Identifiers (Names) ******************* An identifier occurring as an atom is a name. See section *Identifiers and keywords* for lexical definition and section *Naming and binding* for documentation of naming and binding. When the name is bound to an object, evaluation of the atom yields that object. When a name is not bound, an attempt to evaluate it raises a ``NameError`` exception. **Private name mangling:** When an identifier that textually occurs in a class definition begins with two or more underscore characters and does not end in two or more underscores, it is considered a *private name* of that class. Private names are transformed to a longer form before code is generated for them. The transformation inserts the class name in front of the name, with leading underscores removed, and a single underscore inserted in front of the class name. For example, the identifier ``__spam`` occurring in a class named ``Ham`` will be transformed to ``_Ham__spam``. This transformation is independent of the syntactical context in which the identifier is used. If the transformed name is extremely long (longer than 255 characters), implementation defined truncation may happen. If the class name consists only of underscores, no transformation is done. Other topics that may be of interest. IDENTIFIERS NAMESPACES PACKAGES PRIVATENAMES SPECIALATTRIBUTES SPECIALIDENTIFIERS SPECIALMETHODS ---------- nosy: +ron_adam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:31:43 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 16 Nov 2010 16:31:43 +0000 Subject: [issue9076] Add C-API documentation for PyUnicode_AsDecodedObject/Unicode and PyUnicode_AsEncodedObject/Unicode In-Reply-To: <1277422131.02.0.354002642954.issue9076@psf.upfronthosting.co.za> Message-ID: <1289925103.58.0.349233842849.issue9076@psf.upfronthosting.co.za> Georg Brandl added the comment: Documenting Unicode C APIs is now tracked in #10435. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed superseder: -> Document unicode C-API in reST _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:45:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 16 Nov 2010 16:45:18 +0000 Subject: [issue2799] Remove _PyUnicode_AsString(), rework _PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() In-Reply-To: <1210329112.66.0.505096173761.issue2799@psf.upfronthosting.co.za> Message-ID: <1289925918.77.0.940151779105.issue2799@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- components: +Interpreter Core stage: -> needs patch versions: +Python 3.3 -Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 18:32:47 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Nov 2010 17:32:47 +0000 Subject: [issue10433] Document unique behavior of 'getgroups' on OSX In-Reply-To: <1289916367.38.0.763799196023.issue10433@psf.upfronthosting.co.za> Message-ID: <1289928767.33.0.810111268188.issue10433@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 18:49:36 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 16 Nov 2010 17:49:36 +0000 Subject: [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1289929776.13.0.214235819065.issue10318@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 18:55:54 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Nov 2010 17:55:54 +0000 Subject: [issue10429] bug in test_imaplib In-Reply-To: <1289866153.11.0.678652692288.issue10429@psf.upfronthosting.co.za> Message-ID: <1289930154.81.0.743771499457.issue10429@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This was a real bug in IMAP.starttls() actually. Fixed in r86485. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 18:59:01 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 16 Nov 2010 17:59:01 +0000 Subject: [issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data In-Reply-To: <1211069816.05.0.311102248623.issue2901@psf.upfronthosting.co.za> Message-ID: <1289930341.09.0.605298022999.issue2901@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I'm not sure whether it's related but on psutil we have a similar error message by using Python 2.6.1 64-bit: http://code.google.com/p/psutil/issues/detail?id=135 ---------- nosy: +giampaolo.rodola status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 18:59:32 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 16 Nov 2010 17:59:32 +0000 Subject: [issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data In-Reply-To: <1211069816.05.0.311102248623.issue2901@psf.upfronthosting.co.za> Message-ID: <1289930372.17.0.900232115643.issue2901@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +ixokai _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 19:17:44 2010 From: report at bugs.python.org (David Nesting) Date: Tue, 16 Nov 2010 18:17:44 +0000 Subject: [issue10436] tarfile.extractfile in "r|" stream mode fails with filenames or members from getmembers() In-Reply-To: <1289931464.79.0.618120236196.issue10436@psf.upfronthosting.co.za> Message-ID: <1289931464.79.0.618120236196.issue10436@psf.upfronthosting.co.za> New submission from David Nesting : When opening a tarfile with mode "r|" (streaming mode), extractfile("filename") and extractfile(mytarfile.getmembers()[0]) raise "tarfile.StreamError: seeking backwards is not allowed". extractfile(mytarfile.next()) succeeds. A more complete test case: """ import tarfile import StringIO # Create a simple tar file in memory. This could easily be a real tar file # though. data = StringIO.StringIO() tf = tarfile.open(fileobj=data, mode="w") tarinfo = tarfile.TarInfo(name="testfile") filedata = StringIO.StringIO("test data") tarinfo.size = len(filedata.getvalue()) tf.addfile(tarinfo, fileobj=filedata) tf.close() data.seek(0) # Open as an uncompressed stream tf = tarfile.open(fileobj=data, mode="r|") #f = tf.extractfile("testfile") #print "%s: %s" % (f.name, f.read()) # #Traceback (most recent call last): # File "./bug.py", line 19, in # print "%s: %s" % (f.name, f.read()) # File "/usr/lib/python2.7/tarfile.py", line 815, in read # buf += self.fileobj.read() # File "/usr/lib/python2.7/tarfile.py", line 735, in read # return self.readnormal(size) # File "/usr/lib/python2.7/tarfile.py", line 742, in readnormal # self.fileobj.seek(self.offset + self.position) # File "/usr/lib/python2.7/tarfile.py", line 554, in seek # raise StreamError("seeking backwards is not allowed") #tarfile.StreamError: seeking backwards is not allowed #for member in tf.getmembers(): # f = tf.extractfile(member) # print "%s: %s" % (f.name, f.read()) # # Same traceback while True: member = tf.next() if member is None: break f = tf.extractfile(member) print "%s: %s" % (f.name, f.read()) # This works. """ It appears that extractfile("filename") invokes getmember("filename"), which invokes getmembers(). getmembers() scans the entire file before returning results, and by doing so, it's read past and discarded the actual file data, which makes it impossible for us to actually extract it. If this is accurate, this seems tricky to completely fix. You could make getmembers() a generator that doesn't read too far ahead so that the file's contents are still available if someone wants to retrieve them for each file yielded. getmember("filename") could just scan forward through the file until it hits a match, but you'd still lose the ability to do a getmember("filename") on a file that we skipped over. If nothing else, document that extractfile("filename"), getmember() and getmembers() won't work reliably in streaming mode, and possibly raise an exception whenever someone tries just to make behavior consistent. ---------- components: Library (Lib) messages: 121308 nosy: David.Nesting priority: normal severity: normal status: open title: tarfile.extractfile in "r|" stream mode fails with filenames or members from getmembers() type: behavior versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 19:45:25 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Nov 2010 18:45:25 +0000 Subject: [issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data In-Reply-To: <1211069816.05.0.311102248623.issue2901@psf.upfronthosting.co.za> Message-ID: <1289933125.0.0.653567800217.issue2901@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This still needs to be verified that there is a problem with a *current* release. That means 2.7.1 (rc just out) or 3.2 (a4 just out). If this would be considered a security issue (I do not know) then 'current' includes 2.5.5, 2.6.6, and 3.1.3 (rc or final). Without such verification, this should be closed until the problem appears again. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 20:27:24 2010 From: report at bugs.python.org (Christoph Mathys) Date: Tue, 16 Nov 2010 19:27:24 +0000 Subject: [issue10394] subprocess Popen deadlock In-Reply-To: <1289570708.02.0.0744739807294.issue10394@psf.upfronthosting.co.za> Message-ID: <1289935644.4.0.192402689663.issue10394@psf.upfronthosting.co.za> Christoph Mathys added the comment: Yes, it's the correct file. Sorry, I'm making quite a mess in my description about program: The "attached program" is deadlock.py. Program One and Two are python scripts executed using "python -c", the code is inside deadlock.py. I installed python 2.7 (2.7.0+) and 3.1 (3.1.2, had to fix a print statement) and could reproduce the error on both versions. Checking the code in subprocess.py confirmed that the bug is still there. However, I had to increase the number of threads (deadlock.py, line 38) to provoke the error, but I used different hardware and OS release than in the first test ((but still multi core on Linux). What do you expect on fail? I'm a noob when it comes to python, the script just prints "command took too long: