From report at bugs.python.org Sun Jun 1 13:28:26 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 01 Jun 2008 11:28:26 +0000 Subject: [issue1675334] Draft implementation for PEP 364 Message-ID: <1212319706.18.0.0846764856254.issue1675334@psf.upfronthosting.co.za> Georg Brandl added the comment: I guess this is heavily out of date now? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 13:30:06 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 01 Jun 2008 11:30:06 +0000 Subject: [issue837234] Tk.quit and sys.exit cause Fatal Error Message-ID: <1212319806.16.0.147154313896.issue837234@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> duplicate status: pending -> closed superseder: -> Tk.quit leads to crash in python.exe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 14:53:49 2008 From: report at bugs.python.org (Atsuo Ishimoto) Date: Sun, 01 Jun 2008 12:53:49 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212324828.89.0.153788354677.issue2630@psf.upfronthosting.co.za> Atsuo Ishimoto added the comment: diff5.txt contains both code and documentation patch for PEP 3138. - In this patch, default error-handler of sys.stdout is always 'strict'. Added file: http://bugs.python.org/file10491/diff5.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 15:10:25 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 01 Jun 2008 13:10:25 +0000 Subject: [issue775544] Tk.quit leads to crash in python.exe Message-ID: <1212325825.42.0.406664471732.issue775544@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 15:34:04 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 01 Jun 2008 13:34:04 +0000 Subject: [issue3018] tkinter demos fixed In-Reply-To: <1212241760.64.0.0978196091903.issue3018@psf.upfronthosting.co.za> Message-ID: <1212327244.88.0.455310380256.issue3018@psf.upfronthosting.co.za> Changes by Guilherme Polo : Removed file: http://bugs.python.org/file10486/tkinter_demo_fixes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 15:34:33 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 01 Jun 2008 13:34:33 +0000 Subject: [issue3018] tkinter demos fixed In-Reply-To: <1212241760.64.0.0978196091903.issue3018@psf.upfronthosting.co.za> Message-ID: <1212327273.23.0.710130336355.issue3018@psf.upfronthosting.co.za> Changes by Guilherme Polo : Added file: http://bugs.python.org/file10492/tkinter_demo_fixes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 15:34:59 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 01 Jun 2008 13:34:59 +0000 Subject: [issue3018] tkinter demos fixed In-Reply-To: <1212241760.64.0.0978196091903.issue3018@psf.upfronthosting.co.za> Message-ID: <1212327299.41.0.381995016598.issue3018@psf.upfronthosting.co.za> Changes by Guilherme Polo : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 15:35:06 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 01 Jun 2008 13:35:06 +0000 Subject: [issue3018] tkinter demos fixed In-Reply-To: <1212241760.64.0.0978196091903.issue3018@psf.upfronthosting.co.za> Message-ID: <1212327306.42.0.295461023181.issue3018@psf.upfronthosting.co.za> Guilherme Polo added the comment: By the way.. the demo tkinter/guido/ss1 isn't fixed, since rexec is gone _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 16:20:24 2008 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 01 Jun 2008 14:20:24 +0000 Subject: [issue2997] PyNumberMethods has left-over fields in Py3 In-Reply-To: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> Message-ID: <1212330024.09.0.500542127562.issue2997@psf.upfronthosting.co.za> Stefan Behnel added the comment: This seems to have been applied in current SVN. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 16:37:30 2008 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 01 Jun 2008 14:37:30 +0000 Subject: [issue3020] doctest should have lib2to3 integration In-Reply-To: <1212331047.91.0.677781535819.issue3020@psf.upfronthosting.co.za> Message-ID: <1212331047.91.0.677781535819.issue3020@psf.upfronthosting.co.za> New submission from Stefan Behnel : Running a doctest with Py2 syntax in Py3 currently involves either running the 2to3 tool by hand or writing code to convert the doctest using lib2to3, and then running the modified version. This basically pushes the burden of automating this step in any test runner script in the world onto the authors or users of these scripts. Writing portable code is hard enough, but writing portable doctests that remain user readable should not remain as hard as it currently is. The doctest module in Py3 should have a simple option to run a Py2 doctest (in a file or doc string) without requiring users to write the glue code for it. On a related note, if a 3to2 tool becomes available, this should be directly supported by doctest in Py2.6. ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool), Library (Lib) messages: 67594 nosy: collinwinter, scoder severity: normal status: open title: doctest should have lib2to3 integration type: feature request versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 17:35:57 2008 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sun, 01 Jun 2008 15:35:57 +0000 Subject: [issue2884] Create the tkinter package In-Reply-To: <1210914608.62.0.531820285886.issue2884@psf.upfronthosting.co.za> Message-ID: <1212334557.24.0.295579794708.issue2884@psf.upfronthosting.co.za> Changes by Kurt B. Kaiser : ---------- nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 18:05:39 2008 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sun, 01 Jun 2008 16:05:39 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1212336339.13.0.805346672895.issue2775@psf.upfronthosting.co.za> Changes by Kurt B. Kaiser : ---------- nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 18:22:54 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Sun, 01 Jun 2008 16:22:54 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1212337374.65.0.123705198507.issue2898@psf.upfronthosting.co.za> Robert Schuppenies added the comment: Applied in r63856. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 18:39:03 2008 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sun, 01 Jun 2008 16:39:03 +0000 Subject: [issue2917] merge pickle and cPickle in 3.0 In-Reply-To: <1211227162.29.0.0642317760161.issue2917@psf.upfronthosting.co.za> Message-ID: <1212338343.54.0.857576309692.issue2917@psf.upfronthosting.co.za> Changes by Kurt B. Kaiser : ---------- nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 19:35:18 2008 From: report at bugs.python.org (Gregor Lingl) Date: Sun, 01 Jun 2008 17:35:18 +0000 Subject: [issue1513695] new turtle module Message-ID: <1212341718.05.0.0395003037688.issue1513695@psf.upfronthosting.co.za> Gregor Lingl added the comment: Hi, here is my contribution. The zip-file contains - the module turtle.py - a doc-file turtle-docs.txt - a subdirectory with a series of sample scripts and a demoviewer. (one of the demoscripts is a standalone script) Clearly the docs have to be transformed to reST. I would do it or participate but that certainly would only be ready within 2 or 3 weeks. The end of the school year is near and I have a huge amount of work in my school until approx. 20th of June. After this I have plenty of time also for correcting etc. Of course I'll also do bugfixes etc. Anyway I'm interested in feedback of any sort. I worked hard to do my best and I hope the result will be appreciated. Best regards, Gregor Added file: http://bugs.python.org/file10493/turtle.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 21:39:01 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sun, 01 Jun 2008 19:39:01 +0000 Subject: [issue2849] Remove usage of rfc822 from the stdlib In-Reply-To: <1210726924.82.0.902490265063.issue2849@psf.upfronthosting.co.za> Message-ID: <1212349141.49.0.642367758547.issue2849@psf.upfronthosting.co.za> Humberto Diogenes added the comment: Added a patch that successfully removes rfc822 dependency from the cgi module, using ideas from issue 1112856. I had to change one test, as the email FeedParser ignores trailing spaces in subparts. ---------- keywords: +patch Added file: http://bugs.python.org/file10494/remove_rfc822_from_cgi.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 22:03:48 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 01 Jun 2008 20:03:48 +0000 Subject: [issue3021] Lexical exception handlers In-Reply-To: <1212350626.42.0.00327926746922.issue3021@psf.upfronthosting.co.za> Message-ID: <1212350626.42.0.00327926746922.issue3021@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This patch implements the proposal outlined on the py3k mailing-list here: http://mail.python.org/pipermail/python-3000/2008-May/013740.html It solves both #2507 and #2833, and even improves re-raising semantics in several cases (see the test cases which were added to test_raise.py). Anothing thing worth noting is that f_exc_* fields are not accessible from Python code anymore, because their semantics is an implementation detail and shouldn't be relied upon. ---------- components: Interpreter Core files: exc_stacking.patch keywords: patch messages: 67598 nosy: pitrou severity: normal status: open title: Lexical exception handlers type: behavior versions: Python 3.0 Added file: http://bugs.python.org/file10495/exc_stacking.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 22:05:05 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 01 Jun 2008 20:05:05 +0000 Subject: [issue2507] Exception state lives too long in 3.0 In-Reply-To: <1206800918.45.0.478667091266.issue2507@psf.upfronthosting.co.za> Message-ID: <1212350705.76.0.206064228915.issue2507@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A clean solution is now proposed in #3021. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 22:05:30 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 01 Jun 2008 20:05:30 +0000 Subject: [issue2833] __exit__ silences the active exception In-Reply-To: <1210576013.94.0.462684443177.issue2833@psf.upfronthosting.co.za> Message-ID: <1212350730.35.0.215707076154.issue2833@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A clean solution to both #2507 and #2833 is now proposed in #3021. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 22:52:47 2008 From: report at bugs.python.org (Senthil) Date: Sun, 01 Jun 2008 20:52:47 +0000 Subject: [issue600362] relocate cgi.parse_qs() into urlparse Message-ID: <1212353567.08.0.906749015128.issue600362@psf.upfronthosting.co.za> Senthil added the comment: parse_qs and parse_qsl moved to urlparse with this patch. I dont think urlencode would be a good method for urlparse. But this will cease to exist with the addressing of 3108. ---------- keywords: +patch Added file: http://bugs.python.org/file10496/issue600362.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 23:07:21 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 01 Jun 2008 21:07:21 +0000 Subject: [issue1883] Adapt pydoc to new doc system In-Reply-To: <1200935648.41.0.205281442116.issue1883@psf.upfronthosting.co.za> Message-ID: <1212354441.0.0.186082940128.issue1883@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, this is fixed by including topic help as a separate module, and not relying on the HTML documentation, in r63871. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 23:08:24 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 01 Jun 2008 21:08:24 +0000 Subject: [issue836088] Update htmllib to HTML 4.01 Message-ID: <1212354504.34.0.343126706644.issue836088@psf.upfronthosting.co.za> Georg Brandl added the comment: This might be obsolete now that htmllib is going away in 3.0 and deprecated in 2.6. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 23:08:38 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 01 Jun 2008 21:08:38 +0000 Subject: [issue2873] Remove htmllib use in the stdlib In-Reply-To: <1210913045.12.0.944933316665.issue2873@psf.upfronthosting.co.za> Message-ID: <1212354518.62.0.305365058652.issue2873@psf.upfronthosting.co.za> Georg Brandl added the comment: Removed usage in pydoc in r63871. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 23:29:33 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 01 Jun 2008 21:29:33 +0000 Subject: [issue3022] mailbox module, two small fixes In-Reply-To: <1212355773.67.0.369854949727.issue3022@psf.upfronthosting.co.za> Message-ID: <1212355773.67.0.369854949727.issue3022@psf.upfronthosting.co.za> New submission from Guilherme Polo : While fixing the tkinter demos, I found some problems when moving from mhlib to mailbox that are corrected in the attached patch. The first fix: - for name, key_list in self.get_sequences(): + for name, key_list in self.get_sequences().iteritems(): I'm not sure someone else used the module before, or at least get_sequences() since it returns a dict and it just fails in the current code. The second fix is about the .mh_sequences file format I found here, it may have some lines with one space, or two, after its content which was causing the get_sequences() to fail too. ---------- components: Library (Lib) files: mailbox_fixes.diff keywords: patch, patch messages: 67605 nosy: gpolo severity: normal status: open title: mailbox module, two small fixes versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10497/mailbox_fixes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 23:33:06 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 01 Jun 2008 21:33:06 +0000 Subject: [issue2507] Exception state lives too long in 3.0 In-Reply-To: <1206800918.45.0.478667091266.issue2507@psf.upfronthosting.co.za> Message-ID: <1212355986.13.0.886837972969.issue2507@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- superseder: -> Lexical exception handlers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 23:33:14 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 01 Jun 2008 21:33:14 +0000 Subject: [issue2833] __exit__ silences the active exception In-Reply-To: <1210576013.94.0.462684443177.issue2833@psf.upfronthosting.co.za> Message-ID: <1212355994.3.0.258115994755.issue2833@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- superseder: -> Lexical exception handlers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 23:33:34 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 01 Jun 2008 21:33:34 +0000 Subject: [issue3022] mailbox module, two small fixes In-Reply-To: <1212355773.67.0.369854949727.issue3022@psf.upfronthosting.co.za> Message-ID: <1212356014.1.0.644934149877.issue3022@psf.upfronthosting.co.za> Guilherme Polo added the comment: Erm.. sorry, the first correction is directly related to get_message not get_sequences per se. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 23:33:40 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 01 Jun 2008 21:33:40 +0000 Subject: [issue3021] Lexical exception handlers In-Reply-To: <1212350626.42.0.00327926746922.issue3021@psf.upfronthosting.co.za> Message-ID: <1212356020.65.0.385707758753.issue3021@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 23:36:21 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 01 Jun 2008 21:36:21 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1212356181.45.0.725153794453.issue2775@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- dependencies: -Remove htmllib use in the stdlib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 23:38:23 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 01 Jun 2008 21:38:23 +0000 Subject: [issue2980] Pickle stream for unicode object may contain non-ASCII characters. In-Reply-To: <1211902695.6.0.958731947697.issue2980@psf.upfronthosting.co.za> Message-ID: <1212356303.84.0.333934053834.issue2980@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 1 23:44:00 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 01 Jun 2008 21:44:00 +0000 Subject: [issue2997] PyNumberMethods has left-over fields in Py3 In-Reply-To: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> Message-ID: <1212356640.58.0.415347666415.issue2997@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 00:05:32 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 01 Jun 2008 22:05:32 +0000 Subject: [issue3022] mailbox module, two small fixes In-Reply-To: <1212355773.67.0.369854949727.issue3022@psf.upfronthosting.co.za> Message-ID: <1212357932.05.0.949036856703.issue3022@psf.upfronthosting.co.za> Guilherme Polo added the comment: Added a test case Added file: http://bugs.python.org/file10498/test_get_message_with_sequences.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 00:22:20 2008 From: report at bugs.python.org (David Watson) Date: Sun, 01 Jun 2008 22:22:20 +0000 Subject: [issue3023] Problem with invalidly-encoded command-line arguments (Unix) In-Reply-To: <1212358937.18.0.778474192325.issue3023@psf.upfronthosting.co.za> Message-ID: <1212358937.18.0.778474192325.issue3023@psf.upfronthosting.co.za> New submission from David Watson : The error message has no newline at the end: $ LANG=en_GB.UTF-8 python3.0 test.py $'\xff' Could not convert argument 2 to string$ Seriously, though: is this the intended behaviour? If the interpreter just dies when it gets a non-UTF-8 (or whatever) argument, it creates an opportunity for a denial-of-service if some admin is running a Python script via find(1) or similar. And what if you want to run a Python script on some files named in a mixture of charsets (because, say, you just untarred an archive created in a foreign charset)? Could sys.argv not provide bytes objects for those arguments, like os.listdir()? Or (better IMHO) have a separate sys.argv_bytes interface? ---------- components: Unicode messages: 67608 nosy: baikie severity: normal status: open title: Problem with invalidly-encoded command-line arguments (Unix) type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 00:31:18 2008 From: report at bugs.python.org (Razvan Cosma) Date: Sun, 01 Jun 2008 22:31:18 +0000 Subject: [issue3024] Integer conversion inconsistent In-Reply-To: <1212359477.86.0.531880648063.issue3024@psf.upfronthosting.co.za> Message-ID: <1212359477.86.0.531880648063.issue3024@psf.upfronthosting.co.za> New submission from Razvan Cosma : This issue is probably older than I am, and was amazed to discover it in python: Python 2.5.2 (r252:60911, May 7 2008, 15:19:09) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 >>> int(float("-23.15")) -23 >>> int(float("-23.65")) -23 >>> int(float("24.9")) 24 >>> int(float("24.4")) 24 Is this by design? What is the python way of obtaining a correct result? ---------- components: None messages: 67609 nosy: helminthe severity: normal status: open title: Integer conversion inconsistent versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 00:34:05 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 01 Jun 2008 22:34:05 +0000 Subject: [issue3023] Problem with invalidly-encoded command-line arguments (Unix) In-Reply-To: <1212358937.18.0.778474192325.issue3023@psf.upfronthosting.co.za> Message-ID: <1212359645.59.0.697103283137.issue3023@psf.upfronthosting.co.za> Martin v. L?wis added the comment: That os.listdir still uses bytes should be changed as well. Both file names and command line arguments are strings, from the viewpoint of Python. Nothing else is supported. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 00:41:02 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Sun, 01 Jun 2008 22:41:02 +0000 Subject: [issue2847] Remove cl usage from aifc In-Reply-To: <1210726634.74.0.297516553516.issue2847@psf.upfronthosting.co.za> Message-ID: <1212360062.61.0.176063788795.issue2847@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: The attached patch removes all cl references from the aifc module and updates it to make it usable in 3.0. It also supports more compression types because audioop has been enhanced throughout the years (i.e. support for alaw encoding since 2.5). The changes are the following : - replace strings with bytes for frames read from an aiff/aifc file. - replace / by // to have integer division back - added ulaw (as an alternative of ULAW) and alaw/ALAW compression because audioop supports them (I've tested them successfully, using the samples from this URL : http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/AIFF/Samples.html ) - removed all tests when trying to import audioop : they can't fail anymore. - a bit of PEP-8 cleanup I'm not an AIFF/AIFC expert, so criticism is welcome! ---------- keywords: +patch Added file: http://bugs.python.org/file10499/aifc_3.0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 00:41:08 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 01 Jun 2008 22:41:08 +0000 Subject: [issue3024] Integer conversion inconsistent In-Reply-To: <1212359477.86.0.531880648063.issue3024@psf.upfronthosting.co.za> Message-ID: <1212360068.58.0.226421055503.issue3024@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't see any problem with that result? Why do you consider the result incorrect, and what "correct" result would you have inspected instead? Notice that int conversion of floats truncates them, by definition. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 00:44:12 2008 From: report at bugs.python.org (Razvan Cosma) Date: Sun, 01 Jun 2008 22:44:12 +0000 Subject: [issue3024] Integer conversion inconsistent In-Reply-To: <1212359477.86.0.531880648063.issue3024@psf.upfronthosting.co.za> Message-ID: <1212360252.82.0.0333096692379.issue3024@psf.upfronthosting.co.za> Razvan Cosma added the comment: Hello, As far as I know, the correct conversion is to either round to the nearest, or to the smaller integer, but not both. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 00:45:59 2008 From: report at bugs.python.org (Razvan Cosma) Date: Sun, 01 Jun 2008 22:45:59 +0000 Subject: [issue3024] Integer conversion inconsistent In-Reply-To: <1212359477.86.0.531880648063.issue3024@psf.upfronthosting.co.za> Message-ID: <1212360359.62.0.0887204562946.issue3024@psf.upfronthosting.co.za> Razvan Cosma added the comment: Sorry for not writing completely above - python does neither, it rounds to the integer closest to zero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 00:49:54 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 01 Jun 2008 22:49:54 +0000 Subject: [issue3024] Integer conversion inconsistent In-Reply-To: <1212359477.86.0.531880648063.issue3024@psf.upfronthosting.co.za> Message-ID: <1212360594.7.0.199948136189.issue3024@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I see. There is no such thing as a "correct" conversion from real numbers to integer numbers. Instead, there are various approaches, called "truncating", "rounding", "flooring", and "ceiling". Python's default conversion is truncation, and it is consistent in doing so: int(x) will return the nearest integer between 0 and x. If you want rounding, use the round builtin. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 00:51:36 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Jun 2008 22:51:36 +0000 Subject: [issue3024] Integer conversion inconsistent In-Reply-To: <1212359477.86.0.531880648063.issue3024@psf.upfronthosting.co.za> Message-ID: <1212360696.11.0.594954321415.issue3024@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This is exactly what int() is supposed to do. For other kinds of rounding, look at round(), math.floor(), math.ceil(), and many rounding options in the decimal module: from decimal import Decimal >>> Decimal('-23.15').to_integral(ROUND_FLOOR) Decimal("-24") >>> Decimal('-23.15').to_integral(ROUND_CEILING) Decimal("-23") >>> Decimal('-23.15').to_integral(ROUND_DOWN) Decimal("-23") >>> Decimal('-23.15').to_integral(ROUND_HALF_EVEN) Decimal("-23") ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 01:12:29 2008 From: report at bugs.python.org (Jim Jewett) Date: Sun, 01 Jun 2008 23:12:29 +0000 Subject: [issue3025] batch/IDLE differ: print broken for chraracters>ascii In-Reply-To: <1212361944.88.0.914955463157.issue3025@psf.upfronthosting.co.za> Message-ID: <1212361944.88.0.914955463157.issue3025@psf.upfronthosting.co.za> New submission from Jim Jewett : The str->Unicode change widened IDLE/batch discrepancy. In python 2.x, bytes are printable. >>> for i in range(256): print i, chr(i) works fine. In python 3, chr has become (the old) unichr, and whether a unicode character is printable depends on the environment. In particular, under my Windows XP, the equivalent >>> for i in range(256): print (i, chr(i)) will still work fine under IDLE, but will now crash with an UnicodeEncodeError when run from the command line. ---------------- Unfortunately, I'm not sure what the right solution actually is, other than a mention in the Whats New document. I believe the 2.5 code was using a system page to print those characters, as they often looked like letters rather than . Copying that would probably be the wrong solution. Limiting IDLE would add consistency, but might be a lot of work for the equivalent of a --pedantic flag. PEP 3138 seems to be proposing a default stdout BackslashReplace, which may at least help. ---------- assignee: georg.brandl components: Documentation, Unicode messages: 67617 nosy: georg.brandl, jimjjewett severity: normal status: open title: batch/IDLE differ: print broken for chraracters>ascii type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 01:45:31 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 01 Jun 2008 23:45:31 +0000 Subject: [issue2791] subprocess.py leaks fd in communicate In-Reply-To: <1210249364.92.0.977353677692.issue2791@psf.upfronthosting.co.za> Message-ID: <1212363931.0.0.698229277065.issue2791@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fixed in release25-maint r63881. ---------- resolution: -> accepted status: open -> closed versions: +Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 01:49:39 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 01 Jun 2008 23:49:39 +0000 Subject: [issue2871] store thread.get_ident() thread identifier inside threading.Thread objects In-Reply-To: <1210888254.97.0.197047518827.issue2871@psf.upfronthosting.co.za> Message-ID: <1212364179.94.0.919783805377.issue2871@psf.upfronthosting.co.za> Gregory P. Smith added the comment: committed to trunk r63882 for inclusion in 2.6. ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 01:50:16 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 01 Jun 2008 23:50:16 +0000 Subject: [issue2871] store thread.get_ident() thread identifier inside threading.Thread objects In-Reply-To: <1210888254.97.0.197047518827.issue2871@psf.upfronthosting.co.za> Message-ID: <1212364216.49.0.174873830424.issue2871@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 02:08:35 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 02 Jun 2008 00:08:35 +0000 Subject: [issue2588] PyOS_vsnprintf() underflow leads to memory corruption In-Reply-To: <1207670110.11.0.605807538943.issue2588@psf.upfronthosting.co.za> Message-ID: <1212365315.67.0.133466506378.issue2588@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Fixed in release25-maint r63883. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 02:08:52 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 02 Jun 2008 00:08:52 +0000 Subject: [issue2589] PyOS_vsnprintf() potential integer overflow leads to memory corruption In-Reply-To: <1207670389.49.0.356116216637.issue2589@psf.upfronthosting.co.za> Message-ID: <1212365332.37.0.691136997433.issue2589@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Fixed in release25-maint r63883. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 02:23:18 2008 From: report at bugs.python.org (Manuel Kaufmann) Date: Mon, 02 Jun 2008 00:23:18 +0000 Subject: [issue2834] re.IGNORECASE not Unicode-ready In-Reply-To: <1210581845.07.0.550614143529.issue2834@psf.upfronthosting.co.za> Message-ID: <1212366198.45.0.498306468729.issue2834@psf.upfronthosting.co.za> Manuel Kaufmann added the comment: I have the same error with the re.LOCALE flag... [humitos] [~]$ python3.0 Python 3.0a5+ (py3k:63855, Jun 1 2008, 13:05:09) [GCC 4.1.3 20080114 (prerelease) (Debian 4.1.2-19)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> rx = re.compile('?', re.LOCALE | re.IGNORECASE) >>> rx.match('?') >>> rx.match('?') <_sre.SRE_Match object at 0x2b955e204d30> >>> rx = re.compile('?', re.IGNORECASE | re.LOCALE) >>> rx.match('?') <_sre.SRE_Match object at 0x2b955e204e00> >>> rx.match('?') >>> '?'.lower() == '?' and '?'.upper() == '?' True >>> ---------- nosy: +humitos _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 04:24:59 2008 From: report at bugs.python.org (Matthew Mueller) Date: Mon, 02 Jun 2008 02:24:59 +0000 Subject: [issue3026] mmap broken with large files on 64bit system In-Reply-To: <1212373498.52.0.766248013838.issue3026@psf.upfronthosting.co.za> Message-ID: <1212373498.52.0.766248013838.issue3026@psf.upfronthosting.co.za> New submission from Matthew Mueller : mmap on large files on 64 bit platforms in python >=2.5 returns some sort of garbage. In 2.4 it would just throw an exception. Now I get something like this (script runs md5.md5 on mmap object, and then runs os.system md5sum for comparison): This is python2.5 from Ubuntu 8.04 AMD64 /tmp$ python2.5 testbigfile.py python mmap md5: 1230552d39b7c1751f86bae5205ec0c8 abe59e28c9a3f11b883f62c80a3833a5 *bigfile This is python svn as of 20080601, compiled the on same system. /tmp$ python2.6 testbigfile.py testbigfile.py:5: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 python mmap md5: 1230552d39b7c1751f86bae5205ec0c8 abe59e28c9a3f11b883f62c80a3833a5 *bigfile Also note how the python md5 call returns immediately, not something you would expect when md5ing 4GB of data. ---------- components: Extension Modules files: testbigfile.py messages: 67623 nosy: donut severity: normal status: open title: mmap broken with large files on 64bit system type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file10500/testbigfile.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 04:29:54 2008 From: report at bugs.python.org (Matthew Mueller) Date: Mon, 02 Jun 2008 02:29:54 +0000 Subject: [issue3026] mmap broken with large files on 64bit system In-Reply-To: <1212373498.52.0.766248013838.issue3026@psf.upfronthosting.co.za> Message-ID: <1212373794.92.0.701263744183.issue3026@psf.upfronthosting.co.za> Matthew Mueller added the comment: Actually, I just realized that this might be a problem with md5 module instead. Either way, something is busted. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 05:15:16 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Mon, 02 Jun 2008 03:15:16 +0000 Subject: [issue1112856] patch 1079734 broke cgi.FieldStorage w/ multipart post req. Message-ID: <1212376516.57.0.987294388552.issue1112856@psf.upfronthosting.co.za> Humberto Diogenes added the comment: > Er - while reverting it makes the code work again, I'm > _really_ unhappy with this as a long-term solution. I've addressed almost everything that's discussed here in issue 2849, implementing Josh's suggestion of using FeedParser. It removes rfc822 (but not mimetools [yet]) dependency from the cgi module, without the parsing problem pointed by cgibug.py and without hanging, as shown in server.py + post.html. Also, preliminary tests revealed that the new FieldStorage.read_multi is about 10 times faster than the old one. ---------- nosy: +hdiogenes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 22:41:37 2008 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Mon, 02 Jun 2008 20:41:37 +0000 Subject: [issue1706460] access to unicodedata (via codepoints or 2-char surrogates) Message-ID: <1212439297.22.0.955728431904.issue1706460@psf.upfronthosting.co.za> Walter D?rwald added the comment: Fixed for 2.6 in r63899. ---------- nosy: +doerwalter resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 20:43:35 2008 From: report at bugs.python.org (Thomas Heller) Date: Mon, 02 Jun 2008 18:43:35 +0000 Subject: [issue2936] ctypes.util.find_library() doesn't consult LD_LIBRARY_PATH In-Reply-To: <1211398520.2.0.251558881651.issue2936@psf.upfronthosting.co.za> Message-ID: <1212432215.38.0.0229689279415.issue2936@psf.upfronthosting.co.za> Changes by Thomas Heller : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 19:59:48 2008 From: report at bugs.python.org (David Watson) Date: Mon, 02 Jun 2008 17:59:48 +0000 Subject: [issue3023] Problem with invalidly-encoded command-line arguments (Unix) In-Reply-To: <1212358937.18.0.778474192325.issue3023@psf.upfronthosting.co.za> Message-ID: <1212429585.73.0.712442034935.issue3023@psf.upfronthosting.co.za> David Watson added the comment: Hmm, yes, I see that the open() builtin doesn't accept bytes filenames, though os.open() still does. When I saw that you could pass bytes filenames transparently from os.listdir() to os.open(), I assumed that this was intentional! So what *is* os.listdir() supposed to do when it finds an unconvertible filename? Raise an exception? Pretend the file isn't there? What if someone puts unconvertible strings in the password database? I think this is going to cause real problems for people. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 07:14:37 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Jun 2008 05:14:37 +0000 Subject: [issue3025] batch/IDLE differ: print broken for chraracters>ascii In-Reply-To: <1212361944.88.0.914955463157.issue3025@psf.upfronthosting.co.za> Message-ID: <1212383676.91.0.189286823813.issue3025@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Whether or not that works in 3k depends on your console's encoding; your program works just fine for me in Linux, with a UTF-8 console. Python 2.5 was not using a "system page" (whatever that is); it was sending the bytes to the terminal as-is, which then could interpret them according to whatever encoding it choses to. Again, on a UTF-8 terminal, sending individual bytes above 128 is meaningless, so the console had to deal with it somehow. I fail to see a Python problem in this report, so I'm closing it as "works for me". ---------- nosy: +loewis resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 07:14:37 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Mon, 02 Jun 2008 05:14:37 +0000 Subject: [issue2917] merge pickle and cPickle in 3.0 In-Reply-To: <1211227162.29.0.0642317760161.issue2917@psf.upfronthosting.co.za> Message-ID: <1212383676.91.0.127109049097.issue2917@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Here is the fully reviewed and shiny C optimized pickle module. :-) Note, I am only posting the _pickle.c source code for now. I still need to work out a few details out. For example, there is a few methods that needs to be exposed in the public API -- i.e., Unpickler.find_class() and Pickler.save_reduce(). Also, instantiate() needs to reworked to match the one in pickle.py. Anyway, I am now pretty confident that I will have the time to finalize these details before the beta. Added file: http://bugs.python.org/file10501/_pickle.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 06:12:00 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 02 Jun 2008 04:12:00 +0000 Subject: [issue2782] datetime/date strftime() method and time.strftime() inconsistency In-Reply-To: <1210171543.31.0.364893974178.issue2782@psf.upfronthosting.co.za> Message-ID: <1212379920.61.0.979080973956.issue2782@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Fixed in trunk (2.6) r63887. ---------- assignee: gregory.p.smith -> resolution: -> fixed status: open -> closed versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 11:53:22 2008 From: report at bugs.python.org (patrick) Date: Mon, 02 Jun 2008 09:53:22 +0000 Subject: [issue3027] if extended c module is calling Windows API waitForSingleObject, it will block other thread. In-Reply-To: <1212400401.02.0.0405050375682.issue3027@psf.upfronthosting.co.za> Message-ID: <1212400401.02.0.0405050375682.issue3027@psf.upfronthosting.co.za> New submission from patrick : The c extend module is as the attached file "WindowsFuncs.cpp", it wraps some Windows event APIs The python script is as the attached file "test.py", run that script, we could find in the new thread, the calling to Windows API waitForSingleObject will block the main thread printing, that's really strange. The output of running is as the attached file "test.output". ---------- components: Interpreter Core files: attach.zip messages: 67633 nosy: patrick severity: normal status: open title: if extended c module is calling Windows API waitForSingleObject, it will block other thread. versions: Python 2.5 Added file: http://bugs.python.org/file10502/attach.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 16:13:00 2008 From: report at bugs.python.org (Andrew I MacIntyre) Date: Mon, 02 Jun 2008 14:13:00 +0000 Subject: [issue3029] free list management - list, dict, set In-Reply-To: <1212415979.8.0.492351620272.issue3029@psf.upfronthosting.co.za> Message-ID: <1212415979.8.0.492351620272.issue3029@psf.upfronthosting.co.za> New submission from Andrew I MacIntyre : The attached patch adds free list clearing routines for the list, dict & set objects. These objects are the only ones with free lists that don't already have some form of free list management API. This patch complements the patch in issue 2862. ---------- assignee: christian.heimes components: Interpreter Core files: list_dict_set_clearfreelist.patch keywords: patch, patch messages: 67636 nosy: aimacintyre, christian.heimes priority: high severity: normal status: open title: free list management - list, dict, set type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file10503/list_dict_set_clearfreelist.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 08:05:10 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 02 Jun 2008 06:05:10 +0000 Subject: [issue2997] PyNumberMethods has left-over fields in Py3 In-Reply-To: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> Message-ID: <1212386710.47.0.393106814418.issue2997@psf.upfronthosting.co.za> Georg Brandl added the comment: Not to me... ---------- nosy: +georg.brandl resolution: out of date -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 13:21:21 2008 From: report at bugs.python.org (Thomas Herve) Date: Mon, 02 Jun 2008 11:21:21 +0000 Subject: [issue3027] if extended c module is calling Windows API waitForSingleObject, it will block other thread. In-Reply-To: <1212400401.02.0.0405050375682.issue3027@psf.upfronthosting.co.za> Message-ID: <1212405681.25.0.173139357789.issue3027@psf.upfronthosting.co.za> Thomas Herve added the comment: You have to release the GIL. See http://docs.python.org/api/threads.html for some information. ---------- nosy: +therve _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 05:33:10 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Mon, 02 Jun 2008 03:33:10 +0000 Subject: [issue2849] Remove usage of rfc822 from the stdlib In-Reply-To: <1210726924.82.0.902490265063.issue2849@psf.upfronthosting.co.za> Message-ID: <1212377590.42.0.485613468123.issue2849@psf.upfronthosting.co.za> Humberto Diogenes added the comment: With the attached patches, rfc822 won't be used anywhere inside Lib/ anymore (with the exception of mimetools, which is going away too). Is there any reason to convert the files below? Shouldn't they be removed from 3.0? Demo/scripts/mboxconvert.py -> superseded by mailbox.py Tools/faqwiz/faqwiz.py -> really old (1998) Tools/scripts/mailerdaemon.py -> still useful? Tools/versioncheck/pyversioncheck.py -> really old (1997) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 23:51:11 2008 From: report at bugs.python.org (Gregor Lingl) Date: Mon, 02 Jun 2008 21:51:11 +0000 Subject: [issue1513695] new turtle module Message-ID: <1212443470.9.0.626084544999.issue1513695@psf.upfronthosting.co.za> Gregor Lingl added the comment: I'd like to propose a few modifications of turtle.py for the transition from Python 2.6 to Python 3.0, which would result in a cleaner interface but also in some - i think marginal - incompatibiliy: 1) drop from math import * 2) delete the methods Turtle.window_width() and Turtle.indow_height() (They are mereley transferred from Screen to Turtle and are imho generic Screen.methods. So they will still be present as Screen methods and as functions. In fact this proposition has a didactic background - on should teach to differentiate between Screen- and Turtle-methods as belonging to two completely different types of objects, and the only realistic reply to the student's question "Why do Turtle objects have a window_width() method would be: "for historical reasons!" When, if not now, is time to make changes like this?) 3) The same is valid for Turtle.tracer() as tracer controls in fact Screen-updates and not Turtle updates. (The only difference is, that Turtle.tracer cannot be deleted, because it's (currently) used in turtle.circle(), so I'd propose to rename it to Turtle._tracer() and so delete it from the public interface. Of course tracer() will also remain present als Screen-method and as function. Pros and cons? I have prepared a file with these changes which could be used for porting it to Python3.0. So if everybody agrees, I could upload it. Regards, Gregor _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 23:58:55 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 02 Jun 2008 21:58:55 +0000 Subject: [issue2847] Remove cl usage from aifc In-Reply-To: <1210726634.74.0.297516553516.issue2847@psf.upfronthosting.co.za> Message-ID: <1212443935.43.0.677442190209.issue2847@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> georg.brandl nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 23:59:15 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 02 Jun 2008 21:59:15 +0000 Subject: [issue3022] mailbox module, two small fixes In-Reply-To: <1212355773.67.0.369854949727.issue3022@psf.upfronthosting.co.za> Message-ID: <1212443955.79.0.758708512134.issue3022@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> georg.brandl nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 00:07:16 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 02 Jun 2008 22:07:16 +0000 Subject: [issue2849] Remove usage of rfc822 from the stdlib In-Reply-To: <1212377590.42.0.485613468123.issue2849@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sun, Jun 1, 2008 at 8:33 PM, Humberto Diogenes wrote: > > Humberto Diogenes added the comment: > > With the attached patches, rfc822 won't be used anywhere inside Lib/ > anymore (with the exception of mimetools, which is going away too). > > Is there any reason to convert the files below? Shouldn't they be removed > from 3.0? > Demo/scripts/mboxconvert.py -> superseded by mailbox.py > Tools/faqwiz/faqwiz.py -> really old (1998) > Tools/scripts/mailerdaemon.py -> still useful? > Tools/versioncheck/pyversioncheck.py -> really old (1997) > Probably. I bet both the Demo and Tools directory need a thorough clean-up. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 00:14:34 2008 From: report at bugs.python.org (John Arbash Meinel) Date: Mon, 02 Jun 2008 22:14:34 +0000 Subject: [issue3013] disutils fails with GNU ld (GNU Binutils) 2.18.50.20080523 In-Reply-To: <1212444169.46.0.8468320631.issue3013@psf.upfronthosting.co.za> Message-ID: <484470B5.6060501@arbash-meinel.com> John Arbash Meinel added the comment: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Georg Brandl wrote: | Georg Brandl added the comment: | | Do you need the (\.\d+)* trailer in the regex at all? | | ---------- | nosy: +georg.brandl Not sure. The actual revision is: 2.18.50.20080523 The code used to allow lots of version numbers, and I didn't know if we wanted to require that or not. Certainly just changing * => ? is a simpler fix. And since we don't end with $ or anything, it should still match. John =:-> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhEcLUACgkQJdeBCYSNAAPO8ACggCAEx1HWnfv3FD1KAnvyGzKg tbwAn3D6xKEbQkHWrP1dKaO4tSsE6Ito =DpMW -----END PGP SIGNATURE----- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 22:30:49 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Jun 2008 20:30:49 +0000 Subject: [issue3023] Problem with invalidly-encoded command-line arguments (Unix) In-Reply-To: <1212358937.18.0.778474192325.issue3023@psf.upfronthosting.co.za> Message-ID: <1212438649.27.0.766465253234.issue3023@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The issue with unrepresentable file names hasn't been decided yet. One option is to include the bytes object in that case, instead, noting that this can only occur on selected platforms. Another option is indeed to raise an exception, or exclude the file from the listing (although errors should never pass silently). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 00:02:49 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 02 Jun 2008 22:02:49 +0000 Subject: [issue3013] disutils fails with GNU ld (GNU Binutils) 2.18.50.20080523 In-Reply-To: <1212183234.85.0.030546530082.issue3013@psf.upfronthosting.co.za> Message-ID: <1212444169.46.0.8468320631.issue3013@psf.upfronthosting.co.za> Georg Brandl added the comment: Do you need the (\.\d+)* trailer in the regex at all? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 10:40:53 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 02 Jun 2008 08:40:53 +0000 Subject: [issue2980] Pickle stream for unicode object may contain non-ASCII characters. In-Reply-To: <1211902695.6.0.958731947697.issue2980@psf.upfronthosting.co.za> Message-ID: <1212396053.01.0.129003917392.issue2980@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: We could add an extra step to also escape range(128, 256) code points, but I don't think it's worth the performance loss this would cause. Note that this was the first time anyone has ever noticed the fact that the pickle protocol 0 is not pure ASCII - in 8 years. I think it's better to just adapt the documentation and remove the "ASCII". The important feature of protocol 0 is being human readable (to some extent), not that it's pure ASCII. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 00:55:15 2008 From: report at bugs.python.org (Gregor Lingl) Date: Mon, 02 Jun 2008 22:55:15 +0000 Subject: [issue1513695] new turtle module Message-ID: <1212447314.35.0.882107541311.issue1513695@psf.upfronthosting.co.za> Gregor Lingl added the comment: In my last posting i forgot a fourth proposition. Currently one has the Turtle.methods fill(), begin_fill() and end_fill() As is stated in the old turtle docs the specification of fill is "rather complex". begin_fill() and end_fill(), are identical to fill(True) and fill(False) (or fill(1) and fill(0)). That means, that begin_fill() sometimes may do somthing unexpected, namely complete som filling underway. In the new turtle module fill() without arguments returns the filling state, i. e. True/False respectively. I'd prefer the following: begin_fill() should only start a new filling process and cancel some underway, if necessary (that means: a filling without end_fill will not take place) end_fill() should only complete the current filling process a new method filling() should be used to ask if same filling is currently taking place and fill() could be dropped. (deprecated in 2.6) I think Vern Ceders intention with introducing begin_fill and end_fill was to have a clear and easily understandable meaning, which is only partially accomplished with the current solution. What is your opinion? Gregor _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 01:04:27 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Jun 2008 23:04:27 +0000 Subject: [issue3029] free list management - list, dict, set In-Reply-To: <1212415979.8.0.492351620272.issue3029@psf.upfronthosting.co.za> Message-ID: <1212447867.12.0.46948167262.issue3029@psf.upfronthosting.co.za> Raymond Hettinger added the comment: What is the point of expanding the C API for clearing individual types. Isn't the single Fini function sufficient to clear them all? Make the approaches consistent seems like a reasonable goal, but why did you choose the path where everything has its own clearing function instead of one to bind the all? What apps need this? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 01:53:37 2008 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 02 Jun 2008 23:53:37 +0000 Subject: [issue2906] tkinter, assorted fixes In-Reply-To: <1211125137.99.0.839625810587.issue2906@psf.upfronthosting.co.za> Message-ID: <1212450817.33.0.552817624812.issue2906@psf.upfronthosting.co.za> Guilherme Polo added the comment: I found a case where the support for values under list or tuple would fail, when the contents contain spaces it needs a proper tcl formatting. I'm attaching a new patch that fixes this. ---------- resolution: accepted -> status: closed -> open Added file: http://bugs.python.org/file10504/tkinter_tuple_list_support.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 13:33:32 2008 From: report at bugs.python.org (Noam Raphael) Date: Mon, 02 Jun 2008 11:33:32 +0000 Subject: [issue3028] tokenize module: normal lines, not "logical" In-Reply-To: <1212406411.84.0.811061181289.issue3028@psf.upfronthosting.co.za> Message-ID: <1212406411.84.0.811061181289.issue3028@psf.upfronthosting.co.za> New submission from Noam Raphael : Hello, The documentation of the tokenize module says: "The line passed is the *logical* line; continuation lines are included." Some background: The tokenize module splits a python source into tokens, and says for each token where it begins and where it ends, in the format of (row, offset). This note in the documentation made me think that continuation lines are considered as one line, and made me break my head how I should find the offset of the token in the original string. The truth is that the row number is simply the index of the line as returned by the readline function, and it's very simple to reconstruct the string offset. I suggest that this will be changed to something like "The line passed is the index of the string returned by the readline function, plus 1. That is, the first string returned is called line 1, the second is called line 2, and so on." Thanks, Noam ---------- assignee: georg.brandl components: Documentation messages: 67635 nosy: georg.brandl, noam severity: normal status: open title: tokenize module: normal lines, not "logical" versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 09:32:09 2008 From: report at bugs.python.org (Adam Olsen) Date: Mon, 02 Jun 2008 07:32:09 +0000 Subject: [issue3021] Lexical exception handlers In-Reply-To: <1212350626.42.0.00327926746922.issue3021@psf.upfronthosting.co.za> Message-ID: <1212391928.98.0.540235413717.issue3021@psf.upfronthosting.co.za> Changes by Adam Olsen : ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 2 10:43:32 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Jun 2008 08:43:32 +0000 Subject: [issue2125] Read support for Records in msilib In-Reply-To: <1203093337.85.0.620181363068.issue2125@psf.upfronthosting.co.za> Message-ID: <1212396212.25.0.098573135764.issue2125@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the patch. Committed as r63888 ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 03:20:03 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 03 Jun 2008 01:20:03 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1212456003.48.0.518728039605.issue2819@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch that fixes the problems with math.sum on x86 machines that aren't using SSE2. On these machines, the patched version of math.sum does almost the entire calculation using long doubles instead of doubles. Then in the final summation, the top long double is split into a double and a residue long double. Added file: http://bugs.python.org/file10505/mathsum_IA32.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 04:58:28 2008 From: report at bugs.python.org (patrick) Date: Tue, 03 Jun 2008 02:58:28 +0000 Subject: [issue3027] if extended c module is calling Windows API waitForSingleObject, it will block other thread. In-Reply-To: <1212400401.02.0.0405050375682.issue3027@psf.upfronthosting.co.za> Message-ID: <1212461907.99.0.206021491428.issue3027@psf.upfronthosting.co.za> patrick added the comment: Yes, after wrapping the calling to block operation with marco Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS, that issue is gone. Thank you. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 07:55:57 2008 From: report at bugs.python.org (Thomas Heller) Date: Tue, 03 Jun 2008 05:55:57 +0000 Subject: [issue3030] compiler warning on HP-UX In-Reply-To: <1212472557.24.0.226147292753.issue3030@psf.upfronthosting.co.za> Message-ID: <1212472557.24.0.226147292753.issue3030@psf.upfronthosting.co.za> New submission from Thomas Heller : On HP-UX, there is a compiler warning about _POSIX_C_SOURCE redefined: bash-2.04$ make gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c In file included from Include/Python.h:8, from ./Modules/python.c:3: ./pyconfig.h:1023:1: warning: "_POSIX_C_SOURCE" redefined :3:1: warning: this is the location of the previous definition gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Parser/acceler.o Parser/acceler.c In file included from Include/Python.h:8, from Include/pgenheaders.h:10, from Parser/acceler.c:13: ./pyconfig.h:1023:1: warning: "_POSIX_C_SOURCE" redefined ... ---------- components: Build messages: 67649 nosy: theller severity: normal status: open title: compiler warning on HP-UX versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 09:18:36 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 03 Jun 2008 07:18:36 +0000 Subject: [issue3027] if extended c module is calling Windows API waitForSingleObject, it will block other thread. In-Reply-To: <1212400401.02.0.0405050375682.issue3027@psf.upfronthosting.co.za> Message-ID: <1212477516.78.0.550365192519.issue3027@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 11:39:36 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Tue, 03 Jun 2008 09:39:36 +0000 Subject: [issue2847] Remove cl usage from aifc In-Reply-To: <1210726634.74.0.297516553516.issue2847@psf.upfronthosting.co.za> Message-ID: <1212485976.64.0.315812976291.issue2847@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: Updated the patch with the following corrections/improvements : - corrected a missed str -> bytes - replace % formatting occurrences with str.format() - more PEP-8 conformance Added file: http://bugs.python.org/file10506/aifc_3.0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 11:39:45 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Tue, 03 Jun 2008 09:39:45 +0000 Subject: [issue2847] Remove cl usage from aifc In-Reply-To: <1210726634.74.0.297516553516.issue2847@psf.upfronthosting.co.za> Message-ID: <1212485985.1.0.831747751099.issue2847@psf.upfronthosting.co.za> Changes by Quentin Gallet-Gilles : Removed file: http://bugs.python.org/file10499/aifc_3.0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 12:13:56 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 03 Jun 2008 10:13:56 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212488036.32.0.623029581987.issue2630@psf.upfronthosting.co.za> Georg Brandl added the comment: Review: * Why is an empty string not printable? In any case, the empty string should be among the test cases for isprintable(). * Why not use PyUnicode_DecodeASCII instead of PyUnicode_FromEncodedObject? It should be a bit faster. * If old-style string formatting gets "%a", .format() must get a "!a" specifier. * The ascii() and repr() tests should be expanded so that both test the same set of objects, and the expected differences. Are there tests for failing cases? * This is just "return ascii" (in builtin_ascii): + if (ascii == NULL) + return NULL; + + return ascii; * For PyBool_FromLong(1) and PyBool_FromLong(0) there is Py_RETURN_TRUE and Py_RETURN_FALSE. (You're not to blame, the rest of unicodeobject.c seems to use them too, probably a legacy.) * There appear to be some space indentations in tab-indented files like bltinmodule.c and vice versa (unicodeobject.c). * C docs/isprintable() docs: The spec + Characters defined in the Unicode character database as "Other" + or "Separator" other than ASCII space(0x20) are not considered + printable. is unclear, better say "All character except those ... are considered printable". * ascii() docs: + the non-ASCII + characters in the string returned by :func:`ascii`() are hex-escaped + to generate a same string as :func:`repr` in Python 2. should be "the non-ASCII characters in the string returned by :func:`repr` are backslash-escaped (with ``\x``, ``\u`` or ``\U``) to generate ...". * makeunicodedata: len(list(n for n in names if n is not None)) could better be expressed as sum(1 for n in names if n is not None). Otherwise, the patch is fine IMO. (I'm surprised that only so few tests needed adaptation, that's a sign that we're not testing Unicode enough.) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 12:26:38 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 03 Jun 2008 10:26:38 +0000 Subject: [issue2906] tkinter, assorted fixes In-Reply-To: <1211125137.99.0.839625810587.issue2906@psf.upfronthosting.co.za> Message-ID: <1212488798.61.0.479921031969.issue2906@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in trunk, 25-maint and 3k. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 12:31:24 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 03 Jun 2008 10:31:24 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212489084.61.0.50893907639.issue2630@psf.upfronthosting.co.za> Georg Brandl added the comment: One more thing: with r63891 the encoding and errors arguments for the creation of sys.stderr were made configurable; you'll have to adapt the patch so that it defaults to backslashescape but can be overridden by PYTHONIOENCODING. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 12:33:43 2008 From: report at bugs.python.org (Atsuo Ishimoto) Date: Tue, 03 Jun 2008 10:33:43 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212489222.98.0.19006615445.issue2630@psf.upfronthosting.co.za> Atsuo Ishimoto added the comment: This patch contains following changes. - Added the new C API PyObject_ASCII() for consistency. - Added the new string formatting operater for str.format() and PyUnicode_FromFormat. Added file: http://bugs.python.org/file10507/diff6.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 13:00:52 2008 From: report at bugs.python.org (Atsuo Ishimoto) Date: Tue, 03 Jun 2008 11:00:52 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212490852.22.0.0427072493936.issue2630@psf.upfronthosting.co.za> Atsuo Ishimoto added the comment: Thank you for your review! I filed a new patch just before I see your comments. On Tue, Jun 3, 2008 at 7:13 PM, Georg Brandl wrote: > > Georg Brandl added the comment: > > Review: > > * Why is an empty string not printable? In any case, the empty string > should be among the test cases for isprintable(). Well, my intuition came from str.islower() was wrong. An empty string is printable, of cource. > * Why not use PyUnicode_DecodeASCII instead of > PyUnicode_FromEncodedObject? It should be a bit faster. > Okay, thank you. > * If old-style string formatting gets "%a", .format() must get a "!a" > specifier. > I added the format string in my latest patch. > * The ascii() and repr() tests should be expanded so that both test the > same set of objects, and the expected differences. Are there tests for > failing cases? > Okay, thank you. > * This is just "return ascii" (in builtin_ascii): > + if (ascii == NULL) > + return NULL; > + > + return ascii; Fixed in my latest patch. > > * For PyBool_FromLong(1) and PyBool_FromLong(0) there is Py_RETURN_TRUE > and Py_RETURN_FALSE. (You're not to blame, the rest of unicodeobject.c > seems to use them too, probably a legacy.) Okay, thank you. > > * There appear to be some space indentations in tab-indented files like > bltinmodule.c and vice versa (unicodeobject.c). > I think bltinmodule.c is fixed with latest patch, but I don't know what is correct indentation for unicodeobject.c. I guess latest patch is acceptable. > * C docs/isprintable() docs: The spec > + Characters defined in the Unicode character database as "Other" > + or "Separator" other than ASCII space(0x20) are not considered > + printable. > is unclear, better say "All character except those ... are considered > printable". > > * ascii() docs: > + the non-ASCII > + characters in the string returned by :func:`ascii`() are hex-escaped > + to generate a same string as :func:`repr` in Python 2. > > should be > > "the non-ASCII characters in the string returned by :func:`repr` are > backslash-escaped (with ``\x``, ``\u`` or ``\U``) to generate ...". > Okay, thank you. > * makeunicodedata: len(list(n for n in names if n is not None)) could > better be expressed as sum(1 for n in names if n is not None). I don't want to change here, because this is reversion of rev 63378. > One more thing: with r63891 the encoding and errors arguments for the > creation of sys.stderr were made configurable; you'll have to adapt the > patch so that it defaults to backslashescape but can be overridden by > PYTHONIOENCODING. I think sys.stderr should be default to 'backslashreplace' always. I'll post a messege to Py3k-list later. > > Otherwise, the patch is fine IMO. (I'm surprised that only so few tests > needed adaptation, that's a sign that we're not testing Unicode enough.) > Thank you very much! I'll file new patch soon. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 13:06:50 2008 From: report at bugs.python.org (Atsuo Ishimoto) Date: Tue, 03 Jun 2008 11:06:50 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212491210.29.0.325074662374.issue2630@psf.upfronthosting.co.za> Atsuo Ishimoto added the comment: BTW, are new C APIs and functions should be ported to Python 2.6 for compatibility, without modifing repr() itself? If so, I'll prepare a patch for Python 2.6. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 13:10:24 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 03 Jun 2008 11:10:24 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212491422.92.0.139523024558.issue2630@psf.upfronthosting.co.za> Georg Brandl added the comment: ascii() should probably be in future_builtins. Whether the C API stuff and .isprintable() should be backported to 2.6 is something for Guido to decide. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 13:35:48 2008 From: report at bugs.python.org (Andrew I MacIntyre) Date: Tue, 03 Jun 2008 11:35:48 +0000 Subject: [issue3029] free list management - list, dict, set In-Reply-To: <1212415979.8.0.492351620272.issue3029@psf.upfronthosting.co.za> Message-ID: <1212492947.58.0.743577395905.issue3029@psf.upfronthosting.co.za> Andrew I MacIntyre added the comment: Freelist clearing functions for int and float were added by Christian, and made available to Python code via a function in the sys module. I don't know who added the freelist clearing functions for the class, frame, method, tuple and unicode objects, but they are called by gc.collect(). Because the freelist implementations are all static to the relevant type source files, functions within each object source file seem a reasonable way of implementing the required functionality. I don't see the need for them to be part of the public API, but I framed this patch to fit in with what's already in place. It is likely that the functionality of this patch is of minor value, and can thus be rejected. Indeed, I experimented with ripping out all freelists and making sure that all types used PyMalloc, and the resulting interpreter is about 6-8% slower on a pybench run (FreeBSD 7.0, gcc 4.2.1, 6% slower on 32bit, 8% slower on 64bit, 64bit is ~15% faster than 32bit in either case) than the trunk (r63501). Individual micro-benchmarks in pybench show 15-30% variations between the freelist & no freelist, but this doesn't seem to significantly affect the running of the whole benchmark. Issue 2862 is more important IMO, as the current situation has 2 different approaches to accessing freelist management, where I believe there should only be 1. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 15:06:09 2008 From: report at bugs.python.org (fma) Date: Tue, 03 Jun 2008 13:06:09 +0000 Subject: [issue3031] distutils package_dir/package_data failure In-Reply-To: <1212498369.04.0.406397412231.issue3031@psf.upfronthosting.co.za> Message-ID: <1212498369.04.0.406397412231.issue3031@psf.upfronthosting.co.za> New submission from fma : For python2.4: Python 2.4.4 (#2, Apr 15 2008, 23:43:20) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 The distutils documentation says to use an empty string in the setup() 'package_dir' param. for current dir. It works fine for python modules, but it fails when using 'package_data' param. For example: . |-- __init__.py |-- module1.py |-- module2.py |-- setup.py `-- view |-- __init__.py |-- module3.glade |-- module3.py |-- module4.glade `-- module4.py setup.py: from distutils.core import setup setup(name='my_package', package_dir={'my_package': ''}, packages=['my_package', 'my_package.view'], package_data={'my_package': ['view/*.glade']} ) $ python setup.py build running build running build_py creating build creating build/lib creating build/lib/my_package copying module1.py -> build/lib/my_package copying module2.py -> build/lib/my_package copying __init__.py -> build/lib/my_package creating build/lib/my_package/view copying view/module3.py -> build/lib/my_package/view copying view/module4.py -> build/lib/my_package/view copying view/__init__.py -> build/lib/my_package/view creating build/lib/my_package/iew error: can't copy 'iew/module3.glade': doesn't exist or not a regular file To correct this, '.' should be used instead of the empty string: from distutils.core import setup setup(name='my_package', package_dir={'my_package': '.'}, packages=['my_package', 'my_package.view'], package_data={'my_package': ['view/*.glade']} ) Note that the empty string works fine on python2.5: Python 2.5.2 (r252:60911, Apr 17 2008, 13:15:05) [GCC 4.2.3 (Debian 4.2.3-3)] on linux2 ---------- components: Distutils messages: 67659 nosy: fma severity: normal status: open title: distutils package_dir/package_data failure type: behavior versions: Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 19:15:38 2008 From: report at bugs.python.org (Senthil) Date: Tue, 03 Jun 2008 17:15:38 +0000 Subject: [issue3028] tokenize module: normal lines, not "logical" In-Reply-To: <1212406411.84.0.811061181289.issue3028@psf.upfronthosting.co.za> Message-ID: <20080603171217.GA3537@gmail.com> Senthil added the comment: > The documentation of the tokenize module says: "The line passed is the > *logical* line; continuation lines are included." > > I suggest that this will be changed to something like "The line passed > is the index of the string returned by the readline function, plus 1. > That is, the first string returned is called line 1, the second is > called line 2, and so on." The emphasis of *logical* may help us understand that it is a complete line. I find the wording of solution bit awkward, tough I am able to get what it is trying to say. - Index of string returned by readline function ?? and plus 1. ?? How about, The line passed is the *logical* non-blank line; continuation lines are included. The row counting starts from one. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 19:46:05 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 03 Jun 2008 17:46:05 +0000 Subject: [issue1730136] tkFont.__eq__ gives type error Message-ID: <1212515165.47.0.922740121059.issue1730136@psf.upfronthosting.co.za> Changes by Guilherme Polo : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 19:46:30 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 03 Jun 2008 17:46:30 +0000 Subject: [issue1730136] tkFont.__eq__ gives type error Message-ID: <1212515190.26.0.243629089501.issue1730136@psf.upfronthosting.co.za> Guilherme Polo added the comment: Patch added ---------- keywords: +patch nosy: +gpolo Added file: http://bugs.python.org/file10508/tkFont.Font.__eq__.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 19:47:30 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 03 Jun 2008 17:47:30 +0000 Subject: [issue3032] tkFont added displayof where necessary Message-ID: <1212515250.33.0.732386075233.issue3032@psf.upfronthosting.co.za> Changes by Guilherme Polo : ---------- components: Tkinter keywords: patch nosy: gpolo severity: normal status: open title: tkFont added displayof where necessary versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 19:48:19 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 03 Jun 2008 17:48:19 +0000 Subject: [issue3034] tkFont added displayof where necessary In-Reply-To: <1212515298.97.0.682433564085.issue3034@psf.upfronthosting.co.za> Message-ID: <1212515298.97.0.682433564085.issue3034@psf.upfronthosting.co.za> New submission from Guilherme Polo : Added support for -displayof where necessary in tkFont ---------- components: Tkinter files: tkFont_displayof_added.diff keywords: patch, patch messages: 67663 nosy: gpolo severity: normal status: open title: tkFont added displayof where necessary versions: Python 2.6 Added file: http://bugs.python.org/file10510/tkFont_displayof_added.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 19:48:14 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 03 Jun 2008 17:48:14 +0000 Subject: [issue3033] tkFont added displayof where necessary In-Reply-To: <1212515294.71.0.756028895858.issue3033@psf.upfronthosting.co.za> Message-ID: <1212515294.71.0.756028895858.issue3033@psf.upfronthosting.co.za> New submission from Guilherme Polo : Added support for -displayof where necessary in tkFont ---------- components: Tkinter files: tkFont_displayof_added.diff keywords: patch, patch messages: 67662 nosy: gpolo severity: normal status: open title: tkFont added displayof where necessary versions: Python 2.6 Added file: http://bugs.python.org/file10509/tkFont_displayof_added.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 19:48:47 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 03 Jun 2008 17:48:47 +0000 Subject: [issue3032] tkFont added displayof where necessary Message-ID: <1212515327.23.0.605042835134.issue3032@psf.upfronthosting.co.za> Changes by Guilherme Polo : ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 19:49:30 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 03 Jun 2008 17:49:30 +0000 Subject: [issue3034] tkFont added displayof where necessary In-Reply-To: <1212515298.97.0.682433564085.issue3034@psf.upfronthosting.co.za> Message-ID: <1212515370.24.0.196481843912.issue3034@psf.upfronthosting.co.za> Guilherme Polo added the comment: Duplicate of #3033, sorry ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 19:50:22 2008 From: report at bugs.python.org (Atsuo Ishimoto) Date: Tue, 03 Jun 2008 17:50:22 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212515421.54.0.657726145825.issue2630@psf.upfronthosting.co.za> Atsuo Ishimoto added the comment: I updated the patch as per Georg's advice. Added file: http://bugs.python.org/file10511/diff7.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 19:55:52 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Jun 2008 17:55:52 +0000 Subject: [issue3029] free list management - list, dict, set In-Reply-To: <1212415979.8.0.492351620272.issue3029@psf.upfronthosting.co.za> Message-ID: <1212515752.27.0.975927628871.issue3029@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I don't see the need for them to be part of the > public API, but I framed this patch to fit in > with what's already in place. These should not be part of the public API; otherwise, we lock-in the freelisting implementation detail and cannot readily change it (since some C code may come to rely on the new functions). ---------- priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 19:57:35 2008 From: report at bugs.python.org (Atsuo Ishimoto) Date: Tue, 03 Jun 2008 17:57:35 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212515855.77.0.542983273484.issue2630@psf.upfronthosting.co.za> Changes by Atsuo Ishimoto : Removed file: http://bugs.python.org/file10511/diff7.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 20:05:15 2008 From: report at bugs.python.org (Atsuo Ishimoto) Date: Tue, 03 Jun 2008 18:05:15 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212516315.88.0.858497135839.issue2630@psf.upfronthosting.co.za> Atsuo Ishimoto added the comment: I'm sorry, I missed a file to be uploaded. diff7_1.txt is correct file. Added file: http://bugs.python.org/file10512/diff7_1.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 20:21:52 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 03 Jun 2008 18:21:52 +0000 Subject: [issue1500773] wm_attributes doesn't take keyword arguments Message-ID: <1212517312.43.0.892708966456.issue1500773@psf.upfronthosting.co.za> Guilherme Polo added the comment: I'm adding my own version, this was done against python-trunk ---------- nosy: +gpolo Added file: http://bugs.python.org/file10513/issue1500773.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 20:32:49 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 03 Jun 2008 18:32:49 +0000 Subject: [issue3035] Removing apparently unwanted functions from Tkinter In-Reply-To: <1212517969.87.0.228224366447.issue3035@psf.upfronthosting.co.za> Message-ID: <1212517969.87.0.228224366447.issue3035@psf.upfronthosting.co.za> New submission from Guilherme Polo : Patch for removing some unwanted, and probably not used, functions at tkinter/__init__. ---------- components: Tkinter files: removed_index_funcs.diff keywords: patch, patch messages: 67669 nosy: gpolo severity: normal status: open title: Removing apparently unwanted functions from Tkinter versions: Python 3.0 Added file: http://bugs.python.org/file10514/removed_index_funcs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 20:48:05 2008 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 03 Jun 2008 18:48:05 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212518885.61.0.977208563416.issue2630@psf.upfronthosting.co.za> Guido van Rossum added the comment: > Whether the C API stuff and .isprintable() should be backported to 2.6 > is something for Guido to decide. No way -- while all of this makes sense in Py3k, where all strings are Unicode, it would cause no end of problems in 2.6, and it would break backward compatibility badly. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 21:06:26 2008 From: report at bugs.python.org (Eric Smith) Date: Tue, 03 Jun 2008 19:06:26 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212519986.96.0.885801239108.issue2630@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 21:09:14 2008 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Tue, 03 Jun 2008 19:09:14 +0000 Subject: [issue1706460] access to unicodedata (via codepoints or 2-char surrogates) Message-ID: <1212520154.41.0.0471178597717.issue1706460@psf.upfronthosting.co.za> Walter D?rwald added the comment: Fixed for 3.0 in r63918 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 21:19:44 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 03 Jun 2008 19:19:44 +0000 Subject: [issue1482122] Shift+Backspace exhibits odd behavior Message-ID: <1212520784.63.0.577067613269.issue1482122@psf.upfronthosting.co.za> Guilherme Polo added the comment: I've tested this on Linux and on Tk 8.4 I got "\b", and the same happened with Tkinter. On Linux, again, with Tk 8.5 I got a rectangle char (something invalid), and this repeated at Tkinter. This is not a Tkinter issue. ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 21:21:57 2008 From: report at bugs.python.org (Sylvain Fourmanoit) Date: Tue, 03 Jun 2008 19:21:57 +0000 Subject: [issue1702681] Prevent textwrap from breaking words at hyphens Message-ID: <1212520917.21.0.0531406338439.issue1702681@psf.upfronthosting.co.za> Sylvain Fourmanoit added the comment: > That being said, I'm +1 on adding a keyword argument treating hyphens > as non-breaking It's now in Python 2.6: http://bugs.python.org/issue2659 This issue should probably be closed. ---------- nosy: +fourmanoit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 21:30:53 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 03 Jun 2008 19:30:53 +0000 Subject: [issue1702681] Prevent textwrap from breaking words at hyphens Message-ID: <1212521453.03.0.148561681783.issue1702681@psf.upfronthosting.co.za> Guilherme Polo added the comment: "Duplicate" of issue2659 ---------- nosy: +gpolo resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 3 23:56:17 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 03 Jun 2008 21:56:17 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212530177.68.0.63828444566.issue3008@psf.upfronthosting.co.za> Terry J. Reedy added the comment: > AFAICT, there is no good use case for showing floats in in hex It is my impression that hexadecimal is more common than binary, in the numerical analysis community, for exact representation of floats. For example: http://hal.archives-ouvertes.fr/docs/00/28/14/29/PDF/floating-point-article.pdf "Hexadecimal floating-point representations are especially important when values must be represented exactly, for reproducible results ? for instance, for testing ?borderline cases? in algorithms." Or course, without hex float literals or an equivalent function for input, hex float output is not much use. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 00:29:44 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 03 Jun 2008 22:29:44 +0000 Subject: [issue2613] inconsistency with bare * in parameter list In-Reply-To: <1207903370.95.0.0868464301565.issue2613@psf.upfronthosting.co.za> Message-ID: <1212532184.63.0.988353439294.issue2613@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Rationale for banning f(*,**k): it could represent a bug (intended bare name(s) omitted) that should be flagged, a lack of clear understanding of the redundancy, or a somewhat unPythonic stylistic preference for useless redundancy. I consider the first the most likely in practice, though I also did not see the redundancy at first. Guido has used the 'likely a bug' rationale for other design decisions. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 00:44:48 2008 From: report at bugs.python.org (Adam Olsen) Date: Tue, 03 Jun 2008 22:44:48 +0000 Subject: [issue1758146] Crash in PyObject_Malloc Message-ID: <1212533088.58.0.487236706774.issue1758146@psf.upfronthosting.co.za> Adam Olsen added the comment: Does the PythonInterpreter option create multiple interpreters within a single process, rather than spawning separate processes? IMO, that API should be ripped out. They aren't truly isolated interpreters and nobody I've asked has yet provided a use case for it. ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 00:54:11 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 03 Jun 2008 22:54:11 +0000 Subject: [issue3001] RLock's are SLOW In-Reply-To: <1212074891.45.0.23606216758.issue3001@psf.upfronthosting.co.za> Message-ID: <1212533651.53.0.336492745785.issue3001@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 00:58:32 2008 From: report at bugs.python.org (Vaclav Slavik) Date: Tue, 03 Jun 2008 22:58:32 +0000 Subject: [issue1758146] Crash in PyObject_Malloc Message-ID: <1212533912.35.0.0693445471333.issue1758146@psf.upfronthosting.co.za> Vaclav Slavik added the comment: > Does the PythonInterpreter option create multiple interpreters > within a single process Yes. > They aren't truly isolated interpreters and nobody I've asked has yet > provided a use case for it. If you ignore mod_python and mod_wsgi, then maybe, but mod_python is *the* use case for this. Running separate process for every web app and/or every virtual host on your server is expensive in terms of RAM usage (and this matters if you use virtual server - 256MB or less is not unusual). On the other hand, you need isolation for independent apps -- some modules may use globals, or you may want to be able to run both production and testing versions of the same app (i.e. different versions of the same Python module). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 01:58:30 2008 From: report at bugs.python.org (Adam Olsen) Date: Tue, 03 Jun 2008 23:58:30 +0000 Subject: [issue1758146] Crash in PyObject_Malloc Message-ID: <1212537510.43.0.626188051311.issue1758146@psf.upfronthosting.co.za> Adam Olsen added the comment: Right, so it's only the python modules loaded as part of the app that need to be isolated. You don't need the stdlib or any other part of the interpreter to be isolated. This could be done either by not using the normal import mechanism (build your own on top of exec()) or by some magic to generate a different root package for each "interpreter" (so you show up in sys.modules as '_mypkg183.somemodule'.) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 02:50:15 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 04 Jun 2008 00:50:15 +0000 Subject: [issue1758146] Crash in PyObject_Malloc Message-ID: <1212540615.58.0.0822093027812.issue1758146@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 04:13:29 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 04 Jun 2008 02:13:29 +0000 Subject: [issue2302] Uses of SocketServer.BaseServer.shutdown have a race In-Reply-To: <1205680557.19.0.19509352533.issue2302@psf.upfronthosting.co.za> Message-ID: <1212545609.86.0.399120973402.issue2302@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 04:14:23 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 04 Jun 2008 02:14:23 +0000 Subject: [issue1429] FD leak in SocketServer In-Reply-To: <1194870454.07.0.621713310435.issue1429@psf.upfronthosting.co.za> Message-ID: <1212545663.81.0.0461326283436.issue1429@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 04:54:18 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 04 Jun 2008 02:54:18 +0000 Subject: [issue1390197] tempfile misses usecase which requirs renaming Message-ID: <1212548058.42.0.367225581784.issue1390197@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: If you mean "renaming the temporary file while it is still opened" I see 2 reasons for not doing that: - On Windows this is not possible since files remains locked as long as you close() them. - open().name and tempfile.NamedTemporaryFile().name attributes are not reliable since they remains the same even after the file renaming. >>> import os >>> f = open('1', 'w') >>> os.rename('1', '2') >>> f.name 1 ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 05:50:59 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Wed, 04 Jun 2008 03:50:59 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1212551459.52.0.456842583396.issue2848@psf.upfronthosting.co.za> Humberto Diogenes added the comment: The only use of mimetools inside cgi is in parse_multipart, which is untested and has huge warnings like these ones: """ XXX This does not parse nested multipart parts -- use FieldStorage for that. XXX This should really be subsumed by FieldStorage altogether -- no point in having two implementations of the same parsing algorithm. Also, FieldStorage protects itself better against certain DoS attacks by limiting the size of the data read in one chunk. The API here does not support that kind of protection. This also affects parse() since it can call parse_multipart(). """ ---------- nosy: +hdiogenes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 06:58:06 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Wed, 04 Jun 2008 04:58:06 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1212555486.5.0.989282575895.issue2848@psf.upfronthosting.co.za> Humberto Diogenes added the comment: I'm sending a patch that removes mimetools from urllib and test_urllib. It now returns an email.message.Message instead of mimetools.Message. I also moved some imports to the top of the file. If that's a problem, I can send another patch. ---------- keywords: +patch Added file: http://bugs.python.org/file10515/remove_mimetools_from_urllib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 08:00:46 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Wed, 04 Jun 2008 06:00:46 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1212559246.02.0.164678144563.issue2848@psf.upfronthosting.co.za> Changes by Humberto Diogenes : Added file: http://bugs.python.org/file10516/remove_mimetools_from_urllib.patch-2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 08:01:10 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Wed, 04 Jun 2008 06:01:10 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1212559270.99.0.955264324058.issue2848@psf.upfronthosting.co.za> Changes by Humberto Diogenes : Removed file: http://bugs.python.org/file10515/remove_mimetools_from_urllib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 08:30:53 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 04 Jun 2008 06:30:53 +0000 Subject: [issue1513695] new turtle module Message-ID: <1212561053.34.0.576098407648.issue1513695@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the patch, committed as r63929. Please move any further discussion or other necessary changes into a new issue. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 08:43:15 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Wed, 04 Jun 2008 06:43:15 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1212561795.32.0.65451734468.issue2848@psf.upfronthosting.co.za> Humberto Diogenes added the comment: It's relatively easy to replace mimetools in most places: it's just a matter of changing mimetools.Message to email.message_from_file, but it gets a lot more complicated when there's inheritance involved. The problem is that mimetools.Message is both a parser and a Message representation, and AFAIK there's no single class in ``email`` which does both -- the functionality is split between the Parser and Message classes. Inheritance happens in two places: ``pydoc.Message`` and ``http.client.HTTPMessage``, and I couldn't find a solution for those cases yet. Any help would be appreciated. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 08:59:33 2008 From: report at bugs.python.org (Vaclav Slavik) Date: Wed, 04 Jun 2008 06:59:33 +0000 Subject: [issue1758146] Crash in PyObject_Malloc Message-ID: <1212562773.53.0.341570622893.issue1758146@psf.upfronthosting.co.za> Vaclav Slavik added the comment: > This could be done either by not using the normal import mechanism This is completely unrealistic suggestion, people use libraries and frameworks in their code, you're in effect suggestion that no library that could possibly be used in webapp should use (standard) import. I may be wrong, but I strongly suggest that you do talk to mod_python/wsgi people (who know much better than me) about what real-life uses of isolated interpreters are, before entertaining the idea of getting rid of the feature. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 09:37:48 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 04 Jun 2008 07:37:48 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1212565067.9.0.0992285897298.issue2848@psf.upfronthosting.co.za> Raymond Hettinger added the comment: One idea: in http.client.HTTPMessage, inherit from email.Message, modify the addheaders/addcontinue/readheaders methods to use the methods in Message. Then, change the instantiation in HTTPResponse to self.msg = email.parser.Parser(_class=HTTPMessage).parsestr(io.BytesIO ()). Something similar may apply to pydoc. FYI, I believe there is a pending discussion about whether to keep pydoc in Py3.0. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 10:32:32 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 04 Jun 2008 08:32:32 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212568352.51.0.204061589386.issue3008@psf.upfronthosting.co.za> Raymond Hettinger added the comment: No need to conquer the whole world. Start with bin(1.1). If requests pour-in for hex(1.1) or for a reverse routine, we can deal with those when we get them (in the context of their use cases). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 12:31:01 2008 From: report at bugs.python.org (Nick Veitch) Date: Wed, 04 Jun 2008 10:31:01 +0000 Subject: [issue3036] docs - print() example wrong in whatsnew In-Reply-To: <1212575460.09.0.843945185699.issue3036@psf.upfronthosting.co.za> Message-ID: <1212575460.09.0.843945185699.issue3036@psf.upfronthosting.co.za> New submission from Nick Veitch : In the whatsnew/3.0.html doc, the example for print is the wrong way around. Current version reads: * The :func:`print` function doesn't support the "softspace" feature of the old ``print`` statement. For example, in Python 2.x, ``print "A\n", "B"`` would write ``"A\nB\n"``; but in Python 3.0, ``print("A\n", "B")`` writes ``"A\n B\n"``. should read: * The :func:`print` function doesn't support the "softspace" feature of the old ``print`` statement. For example, in Python 2.x, ``print "A\n", "B"`` would write ``"A\n B\n"``; but in Python 3.0, ``print("A\n", "B")`` writes ``"A\nB\n"``. ---------- assignee: georg.brandl components: Documentation messages: 67688 nosy: evilnick, georg.brandl severity: normal status: open title: docs - print() example wrong in whatsnew versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 13:21:56 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 04 Jun 2008 11:21:56 +0000 Subject: [issue3036] docs - print() example wrong in whatsnew In-Reply-To: <1212575460.09.0.843945185699.issue3036@psf.upfronthosting.co.za> Message-ID: <1212578516.78.0.212374692863.issue3036@psf.upfronthosting.co.za> Georg Brandl added the comment: Have you tried it? :) The example is correct as it is. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 14:31:14 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 04 Jun 2008 12:31:14 +0000 Subject: [issue2917] merge pickle and cPickle in 3.0 In-Reply-To: <1211227162.29.0.0642317760161.issue2917@psf.upfronthosting.co.za> Message-ID: <1212582674.27.0.611377292278.issue2917@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 15:11:10 2008 From: report at bugs.python.org (Duane Griffin) Date: Wed, 04 Jun 2008 13:11:10 +0000 Subject: [issue1608818] Sloppy error checking in listdir() for Posix Message-ID: <1212585069.97.0.409891408227.issue1608818@psf.upfronthosting.co.za> Duane Griffin added the comment: This bug hit one of our (Gentoo) users, causing random failures when running emerge (Gentoo's package management tool). See the bug report here for more information: http://bugs.gentoo.org/show_bug.cgi?id=218378 Unfortunately the patch given previously is slightly broken. Please find attached a working version that has survived testing and fixes the problem for the bug reporter. ---------- keywords: +patch nosy: +duaneg Added file: http://bugs.python.org/file10517/fix-unicode-listdir.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 15:56:22 2008 From: report at bugs.python.org (Anthony Tuininga) Date: Wed, 04 Jun 2008 13:56:22 +0000 Subject: [issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger() In-Reply-To: <1188940010.27.0.383470464739.issue1102@psf.upfronthosting.co.za> Message-ID: <1212587782.39.0.925327709812.issue1102@psf.upfronthosting.co.za> Anthony Tuininga added the comment: This patch appears to be mostly duplicated by patch 2125 which has been accepted. Would it be helpful if I separated out the parts that have now been accepted? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 19:52:52 2008 From: report at bugs.python.org (Atsuo Ishimoto) Date: Wed, 04 Jun 2008 17:52:52 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212601972.59.0.568264411328.issue2630@psf.upfronthosting.co.za> Atsuo Ishimoto added the comment: stringlib can be compiled for Python 2.6 now, but the '!a' converter is disabled by #ifdef for now. Added file: http://bugs.python.org/file10518/diff8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 19:57:32 2008 From: report at bugs.python.org (Buck Golemon) Date: Wed, 04 Jun 2008 17:57:32 +0000 Subject: [issue2613] inconsistency with bare * in parameter list In-Reply-To: <1212532184.63.0.988353439294.issue2613@psf.upfronthosting.co.za> Message-ID: <24B938AC0F197F45A4942C998D90EC026B9877@ssanexmb1.amd.com> Buck Golemon added the comment: /agree _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 20:47:55 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 04 Jun 2008 18:47:55 +0000 Subject: [issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger() In-Reply-To: <1188940010.27.0.383470464739.issue1102@psf.upfronthosting.co.za> Message-ID: <1212605274.87.0.0113357122897.issue1102@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Yes, please do provide an updated patch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 21:28:09 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Wed, 04 Jun 2008 19:28:09 +0000 Subject: [issue2917] merge pickle and cPickle in 3.0 In-Reply-To: <1211227162.29.0.0642317760161.issue2917@psf.upfronthosting.co.za> Message-ID: <1212607689.35.0.759266769326.issue2917@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Here is a diff against the previously posted _pickle.c module. The module is pretty much done now. I fixed find_class() to be a proper method and move the initialization code of Pickler/Unpickler into the tp_init slot to allow proper subclassing. The only things I didn't do is make save_reduce() public (since it would be useless) and fix instantiate() to be exactly the same as in pickle.py (since I have no idea how to cleanly inject a __class__ attribute into a pre-build empty class from C). With the beta postponed, I will probably add some optimizations to the module and update the stdlib documentation. ---------- keywords: +patch Added file: http://bugs.python.org/file10519/changeset-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 21:50:20 2008 From: report at bugs.python.org (Ian Bicking) Date: Wed, 04 Jun 2008 19:50:20 +0000 Subject: [issue3037] in output In-Reply-To: <1212609019.75.0.807560443614.issue3037@psf.upfronthosting.co.za> Message-ID: <1212609019.75.0.807560443614.issue3037@psf.upfronthosting.co.za> New submission from Ian Bicking : I updated to sphinx trunk and made just a few small changes in my template, and I'm now seeing: Note specifically "", which comes right before extrahead. ---------- assignee: georg.brandl components: Documentation tools (Sphinx) messages: 67696 nosy: georg.brandl, ianb severity: normal status: open title: in output type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 22:10:00 2008 From: report at bugs.python.org (Ian Bicking) Date: Wed, 04 Jun 2008 20:10:00 +0000 Subject: [issue3037] in output In-Reply-To: <1212609019.75.0.807560443614.issue3037@psf.upfronthosting.co.za> Message-ID: <1212610200.5.0.217057637296.issue3037@psf.upfronthosting.co.za> Ian Bicking added the comment: You can see the source that produces this in http://svn.pythonpaste.org/Paste/trunk at revision 7387 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 22:15:56 2008 From: report at bugs.python.org (Ian Bicking) Date: Wed, 04 Jun 2008 20:15:56 +0000 Subject: [issue3037] in output In-Reply-To: <1212609019.75.0.807560443614.issue3037@psf.upfronthosting.co.za> Message-ID: <1212610556.01.0.566857520074.issue3037@psf.upfronthosting.co.za> Ian Bicking added the comment: Armin says this is a bug that has now been resolved in Jinja _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 22:38:47 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Wed, 04 Jun 2008 20:38:47 +0000 Subject: [issue1608818] Sloppy error checking in listdir() for Posix Message-ID: <1212611927.0.0.763780690715.issue1608818@psf.upfronthosting.co.za> Changes by Ralf Schmitt : ---------- nosy: +schmir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 22:43:00 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Wed, 04 Jun 2008 20:43:00 +0000 Subject: [issue3026] mmap broken with large files on 64bit system In-Reply-To: <1212373498.52.0.766248013838.issue3026@psf.upfronthosting.co.za> Message-ID: <1212612180.99.0.745509696021.issue3026@psf.upfronthosting.co.za> Changes by Ralf Schmitt : ---------- nosy: +schmir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 22:48:10 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 04 Jun 2008 20:48:10 +0000 Subject: [issue3037] in output In-Reply-To: <1212609019.75.0.807560443614.issue3037@psf.upfronthosting.co.za> Message-ID: <1212612489.11.0.625447105866.issue3037@psf.upfronthosting.co.za> Georg Brandl added the comment: Okay, closing as "wfm". ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 22:49:01 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Wed, 04 Jun 2008 20:49:01 +0000 Subject: [issue3002] shutil.copyfile blocks indefinitely on named pipes In-Reply-To: <1212075150.42.0.761610345558.issue3002@psf.upfronthosting.co.za> Message-ID: <1212612541.71.0.682891335868.issue3002@psf.upfronthosting.co.za> Ralf Schmitt added the comment: I can confirm this issue on python 2.5. I think the priority should be set to critical, as this can lead to denial of service attacks. ---------- nosy: +schmir versions: +Python 2.4, Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 22:53:35 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 04 Jun 2008 20:53:35 +0000 Subject: [issue1608818] Sloppy error checking in listdir() for Posix Message-ID: <1212612815.8.0.0974968806292.issue1608818@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> loewis components: +Extension Modules -Library (Lib) keywords: +easy nosy: +loewis priority: normal -> high type: -> crash versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 23:16:51 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Wed, 04 Jun 2008 21:16:51 +0000 Subject: [issue3026] mmap broken with large files on 64bit system In-Reply-To: <1212373498.52.0.766248013838.issue3026@psf.upfronthosting.co.za> Message-ID: <1212614211.08.0.303387721414.issue3026@psf.upfronthosting.co.za> Ralf Schmitt added the comment: I tested this with python 2.6 and can confirm the issue. The problem is that unsigned int isn't big enough to hold the size of the objects, but the size is downcasted to an unsigned int at several places in _hashopenssl.c. All of these occurences of Py_SAFE_DOWNCAST seem problematic to me (Py_SAFE_DOWNCAST(len, Py_ssize_t, unsigned int)) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 23:30:59 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 04 Jun 2008 21:30:59 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212615059.56.0.662785719761.issue2630@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Shall the method be called isprintable() or simply printable()? For the record, in the io classes, the writable()/readable() convention was chosen. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 23:33:34 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 04 Jun 2008 21:33:34 +0000 Subject: [issue3001] RLock's are SLOW In-Reply-To: <1212074891.45.0.23606216758.issue3001@psf.upfronthosting.co.za> Message-ID: <1212615214.89.0.693158450109.issue3001@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You should investigate and try to diagnose where the speed difference comes from. ISTM the RLock class is implemented in Python while the Lock class is simply an alias to the builtin native lock type, which could explain most of the discrepancy. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 23:34:43 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 04 Jun 2008 21:34:43 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212615283.66.0.622129856791.issue2630@psf.upfronthosting.co.za> Georg Brandl added the comment: I would expect "abc".isprintable() give me a bool and "abc".printable() to return a printable string, as with "abc".lower() and "abc".islower(). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 4 23:36:50 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 04 Jun 2008 21:36:50 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1212615410.61.0.349799988705.issue2630@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You are right, I had forgotton about lower()/islower(). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 00:54:06 2008 From: report at bugs.python.org (Cherniavsky Beni) Date: Wed, 04 Jun 2008 22:54:06 +0000 Subject: [issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface In-Reply-To: <1209319360.66.0.583090952017.issue2704@psf.upfronthosting.co.za> Message-ID: <1212620046.39.0.15055545432.issue2704@psf.upfronthosting.co.za> Cherniavsky Beni added the comment: The patch logic is very simple: inside the command area Up/Down move through history. But what about multi-line editing? Wouldn't this interfere when you just want to move between lines in a multi-line command (e.g. a long ``def``)? I'm afraid the conditional logic needs more refining to be useful. ---------- nosy: +cben _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 03:38:33 2008 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 05 Jun 2008 01:38:33 +0000 Subject: [issue3038] Return results from Python callbacks to Tcl as Tcl objects, please backport it. In-Reply-To: <1212629912.92.0.209823350261.issue3038@psf.upfronthosting.co.za> Message-ID: <1212629912.92.0.209823350261.issue3038@psf.upfronthosting.co.za> New submission from Guilherme Polo : I'm not sure if it is okay to ask this here, but could someone backport r59653 ("Return results from Python callbacks to Tcl as Tcl objects.") to releas25-maint ? Maybe it is already "marked" to be backported by someone, if it is the case this could be closed, otherwise leave this as a remainder. Thanks. ---------- components: Tkinter messages: 67707 nosy: gpolo severity: normal status: open title: Return results from Python callbacks to Tcl as Tcl objects, please backport it. type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 04:22:48 2008 From: report at bugs.python.org (Jason Kankiewicz) Date: Thu, 05 Jun 2008 02:22:48 +0000 Subject: [issue3039] tarfile.TarFileCompat.writestr(ZipInfo, str) raises AttributeError In-Reply-To: <1212632567.86.0.457282985708.issue3039@psf.upfronthosting.co.za> Message-ID: <1212632567.86.0.457282985708.issue3039@psf.upfronthosting.co.za> New submission from Jason Kankiewicz : tarfile.TarFileCompat.writestr( self, zinfo, bytes ) raises AttributeError("'ZipInfo' object has no attribute 'name'") because an analog to the tarfile.TarInfo.name attribute cannot be monkeypatched into the zinfo argument value when it's an instance of zipfile.ZipInfo. The zipfile.ZipInfo class' attributes are slots, so no ad hoc attributes can be monkeypatched into an instance of it. I've replaced the monkeypatching of zinfo with the creation of a new tarfile.TarInfo object, tinfo, which receives its relevant values instead. This revealed another problem with the assignment of zinfo.file_size to tinfo.size: if zinfo.file_size has not been assigned a value then an AttributeError("file_size") will be raised because the slotted attribute doesn't exist. Being that the documentation for zipfile.ZipFile.writestr( self, zinfo_or_arcname, bytes ) claims that a zipfile.ZipInfo object value for zinfo_or_arcname must contain "at least the filename, date and time", it's highly likely that zinfo.file_size will be unassigned in ordinary use. I fixed this problem by ignoring the value of zinfo.file_size and using the value of len(bytes) instead, just like the implementation of zipfile.ZipFile.writestr. I would have provided a patch for tarfile.TarFileCompat.writestr's unit test suite, but it doesn't appear to exist. ---------- components: Library (Lib) files: tarfile.TarFileCompat.patch keywords: patch messages: 67708 nosy: jkankiewicz severity: normal status: open title: tarfile.TarFileCompat.writestr(ZipInfo, str) raises AttributeError type: crash versions: Python 2.5, Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10520/tarfile.TarFileCompat.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 05:14:39 2008 From: report at bugs.python.org (Trevor Meyerowitz) Date: Thu, 05 Jun 2008 03:14:39 +0000 Subject: [issue3040] optparse documentation: variable arguments example doesn't work as listed In-Reply-To: <1212635679.53.0.642286486593.issue3040@psf.upfronthosting.co.za> Message-ID: <1212635679.53.0.642286486593.issue3040@psf.upfronthosting.co.za> New submission from Trevor Meyerowitz : There are two minor bugs in the example in: http://docs.python.org/lib/optparse-callback-example-6.html For the optparse example documentation, the call to parser.add_option is listed as: parser.add_option("-c", "--callback", action="callback", callback=varargs) this has two bugs: 1. It refers to the wrong function name 2. It needs to have a dest variable defined, b/c the callback function operates on that. This can be fixed if the parser.add_option call is changed to: parser.add_option("-c", "--callback", action="callback", dest="foo", callback=varargs_callback) ---------- assignee: georg.brandl components: Demos and Tools, Documentation messages: 67709 nosy: georg.brandl, meyerowitz severity: normal status: open title: optparse documentation: variable arguments example doesn't work as listed type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 12:21:35 2008 From: report at bugs.python.org (Christophe de Vienne) Date: Thu, 05 Jun 2008 10:21:35 +0000 Subject: [issue3041] autodoc does not support unicode docstrings In-Reply-To: <1212661294.93.0.247406907361.issue3041@psf.upfronthosting.co.za> Message-ID: <1212661294.93.0.247406907361.issue3041@psf.upfronthosting.co.za> New submission from Christophe de Vienne : If I define unicode docstrings in my python source, autodoc crash because it tries to decode them, which force a ascii encode first. A trivial patch fix the issue : Index: sphinx/ext/autodoc.py =================================================================== --- sphinx/ext/autodoc.py (r?vision 63954) +++ sphinx/ext/autodoc.py (copie de travail) @@ -218,7 +218,7 @@ module = getattr(todoc, '__module__', None) if module is not None: charset = get_module_charset(module) - docstrings = [docstring.decode(charset) for docstring in docstrings] + docstrings = [docstring.decode(charset) for docstring in docstrings if not isinstance(docstring, unicode)] # add docstring content for docstring in docstrings: ---------- assignee: georg.brandl components: Documentation tools (Sphinx) messages: 67710 nosy: cdevienne, georg.brandl severity: normal status: open title: autodoc does not support unicode docstrings type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 14:02:14 2008 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Thu, 05 Jun 2008 12:02:14 +0000 Subject: [issue3039] tarfile.TarFileCompat.writestr(ZipInfo, str) raises AttributeError In-Reply-To: <1212632567.86.0.457282985708.issue3039@psf.upfronthosting.co.za> Message-ID: <1212667334.31.0.681683366586.issue3039@psf.upfronthosting.co.za> Changes by Lars Gust?bel : ---------- assignee: -> lars.gustaebel nosy: +lars.gustaebel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 14:56:08 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 05 Jun 2008 12:56:08 +0000 Subject: [issue3042] Add PEP 8 compliant aliases to threading module In-Reply-To: <1212670566.42.0.274403876451.issue3042@psf.upfronthosting.co.za> Message-ID: <1212670566.42.0.274403876451.issue3042@psf.upfronthosting.co.za> New submission from Nick Coghlan : PEP 371 highlighted the non-PEP 8 compliant nature of the threading API. Since part of that PEP involves updating the multiprocessing API to be PEP 8 compliant before addition the standard library, the threading API should also be updated to be PEP 8 compliant in 3.0. That part's easy - the trickier part if to provide both the existing API and a PEP 8 compliant API in 2.6, with the old names triggering a warning when run with the -3 switch, but not suffering a performance hit otherwise. The trick with that is to define the renamed API's differently depending on whether or not sys.py3kwarning is set, rather than checking it every time the old APIs are invoked. (Left unassigned for the moment, since I'm about to go completely offline for a few days, so it will be tough for me to get to this before the first beta) ---------- components: Library (Lib) messages: 67711 nosy: ncoghlan priority: high severity: normal status: open title: Add PEP 8 compliant aliases to threading module type: feature request versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 16:16:40 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 05 Jun 2008 14:16:40 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1212675400.18.0.256796596768.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: I've attached the latest version of the module as an actual patch against Python SVN. It differs slightly from the last version uploaded as separate files, in that in-place operations on a proxied object will no longer strip the proxy wrapper off the object. Instead, either the same proxy object will be returned if the target returned itself from the in-place operation (mutable objects), or a new proxy wrapper around the result of the target returned a different object (immutable objects). Example with a mutable target: >>> from typetools import ProxyMixin as p >>> x = p([]) >>> last_x = x >>> x += [1] >>> x >>> last_x Example with an immutable target: >>> from typetools import ProxyMixin as p >>> x = p(1) >>> last_x = x >>> x += 1 >>> x >>> last_x Added file: http://bugs.python.org/file10521/issue643841_typetools.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 16:18:06 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 05 Jun 2008 14:18:06 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1212675486.05.0.56317044606.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that I'll be offline for the next few days, so I want be able to respond to any comments until some time next week. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 16:24:42 2008 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 05 Jun 2008 14:24:42 +0000 Subject: [issue3004] Bug in slice.indices() In-Reply-To: <1212086155.65.0.0693111742843.issue3004@psf.upfronthosting.co.za> Message-ID: <1212675882.63.0.0230555912884.issue3004@psf.upfronthosting.co.za> Mark Dickinson added the comment: I agree that those -1s should really be 0s. Do you have any examples of real-life code that's affected by this bug? It doesn't seem like something that would be a problem in practice. ---------- nosy: +marketdickinson priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 17:12:19 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 05 Jun 2008 15:12:19 +0000 Subject: [issue3042] Add PEP 8 compliant aliases to threading module In-Reply-To: <1212670566.42.0.274403876451.issue3042@psf.upfronthosting.co.za> Message-ID: <1212678739.24.0.479922438458.issue3042@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Is this what you were looking for? (in the patch) What I did could also be done with metaclasses, but I thought that would be overkill. Warning: this patch causes test threading to crash when run with the -3 flag. ---------- keywords: +patch nosy: +benjamin.peterson Added file: http://bugs.python.org/file10522/new_threading_api.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 17:53:44 2008 From: report at bugs.python.org (Peter N) Date: Thu, 05 Jun 2008 15:53:44 +0000 Subject: [issue1628484] Python 2.5 64 bit compile fails on Solaris 10/gcc 4.1.1 Message-ID: <1212681223.71.0.636417755317.issue1628484@psf.upfronthosting.co.za> Peter N added the comment: Martin, On solaris 10 x86, this patch makes it possible to build python 2.5.x. Without it, there is no way for the automated build to work. I believe that your characterization of it as "Therefore, I claim that this makes things more complex, and doesn't solve an actual problem." is strangely disconnected from the facts that have been presented to you. So, since this patch allows python to be built 64-bit on a biarch system, and without it, the build doesn't work, what would need to change so that you/the python maintainers would accept a fix? Assuming this patch isn't it, what needs to change? I think that in this entire conversation a set of viable parameters haven't been presented. As it is, python is ridiculously difficult to build for my company's environment which has separate packages in separate directories (eg /usr/local/amd64/expat/ for expat, /usr/local/amd64/gnu/lib for readline and ncurses, etc.) Thanks, -Peter ---------- nosy: +spacey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 17:58:38 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 05 Jun 2008 15:58:38 +0000 Subject: [issue3042] Add PEP 8 compliant aliases to threading module In-Reply-To: <1212670566.42.0.274403876451.issue3042@psf.upfronthosting.co.za> Message-ID: <1212681518.31.0.195974980937.issue3042@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Attaching a patch which fixes everything. Added file: http://bugs.python.org/file10523/new_threading_api2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 18:10:26 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 05 Jun 2008 16:10:26 +0000 Subject: [issue3038] Return results from Python callbacks to Tcl as Tcl objects, please backport it. In-Reply-To: <1212629912.92.0.209823350261.issue3038@psf.upfronthosting.co.za> Message-ID: <1212682226.93.0.265782568681.issue3038@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> loewis nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 19:06:47 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Jun 2008 17:06:47 +0000 Subject: [issue3041] autodoc does not support unicode docstrings In-Reply-To: <1212661294.93.0.247406907361.issue3041@psf.upfronthosting.co.za> Message-ID: <1212685607.79.0.296415870438.issue3041@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r63958. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 19:33:13 2008 From: report at bugs.python.org (Adam Olsen) Date: Thu, 05 Jun 2008 17:33:13 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1212687193.7.0.874955013445.issue643841@psf.upfronthosting.co.za> Adam Olsen added the comment: The inplace operators aren't right for weakref proxies. If a new object is returned there likely won't be another reference to it and the weakref will promptly be cleared. This could be fixed with another property like _target, which by default type(self)(result). Weakref proxies could override it to raise an exception instead. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 21:08:27 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 05 Jun 2008 19:08:27 +0000 Subject: [issue1628484] Python 2.5 64 bit compile fails on Solaris 10/gcc 4.1.1 In-Reply-To: <1212681223.71.0.636417755317.issue1628484@psf.upfronthosting.co.za> Message-ID: <484839A5.1090305@v.loewis.de> Martin v. L?wis added the comment: > So, since this patch allows python to be built 64-bit on a biarch > system, and without it, the build doesn't work This is simply not true. I can build Python 2.5 just fine for 64-bit SPARC, using gcc, with CC="gcc -m64" ./configure make Or, using SunPRO, with CC="cc -m64" ./configure make I tested it myself, and it successfully builds a Python executable (For gcc, the extension modules fail to load because it picks up the wrong libgcc_s, which I believe is a gcc installation bug. For SunPRO, the extension modules also build fine). So before anything is fixed, I'd like to see an actual, reliable, reproducable error report. The subject of this report (Python 2.5 64 bit compile fails on Solaris 10 with gcc) is not reproducable, so I'm tempted to close this report as "works for me". _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 21:14:40 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 05 Jun 2008 19:14:40 +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: <1212693280.68.0.603039245244.issue2799@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I now think the proposed changes wouldn't be bad thing, after all. I have been bitten myself by the confusing naming of the Unicode API. So, there is definitely a potential for errors. The main problem with PyUnicode_AsString(), as Marc-Andr? pointed out, is it doesn't follow the API signature of the rest of the Unicode API: char *PyUnicode_AsString(PyObject *unicode); PyObject *PyUnicode_AsUTF8String(PyObject *unicode); PyObject *PyUnicode_AsASCIIString(PyObject *unicode); On the other hand, I do like the simple API of PyUnicode_AsString. Also, I have to admit that the apparent similarity between the PyString and the PyUnicode API helped me to port my code to Py3K when I first started working on Python core. So, pragmatism might beat purity here. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 21:37:00 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 05 Jun 2008 19:37:00 +0000 Subject: [issue1628484] Python 2.5 64 bit compile fails on Solaris 10/gcc 4.1.1 In-Reply-To: <48483E4D.2000701@digilink.net> Message-ID: <48484058.4030006@v.loewis.de> Martin v. L?wis added the comment: > Your method is just flat wrong - equivalent to using a sledgehammer. The > libraries fail to link not because gcc install is wrong but because the > -m64 flag needs to be passed to the linker. And indeed, the flag *is* passed to the linker. Python links with CC unless specified otherwise, which will be "gcc -m64". That ought to work, and it does work when linking Python itself. > Your method just fixes the compilation stage. Not true. > To be sure I really don't care anymore - we will continue to apply the > patches that we have to fix the build problem however, we will also > actively discourage the use of Python for our customers and all future > development/deployment since it is obvious that as the maintainer you > are completely closed minded and uncooperative when it comes to fixing > things. I'm sorry you feel that way. Feel free to bring up the issue on python-dev if you think you are being ignored. I assure you this is not the case - but I want to see the problem first before accepting fixes. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 21:28:18 2008 From: report at bugs.python.org (Bob Atkins) Date: Thu, 05 Jun 2008 19:28:18 +0000 Subject: [issue1628484] Python 2.5 64 bit compile fails on Solaris 10/gcc 4.1.1 In-Reply-To: <484839A5.1090305@v.loewis.de> Message-ID: <48483E4D.2000701@digilink.net> Bob Atkins added the comment: Martin, Your method is just flat wrong - equivalent to using a sledgehammer. The libraries fail to link not because gcc install is wrong but because the -m64 flag needs to be passed to the linker. Your method just fixes the compilation stage. You are blaming the gcc installation for your problem when in fact the /_*rest*_/ of the open source world builds just fine using gcc when the proper flags are passed at the proper stages of the build. This situation is so sad to see. This isn't the way open source development is supposed to be. Basically _/*you*/_ alone are the gatekeeper and you are refusing to deal with what is a very simple problem. To be sure I really don't care anymore - we will continue to apply the patches that we have to fix the build problem however, we will also actively discourage the use of Python for our customers and all future development/deployment since it is obvious that as the maintainer you are completely closed minded and uncooperative when it comes to fixing things. My suggestion for the rest of the Python community is to branch and re-host the Python project elsewhere if anyone wants to see it move forward. Added file: http://bugs.python.org/file10524/unnamed Added file: http://bugs.python.org/file10525/DigiLink_esig_logo.jpg _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DigiLink_esig_logo.jpg Type: image/jpeg Size: 23605 bytes Desc: not available URL: From report at bugs.python.org Thu Jun 5 21:58:35 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 05 Jun 2008 19:58:35 +0000 Subject: [issue1628484] Python 2.5 64 bit compile fails on Solaris 10/gcc 4.1.1 Message-ID: <1212695914.98.0.172437701188.issue1628484@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Just to demonstrate there is really a problem with the gcc installation (gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)), here is the linker line: gcc -m64 -shared build/temp.solaris-2.10-sun4u-2.5/net/tb0/home/loewis/25/Modules/_struct.o -L/usr/local/lib -o build/lib.solaris-2.10-sun4u-2.5/_struct.so and here is what gcc actually invokes (printed with -v): /usr/sfw/libexec/gcc/sparc-sun-solaris2.10/3.4.3/collect2 -V -G -dy -z text -Y P,/usr/lib/sparcv9 -Qy -o build/lib.solaris-2.10-sun4u-2.5/_struct.so /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/sparcv9/crti.o /usr/ccs/lib/sparcv9/values-Xa.o /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/sparcv9/crtbegin.o -L/usr/local/lib -L/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/sparcv9 -L/usr/ccs/lib/sparcv9 -L/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../sparcv9 -L/lib/sparcv9 -L/usr/lib/sparcv9 build/temp.solaris-2.10-sun4u-2.5/net/tb0/home/loewis/25/Modules/_struct.o -R/usr/sfw/lib -lgcc_s_sparcv9 -R/usr/sfw/lib -lgcc_s_sparcv9 /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/sparcv9/crtend.o /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/sparcv9/crtn.o As you can see, it's picking up -lgcc_s_sparcv9 (from /usr/sfw/lib/sparcv9/libgcc_s_sparcv9.so), so it does link with the 64-bit libgcc_s.so.1. However, when then trying to import the module, it complains ImportError: ld.so.1: python: fatal: /usr/sfw/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32 This is due to the option -R/usr/sfw/lib, which should have been -R/usr/sfw/lib/sparcv9. Fixing the specs file to change the -R option actually fixes that problem. So please don't claim that I did something wrong when there is really a bug in sfw version of gcc. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 22:25:36 2008 From: report at bugs.python.org (Bob Atkins) Date: Thu, 05 Jun 2008 20:25:36 +0000 Subject: [issue1628484] Python 2.5 64 bit compile fails on Solaris 10/gcc 4.1.1 In-Reply-To: <1212695914.98.0.172437701188.issue1628484@psf.upfronthosting.co.za> Message-ID: <48484BB3.2010303@digilink.net> Bob Atkins added the comment: I rest my case - you found /_*one*_/ of the problems which you are blaming on gcc but in fact is not gcc's fault. You /_*must*_/ specify the correct -L and -R paths to the various alternate 64 bit libs. Don't expect the compiler to figure it out. Of course you can also fix the problem by changing the defaults to the system link/loader and I'm sure other non-standard methods. The bottom line is that I just don't know how to describe daylight to a blind man.... FYI, we are using gcc 4.1.1 - same problem and we aren't using or relying on just the /usr/sfw tree sine much of what comes with Solaris isn't 64 bit we have had to build our own libs which are kept in /opt/lib --- Bob Martin v. L?wis wrote: > Martin v. L?wis added the comment: > > Just to demonstrate there is really a problem with the gcc installation > (gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)), here is the > linker line: > > gcc -m64 -shared > build/temp.solaris-2.10-sun4u-2.5/net/tb0/home/loewis/25/Modules/_struct.o > -L/usr/local/lib -o build/lib.solaris-2.10-sun4u-2.5/_struct.so > > and here is what gcc actually invokes (printed with -v): > > /usr/sfw/libexec/gcc/sparc-sun-solaris2.10/3.4.3/collect2 -V -G -dy -z > text -Y P,/usr/lib/sparcv9 -Qy -o > build/lib.solaris-2.10-sun4u-2.5/_struct.so > /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/sparcv9/crti.o > /usr/ccs/lib/sparcv9/values-Xa.o > /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/sparcv9/crtbegin.o > -L/usr/local/lib -L/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/sparcv9 > -L/usr/ccs/lib/sparcv9 > -L/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../sparcv9 > -L/lib/sparcv9 -L/usr/lib/sparcv9 > build/temp.solaris-2.10-sun4u-2.5/net/tb0/home/loewis/25/Modules/_struct.o > -R/usr/sfw/lib -lgcc_s_sparcv9 -R/usr/sfw/lib -lgcc_s_sparcv9 > /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/sparcv9/crtend.o > /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/sparcv9/crtn.o > > As you can see, it's picking up -lgcc_s_sparcv9 (from > /usr/sfw/lib/sparcv9/libgcc_s_sparcv9.so), so it does link with the > 64-bit libgcc_s.so.1. However, when then trying to import the module, it > complains > > ImportError: ld.so.1: python: fatal: /usr/sfw/lib/libgcc_s.so.1: wrong > ELF class: ELFCLASS32 > > This is due to the option -R/usr/sfw/lib, which should have been > -R/usr/sfw/lib/sparcv9. Fixing the specs file to change the -R option > actually fixes that problem. > > So please don't claim that I did something wrong when there is really a > bug in sfw version of gcc. > > _______________________________________ > Python tracker > > _______________________________________ > > > Added file: http://bugs.python.org/file10526/unnamed Added file: http://bugs.python.org/file10527/DigiLink_esig_logo.jpg _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DigiLink_esig_logo.jpg Type: image/jpeg Size: 23605 bytes Desc: not available URL: From report at bugs.python.org Thu Jun 5 22:45:35 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 05 Jun 2008 20:45:35 +0000 Subject: =?utf-8?q?[issue2799]_Remove_PyUnicode=5FAsString(), =09rework_PyUnicode=5FAsStringAndSize(), _add_PyUnicode=5FAsChar()?= In-Reply-To: <1212693280.68.0.603039245244.issue2799@psf.upfronthosting.co.za> Message-ID: <48485068.3030700@egenix.com> Marc-Andre Lemburg added the comment: On 2008-06-05 21:14, Alexandre Vassalotti wrote: > Alexandre Vassalotti added the comment: > > I now think the proposed changes wouldn't be bad thing, after all. I > have been bitten myself by the confusing naming of the Unicode API. So, > there is definitely a potential for errors. > > The main problem with PyUnicode_AsString(), as Marc-Andr? pointed out, > is it doesn't follow the API signature of the rest of the Unicode API: > > char *PyUnicode_AsString(PyObject *unicode); > PyObject *PyUnicode_AsUTF8String(PyObject *unicode); > PyObject *PyUnicode_AsASCIIString(PyObject *unicode); > > On the other hand, I do like the simple API of PyUnicode_AsString. Also, > I have to admit that the apparent similarity between the PyString and > the PyUnicode API helped me to port my code to Py3K when I first started > working on Python core. So, pragmatism might beat purity here. There are a few cases in the interpreter where it is indeed useful to have direct access to the buffer with the default encoded (= UTF-8 in Py3k) char* buffer. However, the naming of the API is poorly chosen, since the other PyUnicode_AsXYZ() APIs either return a PyObject* or copy the data to an output variable. How about PyUnicode_GetUTF8Buffer() or just PyUnicode_UTF8() ?! Note that the function *must* check the UTF-8 buffer for embedded NUL bytes and then raise an exception if it finds one. Otherwise, the API would silently cause truncations. ---------- title: Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() -> Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 22:50:08 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 05 Jun 2008 20:50:08 +0000 Subject: [issue2799] Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() In-Reply-To: <48485068.3030700@egenix.com> Message-ID: <4848517E.4060701@v.loewis.de> Martin v. L?wis added the comment: > How about PyUnicode_GetUTF8Buffer() or just PyUnicode_UTF8() ?! -1 > Note that the function *must* check the UTF-8 buffer for embedded > NUL bytes and then raise an exception if it finds one. Otherwise, > the API would silently cause truncations. PyString_AsString doesn't check for null bytes, either, and will also silently truncate. This has never been a problem, so I fail to see why it is a problem for Unicode strings. ---------- title: Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() -> Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 23:03:51 2008 From: report at bugs.python.org (Tyler Laing) Date: Thu, 05 Jun 2008 21:03:51 +0000 Subject: [issue3043] Recursion bug in deepcopy In-Reply-To: <1212699830.74.0.302463788027.issue3043@psf.upfronthosting.co.za> Message-ID: <1212699830.74.0.302463788027.issue3043@psf.upfronthosting.co.za> New submission from Tyler Laing : With the following code: class Vertex: def __init__(self, type): self.type = type self.color=-1 self.edges=[] class Edge: def __init__(self, V1, V2): self.vertexes=[V1, V2] V1.edges.append(self) V2.edges.append(self) Where the references are cyclic(this is for a research project into graph algorithms), and using deepcopy, even on a tiny graph of five vertexes and 25 edges causes deepcopy to run into the recursion limit. At the very least, it should warn it can't copy the indicated object, as the references are cyclic. At the very most, it should be able to handle complex cyclic references like this properly. ---------- components: Library (Lib) messages: 67728 nosy: Zeroth severity: normal status: open title: Recursion bug in deepcopy type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 23:07:00 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 05 Jun 2008 21:07:00 +0000 Subject: [issue2799] Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() In-Reply-To: <4848517E.4060701@v.loewis.de> Message-ID: <4848556E.5010207@egenix.com> Marc-Andre Lemburg added the comment: On 2008-06-05 22:50, Martin v. L?wis wrote: >> Note that the function *must* check the UTF-8 buffer for embedded >> NUL bytes and then raise an exception if it finds one. Otherwise, >> the API would silently cause truncations. > > PyString_AsString doesn't check for null bytes, either, and will also > silently truncate. This has never been a problem, so I fail to see why > it is a problem for Unicode strings. Just because a bug hasn't surfaced yet, doesn't make it a non-issue. The problem is also somewhat different for Unicode: Unlike PyString_AsString() a Unicode API PyUnicode_UTF8() would not provide easy access to the length of the returned char*. And there is no PyString_GET_SIZE() you could use to quickly verify that there are no embedded NULs. Which is why using PyUnicode_AsStringAndSize() is the overall better and safer solution. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 23:42:43 2008 From: report at bugs.python.org (Tyler Laing) Date: Thu, 05 Jun 2008 21:42:43 +0000 Subject: [issue3043] Recursion bug in deepcopy In-Reply-To: <1212699830.74.0.302463788027.issue3043@psf.upfronthosting.co.za> Message-ID: <1212702163.76.0.534199647889.issue3043@psf.upfronthosting.co.za> Tyler Laing added the comment: Whoops, sorry, correction, when there are 100 vertexes and 500 edges. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 23:46:26 2008 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 05 Jun 2008 21:46:26 +0000 Subject: [issue3043] Recursion bug in deepcopy In-Reply-To: <1212699830.74.0.302463788027.issue3043@psf.upfronthosting.co.za> Message-ID: <1212702386.35.0.0830227679791.issue3043@psf.upfronthosting.co.za> Guilherme Polo added the comment: This should have been fixed at 2.2, as long as you change your classes to new-style classes. If it still happens, post a sample code using your new code that uses new-style classes. ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 5 23:55:58 2008 From: report at bugs.python.org (Tyler Laing) Date: Thu, 05 Jun 2008 21:55:58 +0000 Subject: [issue3043] Recursion bug in deepcopy In-Reply-To: <1212699830.74.0.302463788027.issue3043@psf.upfronthosting.co.za> Message-ID: <1212702958.0.0.29786351789.issue3043@psf.upfronthosting.co.za> Tyler Laing added the comment: Same problem, even with new-style classes. Here, I'll show the function I use to generate the graph as well. class Vertex(object): def __init__(self, type): self.type = type self.color=-1 self.edges=[] class Edge(object): def __init__(self, V1, V2): self.vertexes=[V1, V2] V1.edges.append(self) V2.edges.append(self) def generate(graph={'V':[], 'E':[]}, seed=777, vertexes=5, edges=25): #generates a graph similar to the KEGG pathway database format. # Purpose is for testing algorithms on a smaller scale "predicatible" graph # For that reason, the "random" selections are seeded with a known number. This is to be able # to measure efficacy, in that on the same graph, if algorithm A performs in half the time, its # not a characteristic of the graph, but the algorithm. r=random.Random(seed) p=[0, 0, 0, 0] c=0 #generate vertices, with a regularly incremented set of numbers, to appear like the KEGG pathway database does. while c!=vertexes: #This is ugly, could be done easier in a loop. Fix later. p[3]+=1 if p[3]>9: p[3]=0 p[2]+=1 if p[2]>9: p[2]=0 p[1]+=1 if p[1]>9: p[1]=0 p[0]+=1 #we copy the set of numbers, due to the way python passes lists by reference, instead of by copy. v=Vertex(p[:]) graph['V'].append(v) c+=1 v=graph['V'] if len(v)!=vertexes: print "Not enough vertices, aborting." return graph c=0 #randomly choose two vertices. Could even, randomly, be the same vertex. # Then, connect an edge between them. Just creating the edge by implication, # with the vertices passed, connects them all together. while c!=edges: v1=r.choice(v) v2=r.choice(v) graph['E'].append(Edge(v1, v2)) c+=1 if len(graph['E']) !=edges: print "Not enough edges, aborting." return graph And here is how I use it: >>>import graph, copy >>>g=graph.generate(vertexes=100, edges=500) >>>g2=copy.deepcopy(g) Thanks for the prompt response, this isn't critical in nature, just playing around with the graph, and wanted to alter a copy of it. Ran into this bug, thought I should report it. :) -Zeroth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 00:21:12 2008 From: report at bugs.python.org (Arnaud Bergeron) Date: Thu, 05 Jun 2008 22:21:12 +0000 Subject: [issue3004] Bug in slice.indices() In-Reply-To: <1212675882.63.0.0230555912884.issue3004@psf.upfronthosting.co.za> Message-ID: Arnaud Bergeron added the comment: It's for code that I am developping. I developped a class to allow full slicing over iterators (like what islice does, but with negative indexes). When I have a positive step I just foward the call to isclice using slice.indices() to compute my limits. But with this behavior, I am forced to wrap the indices() call with a function that patches this case. I agree that for the common usage of computing the limits of a for loop it doesn't matter. But it is really surprising when you realise this behavior is what is causing these exceptions after having passed half a day trying to debug your code. In fact, I think this bug should really be more of a documentation bug and I should propose a patch to add clearer documentation to this method. But the fix proposed should also go in because: - it's trivial - it's better Documentation for the method will be submitted later tomorrow. Should I post another report or just attach it to this one? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 00:33:36 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Jun 2008 22:33:36 +0000 Subject: [issue3044] Simplify the Integral ABC In-Reply-To: <1212705216.31.0.628025639885.issue3044@psf.upfronthosting.co.za> Message-ID: <1212705216.31.0.628025639885.issue3044@psf.upfronthosting.co.za> New submission from Raymond Hettinger : See attached patches. The PEP is also updated for Exact/Inexact which were removed a good while ago. ---------- assignee: gvanrossum components: Library (Lib) files: numbers.diff keywords: patch messages: 67734 nosy: gvanrossum, rhettinger severity: normal status: open title: Simplify the Integral ABC versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10528/numbers.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 00:34:12 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Jun 2008 22:34:12 +0000 Subject: [issue3044] Simplify the Integral ABC In-Reply-To: <1212705216.31.0.628025639885.issue3044@psf.upfronthosting.co.za> Message-ID: <1212705252.8.0.138863275671.issue3044@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Added file: http://bugs.python.org/file10529/pep.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 00:50:19 2008 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 05 Jun 2008 22:50:19 +0000 Subject: [issue3044] Simplify the Integral ABC In-Reply-To: <1212705216.31.0.628025639885.issue3044@psf.upfronthosting.co.za> Message-ID: <1212706219.27.0.449956212905.issue3044@psf.upfronthosting.co.za> Guido van Rossum added the comment: Looks like you accidentally removed 2-arg __pow__ from the Complex ABC. This should stay of course. Also, please add the binary operators back in a new ABC called Binary deriving from Integral. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 00:53:16 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 05 Jun 2008 22:53:16 +0000 Subject: [issue2582] Unpickling of range objects fail in Py3k In-Reply-To: <1207658342.58.0.573226897239.issue2582@psf.upfronthosting.co.za> Message-ID: <1212706396.54.0.954019678966.issue2582@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Weird. I wonder why it succeeds to pickle to range object at all. It seems the __reduce_ex__ method emits bogus value. >>> r.__reduce_ex__(2) (, (,), None, None, None) Anyway, that is easy to fix when you know the trick. So, here is the fix. ---------- assignee: -> alexandre.vassalotti keywords: +patch nosy: +alexandre.vassalotti Added file: http://bugs.python.org/file10530/fix_range_pickling.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 00:55:00 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 05 Jun 2008 22:55:00 +0000 Subject: [issue2582] Unpickling of range objects fail in Py3k In-Reply-To: <1207658342.58.0.573226897239.issue2582@psf.upfronthosting.co.za> Message-ID: <1212706500.53.0.0218426974899.issue2582@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Oh, here is a slightly more efficient version. Added file: http://bugs.python.org/file10531/fix_range_pickling-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 01:06:18 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Jun 2008 23:06:18 +0000 Subject: [issue3044] Simplify the Integral ABC In-Reply-To: <1212705216.31.0.628025639885.issue3044@psf.upfronthosting.co.za> Message-ID: <1212707178.68.0.356241041285.issue3044@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Apologies. Didn't know you wanted to go that direction. Will leave this for someone who wants to expand numbers.py rather than simplifying it. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 01:16:24 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 05 Jun 2008 23:16:24 +0000 Subject: [issue2582] Unpickling of range objects fail in Py3k In-Reply-To: <1207658342.58.0.573226897239.issue2582@psf.upfronthosting.co.za> Message-ID: <1212707784.1.0.432041169612.issue2582@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: xrange() in Python 2.x is also affected by this bug. So, here is the fix. ---------- versions: +Python 2.5, Python 2.6 Added file: http://bugs.python.org/file10532/fix_xrange_pickling.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 01:21:57 2008 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 05 Jun 2008 23:21:57 +0000 Subject: [issue3044] Simplify the Integral ABC In-Reply-To: <1212705216.31.0.628025639885.issue3044@psf.upfronthosting.co.za> Message-ID: <1212708116.97.0.0938807980882.issue3044@psf.upfronthosting.co.za> Guido van Rossum added the comment: Excuuuuuse me? Have you actually been following the thread? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 01:37:07 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 05 Jun 2008 23:37:07 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212709027.25.0.535386031365.issue3008@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Kind of a cool hack. I am not sure how useful it is though. Personally, I find ``struct.pack('d', f)`` slightly more educative (more useful too), but that is just me. And if you allow bin() to accept floats, will you make Python accept binary float literals too? ---------- nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 01:50:21 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 05 Jun 2008 23:50:21 +0000 Subject: [issue3043] Recursion bug in deepcopy In-Reply-To: <1212699830.74.0.302463788027.issue3043@psf.upfronthosting.co.za> Message-ID: <1212709821.12.0.279076250719.issue3043@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Your graph is simply too deep for Python to handle it. The copy module (and also the pickle) pushes a new stack frame every time a new container object is encountered. Therefore, there is a recursion limit to prevent the interpreter from crashing. If you want, you can carefully increase the limit by using the function `sys.setrecursionlimit`. Using your example: >>> sys.setrecursionlimit(2000) >>> g2 = copy.deepcopy(g) >>> # no error ---------- nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 03:56:12 2008 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 06 Jun 2008 01:56:12 +0000 Subject: [issue3042] Add PEP 8 compliant aliases to threading module In-Reply-To: <1212670566.42.0.274403876451.issue3042@psf.upfronthosting.co.za> Message-ID: <1212717372.35.0.0651735564435.issue3042@psf.upfronthosting.co.za> Nick Coghlan added the comment: The code changes in the patch look pretty good to me (although you probably want to actually use @wraps inside _old_api!) There are obviously also documentation and test suite changes that will be needed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 03:58:52 2008 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 06 Jun 2008 01:58:52 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1212717532.9.0.319421898396.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, that would answer my #XXX comment regarding that in the patch. Agreed, the best answer will be to factor out the _rewrap operation into a new class method. (Next week though...) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 04:03:36 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 06 Jun 2008 02:03:36 +0000 Subject: [issue3042] Add PEP 8 compliant aliases to threading module In-Reply-To: <1212717372.35.0.0651735564435.issue3042@psf.upfronthosting.co.za> Message-ID: <1afaf6160806051903i7955dde9ofec75609bbb8c689@mail.gmail.com> Benjamin Peterson added the comment: On Thu, Jun 5, 2008 at 8:56 PM, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > The code changes in the patch look pretty good to me (although you > probably want to actually use @wraps inside _old_api!) That won't work because we are creating the method than we would pass to wraps. Changing old's __name__ to old_name should do the trick. > > There are obviously also documentation and test suite changes that will > be needed. Of course. I can do that. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 04:28:36 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 06 Jun 2008 02:28:36 +0000 Subject: [issue3042] Add PEP 8 compliant aliases to threading module In-Reply-To: <1212670566.42.0.274403876451.issue3042@psf.upfronthosting.co.za> Message-ID: <1212719315.94.0.0966806036912.issue3042@psf.upfronthosting.co.za> Changes by Adam Olsen : ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 05:11:29 2008 From: report at bugs.python.org (Peter Whaite) Date: Fri, 06 Jun 2008 03:11:29 +0000 Subject: [issue3045] Windows online help broken when spaces in TEMP environ In-Reply-To: <1212721889.56.0.323857297959.issue3045@psf.upfronthosting.co.za> Message-ID: <1212721889.56.0.323857297959.issue3045@psf.upfronthosting.co.za> New submission from Peter Whaite : If the environ vars TEMP or TMP contain spaces on w32 the on-line help will not work. e.g. help('or') gives the message The system cannot find the file specified. This is because pydoc.tempfilepager sets filename=tempfile.mktemp() which will have spaces in it if TEMP does. The filename is then used to constuct the system command: os.system(cmd + ' ' + filename) which in windows ends up as os.system('more < FILE WITH SPACES'). The filename should be quoted, e.g. os.system('%s "%s"' % (cmd,filename)) I only ran across this problem because I use uwin on windows and it sets TEMP to a w32 style long path. The normal windows command shell uses the dos spaceless sort form for the TMP and TEMP env vars so the problem doesn't arise when python is invoked from there. And isn't tempfile.mktemp() deprecated? ---------- components: Library (Lib), Windows messages: 67746 nosy: peta severity: normal status: open title: Windows online help broken when spaces in TEMP environ versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 08:47:08 2008 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 06 Jun 2008 06:47:08 +0000 Subject: [issue3046] Locking should be removed from the new buffer protocol In-Reply-To: <1212734828.53.0.490072473192.issue3046@psf.upfronthosting.co.za> Message-ID: <1212734828.53.0.490072473192.issue3046@psf.upfronthosting.co.za> New submission from Stefan Behnel : Here is a patch against the current PEP 3118 that removes the LOCK flag. It follows this discussion on the Py3k mailing list: http://comments.gmane.org/gmane.comp.python.python-3000.devel/13409?set_lines=100000 It has not yet been approved by the PEP owners and requires implementation, preferably before beta1. ---------- components: Interpreter Core files: pep-3118-no-locking.patch keywords: patch messages: 67747 nosy: scoder severity: normal status: open title: Locking should be removed from the new buffer protocol type: behavior versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10533/pep-3118-no-locking.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 09:43:20 2008 From: report at bugs.python.org (Jura) Date: Fri, 06 Jun 2008 07:43:20 +0000 Subject: [issue3047] string object's lstrip function In-Reply-To: <1212738199.97.0.591245075441.issue3047@psf.upfronthosting.co.za> Message-ID: <1212738199.97.0.591245075441.issue3047@psf.upfronthosting.co.za> New submission from Jura : example from command line: '_element_no_of_hsscch'.lstrip('_element_') 'o_of_hsscch' '_element_o_of_hsscch'.lstrip('_element_') 'o_of_hsscch' ---------- components: Interpreter Core messages: 67748 nosy: jsostok severity: normal status: open title: string object's lstrip function type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 09:47:13 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 06 Jun 2008 07:47:13 +0000 Subject: [issue3048] getsizeof incorrect for Unicode strings In-Reply-To: <1212738433.49.0.637321178838.issue3048@psf.upfronthosting.co.za> Message-ID: <1212738433.49.0.637321178838.issue3048@psf.upfronthosting.co.za> New submission from Martin v. L?wis : sys.getsizeof doesn't take the actual length of the Unicode string into account: py> sys.getsizeof(u"") 32 [31332 refs] py> sys.getsizeof(u"1"*100) 32 [31332 refs] ---------- assignee: schuppenies messages: 67750 nosy: loewis, schuppenies severity: normal status: open title: getsizeof incorrect for Unicode strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 09:47:14 2008 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 06 Jun 2008 07:47:14 +0000 Subject: [issue3046] Locking should be removed from the new buffer protocol In-Reply-To: <1212734828.53.0.490072473192.issue3046@psf.upfronthosting.co.za> Message-ID: <1212738434.22.0.207717315932.issue3046@psf.upfronthosting.co.za> Stefan Behnel added the comment: As a quick summary of the problems with the current PEP: 1) Many use cases will not require any locking at all, either because they run single-threaded with a short-read/short-write pattern, or because they do not write at all. 2) Write locks require exclusive access rights, but there isn't currently a way to change an existing read lock into a write lock. This means that to acquire a write lock, all consumers (including the requester) must first release all read locks before a write lock can be granted. Therefore, it is not necessary to have such a thing as a read lock in the first place, as any read request essentially becomes a read-lock from the POV of a write lock request. And for data integrity reasons, some kind of write lock must always be applied when writing is requested, regardless of requesting a lock or not. 3) The requirement in point 2) for releasing all locks before granting a write lock necessitates short-read/short-write access, in which case locking is of limited usefulness already. 4) More complex locking scenarios may also require special locking semantics that are not currently handled by the proposed locking protocol. The proposal is therefore to a) remove the locking protocol all-together b) leave it to application space how read/write locking should be handled (if required at all). c) leave it to providers how a request for a writable buffer should be handled: by just granting it (thus jeopardising data integrity), by applying a lock internally, or by copying buffers. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 09:49:35 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 06 Jun 2008 07:49:35 +0000 Subject: [issue3047] string object's lstrip function In-Reply-To: <1212738199.97.0.591245075441.issue3047@psf.upfronthosting.co.za> Message-ID: <1212738575.46.0.675114945591.issue3047@psf.upfronthosting.co.za> Georg Brandl added the comment: What did you expect? Quoting from the docs, """The chars argument is not a prefix; rather, all combinations of its values are stripped: >>> 'www.example.com'.lstrip('cmowz.') 'example.com' """ ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 09:51:17 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 06 Jun 2008 07:51:17 +0000 Subject: [issue3049] Some 3k sizeof tests fail In-Reply-To: <1212738677.44.0.0240899165497.issue3049@psf.upfronthosting.co.za> Message-ID: <1212738677.44.0.0240899165497.issue3049@psf.upfronthosting.co.za> New submission from Martin v. L?wis : When merging the sizeof changes to 3k, I had to disable a few tests, marked with XXX. Can you please take a look at why precisely they broke, and change them appropriately? ---------- assignee: schuppenies messages: 67752 nosy: loewis, schuppenies severity: normal status: open title: Some 3k sizeof tests fail _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 09:59:30 2008 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 06 Jun 2008 07:59:30 +0000 Subject: [issue2997] PyNumberMethods has left-over fields in Py3 In-Reply-To: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> Message-ID: <1212739170.85.0.322727847991.issue2997@psf.upfronthosting.co.za> Stefan Behnel added the comment: :) sorry, that's the problem when you don't have commit rights and leave the changes in your local copy. So this is still an open issue that should be fixed before beta1, thanks. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 10:08:33 2008 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 06 Jun 2008 08:08:33 +0000 Subject: [issue3046] Locking should be removed from the new buffer protocol In-Reply-To: <1212734828.53.0.490072473192.issue3046@psf.upfronthosting.co.za> Message-ID: <1212739713.23.0.496968844105.issue3046@psf.upfronthosting.co.za> Stefan Behnel added the comment: Here is a patch that removes all occurrences of the locking protocol from the current py3k branch code base. There are still some issues in memoryobject.c: - there was an occurrence of PyBUF_SHADOW that might have to be handled - memory_getbuf and memory_releasebuf must be reimplemented as it is no longer allowed to call getbuffer/releasebuffer with a NULL pointer Added file: http://bugs.python.org/file10534/buffer-no-locking.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 10:11:12 2008 From: report at bugs.python.org (Jura) Date: Fri, 06 Jun 2008 08:11:12 +0000 Subject: [issue3047] string object's lstrip function In-Reply-To: <1212738199.97.0.591245075441.issue3047@psf.upfronthosting.co.za> Message-ID: <1212739872.46.0.0656230798726.issue3047@psf.upfronthosting.co.za> Jura added the comment: print '_element_no_of_hsscch'.lstrip.__doc__ S.lstrip([chars]) -> string or unicode Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is unicode, S will be converted to unicode before stripping Ok, I didn't understand it correctly, because i red only __doc__ from which is not the functionality clear. I found a workaround for it... Let's leave it closed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 10:37:44 2008 From: report at bugs.python.org (Thomas Heller) Date: Fri, 06 Jun 2008 08:37:44 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <1200084697.63.0.170138698691.issue1798@psf.upfronthosting.co.za> Message-ID: <1212741463.52.0.610458157366.issue1798@psf.upfronthosting.co.za> Thomas Heller added the comment: A different patch but implementing the same functionality was now committed as trunk rev 63977. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 10:38:10 2008 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 06 Jun 2008 08:38:10 +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: <1212741490.33.0.139236008086.issue2799@psf.upfronthosting.co.za> Stefan Behnel added the comment: While PyUnicode_AsStringAndSize() may be a better solution if the length is required, PyUnicode_AsString is enough() when it is not required. So I don't buy that argument. Since there are dedicated UTF-8 encoding functions, both functions are pure convenience anyway. Embedded \0 bytes can bite you, but that's completely unrelated to the issue discussed here. I wouldn't oppose renaming the function, but I don't see why it should go. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 11:10:47 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 06 Jun 2008 09:10:47 +0000 Subject: [issue3002] shutil.copyfile blocks indefinitely on named pipes In-Reply-To: <1212075150.42.0.761610345558.issue3002@psf.upfronthosting.co.za> Message-ID: <1212743447.3.0.786936844933.issue3002@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: -> critical versions: +Python 3.0 -Python 2.3, Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 11:14:06 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 06 Jun 2008 09:14:06 +0000 Subject: [issue3043] Recursion bug in deepcopy In-Reply-To: <1212699830.74.0.302463788027.issue3043@psf.upfronthosting.co.za> Message-ID: <1212743646.94.0.812561363251.issue3043@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 11:43:19 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Fri, 06 Jun 2008 09:43:19 +0000 Subject: [issue3002] shutil.copyfile blocks indefinitely on named pipes In-Reply-To: <1212075150.42.0.761610345558.issue3002@psf.upfronthosting.co.za> Message-ID: <1212745398.82.0.654764504969.issue3002@psf.upfronthosting.co.za> Ralf Schmitt added the comment: The open('fifo', 'rb') already blocks. One has to use os.fdopen with O_NONBLOCK to prevent blocking. fd=os.open('fifo', os.O_RDONLY | os.O_NONBLOCK) and then use stat.S_ISFIFO(os.fstat(fd).st_mode) to check if this is a fifo. Checking with os.stat before opening with open will result in a race condition. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 13:07:06 2008 From: report at bugs.python.org (Armin Rigo) Date: Fri, 06 Jun 2008 11:07:06 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <1200084697.63.0.170138698691.issue1798@psf.upfronthosting.co.za> Message-ID: <1212750426.41.0.510600204965.issue1798@psf.upfronthosting.co.za> Armin Rigo added the comment: > (Another note: the C-level errno and the TLS copy should also be > synchronized when the C code invokes a Python callback.) What I meant is what should occur when a pure Python function is used as a callback. At this point there is already some logic e.g. to re-acquire the GIL if necessary. Maybe it needs to grow logic to optionally copy the C-level errno into the TLS variable at the start, and at the end copy it back into the C-level errno at the end, for the cases where the C code expects the callback to be able to set errno. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 13:14:01 2008 From: report at bugs.python.org (Thomas Heller) Date: Fri, 06 Jun 2008 11:14:01 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <1212750426.41.0.510600204965.issue1798@psf.upfronthosting.co.za> Message-ID: <48491BF6.4040807@ctypes.org> Thomas Heller added the comment: >> (Another note: the C-level errno and the TLS copy should also be >> synchronized when the C code invokes a Python callback.) > > What I meant is what should occur when a pure Python function is used > as a callback. At this point there is already some logic e.g. to > re-acquire the GIL if necessary. Maybe it needs to grow logic to > optionally copy the C-level errno into the TLS variable at the start, > and at the end copy it back into the C-level errno at the end, for the > cases where the C code expects the callback to be able to set errno. I figured that out in the meantime and implemented it in this way. See the code around line 295 in Modules/_ctypes/callbacks.c. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 13:45:19 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 06 Jun 2008 11:45:19 +0000 Subject: [issue2997] PyNumberMethods has left-over fields in Py3 In-Reply-To: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> Message-ID: <1212752719.79.0.966890353059.issue2997@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Let me quote a comment from GvR about the similar issue1185: """ Can you redo the patch while keeping the slot *position* (though not the name or type)? The wasted space is minimal (4-8 bytes per type or class object) and it means a lot for third party code if the positional struct initialization never breaks due to insertion or removal of a slot. Since everyone has a zero here anyway, I propose to name the slot nb_reserved and make its type int. """ OTOH, it's python 3.0, and we are allowed to break things... ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 13:52:15 2008 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 06 Jun 2008 11:52:15 +0000 Subject: [issue2997] PyNumberMethods has left-over fields in Py3 In-Reply-To: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> Message-ID: <1212753135.87.0.931715476921.issue2997@psf.upfronthosting.co.za> Stefan Behnel added the comment: I would accept that if this had been done in all cases, but as I wrote in my first comment, the previously existing slot "nb_divide", which comes *before* the named ones, has already been removed, so there is no way existing Py2 code can work unchanged in Py3, even if we leave the three fields in. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 13:57:55 2008 From: report at bugs.python.org (Jesse Noller) Date: Fri, 06 Jun 2008 11:57:55 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> New submission from Jesse Noller : This issue tracks the work pending for the inclusion of the pyprocessing module under the multiprocessing name for Python 2.6 and 3.0. If needed, additional tickets will be created for issues which will need to be addressed after initial inclusion. Currently open: - Redo all documentation to match ReST format of stdlib - Update docs to reflect new PEP8 names - Update all unit tests to be in Unittest format Closed: - Rename module API to be PEP8 compliant (roudkerk) - Link csource libs into python-trunk build (jnoller) - redo all local "." style imports to reflect the new namespace (jnoller) ---------- components: Extension Modules messages: 67763 nosy: jnoller, roudkerk severity: normal status: open title: Implement PEP 371: multiprocessing module type: feature request versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 14:01:58 2008 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 06 Jun 2008 12:01:58 +0000 Subject: [issue1185] py3k: Completely remove nb_coerce slot In-Reply-To: <1190328705.55.0.555438383037.issue1185@psf.upfronthosting.co.za> Message-ID: <1212753718.55.0.779034377619.issue1185@psf.upfronthosting.co.za> Stefan Behnel added the comment: As noted in issue2997, the nb_divide slot (4th field!) has already been removed, so Py2 code has to be adapted anyway. I therefore recommend to just remove all unused fields to get a clean struct for Py3. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 14:37:41 2008 From: report at bugs.python.org (Thomas Herve) Date: Fri, 06 Jun 2008 12:37:41 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> New submission from Thomas Herve : A recent change in heapq implements it in terms of less-than: http://svn.python.org/view/python/trunk/Modules/_heapqmodule.c?rev=63827&r1=63675&r2=63827 Unfortunately, it breaks usage of heapq when a class only implements __le__ and not __ge__ or __cmp__. This is done this way in Twisted: http://twistedmatrix.com/trac/browser/trunk/twisted/internet/base.py#L159. If not mandatory, it would be nice if this change was reverted or that a backward compatible change was done instead. ---------- components: Library (Lib) messages: 67765 nosy: therve severity: normal status: open title: heapq change breaking compatibility versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 15:09:42 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 06 Jun 2008 13:09:42 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1212757782.2.0.871266823834.issue3050@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- dependencies: +Add PEP 8 compliant aliases to threading module, Thread local storage and PyGILState_* mucked up by os.fork() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 15:10:18 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Fri, 06 Jun 2008 13:10:18 +0000 Subject: [issue3049] Some 3k sizeof tests fail In-Reply-To: <1212738677.44.0.0240899165497.issue3049@psf.upfronthosting.co.za> Message-ID: <1212757817.95.0.392457309797.issue3049@psf.upfronthosting.co.za> Robert Schuppenies added the comment: Fixed in r63985. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 15:17:22 2008 From: report at bugs.python.org (Alec Thomas) Date: Fri, 06 Jun 2008 13:17:22 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1212758242.09.0.941140936088.issue3050@psf.upfronthosting.co.za> Changes by Alec Thomas : ---------- nosy: +alecthomas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 16:01:46 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 06 Jun 2008 14:01:46 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1212760906.65.0.415464172059.issue3051@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 16:15:17 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 06 Jun 2008 14:15:17 +0000 Subject: [issue3052] Mac Modules failing to compile In-Reply-To: <1212761717.02.0.568849147453.issue3052@psf.upfronthosting.co.za> Message-ID: <1212761717.02.0.568849147453.issue3052@psf.upfronthosting.co.za> New submission from Benjamin Peterson : On Mac 10.4 PPC: building 'MacOS' extension gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/temp/python/trunk/./Include -I/temp/python/trunk/./Mac/Include -I. -IInclude -I./Include -I/usr/local/include -I/temp/python/trunk/Include -I/temp/python/trunk -c /temp/python/trunk/Mac/Modules/MacOS.c -o build/temp.macosx-10.3-ppc-2.6/temp/python/trunk/Mac/Modules/MacOS.o-Wno-deprecated-declarations /temp/python/trunk/Mac/Modules/MacOS.c:44: error: parse error before 'Fsiorefnum' /temp/python/trunk/Mac/Modules/MacOS.c:44: warning: no semicolon at end of struct or union /temp/python/trunk/Mac/Modules/MacOS.c:46: error: parse error before '}' token /temp/python/trunk/Mac/Modules/MacOS.c:46: warning: type defaults to 'int' in declaration of 'rfobject' /temp/python/trunk/Mac/Modules/MacOS.c:46: warning: data definition has no type or storage class /temp/python/trunk/Mac/Modules/MacOS.c:55: error: parse error before '*' token /temp/python/trunk/Mac/Modules/MacOS.c:56: warning: function declaration isn't a prototype /temp/python/trunk/Mac/Modules/MacOS.c: In function 'do_close': /temp/python/trunk/Mac/Modules/MacOS.c:57: error: 'self' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c:57: error: (Each undeclared identifier is reported only once /temp/python/trunk/Mac/Modules/MacOS.c:57: error: for each function it appears in.) /temp/python/trunk/Mac/Modules/MacOS.c: At top level: /temp/python/trunk/Mac/Modules/MacOS.c:67: error: parse error before '*' token /temp/python/trunk/Mac/Modules/MacOS.c:68: warning: function declaration isn't a prototype /temp/python/trunk/Mac/Modules/MacOS.c: In function 'rf_read': /temp/python/trunk/Mac/Modules/MacOS.c:74: error: 'self' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c:79: error: 'args' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c:88: warning: implicit declaration of function 'PyMac_Error' /temp/python/trunk/Mac/Modules/MacOS.c: At top level: /temp/python/trunk/Mac/Modules/MacOS.c:102: error: parse error before '*' token /temp/python/trunk/Mac/Modules/MacOS.c:103: warning: function declaration isn't a prototype /temp/python/trunk/Mac/Modules/MacOS.c: In function 'rf_write': /temp/python/trunk/Mac/Modules/MacOS.c:108: error: 'self' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c:112: error: 'args' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c: At top level: /temp/python/trunk/Mac/Modules/MacOS.c:129: error: parse error before '*' token /temp/python/trunk/Mac/Modules/MacOS.c:130: warning: function declaration isn't a prototype /temp/python/trunk/Mac/Modules/MacOS.c: In function 'rf_seek': /temp/python/trunk/Mac/Modules/MacOS.c:136: error: 'self' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c:140: error: 'args' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c: At top level: /temp/python/trunk/Mac/Modules/MacOS.c:174: error: parse error before '*' token /temp/python/trunk/Mac/Modules/MacOS.c:175: warning: function declaration isn't a prototype /temp/python/trunk/Mac/Modules/MacOS.c: In function 'rf_tell': /temp/python/trunk/Mac/Modules/MacOS.c:179: error: 'self' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c:183: error: 'args' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c: At top level: /temp/python/trunk/Mac/Modules/MacOS.c:199: error: parse error before '*' token /temp/python/trunk/Mac/Modules/MacOS.c:200: warning: function declaration isn't a prototype /temp/python/trunk/Mac/Modules/MacOS.c: In function 'rf_close': /temp/python/trunk/Mac/Modules/MacOS.c:201: error: 'args' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c:203: error: 'self' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c: At top level: /temp/python/trunk/Mac/Modules/MacOS.c:222: error: parse error before '*' token /temp/python/trunk/Mac/Modules/MacOS.c:224: warning: return type defaults to 'int' /temp/python/trunk/Mac/Modules/MacOS.c: In function 'newrfobject': /temp/python/trunk/Mac/Modules/MacOS.c:225: error: 'self' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c:227: error: parse error before ')' token /temp/python/trunk/Mac/Modules/MacOS.c: At top level: /temp/python/trunk/Mac/Modules/MacOS.c:236: error: parse error before '*' token /temp/python/trunk/Mac/Modules/MacOS.c:237: warning: function declaration isn't a prototype /temp/python/trunk/Mac/Modules/MacOS.c: In function 'rf_dealloc': /temp/python/trunk/Mac/Modules/MacOS.c:238: error: 'self' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c: At top level: /temp/python/trunk/Mac/Modules/MacOS.c:243: error: parse error before '*' token /temp/python/trunk/Mac/Modules/MacOS.c:244: warning: function declaration isn't a prototype /temp/python/trunk/Mac/Modules/MacOS.c: In function 'rf_getattr': /temp/python/trunk/Mac/Modules/MacOS.c:245: error: 'self' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c:245: error: 'name' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c: In function 'MacOS_GetCreatorAndType': /temp/python/trunk/Mac/Modules/MacOS.c:295: error: 'PyMac_GetFSRef' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c:304: error: 'PyMac_GetFSSpec' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c:308: warning: implicit declaration of function 'PyErr_Mac' /temp/python/trunk/Mac/Modules/MacOS.c:308: warning: return makes pointer from integer without a cast /temp/python/trunk/Mac/Modules/MacOS.c: In function 'MacOS_SetCreatorAndType': /temp/python/trunk/Mac/Modules/MacOS.c:362: error: 'PyMac_GetFSRef' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c:362: error: 'PyMac_GetOSType' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c:369: error: 'PyMac_GetFSSpec' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c:373: warning: return makes pointer from integer without a cast /temp/python/trunk/Mac/Modules/MacOS.c:379: warning: return makes pointer from integer without a cast /temp/python/trunk/Mac/Modules/MacOS.c: In function 'MacOS_DebugStr': /temp/python/trunk/Mac/Modules/MacOS.c:540: error: 'PyMac_GetStr255' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c: In function 'MacOS_openrf': /temp/python/trunk/Mac/Modules/MacOS.c:626: error: 'fp' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c:629: error: 'PyMac_GetFSRef' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/MacOS.c: In function 'initMacOS': /temp/python/trunk/Mac/Modules/MacOS.c:693: warning: implicit declaration of function 'PyMac_GetOSErrException' /temp/python/trunk/Mac/Modules/MacOS.c:693: warning: assignment makes pointer from integer without a cast building '_AE' extension gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/temp/python/trunk/./Include -I/temp/python/trunk/./Mac/Include -I. -IInclude -I./Include -I/usr/local/include -I/temp/python/trunk/Include -I/temp/python/trunk -c /temp/python/trunk/Mac/Modules/ae/_AEmodule.c -o build/temp.macosx-10.3-ppc-2.6/temp/python/trunk/Mac/Modules/ae/_AEmodule.o -Wno-deprecated-declarations /temp/python/trunk/Mac/Modules/ae/_AEmodule.c: In function 'AEDesc_AEResumeTheCurrentEvent': /temp/python/trunk/Mac/Modules/ae/_AEmodule.c:687: error: 'SRefCon' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/ae/_AEmodule.c:687: error: (Each undeclared identifier is reported only once /temp/python/trunk/Mac/Modules/ae/_AEmodule.c:687: error: for each function it appears in.) /temp/python/trunk/Mac/Modules/ae/_AEmodule.c:687: error: parse error before 'dispatcher' /temp/python/trunk/Mac/Modules/ae/_AEmodule.c: In function 'AE_AEInstallEventHandler': /temp/python/trunk/Mac/Modules/ae/_AEmodule.c:1158: error: 'SRefCon' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/ae/_AEmodule.c:1158: error: parse error before 'handler' /temp/python/trunk/Mac/Modules/ae/_AEmodule.c: In function 'AE_AEGetEventHandler': /temp/python/trunk/Mac/Modules/ae/_AEmodule.c:1207: error: 'SRefCon' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/ae/_AEmodule.c:1207: error: parse error before ')' token building '_File' extension gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/temp/python/trunk/./Include -I/temp/python/trunk/./Mac/Include -I. -IInclude -I./Include -I/usr/local/include -I/temp/python/trunk/Include -I/temp/python/trunk -c /temp/python/trunk/Mac/Modules/file/_Filemodule.c -o build/temp.macosx-10.3-ppc-2.6/temp/python/trunk/Mac/Modules/file/_Filemodule.o -Wno-deprecated-declarations /temp/python/trunk/Mac/Modules/file/_Filemodule.c: In function 'FSRef_FSOpenFork': /temp/python/trunk/Mac/Modules/file/_Filemodule.c:1877: error: 'FSIORefNum' undeclared (first use in this function) /temp/python/trunk/Mac/Modules/file/_Filemodule.c:1877: error: (Each undeclared identifier is reported only once /temp/python/trunk/Mac/Modules/file/_Filemodule.c:1877: error: for each function it appears in.) /temp/python/trunk/Mac/Modules/file/_Filemodule.c:1877: error: parse error before 'forkRefNum' /temp/python/trunk/Mac/Modules/file/_Filemodule.c:1886: error: 'forkRefNum' undeclared (first use in this function) ---------- assignee: ronaldoussoren messages: 67767 nosy: benjamin.peterson, ronaldoussoren priority: critical severity: normal status: open title: Mac Modules failing to compile type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 16:18:09 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 06 Jun 2008 14:18:09 +0000 Subject: [issue2337] Backport oct() and hex() to use __index__ In-Reply-To: <1205776266.64.0.297851457778.issue2337@psf.upfronthosting.co.za> Message-ID: <1212761889.51.0.0350582173407.issue2337@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This was rejected by Guido. ---------- resolution: -> rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 16:26:34 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 06 Jun 2008 14:26:34 +0000 Subject: [issue3052] Mac Modules failing to compile In-Reply-To: <1212761717.02.0.568849147453.issue3052@psf.upfronthosting.co.za> Message-ID: <1212762394.63.0.296713251244.issue3052@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Is this on OSX 10.4? I'll fix this tonight or tomorrow (the latter would probably result in a commit on sunday morning PST). The fix will look like this: #ifdef __LP64__ FSIORefNum fRefNum; #else SInt16 fRefNum; #endif That is, unless I can find the correct way to detect if the code is compiled with the 10.5 SDK or not. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 16:28:08 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 06 Jun 2008 14:28:08 +0000 Subject: [issue3052] Mac Modules failing to compile In-Reply-To: <1212761717.02.0.568849147453.issue3052@psf.upfronthosting.co.za> Message-ID: <1212762488.16.0.122736540103.issue3052@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is 10.4. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 16:51:07 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Jun 2008 14:51:07 +0000 Subject: [issue3053] test_shutil fails under AIX In-Reply-To: <1212763867.85.0.395528995267.issue3053@psf.upfronthosting.co.za> Message-ID: <1212763867.85.0.395528995267.issue3053@psf.upfronthosting.co.za> New submission from Antoine Pitrou : test_shutil fails with the following error under some AIX 5.3 machine: ====================================================================== FAIL: test_on_error (__main__.TestShutil) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_shutil.py", line 35, in test_on_error shutil.rmtree(TESTFN, onerror=self.check_args_to_onerror) File "/qakplus/qa_test/SandBoxes/Antoine/Python-2.5.2/Lib/shutil.py", line 161, in rmtree onerror(os.listdir, path, sys.exc_info()) File "Lib/test/test_shutil.py", line 49, in check_args_to_onerror self.assertEqual(func, os.remove) AssertionError: != The problem seems to be that the system is stricter with permissions (please note I don't know AIX at all, and the filesystems are unknown brands of network filesystems :-)), and @test in that test case is set to chmod 0400: $ chmod 400 @test $ ./python -c "import os; print os.listdir('@test')" Traceback (most recent call last): File "", line 1, in OSError: [Errno 13] Permission denied: '@test' $ chmod 100 @test $ ./python -c "import os; print os.listdir('@test')" Traceback (most recent call last): File "", line 1, in OSError: [Errno 13] Permission denied: '@test' $ chmod 500 @test $ ./python -c "import os; print os.listdir('@test')" ['a'] The error was witnessed with Python 2.5.2 but the test case doesn't seem to have changed in trunk so it should be the same there too. ---------- components: Tests messages: 67771 nosy: pitrou severity: normal status: open title: test_shutil fails under AIX versions: Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 16:55:25 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Jun 2008 14:55:25 +0000 Subject: [issue3053] test_shutil fails under AIX In-Reply-To: <1212763867.85.0.395528995267.issue3053@psf.upfronthosting.co.za> Message-ID: <1212764125.94.0.845796529382.issue3053@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a working patch. I've also added a try/finally block, because otherwise the following tests in regrtest.py couldn't run properly (@test was unremovable because of wrong permissions). ---------- keywords: +patch Added file: http://bugs.python.org/file10535/3053.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 16:57:49 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Fri, 06 Jun 2008 14:57:49 +0000 Subject: [issue3002] shutil.copyfile blocks indefinitely on named pipes In-Reply-To: <1212075150.42.0.761610345558.issue3002@psf.upfronthosting.co.za> Message-ID: <1212764269.56.0.117087049708.issue3002@psf.upfronthosting.co.za> Ralf Schmitt added the comment: if the destination is a named pipe, it will also block (waiting for a reader). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 17:11:44 2008 From: report at bugs.python.org (Raghuram Devarakonda) Date: Fri, 06 Jun 2008 15:11:44 +0000 Subject: [issue3053] test_shutil fails under AIX In-Reply-To: <1212763867.85.0.395528995267.issue3053@psf.upfronthosting.co.za> Message-ID: <1212765104.78.0.835519066355.issue3053@psf.upfronthosting.co.za> Raghuram Devarakonda added the comment: Is there any particular reason to assert for failed function at all? This test seems to be for 'onerror' function and the test would be valid even without asserting whether the failed API is 'remove' or 'listdir' etc. Isn't it? ---------- nosy: +draghuram _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 17:13:28 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Fri, 06 Jun 2008 15:13:28 +0000 Subject: [issue3026] mmap broken with large files on 64bit system In-Reply-To: <1212373498.52.0.766248013838.issue3026@psf.upfronthosting.co.za> Message-ID: <1212765208.13.0.0550188409923.issue3026@psf.upfronthosting.co.za> Ralf Schmitt added the comment: the same bug also occurs when computing the md5 of a string larger than 2**32 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 17:21:02 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Jun 2008 15:21:02 +0000 Subject: [issue3053] test_shutil fails under AIX In-Reply-To: <1212763867.85.0.395528995267.issue3053@psf.upfronthosting.co.za> Message-ID: <1212765662.9.0.368965737849.issue3053@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Apparently it dates back to this commit: http://hg.pitrou.net/public/cpython/trunk/rev/56254b99fb78 Perhaps someone should ask the original author. But indeed I'm not sure why it's testing such implementation details. The only requirement about the first argument passed to the onerror callback is that it's one of (os.listdir, os.remove, os.rmdir). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 18:18:14 2008 From: report at bugs.python.org (Facundo Batista) Date: Fri, 06 Jun 2008 16:18:14 +0000 Subject: [issue1785] "inspect" gets broken by some descriptors In-Reply-To: <1199986772.67.0.313630472197.issue1785@psf.upfronthosting.co.za> Message-ID: <1212769093.53.0.924723507768.issue1785@psf.upfronthosting.co.za> Facundo Batista added the comment: Really don't know why this was assigned to me... ---------- assignee: facundobatista -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 18:24:18 2008 From: report at bugs.python.org (Travis Oliphant) Date: Fri, 06 Jun 2008 16:24:18 +0000 Subject: [issue3046] Locking should be removed from the new buffer protocol In-Reply-To: <1212734828.53.0.490072473192.issue3046@psf.upfronthosting.co.za> Message-ID: <1212769458.44.0.925537626531.issue3046@psf.upfronthosting.co.za> Travis Oliphant added the comment: Greg Ewing's comment in the thread that read/write locking is orthogonal to memory-buffer moving is to me the most convincing argument that the locking portion of the getbuffer function call should be removed and potentially placed in a separate API at some point. This will simplify the protocol a bit. I will apply the patch. ---------- nosy: +teoliphant _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 20:46:09 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 06 Jun 2008 18:46:09 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1212777969.4.0.34659018354.issue3051@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It would be better if the Twisted code changed to define all of the rich comparisons instead of relying on an accidental and erroneous implementation detail. The heapq change because other people's code that used __lt__ was breaking. They had some basis for the complaint because heapq is documented to match sort() which is also based on __lt__ (and so is the bisect module). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 21:08:24 2008 From: report at bugs.python.org (Thomas Herve) Date: Fri, 06 Jun 2008 19:08:24 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1212779304.16.0.0386143245996.issue3051@psf.upfronthosting.co.za> Thomas Herve added the comment: Okay then. At least the issue is recorded somewhere, if someone has the same problem. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 21:28:48 2008 From: report at bugs.python.org (Jean-Paul Calderone) Date: Fri, 06 Jun 2008 19:28:48 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1212780526.64.0.499150470932.issue3051@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: The heapq documentation isn't very clear about its requirements. It does explicitly say that "Heaps are arrays for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k, counting elements from zero." (this in the module reference for the heapq module, both in the Python 2.5 version and the in-development version) which might lead one to believe that <= (__le__) is the important operation. I don't know where it is documented that heapq behaves the same as sort(). I think the documentation needs some improvement to avoid this kind of confusion. It's very hard, often impossible, to know what is an "accidental and erroneous implementation detail" and what is a stable, public API. Also, I'm not sure why the code is being changed to accomodate newly written applications which never could have worked, breaking existing applications which did work, but I suppose that's just the decision CPython developers want to make. ---------- nosy: +exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 22:10:06 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 06 Jun 2008 20:10:06 +0000 Subject: [issue3021] Lexical exception handlers In-Reply-To: <1212350626.42.0.00327926746922.issue3021@psf.upfronthosting.co.za> Message-ID: <1212783004.08.0.392490574358.issue3021@psf.upfronthosting.co.za> Adam Olsen added the comment: PEP 3134's implicit exception chaining (if accepted) would require your semantic, and your semantic is simpler anyway (even if the implementation is non-trivial), so consider my objections to be dropped. PEP 3134 also proposes implicit chaining during a finally block, which raises questions for this case: try: ... finally: print(sys.exc_info()) raise If sys.exc_info() were removed (with no direct replacement) we'd have that behaviour answered. raise could be answered by making it a syntax error, but keep in mind this may be nested in another except block: try: ... except: try: ... finally: raise I'd prefer a syntax error in this case as well, to avoid any ambiguity and to keep the implementation simple. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 22:17:51 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 06 Jun 2008 20:17:51 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1212783470.98.0.0258583277018.issue3051@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'll fix this to accommodate both cases, __lt__ and __le__. After trying xx with x=x with x<=y, and may swap the arguments of x==y and x!=y." -- PEP 207 ---------- priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 22:38:48 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 06 Jun 2008 20:38:48 +0000 Subject: [issue3049] Some 3k sizeof tests fail In-Reply-To: <1212738677.44.0.0240899165497.issue3049@psf.upfronthosting.co.za> Message-ID: <1212784728.14.0.185792153169.issue3049@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 23:32:20 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 06 Jun 2008 21:32:20 +0000 Subject: [issue3052] Mac Modules failing to compile In-Reply-To: <1212761717.02.0.568849147453.issue3052@psf.upfronthosting.co.za> Message-ID: <1212787940.46.0.469937915601.issue3052@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This should be fixed in revision 63997. ---------- resolution: accepted -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 23:34:18 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 06 Jun 2008 21:34:18 +0000 Subject: [issue3054] test_disutils fails In-Reply-To: <1212788058.33.0.328120732213.issue3054@psf.upfronthosting.co.za> Message-ID: <1212788058.33.0.328120732213.issue3054@psf.upfronthosting.co.za> New submission from Ronald Oussoren : test_distutils fails when you're not building in the root of the source tree. That is: mkdir build cd build ../configure make make check This fails like this: test test_distutils failed -- Traceback (most recent call last): File "/Users/ronald/Projects/python/python- trunk/Lib/distutils/tests/test_build_ext.py", line 23, in setUp shutil.copy(xx_c, self.tmp_dir) File "/Users/ronald/Projects/python/python-trunk/Lib/shutil.py", line 82, in copy copyfile(src, dst) File "/Users/ronald/Projects/python/python-trunk/Lib/shutil.py", line 46, in copyfile fsrc = open(src, 'rb') IOError: [Errno 2] No such file or directory: '/Users/ronald/Projects/python/python-trunk/build104/Modules/xxmodule.c' ---------- components: Distutils messages: 67785 nosy: ronaldoussoren priority: high severity: normal status: open title: test_disutils fails versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 23:37:35 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 06 Jun 2008 21:37:35 +0000 Subject: [issue3055] test_list on 64-bit platforms In-Reply-To: <1212788254.95.0.00817873629987.issue3055@psf.upfronthosting.co.za> Message-ID: <1212788254.95.0.00817873629987.issue3055@psf.upfronthosting.co.za> New submission from Ronald Oussoren : test_list, and possible other tests, use a lot of memory when Python is build in 64-bit mode. This causes heavy swapping when the machine doesn't have a huge amount of memory. I've filed this bug because an OSX box with 3 GBytes of RAM gets completely unresponsive when trying to run test_list (due to heavy swapping). ---------- components: Tests messages: 67786 nosy: ronaldoussoren priority: low severity: normal status: open title: test_list on 64-bit platforms type: resource usage versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 23:38:51 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 06 Jun 2008 21:38:51 +0000 Subject: [issue1619130] 64-bit Universal Binary build broken Message-ID: <1212788331.9.0.583189544142.issue1619130@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This should be fixed on the trunk, I've introduced a new configure option that makes it possible to build a 4-way universal build on OSX 10.5 Note that the default build will still be a 2-way universal build that runs on 10.3.9 and later. ---------- resolution: accepted -> fixed status: open -> pending type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 23:39:51 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 06 Jun 2008 21:39:51 +0000 Subject: [issue3054] test_disutils fails In-Reply-To: <1212788058.33.0.328120732213.issue3054@psf.upfronthosting.co.za> Message-ID: <1212788391.18.0.648572710551.issue3054@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- components: +Tests -Distutils type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 23:48:05 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 06 Jun 2008 21:48:05 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1212788885.25.0.714814626147.issue3051@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed in r63998. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 6 23:54:09 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Jun 2008 21:54:09 +0000 Subject: [issue3021] Lexical exception handlers In-Reply-To: <1212350626.42.0.00327926746922.issue3021@psf.upfronthosting.co.za> Message-ID: <1212789249.29.0.839752844029.issue3021@psf.upfronthosting.co.za> Antoine Pitrou added the comment: With or without my patch, bare "raise" inside a "finally" statement raises a "RuntimeError: no active exception to re-raise". (except, of course, when the try/finally is itself enclosed in an except block) That's because a finally block is not considered an exception handler. I don't think there's any reason to change this. I'm not for adding syntax errors. After all the bare "raise" statement just does the moral equivalent of re-raising sys.exc_info() verbatim. In those situations where sys.exc_info() would return a non-empty result, why shouldn't "raise" be accepted as well? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 00:11:52 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 06 Jun 2008 22:11:52 +0000 Subject: [issue2065] trunk version does not compile with vs8 and vc6 In-Reply-To: <1202727039.47.0.783651728329.issue2065@psf.upfronthosting.co.za> Message-ID: <1212790312.41.0.563522295235.issue2065@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file10475/ocean.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 00:12:41 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 06 Jun 2008 22:12:41 +0000 Subject: [issue2065] trunk version does not compile with vs8 and vc6 In-Reply-To: <1202727039.47.0.783651728329.issue2065@psf.upfronthosting.co.za> Message-ID: <1212790361.23.0.916416001287.issue2065@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file10536/ocean.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 00:30:41 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Jun 2008 22:30:41 +0000 Subject: [issue3021] Lexical exception handlers In-Reply-To: <1212350626.42.0.00327926746922.issue3021@psf.upfronthosting.co.za> Message-ID: <1212791441.71.0.61189493902.issue3021@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (an unexpected side effect of my patch is that the interpreter has become 5-10% faster under Linux, witnessed with pystone and pybench. I don't know the explanation) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 01:11:08 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Fri, 06 Jun 2008 23:11:08 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1212793868.72.0.933104141424.issue2848@psf.upfronthosting.co.za> Changes by Humberto Diogenes : Added file: http://bugs.python.org/file10537/email.parser-small_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 03:49:13 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sat, 07 Jun 2008 01:49:13 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1212803353.18.0.310523140712.issue2848@psf.upfronthosting.co.za> Humberto Diogenes added the comment: Attached a patch to rename all calls to the mimetools-specific .getheader() to .get(), which works on both libraries (mimetools and email.Message). That eases transition without breaking any tests. Added file: http://bugs.python.org/file10538/replace_getheaders_by_get.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 03:57:26 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 07 Jun 2008 01:57:26 +0000 Subject: [issue3056] Simplify the Integral ABC In-Reply-To: <1212803845.73.0.399511532431.issue3056@psf.upfronthosting.co.za> Message-ID: <1212803845.73.0.399511532431.issue3056@psf.upfronthosting.co.za> New submission from Raymond Hettinger : * Reduce Integral to just a single additional abstract method. * Supply the binary operations as mixins instead of abstract methods. * Three argument __pow__ is now optional. * Convert with __int__ instead of __long__. ---------- assignee: gvanrossum components: Library (Lib) files: numbers2.diff keywords: patch messages: 67792 nosy: gvanrossum, rhettinger severity: normal status: open title: Simplify the Integral ABC versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10539/numbers2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 04:01:44 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 07 Jun 2008 02:01:44 +0000 Subject: [issue3056] Simplify the Integral ABC In-Reply-To: <1212803845.73.0.399511532431.issue3056@psf.upfronthosting.co.za> Message-ID: <1212804104.56.0.186386121534.issue3056@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Added file: http://bugs.python.org/file10540/pep2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 04:07:02 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sat, 07 Jun 2008 02:07:02 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1212804422.93.0.539009233727.issue2848@psf.upfronthosting.co.za> Humberto Diogenes added the comment: As we're moving away from using .getheader() everywhere (file 10538), I think it's a good time to make HTTPResponse conform to PEP8 and define .get_header (with underscore) instead. Added file: http://bugs.python.org/file10541/rename_HTTPResponse.getheaders.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 04:14:06 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 07 Jun 2008 02:14:06 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1212804846.42.0.668753081631.issue2848@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -1 on the get_header() change. I would like this patch to be as minimal as possible. The new spelling is a bit awkward and it introduces an unnecessary change that could break code. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 04:25:55 2008 From: report at bugs.python.org (Adam Olsen) Date: Sat, 07 Jun 2008 02:25:55 +0000 Subject: [issue3021] Lexical exception handlers In-Reply-To: <1212350626.42.0.00327926746922.issue3021@psf.upfronthosting.co.za> Message-ID: <1212805555.32.0.923332699742.issue3021@psf.upfronthosting.co.za> Adam Olsen added the comment: PEP 3134 gives reason to change it. __context__ should be set from whatever exception is "active" from the try/finally, thus it should be the inner block, not the outer except block. This flipping of behaviour, and the general ambiguity, is why I suggest a syntax error. "In the face of ambiguity, refuse the temptation to guess." PEP 3134 has not been officially accepted, but many parts have be added anyway. Your cleanups pave the way for the last of it. I suggest asking on python-3000 for a pronouncement on the PEP. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 04:26:04 2008 From: report at bugs.python.org (James Thomas) Date: Sat, 07 Jun 2008 02:26:04 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1212805564.16.0.550656628209.issue2912@psf.upfronthosting.co.za> James Thomas added the comment: I can work on this task. ---------- nosy: +jjt009 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 05:28:48 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sat, 07 Jun 2008 03:28:48 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1212809328.58.0.150360591536.issue2848@psf.upfronthosting.co.za> Humberto Diogenes added the comment: Raymond, thanks for the parser solution! It worked -- just broke some tests because of the nature of FeedParser. While rfc822.Message can read the file and stop at some point in the middle (meaning that self.fp can still be read), FeedParser will always read the whole file *and* close it, even if setting _headersonly to True. This is the same problem that I had to work around on issue 2849. I'm attaching a patch that demonstrates it: lots of tests giving "I/O operation on closed file." Right now I can think of two options: * Working around it, again (don't know how) * Implement some flag in FeedParser to make it consume only the headers and leave the file open. Any other idea? Oh, and if you think it's better not to mess with the name of other methods like getheader, that's fine by me. It was only a suggestion, after all. ;) Added file: http://bugs.python.org/file10542/remove_mimetools_from_http.client.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 06:08:18 2008 From: report at bugs.python.org (James Thomas) Date: Sat, 07 Jun 2008 04:08:18 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1212811698.24.0.722538779186.issue2912@psf.upfronthosting.co.za> James Thomas added the comment: i'm looking at the source and there doesn't appear to be a function uname within os.py. are we just considering the uname function in platform.py? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 07:14:36 2008 From: report at bugs.python.org (James Thomas) Date: Sat, 07 Jun 2008 05:14:36 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1212815676.28.0.949397488402.issue2912@psf.upfronthosting.co.za> James Thomas added the comment: much handling code already seems to exist under the line except AttributeError: in platform.py (function uname(), lines 1101-1161 platform.py) i'm not too familiar with the Python codebase (i just began developing with Python a few days back) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 07:33:48 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Jun 2008 05:33:48 +0000 Subject: [issue3021] Lexical exception handlers In-Reply-To: <1212350626.42.0.00327926746922.issue3021@psf.upfronthosting.co.za> Message-ID: <1212816827.93.0.567221219996.issue3021@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, it makes sense to have the same behaviour for except and finally blocks then. As for the syntax error, I'm still not convinced. The point of Py3k is to change semantics: people should expect some incompatible changes. Also the previous behaviour was rather under-specified, so it could be considered a bug. And it seems to me syntax errors should be used to guard against potential syntax mistakes, not semantic subtleties. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 08:37:41 2008 From: report at bugs.python.org (Adam Olsen) Date: Sat, 07 Jun 2008 06:37:41 +0000 Subject: [issue3021] Lexical exception handlers In-Reply-To: <1212350626.42.0.00327926746922.issue3021@psf.upfronthosting.co.za> Message-ID: <1212820660.87.0.322792346954.issue3021@psf.upfronthosting.co.za> Adam Olsen added the comment: I agree, the argument for a syntax error is weak. It's more instinct than anything else. I don't think I'd be able to convince you unless Guido had the same instinct I do. ;) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 13:48:54 2008 From: report at bugs.python.org (Thomas Herve) Date: Sat, 07 Jun 2008 11:48:54 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1212839334.09.0.721056226066.issue3051@psf.upfronthosting.co.za> Thomas Herve added the comment: Unfortunately, the modification didn't fix the problem. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 14:05:45 2008 From: report at bugs.python.org (Mark Hammond) Date: Sat, 07 Jun 2008 12:05:45 +0000 Subject: [issue1505257] winerror module Message-ID: <1212840345.33.0.483735954625.issue1505257@psf.upfronthosting.co.za> Mark Hammond added the comment: pywin32 has a 'winerror' module, which is (basically) a h2py generated module from the same header (although initially generated roughly a decade ago and hand-tweaked since then). Its unfortunate pywin32 still hasn't adopted a package approach, but it would be nice to find something compatible with pywin32 should a winerror module ever be adopted. ---------- nosy: +mhammond _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 14:43:36 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 07 Jun 2008 12:43:36 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1212842616.8.0.74870302876.issue2912@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for volunteering, James! I think you misunderstood the task. Do you see how in platform's uname, it only tries to find missing values for os.uname if os.uname doesn't exist? Sometimes os.uname exists, but it doesn't provide all the values. Your task is to modify platform.uname to try to fill in missing values in os.uname if they are present. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 14:47:45 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 07 Jun 2008 12:47:45 +0000 Subject: [issue3052] Mac Modules failing to compile In-Reply-To: <1212761717.02.0.568849147453.issue3052@psf.upfronthosting.co.za> Message-ID: <1212842865.15.0.601728381046.issue3052@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It is fixed. Thanks. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 14:49:53 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 07 Jun 2008 12:49:53 +0000 Subject: [issue3048] getsizeof incorrect for Unicode strings In-Reply-To: <1212738433.49.0.637321178838.issue3048@psf.upfronthosting.co.za> Message-ID: <1212842993.84.0.805242978864.issue3048@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 15:37:01 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 07 Jun 2008 13:37:01 +0000 Subject: [issue2451] No way to disable socket timeouts in httplib, etc. In-Reply-To: <1206141378.11.0.857343736887.issue2451@psf.upfronthosting.co.za> Message-ID: <1212845821.26.0.587742935221.issue2451@psf.upfronthosting.co.za> Facundo Batista added the comment: Applied the rest of the patch regarding test_urllib2net.py. Thank you! ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 15:51:03 2008 From: report at bugs.python.org (Dror Levin) Date: Sat, 07 Jun 2008 13:51:03 +0000 Subject: [issue3054] test_disutils fails In-Reply-To: <1212788058.33.0.328120732213.issue3054@psf.upfronthosting.co.za> Message-ID: <1212846663.29.0.158552443715.issue3054@psf.upfronthosting.co.za> Dror Levin added the comment: This also happens in py3k. Attached a patch that fixes this by using the dirname of sysconfig.project_base if the file is not found, but perhaps a better solution could be found... ---------- keywords: +patch nosy: +spatz versions: +Python 3.0 Added file: http://bugs.python.org/file10543/test_build_ext.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 17:19:05 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 07 Jun 2008 15:19:05 +0000 Subject: [issue2862] cleanup of freelist management In-Reply-To: <1210859181.3.0.311974356319.issue2862@psf.upfronthosting.co.za> Message-ID: <1212851945.88.0.383804945907.issue2862@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 17:21:47 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 07 Jun 2008 15:21:47 +0000 Subject: [issue3029] free list management - list, dict, set In-Reply-To: <1212415979.8.0.492351620272.issue3029@psf.upfronthosting.co.za> Message-ID: <1212852107.09.0.172870925453.issue3029@psf.upfronthosting.co.za> Gregory P. Smith added the comment: everyone seems to be in agreement that this patch is a bad idea. closing. ---------- nosy: +gregory.p.smith resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 17:28:58 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 07 Jun 2008 15:28:58 +0000 Subject: [issue2862] cleanup of freelist management In-Reply-To: <1210859181.3.0.311974356319.issue2862@psf.upfronthosting.co.za> Message-ID: <1212852537.91.0.913929819506.issue2862@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I agree with this patch and will commit it later this weekend if I hear no objections. see the mailing list discussion. ---------- assignee: christian.heimes -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 18:13:30 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 07 Jun 2008 16:13:30 +0000 Subject: [issue3057] 2.6 abc fixes In-Reply-To: <1212855209.92.0.133946246819.issue3057@psf.upfronthosting.co.za> Message-ID: <1212855209.92.0.133946246819.issue3057@psf.upfronthosting.co.za> New submission from Georg Brandl : This patch makes the 2.6 Mapping ABC use the 2.6 dict interface. It also removes registering list as a KeysView, ValuesView and ItemsView. ---------- assignee: gvanrossum components: Library (Lib) files: abcoll.diff keywords: 26backport, patch messages: 67810 nosy: georg.brandl, gvanrossum severity: normal status: open title: 2.6 abc fixes versions: Python 2.6 Added file: http://bugs.python.org/file10544/abcoll.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 18:26:12 2008 From: report at bugs.python.org (Kunshan Wang) Date: Sat, 07 Jun 2008 16:26:12 +0000 Subject: [issue3058] Let SimpleXMLRPCServer pass client_address to called functions. In-Reply-To: <1212855971.92.0.424447915547.issue3058@psf.upfronthosting.co.za> Message-ID: <1212855971.92.0.424447915547.issue3058@psf.upfronthosting.co.za> New submission from Kunshan Wang : I recently wrote a program making use of SimpleXMLRPCServer. It has a function that responds to the caller according to the caller's IP address. However the current SimpleXMLRPCServer does not allow me to do this (directly). For example: def whoami(): # blah blah blah .... return the_caller_s_ip_address svr.register_function(whoami) The problem is that only SimpleXMLRPCRequestHandler knows the client's IP address. I googled and searched the google group. Many people recommends subclassing the SimpleXMLRPCRequestHandler. I did this, but found that it is not very easy, although possible. I managed to make the RequestHandler pass its member client_address to function _dispatch by subclassing SimpleXMLRPCRequestHandler, copy-and-paste the code from the library, and then add an extra argument to _dispatch. Now _dispatch function looks like this: _dispatch(self, method, params, client_address) By default _dispatch assumes that the first parameter of 'method' is client_address, and then followed by other parameters from the (remote) caller. So if the XMLRPC client calls: s=xmlrpclib.Server("http://localhost:9999") s.whoami() the server actually calls whoami(client_address), where whoami is defined as: def whoami(client_address): return client_address The attachment contains a subclassed version of SimpleXMLRPCServer, named AddressRevealingXMLRPCServer. The code is ugly (because most codes are copied, and is vulnerable to future library changes), but it just works now. However this leads to more problems: Now that client_address can be passed to the called function, it may be needed that more informations could be passed to the called function, such as the HTTP headers, the response time, etc.. My code may not be the best solution. I suggest there may be some mechanism (such as overridable methods) to be added to SimpleXMLRPCServer so that user can specify *what* to pass to the called function. ---------- components: Library (Lib) files: AddressRevealingXMLRPCServer.py messages: 67811 nosy: cloverprince severity: normal status: open title: Let SimpleXMLRPCServer pass client_address to called functions. type: feature request versions: Python 2.5 Added file: http://bugs.python.org/file10545/AddressRevealingXMLRPCServer.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 18:53:26 2008 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 07 Jun 2008 16:53:26 +0000 Subject: [issue3057] 2.6 abc fixes In-Reply-To: <1212855209.92.0.133946246819.issue3057@psf.upfronthosting.co.za> Message-ID: <1212857606.37.0.513110549228.issue3057@psf.upfronthosting.co.za> Guido van Rossum added the comment: Looks good. I like keeping the *View classes around so someone can use them still. ---------- assignee: gvanrossum -> georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 19:03:54 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 07 Jun 2008 17:03:54 +0000 Subject: [issue3057] 2.6 abc fixes In-Reply-To: <1212855209.92.0.133946246819.issue3057@psf.upfronthosting.co.za> Message-ID: <1212858234.89.0.650184783403.issue3057@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, committed as r64018. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 20:39:08 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 07 Jun 2008 18:39:08 +0000 Subject: [issue1505257] winerror module Message-ID: <1212863948.64.0.558949242665.issue1505257@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 21:02:23 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 07 Jun 2008 19:02:23 +0000 Subject: [issue2847] Remove cl usage from aifc In-Reply-To: <1210726634.74.0.297516553516.issue2847@psf.upfronthosting.co.za> Message-ID: <1212865343.7.0.974870976277.issue2847@psf.upfronthosting.co.za> Georg Brandl added the comment: I found a few more bytes/str problems, committed patch in r64023. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 21:30:16 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 07 Jun 2008 19:30:16 +0000 Subject: [issue2663] shutil.copytree glob-style filtering [patch] In-Reply-To: <1208726903.81.0.936252523277.issue2663@psf.upfronthosting.co.za> Message-ID: <1212867016.86.0.656599512711.issue2663@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 21:40:04 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 07 Jun 2008 19:40:04 +0000 Subject: [issue3059] Removing s.decode at Lib/calendar.py In-Reply-To: <1212867603.86.0.654177679684.issue3059@psf.upfronthosting.co.za> Message-ID: <1212867603.86.0.654177679684.issue3059@psf.upfronthosting.co.za> New submission from Guilherme Polo : I've removed calls to s.decode found at Lib/calendar.py as it is no longer needed in py3k and doesn't even work (since .decode is gone). ---------- components: Library (Lib) files: no_strdecode.diff keywords: patch messages: 67815 nosy: gpolo severity: normal status: open title: Removing s.decode at Lib/calendar.py versions: Python 3.0 Added file: http://bugs.python.org/file10546/no_strdecode.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 21:43:15 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 07 Jun 2008 19:43:15 +0000 Subject: [issue3059] Removing .decode calls from Lib/calendar.py In-Reply-To: <1212867603.86.0.654177679684.issue3059@psf.upfronthosting.co.za> Message-ID: <1212867795.85.0.0639927422822.issue3059@psf.upfronthosting.co.za> Changes by Guilherme Polo : ---------- title: Removing s.decode at Lib/calendar.py -> Removing .decode calls from Lib/calendar.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 22:58:33 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Jun 2008 20:58:33 +0000 Subject: [issue3021] Lexical exception handlers In-Reply-To: <1212350626.42.0.00327926746922.issue3021@psf.upfronthosting.co.za> Message-ID: <1212872312.95.0.629101199022.issue3021@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a newer patch that also adapts the behaviour of finally blocks as suggested by Adam Olsen. Note that I had to change some things in the way 'with' statements are compiled and executed. Added file: http://bugs.python.org/file10547/finally.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 7 23:30:21 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Jun 2008 21:30:21 +0000 Subject: [issue2523] binary buffered reading is quadratic In-Reply-To: <1206987085.65.0.944826780657.issue2523@psf.upfronthosting.co.za> Message-ID: <1212874221.3.0.464226442044.issue2523@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I recommend not letting this issue rot too much :) Eating 20+ seconds to read the contents of a 10MB binary file in one pass is not very good marketing-wise, and the betas are coming soon... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 00:20:39 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 07 Jun 2008 22:20:39 +0000 Subject: [issue1500773] wm_attributes doesn't take keyword arguments Message-ID: <1212877239.15.0.13146419948.issue1500773@psf.upfronthosting.co.za> Changes by Guilherme Polo : Removed file: http://bugs.python.org/file10513/issue1500773.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 00:21:02 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 07 Jun 2008 22:21:02 +0000 Subject: [issue1500773] wm_attributes doesn't take keyword arguments Message-ID: <1212877262.12.0.530827481529.issue1500773@psf.upfronthosting.co.za> Changes by Guilherme Polo : Added file: http://bugs.python.org/file10548/issue1500773.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 01:18:03 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 07 Jun 2008 23:18:03 +0000 Subject: [issue2523] binary buffered reading is quadratic In-Reply-To: <1206987085.65.0.944826780657.issue2523@psf.upfronthosting.co.za> Message-ID: <1212880683.61.0.49145123857.issue2523@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I am going to go through your patch as soon as I get the time -- i.e., later today or tomorrow morning. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 03:44:00 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Jun 2008 01:44:00 +0000 Subject: [issue2349] Py3K warn against assigning to True/False In-Reply-To: <1205781558.49.0.8223061173.issue2349@psf.upfronthosting.co.za> Message-ID: <1212889440.52.0.962857667665.issue2349@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Georg, can I apply? ---------- assignee: brett.cannon -> georg.brandl nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 03:45:54 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Jun 2008 01:45:54 +0000 Subject: [issue3060] Warn about tuple parameters In-Reply-To: <1212889554.57.0.975996757634.issue3060@psf.upfronthosting.co.za> Message-ID: <1212889554.57.0.975996757634.issue3060@psf.upfronthosting.co.za> New submission from Benjamin Peterson : This patch adds Py3k warnings to nested tuple parameters. ---------- assignee: georg.brandl components: Interpreter Core files: tuple_parameters_warn.patch keywords: patch messages: 67820 nosy: benjamin.peterson, georg.brandl severity: normal status: open title: Warn about tuple parameters type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file10549/tuple_parameters_warn.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 06:37:37 2008 From: report at bugs.python.org (Mark Hammond) Date: Sun, 08 Jun 2008 04:37:37 +0000 Subject: [issue2981] confusing action of struct.pack and struct.unpack with fmt 'p' In-Reply-To: <1211903770.4.0.523120419892.issue2981@psf.upfronthosting.co.za> Message-ID: <1212899857.15.0.73144997215.issue2981@psf.upfronthosting.co.za> Mark Hammond added the comment: What should struct.calcsize() do with a 'p' format string? ---------- nosy: +mhammond _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 07:42:17 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 08 Jun 2008 05:42:17 +0000 Subject: [issue2523] binary buffered reading is quadratic In-Reply-To: <1206987085.65.0.944826780657.issue2523@psf.upfronthosting.co.za> Message-ID: <1212903737.33.0.261936601879.issue2523@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I reviewed the patch and I found a few bugs -- i.e., peek() was replacing the buffer content, read() wasn't written in consideration of non-blocking streams, the removal of the None check in BufferedRandom.read() was wrong. Here's an updated patch. Added file: http://bugs.python.org/file10550/binaryio3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 10:17:11 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 08 Jun 2008 08:17:11 +0000 Subject: [issue3060] Warn about tuple parameters In-Reply-To: <1212889554.57.0.975996757634.issue3060@psf.upfronthosting.co.za> Message-ID: <1212913031.24.0.208242290042.issue3060@psf.upfronthosting.co.za> Georg Brandl added the comment: Why not warn in the AST, like for the other syntax-related changes? The relevant location is ast_for_arguments, line 680 in current SVN. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 10:23:19 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 08 Jun 2008 08:23:19 +0000 Subject: [issue2349] Py3K warn against assigning to True/False In-Reply-To: <1205781558.49.0.8223061173.issue2349@psf.upfronthosting.co.za> Message-ID: <1212913399.04.0.999346611774.issue2349@psf.upfronthosting.co.za> Georg Brandl added the comment: Hmm, I'd even go a step further and factor out the whole checking for invalid/warnable names, like in Py3k's forbidden_name. Also the warning text shouldn't start with uppercase and end in a full stop. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 10:23:34 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 08 Jun 2008 08:23:34 +0000 Subject: [issue3060] Warn about tuple parameters In-Reply-To: <1212889554.57.0.975996757634.issue3060@psf.upfronthosting.co.za> Message-ID: <1212913414.35.0.633905056494.issue3060@psf.upfronthosting.co.za> Georg Brandl added the comment: Also a test is missing. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 10:35:36 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 08 Jun 2008 08:35:36 +0000 Subject: [issue3056] Simplify the Integral ABC In-Reply-To: <1212803845.73.0.399511532431.issue3056@psf.upfronthosting.co.za> Message-ID: <1212914136.15.0.39793755039.issue3056@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Is the patch good to go? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 10:40:22 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 08 Jun 2008 08:40:22 +0000 Subject: [issue3059] Removing .decode calls from Lib/calendar.py In-Reply-To: <1212867603.86.0.654177679684.issue3059@psf.upfronthosting.co.za> Message-ID: <1212914422.29.0.391364846928.issue3059@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, committed in r64033. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 10:44:29 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 08 Jun 2008 08:44:29 +0000 Subject: [issue3061] time.strftime() always decodes result with UTF-8 In-Reply-To: <1212914669.61.0.344111508001.issue3061@psf.upfronthosting.co.za> Message-ID: <1212914669.61.0.344111508001.issue3061@psf.upfronthosting.co.za> New submission from Georg Brandl : It decodes the system strftime's result using TZNAME_ENCODING which is also used to decode timezone names. This may be correct for timezone names themselves (I don't know), but the strftime result is encoded in the LC_TIME encoding - at least on my Linux system. ---------- assignee: loewis messages: 67828 nosy: georg.brandl, loewis priority: high severity: normal status: open title: time.strftime() always decodes result with UTF-8 versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 11:00:28 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 08 Jun 2008 09:00:28 +0000 Subject: [issue3028] tokenize module: normal lines, not "logical" In-Reply-To: <1212406411.84.0.811061181289.issue3028@psf.upfronthosting.co.za> Message-ID: <1212915628.07.0.619995519796.issue3028@psf.upfronthosting.co.za> Georg Brandl added the comment: I got it wrong too at first; the "logical line" refers to the last tuple item, the line string, not the line *number* passed. It should now be clear as of r64037. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 12:08:28 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Jun 2008 10:08:28 +0000 Subject: [issue2523] binary buffered reading is quadratic In-Reply-To: <1206987085.65.0.944826780657.issue2523@psf.upfronthosting.co.za> Message-ID: <1212919708.8.0.124677026201.issue2523@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the fixes. By the way, I don't know much about non-blocking streams, but it seems to me that "optimal" non-blocking read() would require that the chunks we ask to the OS are block-aligned, which is not the case currently (we use 2*avail, which can be an arbitrary value). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 13:06:56 2008 From: report at bugs.python.org (Pierre Bourdon) Date: Sun, 08 Jun 2008 11:06:56 +0000 Subject: [issue3062] Turtle speed() function has no effect under Mac OS X In-Reply-To: <1212923215.43.0.432854849061.issue3062@psf.upfronthosting.co.za> Message-ID: <1212923215.43.0.432854849061.issue3062@psf.upfronthosting.co.za> New submission from Pierre Bourdon : When using the speed() function of the turtle module under Mac OS X, it has no effect : the turtle always draws lines with the same speed. An easy fix is to replace line 553 of the turtle.py file by "sleep(self._delay / 1000.0)", however I don't know if it is the best solution. ---------- components: Tkinter messages: 67831 nosy: delroth severity: normal status: open title: Turtle speed() function has no effect under Mac OS X type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 13:45:02 2008 From: report at bugs.python.org (Tal Einat) Date: Sun, 08 Jun 2008 11:45:02 +0000 Subject: [issue1350] IDLE - CallTips enhancement - show full doc-string in new window In-Reply-To: <1193540394.75.0.209428889105.issue1350@psf.upfronthosting.co.za> Message-ID: <1212925502.6.0.0703696196208.issue1350@psf.upfronthosting.co.za> Changes by Tal Einat : Removed file: http://bugs.python.org/file8641/IDLE_CallTips.071028.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 13:46:09 2008 From: report at bugs.python.org (Tal Einat) Date: Sun, 08 Jun 2008 11:46:09 +0000 Subject: [issue1350] IDLE - CallTips enhancement - show full doc-string in new window In-Reply-To: <1193540394.75.0.209428889105.issue1350@psf.upfronthosting.co.za> Message-ID: <1212925569.23.0.817449185568.issue1350@psf.upfronthosting.co.za> Changes by Tal Einat : Removed file: http://bugs.python.org/file8960/IDLE_CallTips.071214.incremental.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 16:48:03 2008 From: report at bugs.python.org (Noam Raphael) Date: Sun, 08 Jun 2008 14:48:03 +0000 Subject: [issue3028] tokenize module: normal lines, not "logical" In-Reply-To: <1212406411.84.0.811061181289.issue3028@psf.upfronthosting.co.za> Message-ID: <1212936482.22.0.590678966424.issue3028@psf.upfronthosting.co.za> Noam Raphael added the comment: Can I suggest that you also add something like "The row indices in the (row, column) tuples, however, are physical, and don't treat continuation lines specially."? It's just that it took me some time to understand your clarification, since the row indices I thought the documentation talks about are also tuple items, they just happen to be the first in the tuple, not the last. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 17:46:09 2008 From: report at bugs.python.org (Grant Tang) Date: Sun, 08 Jun 2008 15:46:09 +0000 Subject: [issue3063] memory leak in random number generation In-Reply-To: <1212939967.99.0.941797469942.issue3063@psf.upfronthosting.co.za> Message-ID: <1212939967.99.0.941797469942.issue3063@psf.upfronthosting.co.za> New submission from Grant Tang : #the following code consume about 800M memory, which is normal n = 100000000 data = [0.0 for i in xrange(n)] #however, if I assign random number to data list, it will consume extra 2.5G memory. from random import random for s in xrange(n): data[i] = random() #even if I delete data, only 800M memory released del data #call gc.collect() does not help, the extra 2.5G memory not released import gc gc.collect() only when I quit Python, the memory is released. Same effect if I use random number generator from numpy. Same effect even if I just say data[i] = atpof("1.26") I tried it in both Python 2.4 and 2.5 on linux 64bit and 32bit. ---------- components: None messages: 67833 nosy: gtang severity: normal status: open title: memory leak in random number generation type: resource usage versions: Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 18:01:39 2008 From: report at bugs.python.org (Facundo Batista) Date: Sun, 08 Jun 2008 16:01:39 +0000 Subject: [issue3063] memory leak in random number generation In-Reply-To: <1212939967.99.0.941797469942.issue3063@psf.upfronthosting.co.za> Message-ID: <1212940898.92.0.362932326139.issue3063@psf.upfronthosting.co.za> Facundo Batista added the comment: Confirmed the issue in the trunk right now: (the number between square brackets point to the 'top' information below) facundo at pomcat:~/devel/reps/python/trunk$ ./python Python 2.6a3+ (trunk:64009, Jun 7 2008, 09:51:56) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. [1] >>> data = [0.0 for i in xrange(100000000)] [2] >>> from random import random >>> for i in xrange(100000000): ... data[i] = random() ... >>> [3] The memory consumption: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND [1] 4054 facundo 20 0 5032 3264 1796 S 0.0 0.2 0:00.02 python [2] 4054 facundo 20 0 414m 384m 1888 S 0.0 19.1 0:17.72 python [3] 4054 facundo 20 0 1953m 1.4g 1952 S 0.0 70.7 1:01.40 python ---------- nosy: +facundobatista versions: +Python 2.6 -Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 18:18:27 2008 From: report at bugs.python.org (Tim Peters) Date: Sun, 08 Jun 2008 16:18:27 +0000 Subject: [issue3063] memory leak in random number generation In-Reply-To: <1212939967.99.0.941797469942.issue3063@psf.upfronthosting.co.za> Message-ID: <1212941907.48.0.152007405158.issue3063@psf.upfronthosting.co.za> Tim Peters added the comment: Strongly doubt this has anything to do with random number generation. Python maintains a freelist for float objects, which is both unbounded and immortal. Instead of doing "data[i] = random()", do, e.g., "data[i] = float(s)", and I bet you'll see the same behavior. That is, whenever you create a number of distinct float objects simultaneously alive, the space they occupy is never released (although it is available to be reused for other float objects). The use of random() here simply creates a large number of distinct float objects simultaneously alive. ---------- nosy: +tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 18:36:42 2008 From: report at bugs.python.org (Grant Tang) Date: Sun, 08 Jun 2008 16:36:42 +0000 Subject: [issue3063] memory leak in random number generation In-Reply-To: <1212939967.99.0.941797469942.issue3063@psf.upfronthosting.co.za> Message-ID: <1212943002.31.0.455379684293.issue3063@psf.upfronthosting.co.za> Grant Tang added the comment: I agree with Tim's comment. The problem's why these floats keep alive even after random() call returns. Then this becomes a garbage collection issue? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 18:46:41 2008 From: report at bugs.python.org (Tim Peters) Date: Sun, 08 Jun 2008 16:46:41 +0000 Subject: [issue3063] memory leak in random number generation In-Reply-To: <1212939967.99.0.941797469942.issue3063@psf.upfronthosting.co.za> Message-ID: <1212943601.45.0.700657990293.issue3063@psf.upfronthosting.co.za> Tim Peters added the comment: They stayed alive simultaneously because you stored 100 million of them simultaneously in a list (data[]). If instead you did, e.g., for i in xrange(100000000): x = random() the problem would go away -- then only two float objects are simultaneously alive at any given time (the "old" float in `x` stays alive until the "new" float created by random() replaces it). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 18:55:46 2008 From: report at bugs.python.org (Grant Tang) Date: Sun, 08 Jun 2008 16:55:46 +0000 Subject: [issue3063] memory leak in random number generation In-Reply-To: <1212939967.99.0.941797469942.issue3063@psf.upfronthosting.co.za> Message-ID: <1212944145.99.0.719844270819.issue3063@psf.upfronthosting.co.za> Grant Tang added the comment: Here I am confused. 100million floats in a list takes about 800M byte memory. This is acceptable. for i in xrange(100000000): data[i] = random() so it should be 800M plus a float returned by random(). But the problem is after this loop, except 800M bytes list, another >2G memory is occupied. And delete data list and call gc.collect() does not release these memory. I think you mean there are lots of floats used in random () call, they should be released after random() returned. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 18:59:26 2008 From: report at bugs.python.org (Facundo Batista) Date: Sun, 08 Jun 2008 16:59:26 +0000 Subject: [issue3063] memory leak in random number generation In-Reply-To: <1212939967.99.0.941797469942.issue3063@psf.upfronthosting.co.za> Message-ID: <1212944366.37.0.361157719462.issue3063@psf.upfronthosting.co.za> Facundo Batista added the comment: So, 0.0 would be cached, and the 414m+384m would be from the list itself, right? I tried, >>> data = [(1.0/i) for i in xrange(1,100000000)] And the memory consumption was the big one. Grant, the 800 MB is taken by ONE 0.0, and a list of zillion positions. Furthermore, I did: >>> for x in xrange(100000000): ... i = random() And the memory didn't increase. Grant, take note that there's no gc issue, the numbers stay alive because the list itself is pointing to them. Closing this as invalid. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 19:07:10 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Jun 2008 17:07:10 +0000 Subject: [issue2349] Py3K warn against assigning to True/False In-Reply-To: <1205781558.49.0.8223061173.issue2349@psf.upfronthosting.co.za> Message-ID: <1212944829.97.0.751722883017.issue2349@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here's a much better patch that delegates checking to a helper. Added file: http://bugs.python.org/file10551/bool_assign7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 19:13:52 2008 From: report at bugs.python.org (Grant Tang) Date: Sun, 08 Jun 2008 17:13:52 +0000 Subject: [issue3063] memory leak in random number generation In-Reply-To: <1212944366.37.0.361157719462.issue3063@psf.upfronthosting.co.za> Message-ID: Grant Tang added the comment: Facundo: I understand now. You mean every unique float number used will be an object in memory. And never been released until Python quit. Is there any way to reclaim these memory? We need 3G memory to create a list of 100million randum numbers. Thank you very much, Grant On Sun, Jun 8, 2008 at 11:59 AM, Facundo Batista wrote: > > Facundo Batista added the comment: > > So, 0.0 would be cached, and the 414m+384m would be from the list > itself, right? I tried, > > >>> data = [(1.0/i) for i in xrange(1,100000000)] > > And the memory consumption was the big one. > > Grant, the 800 MB is taken by ONE 0.0, and a list of zillion positions. > > Furthermore, I did: > > >>> for x in xrange(100000000): > ... i = random() > > And the memory didn't increase. > > Grant, take note that there's no gc issue, the numbers stay alive > because the list itself is pointing to them. > > Closing this as invalid. > > ---------- > resolution: -> invalid > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > Added file: http://bugs.python.org/file10552/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Sun Jun 8 19:19:40 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Jun 2008 17:19:40 +0000 Subject: [issue3060] Warn about tuple parameters In-Reply-To: <1212889554.57.0.975996757634.issue3060@psf.upfronthosting.co.za> Message-ID: <1212945580.81.0.386597653558.issue3060@psf.upfronthosting.co.za> Benjamin Peterson added the comment: > Why not warn in the AST, like for the other syntax-related changes? because I was reading through symtable.c at the time. :) Anyway, here's a better patch. Added file: http://bugs.python.org/file10553/tuple_parameters_warn2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 19:25:12 2008 From: report at bugs.python.org (Facundo Batista) Date: Sun, 08 Jun 2008 17:25:12 +0000 Subject: [issue3063] memory leak in random number generation In-Reply-To: <1212939967.99.0.941797469942.issue3063@psf.upfronthosting.co.za> Message-ID: <1212945912.62.0.674379565823.issue3063@psf.upfronthosting.co.za> Facundo Batista added the comment: Grant, A float takes 64 bits. 100 million floats take 800 MB, *just* the floats. You're also building a list of 100 million places. Maybe you shouldn't be building this structure in memory? In any case, you should raise this issue in comp.lang.python, to get advice. Regards, _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 19:29:35 2008 From: report at bugs.python.org (Tim Peters) Date: Sun, 08 Jun 2008 17:29:35 +0000 Subject: [issue3063] memory leak in random number generation In-Reply-To: <1212939967.99.0.941797469942.issue3063@psf.upfronthosting.co.za> Message-ID: <1212946174.84.0.0065556947211.issue3063@psf.upfronthosting.co.za> Tim Peters added the comment: Float objects also require, as do all Python objects, space to hold a type pointer and a reference count. So each float object requires at least 16 bytes (on most 32-bit boxes, 4 bytes for the type pointer, 4 bytes for the refcount, + 8 bytes for the float). So 100 million float objects requires at least 1.6 billion bytes. It is a gc issue in the sense that the float-object free-list is both unbounded and immortal. For that matter, so is the int-object free-list. This has been discussed many times over the years on python-dev, but nobody yet has a thoroughly attractive alternative. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 20:04:18 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 08 Jun 2008 18:04:18 +0000 Subject: [issue3060] Warn about tuple parameters In-Reply-To: <1212889554.57.0.975996757634.issue3060@psf.upfronthosting.co.za> Message-ID: <1212948258.54.0.383200893496.issue3060@psf.upfronthosting.co.za> Georg Brandl added the comment: Replace "upacking" with "unpacking" and you can commit it :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 20:06:21 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 08 Jun 2008 18:06:21 +0000 Subject: [issue2349] Py3K warn against assigning to True/False In-Reply-To: <1205781558.49.0.8223061173.issue2349@psf.upfronthosting.co.za> Message-ID: <1212948381.64.0.40646611191.issue2349@psf.upfronthosting.co.za> Georg Brandl added the comment: The macro at the top of the patch should be removed, then this can be checked in. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 21:49:57 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 08 Jun 2008 19:49:57 +0000 Subject: [issue2911] rewrite test_struct as a unittest In-Reply-To: <1211149411.88.0.00220562909175.issue2911@psf.upfronthosting.co.za> Message-ID: <1212954596.08.0.508005544565.issue2911@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: In attachment. All existing tests are unchanged. All tests passed on Windows XP sp3 and Linux Ubuntu Breezie both equipped with Python-2.6a3. ---------- keywords: +patch nosy: +giampaolo.rodola Added file: http://bugs.python.org/file10554/test_struct.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 8 23:13:45 2008 From: report at bugs.python.org (Tal Einat) Date: Sun, 08 Jun 2008 21:13:45 +0000 Subject: [issue2053] IDLE - standardize dialogs In-Reply-To: <1202515821.86.0.159216664847.issue2053@psf.upfronthosting.co.za> Message-ID: <1212959625.23.0.718926771467.issue2053@psf.upfronthosting.co.za> Tal Einat added the comment: After more testing, I discovered a bug which broke Goto Line. Attaching a fixed patch. Added file: http://bugs.python.org/file10555/IDLE_standardize_dialogs.080609.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 00:07:37 2008 From: report at bugs.python.org (Tal Einat) Date: Sun, 08 Jun 2008 22:07:37 +0000 Subject: [issue2053] IDLE - standardize dialogs In-Reply-To: <1202515821.86.0.159216664847.issue2053@psf.upfronthosting.co.za> Message-ID: <1212962857.74.0.728253924346.issue2053@psf.upfronthosting.co.za> Changes by Tal Einat : Removed file: http://bugs.python.org/file10555/IDLE_standardize_dialogs.080609.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 00:08:44 2008 From: report at bugs.python.org (Tal Einat) Date: Sun, 08 Jun 2008 22:08:44 +0000 Subject: [issue2053] IDLE - standardize dialogs In-Reply-To: <1202515821.86.0.159216664847.issue2053@psf.upfronthosting.co.za> Message-ID: <1212962924.5.0.803683204867.issue2053@psf.upfronthosting.co.za> Changes by Tal Einat : Added file: http://bugs.python.org/file10556/IDLE_standardize_dialogs.080609.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 01:10:46 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Jun 2008 23:10:46 +0000 Subject: [issue2349] Py3K warn against assigning to True/False In-Reply-To: <1205781558.49.0.8223061173.issue2349@psf.upfronthosting.co.za> Message-ID: <1212966646.81.0.496241068311.issue2349@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Done in r64044. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 01:11:07 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Jun 2008 23:11:07 +0000 Subject: [issue3060] Warn about tuple parameters In-Reply-To: <1212889554.57.0.975996757634.issue3060@psf.upfronthosting.co.za> Message-ID: <1212966667.86.0.828151494242.issue3060@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Done with r64045. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 01:22:19 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Jun 2008 23:22:19 +0000 Subject: [issue2874] Remove use of the stat module in the stdlib In-Reply-To: <1210913145.44.0.456986373707.issue2874@psf.upfronthosting.co.za> Message-ID: <1212967339.65.0.612920818794.issue2874@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Can't you just inherit PyStructSequence with tp_base? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 01:25:09 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Jun 2008 23:25:09 +0000 Subject: [issue2876] Write UserDict fixer for 2to3 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1212967509.92.0.96724857227.issue2876@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: release blocker -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 01:28:19 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Jun 2008 23:28:19 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1212967699.94.0.240949874714.issue2775@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- dependencies: -Remove cl usage from aifc, Write UserDict fixer for 2to3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 01:46:10 2008 From: report at bugs.python.org (Gregor Lingl) Date: Sun, 08 Jun 2008 23:46:10 +0000 Subject: [issue3064] new turtle module for Python 3.0 In-Reply-To: <1212968770.03.0.0198967789225.issue3064@psf.upfronthosting.co.za> Message-ID: <1212968770.03.0.0198967789225.issue3064@psf.upfronthosting.co.za> New submission from Gregor Lingl : turtle3.zip contains the port of the new turtle module (including demo viewer and demo scripts) to Python 3.0 . One demo script has been added (tdemo_forest.py) It has been tested under Windows/MacOsX/Linux without showing up any problems. I've done a few small changes to the API - as proposed in issue 1513695 - which are described in the docfile. Gregor Lingl ---------- components: Tkinter files: turtle3.zip messages: 67852 nosy: gregorlingl, loewis severity: normal status: open title: new turtle module for Python 3.0 type: feature request versions: Python 3.0 Added file: http://bugs.python.org/file10557/turtle3.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 01:54:14 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 08 Jun 2008 23:54:14 +0000 Subject: [issue3065] Fix pickling bug of collections.namedtuple In-Reply-To: <1212969254.61.0.946531358999.issue3065@psf.upfronthosting.co.za> Message-ID: <1212969254.61.0.946531358999.issue3065@psf.upfronthosting.co.za> New submission from Alexandre Vassalotti : There is currently a pickling bug in the namedtuple factory: >>> from collections import namedtuple >>> MemoRecord = namedtuple("MemoRecord", "key, msg") >>> m = MemoRecord(1,"hello") >>> import pickle >>> pickle.loads(pickle.dumps(m)) Traceback (most recent call last): ... TypeError: __new__() takes exactly 3 positional arguments (2 given) The bug is due to the fact that classes created by namedtuple don't handle the __new__ arguments in the same fashion as tuple.__new__. The fix is simply to define __getnewargs__. ---------- assignee: rhettinger components: Library (Lib) files: fix_namedtuple_pickling.patch keywords: patch, patch messages: 67853 nosy: alexandre.vassalotti, rhettinger priority: normal severity: normal status: open title: Fix pickling bug of collections.namedtuple type: behavior versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10558/fix_namedtuple_pickling.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 02:04:00 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Jun 2008 00:04:00 +0000 Subject: [issue3065] Fix pickling bug of collections.namedtuple In-Reply-To: <1212969254.61.0.946531358999.issue3065@psf.upfronthosting.co.za> Message-ID: <1212969840.69.0.478512040076.issue3065@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 02:15:42 2008 From: report at bugs.python.org (Kevin Walzer) Date: Mon, 09 Jun 2008 00:15:42 +0000 Subject: [issue2983] Ttk support for Tkinter In-Reply-To: <1211911032.63.0.360625687085.issue2983@psf.upfronthosting.co.za> Message-ID: <1212970542.44.0.281959274946.issue2983@psf.upfronthosting.co.za> Changes by Kevin Walzer : ---------- nosy: +wordtech _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 02:17:38 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Jun 2008 00:17:38 +0000 Subject: [issue3065] Fix pickling bug of collections.namedtuple In-Reply-To: <1212969254.61.0.946531358999.issue3065@psf.upfronthosting.co.za> Message-ID: <1212970658.45.0.371659581143.issue3065@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Georg, this works fine in Py2.6 but not in Py3.0. Do you know what changed and whether other pickles will fail? ---------- assignee: rhettinger -> georg.brandl nosy: +georg.brandl versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 02:18:25 2008 From: report at bugs.python.org (Kevin Walzer) Date: Mon, 09 Jun 2008 00:18:25 +0000 Subject: [issue2618] Tile module: Add support for themed widgets In-Reply-To: <1207943040.06.0.54693474861.issue2618@psf.upfronthosting.co.za> Message-ID: <1212970705.4.0.605075789339.issue2618@psf.upfronthosting.co.za> Kevin Walzer added the comment: I would like to close this feature request in favor of http://bugs.python.org/issue2983. That project achieves the same goal as this code submission in a more comprehensive, better-documented fashion. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 02:24:32 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Jun 2008 00:24:32 +0000 Subject: [issue3065] Fix pickling bug of collections.namedtuple In-Reply-To: <1212969254.61.0.946531358999.issue3065@psf.upfronthosting.co.za> Message-ID: <1212971072.64.0.398861789826.issue3065@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Found it. Py3.0 uses protocol 2 by default and that protocol has a different set of calls. ---------- versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 02:58:25 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Jun 2008 00:58:25 +0000 Subject: [issue2618] Tile module: Add support for themed widgets In-Reply-To: <1207943040.06.0.54693474861.issue2618@psf.upfronthosting.co.za> Message-ID: <1212973104.95.0.638189040761.issue2618@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> duplicate status: open -> closed superseder: -> Ttk support for Tkinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 03:01:39 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Jun 2008 01:01:39 +0000 Subject: [issue3064] new turtle module for Python 3.0 In-Reply-To: <1212968770.03.0.0198967789225.issue3064@psf.upfronthosting.co.za> Message-ID: <1212973299.74.0.455465221815.issue3064@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 03:30:31 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Jun 2008 01:30:31 +0000 Subject: [issue3065] Fix pickling bug of collections.namedtuple In-Reply-To: <1212969254.61.0.946531358999.issue3065@psf.upfronthosting.co.za> Message-ID: <1212975031.41.0.391316306861.issue3065@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed in r64047. Thanks for the submission. ---------- assignee: georg.brandl -> rhettinger resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 08:35:50 2008 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 09 Jun 2008 06:35:50 +0000 Subject: [issue3042] Add PEP 8 compliant aliases to threading module In-Reply-To: <1212670566.42.0.274403876451.issue3042@psf.upfronthosting.co.za> Message-ID: <1212993350.32.0.143797077709.issue3042@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'd still be inclined to put a @wraps(meth) decorator on the definition of the wrapper function (and then override to the supplied name afterwards) - remember that functools.wraps is a decorator factory rather than a decorator itself. That would ensure that any docstrings and the like would be preserved (granted, it appears the threading module currently doesn't *have* any docstrings, but it would still be better to write the wrapping code correctly). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 08:55:32 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Jun 2008 06:55:32 +0000 Subject: [issue2138] Add a factorial function In-Reply-To: <1203329368.91.0.915653416666.issue2138@psf.upfronthosting.co.za> Message-ID: <1212994532.2.0.448424367929.issue2138@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Added math.factorial() in r64050. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 12:59:38 2008 From: report at bugs.python.org (Raghuram Devarakonda) Date: Mon, 09 Jun 2008 10:59:38 +0000 Subject: [issue3058] Let SimpleXMLRPCServer pass client_address to called functions. In-Reply-To: <1212855971.92.0.424447915547.issue3058@psf.upfronthosting.co.za> Message-ID: <1213009177.99.0.551197284834.issue3058@psf.upfronthosting.co.za> Changes by Raghuram Devarakonda : ---------- nosy: +draghuram _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 13:03:09 2008 From: report at bugs.python.org (Bohdan Vlasyuk) Date: Mon, 09 Jun 2008 11:03:09 +0000 Subject: [issue3066] FD leak in urllib2 In-Reply-To: <1213009389.23.0.132424094421.issue3066@psf.upfronthosting.co.za> Message-ID: <1213009389.23.0.132424094421.issue3066@psf.upfronthosting.co.za> New submission from Bohdan Vlasyuk : In urllib2.AbstractHTTPHandler.do_open, the following like creates a circular link: r.recv = r.read [r.read is a bound method, so it contains a reference to 'r'. Therefore, r now refers to itself.] If the GC is disabled or doesn't run often, this creates a FD leak. How to reproduce: import gc import urllib2 u = urllib2.urlopen("http://google.com") s = [ u.fp._sock.fp._sock ] u.close() del u print gc.get_referrers(s[0]) [, []] I would expect that only one reference to the socket would exist (the "s" list itself). I can reproduce with 2.4; the problems seems to still exist in SVN HEAD. ---------- components: Library (Lib) messages: 67860 nosy: bohdan severity: normal status: open title: FD leak in urllib2 type: resource usage versions: Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 14:09:15 2008 From: report at bugs.python.org (vincent.chute) Date: Mon, 09 Jun 2008 12:09:15 +0000 Subject: [issue3067] setlocale Tracebacks on unicode locale strings In-Reply-To: <1213013354.87.0.861327880823.issue3067@psf.upfronthosting.co.za> Message-ID: <1213013354.87.0.861327880823.issue3067@psf.upfronthosting.co.za> New submission from vincent.chute : import locale locale.setlocale( locale.LC_ALL, u'ja_JP.utf8') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.5/locale.py", line 475, in setlocale locale = normalize(_build_localename(locale)) File "/usr/lib/python2.5/locale.py", line 383, in _build_localename language, encoding = localetuple ValueError: too many values to unpack The problem is line 473: if locale and type(locale) is not type(""): Replacing this with if locale and not isinstance(locale, basestring): fixes the problem. ---------- components: Library (Lib) messages: 67861 nosy: vincent.chute severity: normal status: open title: setlocale Tracebacks on unicode locale strings versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 14:12:26 2008 From: report at bugs.python.org (vincent.chute) Date: Mon, 09 Jun 2008 12:12:26 +0000 Subject: [issue3067] setlocale Tracebacks on unicode locale strings In-Reply-To: <1213013354.87.0.861327880823.issue3067@psf.upfronthosting.co.za> Message-ID: <1213013546.42.0.208146392138.issue3067@psf.upfronthosting.co.za> vincent.chute added the comment: I have confirmed this exists on trunk http://svn.python.org/view/python/trunk/Lib/locale.py?rev=63824&view=markup (63824 is the latest) where the line in question is now 475 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 15:09:21 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Jun 2008 13:09:21 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1213016961.74.0.336399545067.issue3051@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 15:40:24 2008 From: report at bugs.python.org (Simon Cross) Date: Mon, 09 Jun 2008 13:40:24 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1206918832.8.0.542354120577.issue2517@psf.upfronthosting.co.za> Message-ID: <1213018824.25.0.137378819627.issue2517@psf.upfronthosting.co.za> Simon Cross added the comment: One of the examples Christoph tried was unicode(Exception(u'\xe1')) which fails quite oddly with: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 0: ordinal not in range(128) The reason for this is Exception lacks an __unicode__ method implementation so that unicode(e) does something like unicode(str(e)) which attempts to convert the exception arguments to the default encoding (almost always ASCII) and fails. Fixing this seems quite important. It's common to want to raise errors with non-ASCII characters (e.g. when the data which caused the error contains such characters). Usually the code raising the error has no way of knowing how the characters should be encoded (exceptions can end up being written to log files, displayed in web interfaces, that sort of thing). This means raising exceptions with unicode messages. Using unicode(e.message) is unattractive since it won't work in 3.0 and also does not duplicate str(e)'s handling of the other exception __init__ arguments. I'm attaching a patch which implements __unicode__ for BaseException. Because of the lack of a tp_unicode slot to mirror tp_str slot, this breaks the test that calls unicode(Exception). The existing test for unicode(e) does unicode(Exception(u"Foo")) which is a bit of a non-test. My patch adds a test of unicode(Exception(u'\xe1')) which fails without the patch. A quick look through trunk suggests implementing tp_unicode actually wouldn't be a huge job. My worry is that this would constitute a change to the C API for PyObjects and has little chance of acceptance into 2.6 (and in 3.0 all these issues disappear anyway). If there is some chance of acceptance, I'm willing to write a patch that adds tp_unicode. ---------- nosy: +hodgestar Added file: http://bugs.python.org/file10559/exception-unicode.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 17:16:39 2008 From: report at bugs.python.org (Jim Jewett) Date: Mon, 09 Jun 2008 15:16:39 +0000 Subject: [issue775544] Tk.quit leads to crash in python.exe Message-ID: <1213024599.78.0.798594168082.issue775544@psf.upfronthosting.co.za> Jim Jewett added the comment: Were you using IDLE at the time? When I try this (Windows XP SP2), the button and its window do not go away (which is arguably a bug), but it does not crash. If I then try to close the window using the little X (from the window manager), (1) A qb started from the command-line interface exits, as it should. (2) A qb started from within IDLE becomes non-responsive, and Windows asks whether or not I want to continue shutting it down. ---------- nosy: +jimjjewett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 17:44:46 2008 From: report at bugs.python.org (David Fraser) Date: Mon, 09 Jun 2008 15:44:46 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1206918832.8.0.542354120577.issue2517@psf.upfronthosting.co.za> Message-ID: <1213026286.11.0.605586748416.issue2517@psf.upfronthosting.co.za> Changes by David Fraser : ---------- nosy: +davidfraser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 17:53:28 2008 From: report at bugs.python.org (David Fraser) Date: Mon, 09 Jun 2008 15:53:28 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1206918832.8.0.542354120577.issue2517@psf.upfronthosting.co.za> Message-ID: <1213026808.62.0.563790418406.issue2517@psf.upfronthosting.co.za> David Fraser added the comment: Aha - the __unicode__ method was previously there in Python 2.5, and was ripped out because of the unicode(Exception) problem. See http://bugs.python.org/issue1551432. The reversion is in http://svn.python.org/view/python/trunk/Objects/exceptions.c?rev=51837&r1=51770&r2=51837 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 17:53:57 2008 From: report at bugs.python.org (David Fraser) Date: Mon, 09 Jun 2008 15:53:57 +0000 Subject: [issue1551432] __unicode__ breaks for exception class objects Message-ID: <1213026837.32.0.414005595104.issue1551432@psf.upfronthosting.co.za> David Fraser added the comment: Note that this causes problems with converting Exceptions to unicode - see http://bugs.python.org/issue2517 ---------- nosy: +davidfraser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 17:56:37 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Jun 2008 15:56:37 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1213018824.25.0.137378819627.issue2517@psf.upfronthosting.co.za> Message-ID: <1afaf6160806090856o3b52e866xaeae17e844696e1c@mail.gmail.com> Benjamin Peterson added the comment: On Mon, Jun 9, 2008 at 8:40 AM, Simon Cross wrote: > > Simon Cross added the comment: > > One of the examples Christoph tried was > > unicode(Exception(u'\xe1')) > > which fails quite oddly with: > > UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in > position 0: ordinal not in range(128) > > The reason for this is Exception lacks an __unicode__ method > implementation so that unicode(e) does something like unicode(str(e)) > which attempts to convert the exception arguments to the default > encoding (almost always ASCII) and fails. What version are you using? In Py3k, str is unicode so __str__ can return a unicode string. > > Fixing this seems quite important. It's common to want to raise errors > with non-ASCII characters (e.g. when the data which caused the error > contains such characters). Usually the code raising the error has no way > of knowing how the characters should be encoded (exceptions can end up > being written to log files, displayed in web interfaces, that sort of > thing). This means raising exceptions with unicode messages. Using > unicode(e.message) is unattractive since it won't work in 3.0 and also > does not duplicate str(e)'s handling of the other exception __init__ > arguments. > > I'm attaching a patch which implements __unicode__ for BaseException. > Because of the lack of a tp_unicode slot to mirror tp_str slot, this > breaks the test that calls unicode(Exception). The existing test for > unicode(e) does unicode(Exception(u"Foo")) which is a bit of a non-test. > My patch adds a test of unicode(Exception(u'\xe1')) which fails without > the patch. > > A quick look through trunk suggests implementing tp_unicode actually > wouldn't be a huge job. My worry is that this would constitute a change > to the C API for PyObjects and has little chance of acceptance into 2.6 > (and in 3.0 all these issues disappear anyway). If there is some chance > of acceptance, I'm willing to write a patch that adds tp_unicode. Email Python-dev for permission. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 18:03:27 2008 From: report at bugs.python.org (Simon Cross) Date: Mon, 09 Jun 2008 16:03:27 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1206918832.8.0.542354120577.issue2517@psf.upfronthosting.co.za> Message-ID: <1213027406.99.0.406592385845.issue2517@psf.upfronthosting.co.za> Simon Cross added the comment: Concerning http://bugs.python.org/issue1551432: I'd much rather have working unicode(e) than working unicode(Exception). Calling unicode(C) on any class C which overrides __unicode__ is broken without tp_unicode anyway. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 18:12:32 2008 From: report at bugs.python.org (Simon Cross) Date: Mon, 09 Jun 2008 16:12:32 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1206918832.8.0.542354120577.issue2517@psf.upfronthosting.co.za> Message-ID: <1213027952.7.0.294707881423.issue2517@psf.upfronthosting.co.za> Simon Cross added the comment: Benjamin Peterson wrote: > What version are you using? In Py3k, str is unicode so __str__ can > return a unicode string. I'm sorry it wasn't clear. I'm aware that this issue doesn't apply to Python 3.0. I'm testing on both Python 2.5 and Python 2.6 for the purposes of the bug. Code I'm developing that hits these issues are database exceptions with unicode messages raised inside MySQLdb on Python 2.5. The patch I submitted is against trunk. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 18:20:46 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 09 Jun 2008 16:20:46 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1206918832.8.0.542354120577.issue2517@psf.upfronthosting.co.za> Message-ID: <1213028446.0.0.721366642816.issue2517@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Removing 3.0 from the versions list. ---------- nosy: +lemburg versions: -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 19:20:35 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 09 Jun 2008 17:20:35 +0000 Subject: [issue3064] new turtle module for Python 3.0 In-Reply-To: <1212968770.03.0.0198967789225.issue3064@psf.upfronthosting.co.za> Message-ID: <1213032034.98.0.580464697792.issue3064@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you please provide the documentation change as a patch relative to the 2.6 Doc/lib/turtle.rst (or as a complete file based on turtle.rst)? In the current form, I find it hard to accept, since I would have to redo all the changes that I had already done for the 2.6 version. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 20:10:33 2008 From: report at bugs.python.org (Tal Einat) Date: Mon, 09 Jun 2008 18:10:33 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> New submission from Tal Einat : Attaching a patch for a straightforward extension config dialog, largely based on configDialog.py. This uses the multiple-tab-rows feature of the TabbedPageSet widget from the tabbedPages module, as well as the included VerticalScrolledFrame widget. Other than that there's nothing really new here. ---------- components: IDLE files: IDLE_configExtensionsDialog.080609.patch keywords: patch messages: 67872 nosy: kbk, taleinat severity: normal status: open title: IDLE - Add an extension configuration dialog type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file10560/IDLE_configExtensionsDialog.080609.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 20:35:52 2008 From: report at bugs.python.org (Tal Einat) Date: Mon, 09 Jun 2008 18:35:52 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1213036552.28.0.503692760209.issue3068@psf.upfronthosting.co.za> Changes by Tal Einat : Removed file: http://bugs.python.org/file10560/IDLE_configExtensionsDialog.080609.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 20:38:41 2008 From: report at bugs.python.org (Tal Einat) Date: Mon, 09 Jun 2008 18:38:41 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1213036720.99.0.327046182608.issue3068@psf.upfronthosting.co.za> Tal Einat added the comment: I forgot to mention: This patch also removes the "paragraph width" option from the "General" tab in the normal IDLE config, since that configures a parameter of the FormatParagraph extension, which can now be done in the extension config dialog. Added file: http://bugs.python.org/file10561/IDLE_configExtensionsDialog.080609.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 21:04:57 2008 From: report at bugs.python.org (David Fraser) Date: Mon, 09 Jun 2008 19:04:57 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1206918832.8.0.542354120577.issue2517@psf.upfronthosting.co.za> Message-ID: <1213038297.19.0.294021763546.issue2517@psf.upfronthosting.co.za> David Fraser added the comment: So I've got a follow-up patch that adds tp_unicode. Caveat that I've never done anything like this before and it's almost certain to be wrong. It does however generate the desired result in this case :-) Added file: http://bugs.python.org/file10562/tp_unicode_exception.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 21:09:04 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Jun 2008 19:09:04 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1213038297.19.0.294021763546.issue2517@psf.upfronthosting.co.za> Message-ID: <1afaf6160806091209r3dd93ca6ndb4ce088c0358d5a@mail.gmail.com> Benjamin Peterson added the comment: On Mon, Jun 9, 2008 at 2:04 PM, David Fraser wrote: > > David Fraser added the comment: > > So I've got a follow-up patch that adds tp_unicode. > Caveat that I've never done anything like this before and it's almost > certain to be wrong. Unfortunately, adding a slot is a bit more complicated. You have to deal with inheritance and such. Have a look in typeobject.c for all the gory details. I'd recommend you write to python-dev before going on the undertaking, though. > > It does however generate the desired result in this case :-) > > Added file: http://bugs.python.org/file10562/tp_unicode_exception.patch > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 21:36:31 2008 From: report at bugs.python.org (Gregor Lingl) Date: Mon, 09 Jun 2008 19:36:31 +0000 Subject: [issue3064] new turtle module for Python 3.0 In-Reply-To: <1212968770.03.0.0198967789225.issue3064@psf.upfronthosting.co.za> Message-ID: <1213040190.66.0.0662885143874.issue3064@psf.upfronthosting.co.za> Gregor Lingl added the comment: Here is the (slightly) modified docfile in rst-format for the new turtle module for Python 3.0 I'll submit the diff (from the turtle.rst for Python 2.6) in a follow up posting for your convenience. So you can easily check the few differences - as well as if I have used reST correctly. Regards, Gregor Added file: http://bugs.python.org/file10563/turtle30.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 9 21:40:46 2008 From: report at bugs.python.org (Gregor Lingl) Date: Mon, 09 Jun 2008 19:40:46 +0000 Subject: [issue3064] new turtle module for Python 3.0 In-Reply-To: <1212968770.03.0.0198967789225.issue3064@psf.upfronthosting.co.za> Message-ID: <1213040446.63.0.872896441768.issue3064@psf.upfronthosting.co.za> Gregor Lingl added the comment: And here the diff from docfile turtle.rst to what I have named turtle30.rst for now. Gregor ---------- keywords: +patch Added file: http://bugs.python.org/file10564/turtle.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 01:01:53 2008 From: report at bugs.python.org (Arnaud Delobelle) Date: Mon, 09 Jun 2008 23:01:53 +0000 Subject: [issue3069] Let set.union and set.intersection accept multiple arguments In-Reply-To: <1213052512.78.0.0912293391051.issue3069@psf.upfronthosting.co.za> Message-ID: <1213052512.78.0.0912293391051.issue3069@psf.upfronthosting.co.za> New submission from Arnaud Delobelle : The patch allows the following syntax for s set/frozenset: * s.union(a, b, c,...) * s.update(a, b, c,...) * s.intersection(a, b, c,...) * s.intersection_update(a, b, c,...) By extension: * set.union(a, b, c,...) # provided a is a set/frozenset * ... Union is extended by iterative application of set_union_internal Intersection is optimized by sorting all sets/frozensets/dicts in increasing order of size and only iterating over elements in the smallest. This was discussed on python-ideas: http://groups.google.com/group/python- ideas/browse_thread/thread/945a6c989ab905a3/54defd5e62b9a2a6 ---------- components: Interpreter Core files: set_ui_varargs.diff keywords: patch messages: 67878 nosy: arno severity: normal status: open title: Let set.union and set.intersection accept multiple arguments type: feature request versions: Python 3.0 Added file: http://bugs.python.org/file10565/set_ui_varargs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 01:15:39 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Jun 2008 23:15:39 +0000 Subject: [issue3069] Let set.union and set.intersection accept multiple arguments In-Reply-To: <1213052512.78.0.0912293391051.issue3069@psf.upfronthosting.co.za> Message-ID: <1213053339.42.0.296810078763.issue3069@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Time machine -- I already put in a version of this last night. See r64051 and r64055. Will take a look at your code to see if I can incorporate the sorting for insection() and harvest it for more tests. ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 01:28:51 2008 From: report at bugs.python.org (Adam Olsen) Date: Mon, 09 Jun 2008 23:28:51 +0000 Subject: [issue3070] Wrong size calculation in posix_execve In-Reply-To: <1213054131.08.0.268305843949.issue3070@psf.upfronthosting.co.za> Message-ID: <1213054131.08.0.268305843949.issue3070@psf.upfronthosting.co.za> New submission from Adam Olsen : In 2.x, the size of C string needed for an environment variable used by posix_execve was calculated using PyString_GetSize. In 3.0 this is translated to PyUnicode_GetSize. However, in 3.0 the C string is the UTF-8 encoded version of the unicode object, which doesn't necessarily have the same length as what PyUnicode_GetSize reports. The simplest solution I see is to use strlen() instead. ---------- components: Extension Modules messages: 67880 nosy: Rhamphoryncus severity: normal status: open title: Wrong size calculation in posix_execve versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 01:41:26 2008 From: report at bugs.python.org (Arnaud Delobelle) Date: Mon, 09 Jun 2008 23:41:26 +0000 Subject: [issue3069] Let set.union and set.intersection accept multiple arguments In-Reply-To: <1213052512.78.0.0912293391051.issue3069@psf.upfronthosting.co.za> Message-ID: <1213054886.73.0.442769907886.issue3069@psf.upfronthosting.co.za> Arnaud Delobelle added the comment: I must have diffed my patch against the wrong revision then, because I haven't seen it. I had finished it last thursday, but have had a very hectic few days and only found a few minutes to send it this evening. Something must have gone wrong & the patch must be against last thursday's revision I guess. Anyway it doesn't matter too much as you have started making the changes and it's easy to isolate set_intersection, which is a whole new function, in the patch file. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 02:47:06 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 10 Jun 2008 00:47:06 +0000 Subject: [issue2917] merge pickle and cPickle in 3.0 In-Reply-To: <1211227162.29.0.0642317760161.issue2917@psf.upfronthosting.co.za> Message-ID: <1213058826.31.0.174928266104.issue2917@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file10566/changeset-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 02:55:56 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 10 Jun 2008 00:55:56 +0000 Subject: [issue2917] merge pickle and cPickle in 3.0 In-Reply-To: <1211227162.29.0.0642317760161.issue2917@psf.upfronthosting.co.za> Message-ID: <1213059356.49.0.717453406033.issue2917@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Here is the full patch that adds the _pickle module. I would like to commit it as soon another developer tests it and (hopefully) reviews it. A documentation patch is coming as well. However since I don't want to block the release just for documentation patch, I will post it as a separate issue. Added file: http://bugs.python.org/file10567/add-cpickle-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 03:01:01 2008 From: report at bugs.python.org (Arnaud Bergeron) Date: Tue, 10 Jun 2008 01:01:01 +0000 Subject: [issue3004] Bug in slice.indices() In-Reply-To: <1212086155.65.0.0693111742843.issue3004@psf.upfronthosting.co.za> Message-ID: <1213059661.0.0.847058858378.issue3004@psf.upfronthosting.co.za> Arnaud Bergeron added the comment: Don't blame me for the delay, I have long days (yes, really up to 96 hours long :) As for the documentation patch, I'm not certain anymore about it. Unless I bloat the description to about one full screen worth of text, there will always be surprises for the user. And describing only one little part in detail feels inconsistent. So unless I'm just a really bad writer, I think the current doc could be left as-is. I'm still all for the attached patch. Comments anyone? Or does this needs more nagging? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 03:55:21 2008 From: report at bugs.python.org (Jesse Noller) Date: Tue, 10 Jun 2008 01:55:21 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213062921.12.0.451482911761.issue3050@psf.upfronthosting.co.za> Jesse Noller added the comment: Quick status: Completed: - Redo all documentation to match ReST format of stdlib - thanks to Benjamin Peterson for the massive conversion he did. - All unit tests are converted, I'm just chasing down a few lingering bugs that came with the conversion. (jnoller) Richard and I are ironing out a few remaining API cleanups that came about with the renaming and I'll update the docs to reflect the new method names. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 04:06:06 2008 From: report at bugs.python.org (Jonathan Lange) Date: Tue, 10 Jun 2008 02:06:06 +0000 Subject: [issue3071] The ValueError raised by failing to unpack sequence should have more information. In-Reply-To: <1213063566.77.0.933941671492.issue3071@psf.upfronthosting.co.za> Message-ID: <1213063566.77.0.933941671492.issue3071@psf.upfronthosting.co.za> New submission from Jonathan Lange : Here's the current message: Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> [foo] = [2, 3] Traceback (most recent call last): File "", line 1, in ValueError: too many values to unpack It would be good if the message of the ValueError contained information about how many values were expected and how many values were given. ---------- components: Interpreter Core messages: 67885 nosy: jml severity: normal status: open title: The ValueError raised by failing to unpack sequence should have more information. type: feature request versions: Python 2.3, Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 04:14:11 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 10 Jun 2008 02:14:11 +0000 Subject: [issue2918] Merge StringIO/cStringIO in 3.0 In-Reply-To: <1211227262.27.0.176120683389.issue2918@psf.upfronthosting.co.za> Message-ID: <1213064051.45.0.53499411619.issue2918@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Here's a preliminary patch that add the C optimization for StringIO. All tests are passing except two which depends on the StringIO.buffer attribute of the TextIOWrapper class. Honestly, I am not sure what is the correct way to fix this. I cannot simply "fake" the attribute by returning a BytesIO object, since the file position of buffer is undecidable. It seems to me that the only way to fix these failing tests would be to define a FakeIO class, in their test file, that would wrap ByteIO with TextIOWrapper, just like the old and inefficient StringIO. So, any idea on what would be the best thing to do? ---------- keywords: +patch Added file: http://bugs.python.org/file10568/add-stringio-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 04:22:58 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 10 Jun 2008 02:22:58 +0000 Subject: [issue2523] binary buffered reading is quadratic In-Reply-To: <1206987085.65.0.944826780657.issue2523@psf.upfronthosting.co.za> Message-ID: <1213064578.94.0.924224851403.issue2523@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Oh, that is simple to fix. You can round the value 2*avail to the nearest block by doing something like (2*avail) & ~(bksize-1) where bksize is a power of 2, or the less magic (2*avail//bksize) * bksize. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 04:35:41 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 02:35:41 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213065341.47.0.210722336289.issue3050@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm attaching my version of the docs. (Jesse, I did fix the Sphinx warnings and some other problems I noticed.) Georg, if you could cast your expert reST eye over them, I'd be much obliged. ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson, georg.brandl priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 04:39:49 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 02:39:49 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213065589.27.0.47713810445.issue3050@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- keywords: +patch Added file: http://bugs.python.org/file10569/multiprocessing_docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 04:46:25 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 02:46:25 +0000 Subject: [issue3071] The ValueError raised by failing to unpack sequence should have more information. In-Reply-To: <1213063566.77.0.933941671492.issue3071@psf.upfronthosting.co.za> Message-ID: <1213065985.64.0.354590240899.issue3071@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Would you like to submit a patch? ---------- nosy: +benjamin.peterson priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 04:54:28 2008 From: report at bugs.python.org (Senthil) Date: Tue, 10 Jun 2008 02:54:28 +0000 Subject: [issue754016] urlparse goes wrong with IP:port without scheme Message-ID: <1213066468.71.0.143409672034.issue754016@psf.upfronthosting.co.za> Senthil added the comment: Attaching the patch to fix this issue. I deliberated upon this for a while and came up with the approach to: 1) fix the port issue, wherein urlparse should technically recognize the ':' separator for port from ':' after scheme. 2) And Doc fix wherein, it is advised that in the absence of a scheme, use the net_loc as //net_loc (following RCF 1808). If we go for any other fix, like internally pre-pending // when user has not specified the scheme (like in many pratical purpose), then we stand at chance of breaking a number of tests ( cases where url is 'g'(path only),';x' (path with params) and cases where relative url is g:h) Let me know your thoughts on this. >>> urlparse('1.2.3.4:80') ParseResult(scheme='', netloc='', path='1.2.3.4:80', params='', query='', fragment='') >>> urlparse('http://www.python.org:80/~guido/foo?query#fun') ParseResult(scheme='http', netloc='www.python.org:80', path='/~guido/foo', params='', query='query', fragment='fun') >>> ---------- keywords: +patch nosy: +orsenthil Added file: http://bugs.python.org/file10570/issue754016.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 06:05:51 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 10 Jun 2008 04:05:51 +0000 Subject: [issue2582] Unpickling of range objects fail in Py3k In-Reply-To: <1207658342.58.0.573226897239.issue2582@psf.upfronthosting.co.za> Message-ID: <1213070751.79.0.674873121831.issue2582@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Fixed in r64059 for Python 3.0 Fixed in r64056 and r64057 for Python 2.6 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 06:06:55 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 10 Jun 2008 04:06:55 +0000 Subject: [issue2582] Unpickling of range objects fail in Py3k In-Reply-To: <1207658342.58.0.573226897239.issue2582@psf.upfronthosting.co.za> Message-ID: <1213070815.84.0.681770059885.issue2582@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: > Fixed in r64056 and r64057 for Python 2.6 Oops, I meant r64057 and r64058. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 06:18:32 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 10 Jun 2008 04:18:32 +0000 Subject: [issue1092962] Make Generators Pickle-able Message-ID: <1213071512.71.0.45828172277.issue1092962@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I think is a bad idea too. Unless I see patch that implements this feature cleanly, I will have to reject this feature request. ---------- nosy: +alexandre.vassalotti resolution: -> rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 06:24:30 2008 From: report at bugs.python.org (Steve Emmert) Date: Tue, 10 Jun 2008 04:24:30 +0000 Subject: [issue3072] Assignment to list of lists gives incorrect result In-Reply-To: <1213071869.88.0.834144685445.issue3072@psf.upfronthosting.co.za> Message-ID: <1213071869.88.0.834144685445.issue3072@psf.upfronthosting.co.za> New submission from Steve Emmert : This bug is explained in the attached file. The list of lists does not behave correctly when it is defined by the makeGrid function in the attached file. When attempting to set the value of one element, it actually sets multiple elements. The same operation works differently when the list of lists is defined with a literal. I am using version 2.5.2 with Windows XP. I am just learning Python, so I may have gotten some terminology wrong. stesteve ---------- components: Interpreter Core files: Bug_Case.py messages: 67894 nosy: stesteve severity: normal status: open title: Assignment to list of lists gives incorrect result type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10571/Bug_Case.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 06:27:13 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 10 Jun 2008 04:27:13 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1213072032.77.0.678287453547.issue1580@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 06:47:17 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 10 Jun 2008 04:47:17 +0000 Subject: [issue3064] new turtle module for Python 3.0 In-Reply-To: <1212968770.03.0.0198967789225.issue3064@psf.upfronthosting.co.za> Message-ID: <1213073237.57.0.5968281031.issue3064@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the patch. Committed as r64061. Notice that the turtle module was meanwhile moved into the tkinter package. If you think it should stay as a toplevel module, you should discuss that on stdlib-sig. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 06:47:26 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 10 Jun 2008 04:47:26 +0000 Subject: [issue3064] new turtle module for Python 3.0 In-Reply-To: <1212968770.03.0.0198967789225.issue3064@psf.upfronthosting.co.za> Message-ID: <1213073246.67.0.255975573761.issue3064@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 06:56:49 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 10 Jun 2008 04:56:49 +0000 Subject: [issue2919] Merge profile/cProfile in 3.0 In-Reply-To: <1211227334.77.0.551300594218.issue2919@psf.upfronthosting.co.za> Message-ID: <1213073808.84.0.509931789576.issue2919@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I will try to fix issue. I cannot promise that I will get it done before the beta though. ---------- nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 06:57:10 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 10 Jun 2008 04:57:10 +0000 Subject: [issue3072] Assignment to list of lists gives incorrect result In-Reply-To: <1213071869.88.0.834144685445.issue3072@psf.upfronthosting.co.za> Message-ID: <1213073830.36.0.651592956873.issue3072@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is not a bug. Please read about references in Python, and what this means: py> b=[0] py> a=[b,b] py> a[0] is a[1] True py> c=[[0],[0]] py> c[0] is c[1] False py> c[0] == c[1] True In short, there is only a single list stored in the variable gridRow, and the very same list is appended multiple times (not copies of the list, but the very same object). There are then multiple ways to refer to the list, such as g[0] or g[1]. To avoid sharing the list objects, either create new lists (i.e. nest the first loop into the second one, and create a new gridRow on each outer loop iteration), or create clones of the first list, e.g. grid.append(list(gridRow)) # or grid.append(gridRow[:]) ---------- nosy: +loewis resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 09:08:58 2008 From: report at bugs.python.org (=?utf-8?q?Fernando_P=C3=A9rez?=) Date: Tue, 10 Jun 2008 07:08:58 +0000 Subject: [issue2657] Curses sometimes fails to initialize terminal In-Reply-To: <1208559068.96.0.196247088071.issue2657@psf.upfronthosting.co.za> Message-ID: <1213081737.99.0.394384611602.issue2657@psf.upfronthosting.co.za> Fernando P?rez added the comment: As reported by Ondrej Certik on the IPython mailing list: Here is how to reliably (100%) reproduce it in ipython 0.8.2 (the bug indeed goes away in 0.8.4): http://code.google.com/p/sympy/issues/detail?id=822 together with a screenshot how the terminal looks like (see the comment #6 for the exact sympy revision to use). Maybe you could use it to track the bug down in curses, as your patch only seems to be a workaround (albeit working). Ondrej /quote While unfortunately right now I don't have the time to try and whittle this down to a smaller, self-contained example, it's great to at least have a guaranteed reproducible way of triggering the bug. It requires installing specific versions of both ipython and sympy, but that's very straightforward to do, as both are pure-python projects with no dependencies outside the stdlib. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 09:12:45 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 10 Jun 2008 07:12:45 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213081965.48.0.484232969405.issue3050@psf.upfronthosting.co.za> Georg Brandl added the comment: Attaching reviewed docs patch. Added file: http://bugs.python.org/file10572/mpdocs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 10:34:40 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Jun 2008 08:34:40 +0000 Subject: [issue2523] binary buffered reading is quadratic In-Reply-To: <1206987085.65.0.944826780657.issue2523@psf.upfronthosting.co.za> Message-ID: <1213086879.75.0.0116573354873.issue2523@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yup. However, if you try it, you'll probably notice that it decreases performance of normal (blocking) reads as well :-) Anyway, non-blocking file objects are pretty much second-class citizens in Py3k right now, so my remark was theoretical. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 12:11:44 2008 From: report at bugs.python.org (Lawrence Oluyede) Date: Tue, 10 Jun 2008 10:11:44 +0000 Subject: [issue3073] Cookie.Morsel breaks in parsing cookie values with whitespace In-Reply-To: <1213092703.97.0.622811170151.issue3073@psf.upfronthosting.co.za> Message-ID: <1213092703.97.0.622811170151.issue3073@psf.upfronthosting.co.za> New submission from Lawrence Oluyede : It seems the Cookie module has an odd behavior with whitespaces. According to http://wp.netscape.com/newsref/std/cookie_spec.html and http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_attributes the 'Expires' attribute of the cookie should have this format: "Wdy, DD-Mon-YYYY HH:MM:SS GMT" and this is recognized by all the browsers. The oddity comes when I try to load or create a cookie with that attribute: Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from Cookie import SimpleCookie >>> cookies = SimpleCookie() >>> cookies.load('foo=baz; expires=Sat, 10-Jun-1978 09:41:04 GMT') >>> cookies >>> cookies['foo']['expires'] 'Sat,' >>> cookies.load('foo=baz; expires=2008-06-10T09:44:45.963024') >>> cookies['foo']['expires'] '2008-06-10T09:44:45.963024' It really seems the parser breaks on whitespaces. ---------- components: Library (Lib) messages: 67901 nosy: rhymes severity: normal status: open title: Cookie.Morsel breaks in parsing cookie values with whitespace type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 14:48:37 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 10 Jun 2008 12:48:37 +0000 Subject: [issue2536] itertools.permutations docstring is misleading In-Reply-To: <1207133284.49.0.529226014419.issue2536@psf.upfronthosting.co.za> Message-ID: <1213102117.34.0.565008838518.issue2536@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r64067. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 15:05:47 2008 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 10 Jun 2008 13:05:47 +0000 Subject: [issue2997] PyNumberMethods has left-over fields in Py3 In-Reply-To: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> Message-ID: <1213103146.94.0.759156257232.issue2997@psf.upfronthosting.co.za> Stefan Behnel added the comment: The change that removed the nb_divide and nb_inplace_divide members is here: http://svn.python.org/view?rev=43285&view=rev http://svn.python.org/view/python/branches/p3yk/Include/object.h?rev=43285&view=diff&r1=43285&r2=43284 It dates back to March 2006. (changing issue type to "compile error" as that's what you currently get for Py2 code due to this change) ---------- type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 15:06:06 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 13:06:06 +0000 Subject: [issue3074] test_asyncore is failing In-Reply-To: <1213103166.81.0.500161897199.issue3074@psf.upfronthosting.co.za> Message-ID: <1213103166.81.0.500161897199.issue3074@psf.upfronthosting.co.za> New submission from Benjamin Peterson : test_asyncore test_closeall (test.test_asyncore.HelperFunctionTests) ... ok test_closeall_default (test.test_asyncore.HelperFunctionTests) ... ok test_compact_traceback (test.test_asyncore.HelperFunctionTests) ... ok test_readwrite (test.test_asyncore.HelperFunctionTests) ... ok test_readwriteexc (test.test_asyncore.HelperFunctionTests) ... ok test_basic (test.test_asyncore.DispatcherTests) ... ok test_log (test.test_asyncore.DispatcherTests) ... ok test_log_info (test.test_asyncore.DispatcherTests) ... ok test_repr (test.test_asyncore.DispatcherTests) ... ok test_unhandled (test.test_asyncore.DispatcherTests) ... ok test_send (test.test_asyncore.DispatcherWithSendTests) ... ok test_send (test.test_asyncore.DispatcherWithSendTests_UsePoll) ... ok test_recv (test.test_asyncore.FileWrapperTest) ... FAIL test_send (test.test_asyncore.FileWrapperTest) ... ok ====================================================================== FAIL: test_recv (test.test_asyncore.FileWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/temp/python/trunk/Lib/test/test_asyncore.py", line 387, in test_recv self.assertEqual(w.fd, fd) AssertionError: 7 != 5 ---------------------------------------------------------------------- Ran 14 tests in 0.969s FAILED (failures=1) test test_asyncore failed -- Traceback (most recent call last): File "/temp/python/trunk/Lib/test/test_asyncore.py", line 387, in test_recv self.assertEqual(w.fd, fd) AssertionError: 7 != 5 1 test failed: test_asyncore ---------- assignee: josiahcarlson components: Tests messages: 67904 nosy: benjamin.peterson, josiahcarlson priority: critical severity: normal status: open title: test_asyncore is failing type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 15:17:04 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 10 Jun 2008 13:17:04 +0000 Subject: [issue2997] PyNumberMethods has left-over fields in Py3 In-Reply-To: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> Message-ID: <1213103824.07.0.786977476874.issue2997@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 15:29:05 2008 From: report at bugs.python.org (Jesse Noller) Date: Tue, 10 Jun 2008 13:29:05 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213104545.29.0.188694211279.issue3050@psf.upfronthosting.co.za> Jesse Noller added the comment: I applied Ben's updated patch and then applied Georg's patch - but now I am getting an error doing "make html", unfortunately sphinx/ReST doesn't include line numbers with the error: mify library/miniaeframe library/misc library/mm library/mmap library/modulefinder library/modules library/msilib library/msvcrt library/multifile library/multiprocessing reST markup error: /Users/jesse/open_source/subversion/python- trunk/Doc/library/multiprocessing.rst:: (SEVERE/4) Duplicate ID: "module-multiprocessing". make: *** [build] Error 1 Ben/Georg - did I apply them wrong? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 15:40:19 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 13:40:19 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213105218.79.0.564509741254.issue3050@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Do this: svn revert -R .; rm Doc/library/multiprocessing.rst rm Doc/includes/mp*.py Then apply just Georg's patch. That should work. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 17:15:10 2008 From: report at bugs.python.org (Jesse Noller) Date: Tue, 10 Jun 2008 15:15:10 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213110910.19.0.708774339294.issue3050@psf.upfronthosting.co.za> Jesse Noller added the comment: Thanks Ben - even with that, for some reason I ended up with duplicate chunks and data inside of the .rst file - wiping it all out, and then making a blank version of the .rst and then applying the patch from Georg worked. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 17:28:35 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 10 Jun 2008 15:28:35 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213111715.55.0.557535595256.issue3050@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 17:54:54 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 10 Jun 2008 15:54:54 +0000 Subject: [issue2330] Update PEP 3000 with new release schedule In-Reply-To: <1205775123.38.0.0848585015118.issue2330@psf.upfronthosting.co.za> Message-ID: <1213113294.85.0.541819525665.issue2330@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 18:01:54 2008 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 10 Jun 2008 16:01:54 +0000 Subject: [issue3074] test_asyncore is failing In-Reply-To: <1213103166.81.0.500161897199.issue3074@psf.upfronthosting.co.za> Message-ID: <1213113714.23.0.839216144169.issue3074@psf.upfronthosting.co.za> Josiah Carlson added the comment: Fixed in 64080. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 20:12:04 2008 From: report at bugs.python.org (Bill Janssen) Date: Tue, 10 Jun 2008 18:12:04 +0000 Subject: [issue3075] make minidom.toxml() encoding argument useful In-Reply-To: <1213121523.99.0.8342553488.issue3075@psf.upfronthosting.co.za> Message-ID: <1213121523.99.0.8342553488.issue3075@psf.upfronthosting.co.za> New submission from Bill Janssen : Right now, the encoding argument added to xml.dom.minidom.DOMObject.toxml() in Python 2.3 seems fairly useless. It has to be UTF-8. But a one-line change to the implementation of toprettyxml would make it useful; instead of the encoding error method being "strict", make it "xmlcharrefreplace". So change writer = codecs.lookup(encoding)[3](writer) to writer = codecs.lookup(encoding)[3](writer, "xmlcharrefreplace") ---------- components: Library (Lib) keywords: easy messages: 67909 nosy: janssen priority: normal severity: normal status: open title: make minidom.toxml() encoding argument useful versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 20:22:58 2008 From: report at bugs.python.org (Bill Janssen) Date: Tue, 10 Jun 2008 18:22:58 +0000 Subject: [issue3075] make minidom.toxml() encoding argument useful In-Reply-To: <1213121523.99.0.8342553488.issue3075@psf.upfronthosting.co.za> Message-ID: <1213122178.05.0.746859561865.issue3075@psf.upfronthosting.co.za> Bill Janssen added the comment: The method "toxml" is actually on xml.dom.minidom.Node. ---------- type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 20:58:53 2008 From: report at bugs.python.org (Jesse Noller) Date: Tue, 10 Jun 2008 18:58:53 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213124333.73.0.0683216907146.issue3050@psf.upfronthosting.co.za> Jesse Noller added the comment: Attached is rev 1 of a complete patch for inclusion in 2.6. This patch was developed off of trunk and includes the unit tests, docs, modules, c module, etc. 2 of the unit tests had to be commented out, the first due to the difference in the threading versus process API (is_set vs. isSet) and the second is an OS/X issue I am working with Richard on. Note, some of the examples may be out of date - I am working on those. A full review of this would be appreciated. Pending the application of the patch in issue 1638, this initial revision could be applied to trunk for the wednesday build. Added file: http://bugs.python.org/file10573/multiprocessing_patch_complete.patch.jnoller.v1.bz2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 21:04:05 2008 From: report at bugs.python.org (Jesse Noller) Date: Tue, 10 Jun 2008 19:04:05 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213124645.42.0.959274038299.issue3050@psf.upfronthosting.co.za> Jesse Noller added the comment: Added to the code review system too: http://codereview.appspot.com/2061 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 21:16:38 2008 From: report at bugs.python.org (Adam Olsen) Date: Tue, 10 Jun 2008 19:16:38 +0000 Subject: [issue2320] Race condition in subprocess using stdin In-Reply-To: <1205760712.39.0.906940637593.issue2320@psf.upfronthosting.co.za> Message-ID: <1213125398.36.0.494960108735.issue2320@psf.upfronthosting.co.za> Changes by Adam Olsen : ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 21:33:41 2008 From: report at bugs.python.org (James Thomas) Date: Tue, 10 Jun 2008 19:33:41 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1213126421.84.0.129921225193.issue2912@psf.upfronthosting.co.za> James Thomas added the comment: Alright, that makes things much clearer. I'm looking at this code snippet in platform.py: if system == 'unknown': system = '' if node == 'unknown': node = '' if release == 'unknown': release = '' if version == 'unknown': version = '' if machine == 'unknown': machine = '' if processor == 'unknown': processor = '' So essentially what you want me to do is add code that tries to replace the ''s with meaningful information. From what I understand, os.uname() is only defined in posix-based systems (it is imported from the module posix, after all). That means that 'unknown' is returned because the uname command is unable to retrieve the necessary information. Are there any alternatives to uname that could provide me with system info? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 21:39:51 2008 From: report at bugs.python.org (James Thomas) Date: Tue, 10 Jun 2008 19:39:51 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1213126791.09.0.461867073934.issue2912@psf.upfronthosting.co.za> James Thomas added the comment: Ah, ok, the code under except AttributeError: gives me some good ideas. Should I use the methods utilized there to extract information from the system? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 21:40:54 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 10 Jun 2008 19:40:54 +0000 Subject: [issue2065] trunk version does not compile with vs8 and vc6 In-Reply-To: <1202727039.47.0.783651728329.issue2065@psf.upfronthosting.co.za> Message-ID: <1213126854.63.0.434217344899.issue2065@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file10536/ocean.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 21:41:40 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 10 Jun 2008 19:41:40 +0000 Subject: [issue2065] trunk version does not compile with vs8 and vc6 In-Reply-To: <1202727039.47.0.783651728329.issue2065@psf.upfronthosting.co.za> Message-ID: <1213126900.08.0.121697898815.issue2065@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file10574/ocean.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 22:04:50 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 10 Jun 2008 20:04:50 +0000 Subject: [issue1342] Crash on Windows if Python runs from a directory with umlauts In-Reply-To: <1193456436.1.0.972609600257.issue1342@psf.upfronthosting.co.za> Message-ID: <1213128289.73.0.835851025337.issue1342@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Here is a quick fix, that decodes filenames using Py_FileSystemDefaultEncoding, to let the release pass. I am still working on a version that keep PyObjects* as long as possible, but it will be a major change. ---------- keywords: +patch priority: release blocker -> critical Added file: http://bugs.python.org/file10575/win_nonascii.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 22:27:21 2008 From: report at bugs.python.org (Will Brown) Date: Tue, 10 Jun 2008 20:27:21 +0000 Subject: [issue2234] cygwinccompiler.py fails for latest MinGW releases. In-Reply-To: <1204656219.89.0.991339984516.issue2234@psf.upfronthosting.co.za> Message-ID: <1213129641.64.0.436423056565.issue2234@psf.upfronthosting.co.za> Will Brown added the comment: Same problem in version.py, line 100 (StrictVersion) ---------- nosy: +wmbrown _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 22:29:29 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 20:29:29 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213129769.09.0.316400754961.issue3050@psf.upfronthosting.co.za> Benjamin Peterson added the comment: How much work needs to be done to port this to Py3k? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 22:45:41 2008 From: report at bugs.python.org (Ismail Donmez) Date: Tue, 10 Jun 2008 20:45:41 +0000 Subject: [issue3076] xml_rpc_net fails on Darwin In-Reply-To: <1213130740.65.0.865177105879.issue3076@psf.upfronthosting.co.za> Message-ID: <1213130740.65.0.865177105879.issue3076@psf.upfronthosting.co.za> New submission from Ismail Donmez : Latest py3k branch, test_xmlrpc_net test test_xmlrpc_net failed -- Traceback (most recent call last): File "/Users/cartman/Sources/py3k/Lib/test/test_xmlrpc_net.py", line 18, in test_current_time t0 = server.currentTime.getCurrentTime() File "/Users/cartman/Sources/py3k/Lib/xmlrpc/client.py", line 1095, in __call__ return self.__send(self.__name, args) File "/Users/cartman/Sources/py3k/Lib/xmlrpc/client.py", line 1353, in __request verbose=self.__verbose File "/Users/cartman/Sources/py3k/Lib/xmlrpc/client.py", line 1136, in request return self._parse_response(resp, None) File "/Users/cartman/Sources/py3k/Lib/xmlrpc/client.py", line 1246, in _parse_response p.feed(response) File "/Users/cartman/Sources/py3k/Lib/xmlrpc/client.py", line 516, in feed self._parser.Parse(data, 0) xml.parsers.expat.ExpatError: mismatched tag: line 10, column 7 This is MacOSX Leopard 10.5.3 ---------- components: Tests messages: 67918 nosy: cartman severity: normal status: open title: xml_rpc_net fails on Darwin type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 22:45:59 2008 From: report at bugs.python.org (Ismail Donmez) Date: Tue, 10 Jun 2008 20:45:59 +0000 Subject: [issue3076] test_xmlrpc_net fails on Darwin In-Reply-To: <1213130740.65.0.865177105879.issue3076@psf.upfronthosting.co.za> Message-ID: <1213130759.67.0.72705204963.issue3076@psf.upfronthosting.co.za> Changes by Ismail Donmez : ---------- title: xml_rpc_net fails on Darwin -> test_xmlrpc_net fails on Darwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 22:50:48 2008 From: report at bugs.python.org (Jesse Noller) Date: Tue, 10 Jun 2008 20:50:48 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213131048.1.0.442375295653.issue3050@psf.upfronthosting.co.za> Jesse Noller added the comment: Richard mentioned it should just work after being run though lib2to3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 23:00:33 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 21:00:33 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1213131048.1.0.442375295653.issue3050@psf.upfronthosting.co.za> Message-ID: <1afaf6160806101359h71417e19x3263b8de2632f1bc@mail.gmail.com> Benjamin Peterson added the comment: On Tue, Jun 10, 2008 at 3:50 PM, Jesse Noller wrote: > > Jesse Noller added the comment: > > Richard mentioned it should just work after being run though lib2to3 Excellent! That clears up a main worry of mine. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 23:06:00 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 21:06:00 +0000 Subject: [issue3076] test_xmlrpc_net fails on Darwin In-Reply-To: <1213130740.65.0.865177105879.issue3076@psf.upfronthosting.co.za> Message-ID: <1213131960.54.0.253013647201.issue3076@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 23:10:04 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 10 Jun 2008 21:10:04 +0000 Subject: [issue3076] test_xmlrpc_net fails on Darwin In-Reply-To: <1213130740.65.0.865177105879.issue3076@psf.upfronthosting.co.za> Message-ID: <1213132204.54.0.967641623162.issue3076@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It's not a python issue: the web site at http://www.xmlrpc.com is completely broken! The ExpatError occurs because the returned HTML page is not strict XML. ---------- nosy: +amaury.forgeotdarc resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 23:12:29 2008 From: report at bugs.python.org (Ismail Donmez) Date: Tue, 10 Jun 2008 21:12:29 +0000 Subject: [issue3076] test_xmlrpc_net fails on Darwin In-Reply-To: <1213130740.65.0.865177105879.issue3076@psf.upfronthosting.co.za> Message-ID: <1213132349.75.0.0460539028879.issue3076@psf.upfronthosting.co.za> Ismail Donmez added the comment: It is a python bug, test should use a better web page then. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 23:13:15 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 21:13:15 +0000 Subject: [issue3042] Add PEP 8 compliant aliases to threading module In-Reply-To: <1212670566.42.0.274403876451.issue3042@psf.upfronthosting.co.za> Message-ID: <1213132395.94.0.0938045830241.issue3042@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Ok. Pending your acceptance, I'll apply after docs+tests. Added file: http://bugs.python.org/file10576/new_threading_api3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 23:16:08 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 21:16:08 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1213132568.8.0.892767051211.issue2912@psf.upfronthosting.co.za> Benjamin Peterson added the comment: >Ah, ok, the code under except AttributeError: gives me some good ideas. >Should I use the methods utilized there to extract information from the >system? Right on! You don't need to write any new code, just make sure the code under the except AttributeError is utilized even if os.uname returns blank spots. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 23:20:48 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 21:20:48 +0000 Subject: [issue3076] test_xmlrpc_net fails on Darwin In-Reply-To: <1213130740.65.0.865177105879.issue3076@psf.upfronthosting.co.za> Message-ID: <1213132848.61.0.597174271595.issue3076@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I agree. I've temporarily disabled the offending test, but we should fix this soon. ---------- nosy: +benjamin.peterson priority: release blocker -> critical resolution: invalid -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 23:25:22 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 21:25:22 +0000 Subject: [issue2234] cygwinccompiler.py fails for latest MinGW releases. In-Reply-To: <1204656219.89.0.991339984516.issue2234@psf.upfronthosting.co.za> Message-ID: <1213133122.08.0.203241613454.issue2234@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This seems to be the same as #3013. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 23:26:11 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 21:26:11 +0000 Subject: [issue3013] disutils fails with GNU ld (GNU Binutils) 2.18.50.20080523 In-Reply-To: <1212183234.85.0.030546530082.issue3013@psf.upfronthosting.co.za> Message-ID: <1213133171.75.0.629212075501.issue3013@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This seems to be the same as #2234. ---------- nosy: +benjamin.peterson superseder: -> cygwinccompiler.py fails for latest MinGW releases. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 23:27:42 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 10 Jun 2008 21:27:42 +0000 Subject: [issue3076] test_xmlrpc_net fails on Darwin In-Reply-To: <1213130740.65.0.865177105879.issue3076@psf.upfronthosting.co.za> Message-ID: <1213133262.3.0.694282611717.issue3076@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: But (try a Google search) xmlrpc.com is the main site for xml-rpc resources! What kind of site should we use for testing? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 23:28:56 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 21:28:56 +0000 Subject: [issue3076] test_xmlrpc_net fails on Darwin In-Reply-To: <1213133262.3.0.694282611717.issue3076@psf.upfronthosting.co.za> Message-ID: <1afaf6160806101428m190a416ew502b367f5d88e001@mail.gmail.com> Benjamin Peterson added the comment: On Tue, Jun 10, 2008 at 4:27 PM, Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > But (try a Google search) xmlrpc.com is the main site for xml-rpc resources! > What kind of site should we use for testing? Take a look at xmlrpc.com. It seems that it is temporarily down, so we should be back and running soon. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 23:29:05 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 21:29:05 +0000 Subject: [issue3076] test_xmlrpc_net fails In-Reply-To: <1213130740.65.0.865177105879.issue3076@psf.upfronthosting.co.za> Message-ID: <1213133345.94.0.663120446514.issue3076@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- title: test_xmlrpc_net fails on Darwin -> test_xmlrpc_net fails _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 10 23:32:14 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 21:32:14 +0000 Subject: [issue2885] Create the urllib package In-Reply-To: <1210914691.08.0.848288242706.issue2885@psf.upfronthosting.co.za> Message-ID: <1213133533.81.0.813296883356.issue2885@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Jeremy, will you have time for this before the betas on Wensday, or should someone else do it? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 00:29:19 2008 From: report at bugs.python.org (Will Brown) Date: Tue, 10 Jun 2008 22:29:19 +0000 Subject: [issue2234] cygwinccompiler.py fails for latest MinGW releases. In-Reply-To: <1213133122.08.0.203241613454.issue2234@psf.upfronthosting.co.za> Message-ID: <2D82356CD8BFF34A92BFB1EC38D5BE58050F77A8@XCH-NW-3V1.nw.nos.boeing.com> Will Brown added the comment: Yes, same problem. Multiple files. I should have read the discussion more carefully. My note was redundant. Will ------------------ William Brown ------------------ ------ Boeing Networked Systems Technology ------ Kent:253.657.5586 Blvu:425.373.2738 > -----Original Message----- > From: Benjamin Peterson [mailto:report at bugs.python.org] > Sent: Tuesday, June 10, 2008 2:25 PM > To: Brown, William J > Subject: [issue2234] cygwinccompiler.py fails for latest > MinGW releases. > > > Benjamin Peterson added the comment: > > This seems to be the same as #3013. > > ---------- > nosy: +benjamin.peterson > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 00:42:16 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Jun 2008 22:42:16 +0000 Subject: [issue2976] test_pydoc fails in trunk In-Reply-To: <1211833381.06.0.61569848147.issue2976@psf.upfronthosting.co.za> Message-ID: <1213137736.4.0.523157236295.issue2976@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It seems Amaury fixed the problem with r64095. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 03:22:47 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 01:22:47 +0000 Subject: [issue1530559] struct.pack raises TypeError where it used to convert Message-ID: <1213147367.23.0.795481188726.issue1530559@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I ran into this issue converting test_struct to unittest. I would fix it, but I'm not sure exactly what is intended. I'm raising priority. ---------- nosy: +benjamin.peterson priority: normal -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 03:33:26 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 01:33:26 +0000 Subject: [issue2911] rewrite test_struct as a unittest In-Reply-To: <1211149411.88.0.00220562909175.issue2911@psf.upfronthosting.co.za> Message-ID: <1213148006.43.0.992599530049.issue2911@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks very much. Reviewed and committed in r64097. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 03:39:12 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 01:39:12 +0000 Subject: [issue2911] rewrite test_struct as a unittest In-Reply-To: <1211149411.88.0.00220562909175.issue2911@psf.upfronthosting.co.za> Message-ID: <1213148352.69.0.938585688005.issue2911@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm sorry. I meant r64102. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 04:37:43 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 02:37:43 +0000 Subject: [issue3076] test_xmlrpc_net fails In-Reply-To: <1213130740.65.0.865177105879.issue3076@psf.upfronthosting.co.za> Message-ID: <1213151862.95.0.11519918538.issue3076@psf.upfronthosting.co.za> Benjamin Peterson added the comment: xmlrpc.com is backup so I reenabled the test. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 04:47:26 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 11 Jun 2008 02:47:26 +0000 Subject: [issue1530559] struct.pack raises TypeError where it used to convert Message-ID: <1213152446.11.0.460891432773.issue1530559@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 04:55:51 2008 From: report at bugs.python.org (Senthil) Date: Wed, 11 Jun 2008 02:55:51 +0000 Subject: [issue1722348] urlparse.urlunparse forms file urls incorrectly Message-ID: <1213152950.93.0.636053551901.issue1722348@psf.upfronthosting.co.za> Senthil added the comment: This issue no longer exists. I verified the bug report on the trunk and urlparse() and urlunparse methods behave properly on subsquent usages on the same url. >>> urlparse.urlparse(urlparse.urlunparse(urlparse.urlparse('file:///home/ors/Letter.txt'))) ParseResult(scheme='file', netloc='', path='/home/ors/Letter.txt', params='', query='', fragment='') Can be closed as Invalid. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 05:12:21 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 03:12:21 +0000 Subject: [issue3021] Lexical exception handlers In-Reply-To: <1212350626.42.0.00327926746922.issue3021@psf.upfronthosting.co.za> Message-ID: <1213153940.66.0.133267174818.issue3021@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Guido has given the go ahead on this. I will apply in about 8 hours (after some sleep). ---------- assignee: -> benjamin.peterson resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 05:33:19 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 03:33:19 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213155199.3.0.912729980402.issue3050@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Congrats, you're in! See r64104 in the trunk. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 06:22:52 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Wed, 11 Jun 2008 04:22:52 +0000 Subject: [issue2918] Merge StringIO/cStringIO in 3.0 In-Reply-To: <1211227262.27.0.176120683389.issue2918@psf.upfronthosting.co.za> Message-ID: <1213158172.15.0.80264363543.issue2918@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Here's another patch fixes the failing tests. I have tried to support the buffer attribute using following hack: @property def buffer(self): # XXX Hack to support the buffer attribute. buf = codecs.getwriter(self.encoding)(BytesIO(), self.errors) value = self.getvalue() buf.write(value[:self.tell()]) pos = buf.stream.tell() buf.write(value[self.tell():]) buf.stream.seek(pos) return buf.stream but this doesn't work since some application might want to modify the buffer. So, I removed it. Another thing that bothered me were the bogus encoding and errors arguments. So, I also removed them. Added file: http://bugs.python.org/file10577/add-stringio-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 06:31:11 2008 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 11 Jun 2008 04:31:11 +0000 Subject: [issue3056] Simplify the Integral ABC In-Reply-To: <1212803845.73.0.399511532431.issue3056@psf.upfronthosting.co.za> Message-ID: <1213158670.91.0.871132121698.issue3056@psf.upfronthosting.co.za> Guido van Rossum added the comment: Not really, see the reply I sent to the checkin mail. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 07:44:30 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Jun 2008 05:44:30 +0000 Subject: [issue2632] performance problem in socket._fileobject.read In-Reply-To: <1208197816.87.0.564994342754.issue2632@psf.upfronthosting.co.za> Message-ID: <1213163070.58.0.525858770129.issue2632@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 08:02:39 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 11 Jun 2008 06:02:39 +0000 Subject: [issue1722348] urlparse.urlunparse forms file urls incorrectly Message-ID: <1213164159.98.0.839930130189.issue1722348@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 09:41:52 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Jun 2008 07:41:52 +0000 Subject: [issue2137] test_crasher in test_struct uses 8 GB memory on 64 bit systems In-Reply-To: <1203324191.51.0.860214602248.issue2137@psf.upfronthosting.co.za> Message-ID: <1213170112.17.0.691095408829.issue2137@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Test disabled on 64bit when using the supplied patch when forward porting to 2.6 in trunk revision 64114. ---------- assignee: -> gregory.p.smith keywords: +64bit, easy, patch nosy: +gregory.p.smith priority: -> high resolution: fixed -> accepted versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 10:26:09 2008 From: report at bugs.python.org (Gabriel) Date: Wed, 11 Jun 2008 08:26:09 +0000 Subject: [issue3077] h2py char literal doesn work In-Reply-To: <1213172768.79.0.156029263713.issue3077@psf.upfronthosting.co.za> Message-ID: <1213172768.79.0.156029263713.issue3077@psf.upfronthosting.co.za> New submission from Gabriel : Tools/scripts/h2py.py doesn't work with char literals in a define. This was first reported in the following post : http://mail.python.org/pipermail/python-list/2005-September/340608.html The fix works, I have included the patch as h2py.py.patch2. Also, the current thing that is done when a char literal is encountered is to use the char's ordinal value. I think that this is misleading, since in C, if you use a char literal you are usually meaning to check for an ascii char value like so : #define EXIT_CHAR 'x' /* ..... */ if(char_read == EXIT_CHAR) exit(0) and not an integer/numeric value, and if you intend to do numerical things then you'd use an integer/numeric value instead. This is the way ctypes does it with their h2xml.py & xml2py.py scripts. So currently, a defines like the following : #define EXIT_CHAR 'x' #define MASK 0xfe #define LIMIT 4 give (after the h2py.py.patch2 being applied) : EXIT_CHAR = 120 MASK = 0xfe LIMIT = 4 and the second patch I am submitting (h2py.py.patch) makes it give : EXIT_CHAR = 'x' MASK = 0xfe LIMIT = 4 which I think is a better interpretation of the intent of the defines. So to resume : h2py.py.patch2 : this fixes the bug, maintaining the way the original h2py script tried to process a char literal. h2py.py.patch : this fixes the bug, but makes a char literal become a string literal in python instead of the ordinal value. Gabriel ---------- components: Demos and Tools files: h2py.py.patch2 messages: 67943 nosy: grossetti severity: normal status: open title: h2py char literal doesn work type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10578/h2py.py.patch2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 10:26:40 2008 From: report at bugs.python.org (Gabriel) Date: Wed, 11 Jun 2008 08:26:40 +0000 Subject: [issue3077] h2py char literal doesn work In-Reply-To: <1213172768.79.0.156029263713.issue3077@psf.upfronthosting.co.za> Message-ID: <1213172800.37.0.788489050776.issue3077@psf.upfronthosting.co.za> Changes by Gabriel : ---------- keywords: +patch Added file: http://bugs.python.org/file10579/h2py.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 11:32:24 2008 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 11 Jun 2008 09:32:24 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1206918832.8.0.542354120577.issue2517@psf.upfronthosting.co.za> Message-ID: <1213176744.02.0.830768417637.issue2517@psf.upfronthosting.co.za> Nick Coghlan added the comment: As far as I am concerned, the implementation of PyObject_Unicode in object.c has a bug in it: it should NEVER be retrieving __unicode__ from the instance object. The implementation of PyObject_Format in abstract.c shows the correct way to retrieve a pseudo-slot method like __unicode__ from an arbitrary object. Line 482 in object.c is the offending line: func = PyObject_GetAttr(v, unicodestr); Fix that bug, then add a __unicode__ method back to Exception objects and you will have the best of both worlds. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 11:36:29 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Wed, 11 Jun 2008 09:36:29 +0000 Subject: [issue2632] performance problem in socket._fileobject.read In-Reply-To: <1208197816.87.0.564994342754.issue2632@psf.upfronthosting.co.za> Message-ID: <1213176989.36.0.255206897651.issue2632@psf.upfronthosting.co.za> Ralf Schmitt added the comment: Can we get the fix for release25-maint? It will not get worse than the current state is. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 11:47:33 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 11 Jun 2008 09:47:33 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1213176744.02.0.830768417637.issue2517@psf.upfronthosting.co.za> Message-ID: <484F9F1D.4050303@egenix.com> Marc-Andre Lemburg added the comment: On 2008-06-11 11:32, Nick Coghlan wrote: > Nick Coghlan added the comment: > > As far as I am concerned, the implementation of PyObject_Unicode in > object.c has a bug in it: it should NEVER be retrieving __unicode__ from > the instance object. The implementation of PyObject_Format in abstract.c > shows the correct way to retrieve a pseudo-slot method like __unicode__ > from an arbitrary object. The only difference I can spot is that the PyObject_Format() code special cases non-instance objects. > Line 482 in object.c is the offending line: > func = PyObject_GetAttr(v, unicodestr); > > Fix that bug, then add a __unicode__ method back to Exception objects > and you will have the best of both worlds. I'm not sure whether that would really solve anything. IMHO, it's better to implement the tp_unicode slot and then check that before trying .__unicode__ (as mentioned in the comment in PyObject_Unicode()). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 12:02:04 2008 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 11 Jun 2008 10:02:04 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1206918832.8.0.542354120577.issue2517@psf.upfronthosting.co.za> Message-ID: <1213178524.53.0.177493222258.issue2517@psf.upfronthosting.co.za> Nick Coghlan added the comment: Here's the key difference with the way PyObject_Format looks up the pseudo-slot method: PyObject *method = _PyType_Lookup(Py_TYPE(obj), str__format__); _PyType_Lookup instead of PyObject_GetAttr - so unicode(Exception) would only look for type.__unicode__ and avoid getting confused by the utterly irrelevant Exception.__unicode__ method (which is intended only for printing Exception instances, not for printing the Exception type itself). You then need the PyInstance_Check/PyObject_GetAttr special case for retrieving the bound method because _PyType_Lookup won't work on classic class instances. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 13:29:58 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 11 Jun 2008 11:29:58 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1213183796.32.0.115973645575.issue643841@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: This is a huge thread and I don't have time to look at the entire patch. However, it seems like the main purpose of the proxy class is to work around a basic deficiency in Python. Now, if this is a purposeful omissions (i.e. defined as part of the language), then a proxy class makes sense. If not, then you should probably work to fix the implementation. In general, the concept of a base proxy mixin makes sense if it's generic enough and flexible enough to be of wider use to Python programmers. One measure of that might be to re-implement the existing proxy-like classes to use this mixin class. If that can't be done, then this is too specialized (or too unproven) and should probably be a cheeseshop module first. I'm also uncomfortable with adding a new typestool module, mostly because we have a types module. I know they're there for different purposes, but still, it seems ugly to me. On top of that, adding a module for a single class seems like overkill. Do you have any ideas about where this might go in an existing module? Overall, I'm -0 on adding this to Python. Guido should have the final say though. I'm knocking this down to critical so it won't hold up the betas. Other than the refactoring, it seems like adding a proxy class, while being a new feature, is isolated enough that it could go in after beta. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 13:30:25 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 11 Jun 2008 11:30:25 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1213183825.71.0.782435501461.issue643841@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 13:54:41 2008 From: report at bugs.python.org (Simon Cross) Date: Wed, 11 Jun 2008 11:54:41 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1206918832.8.0.542354120577.issue2517@psf.upfronthosting.co.za> Message-ID: <1213185281.18.0.487372230857.issue2517@psf.upfronthosting.co.za> Simon Cross added the comment: Attached a patch which implements Nick Coghlan's suggestion. All existing tests in test_exceptions.py and test_unicode.py pass as does the new unicode(Exception(u"\xe1")) test. Added file: http://bugs.python.org/file10580/exception-unicode-with-type-fetch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 14:06:40 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 12:06:40 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213185999.93.0.542910063112.issue3050@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Please see Georg's Python-dev message about importing multiprocessing. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 14:08:11 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Jun 2008 12:08:11 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1213186091.12.0.438756474047.issue3051@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thomas, please let me know if r64116 works for you. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 14:12:37 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Jun 2008 12:12:37 +0000 Subject: [issue762920] API Functions for PyArray Message-ID: <1213186357.55.0.826873363295.issue762920@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> teoliphant _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 14:14:41 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 11 Jun 2008 12:14:41 +0000 Subject: [issue2997] PyNumberMethods has left-over fields in Py3 In-Reply-To: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> Message-ID: <1213186481.18.0.841645068264.issue2997@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 14:16:07 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 11 Jun 2008 12:16:07 +0000 Subject: [issue2384] [Py3k] line number is wrong after encoding declaration In-Reply-To: <1205825319.07.0.115749100037.issue2384@psf.upfronthosting.co.za> Message-ID: <1213186567.85.0.763101770052.issue2384@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: This is a bug and not a new feature, so it could go in after beta. I'm knocking it down to a critical. ---------- nosy: +barry priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 14:23:24 2008 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 11 Jun 2008 12:23:24 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1213187004.55.0.966807690894.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: Unfortunately, the standard library doesn't tend to do this kind of delegation (aside from weakref.proxy, which implements the equivalent code directly in C), so there isn't a lot of standard library code that will benefit from it directly. However, maintaining such a class on PyPI is also fairly undesirable, due to the extremely tight coupling between the list of methods it needs to delegate explicitly and the tp_* slots in the PyType method definitions - add a new tp_* slot, and it's necessary to add the same methods to the proxy class. Different Python implementations are going to have different needs as to which slots they have to delegate explicitly, and which can be left to the __getattribute__ catch-all delegation. As far as adding a module for a single class goes, I wouldn't expect it to remain that way forever. E.g., I'd hope to eventually see a CallableMixin that defined __get__ the same way a function does, making it easier to create callables that behave like functions when stored as a class attribute. That said, I'd be happy enough with adding the ProxyMixin to the types module instead, but I thought we were still trying to get rid of that module. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 14:29:35 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Jun 2008 12:29:35 +0000 Subject: [issue1023290] proposed struct module format code addition Message-ID: <1213187375.48.0.707027255473.issue1023290@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Don't think there is sufficient agreement on this one to move forward. It looks like OP has a completely different conception of the struct module than the other respondants. For the time being, pickle.dumps with protocol 2 can serve as a way to save arrays of long integers in binary. ---------- assignee: rhettinger -> priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 14:29:52 2008 From: report at bugs.python.org (Jesse Noller) Date: Wed, 11 Jun 2008 12:29:52 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213187391.99.0.580002849919.issue3050@psf.upfronthosting.co.za> Jesse Noller added the comment: Specifically: >>> import multiprocessing Traceback (most recent call last): File "", line 1, in File "/Users/jesse/open_source/subversion/python- trunk/Lib/multiprocessing/__init__.py", line 63, in import _multiprocessing AttributeError: 'module' object has no attribute 'BufferTooShort' This occurs due to the fact that __init__.py imports _multiprocessing prior to the definition of the exceptions. This should be moved to the ccode. From Georg: "The test suite passes (at least for some buildbots) because it imports _multiprocessing first, which then in its init function imports multiprocessing to get the BufferTooShort exception. Since BufferTooShort and other exceptions inheriting from ProcessError are simple derived exceptions, why aren't they created in the C module in the first place?" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 14:33:47 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 11 Jun 2008 12:33:47 +0000 Subject: [issue2911] rewrite test_struct as a unittest In-Reply-To: <1211149411.88.0.00220562909175.issue2911@psf.upfronthosting.co.za> Message-ID: <1213187627.7.0.45871819235.issue2911@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: In case you're interested there are a bunch of other tests I converted: http://bugs.python.org/issue?%40search_text=unittest&title=&%40columns=title&id=&%40columns=id&creation=&creator=giampaolo.rodola&activity=&%40columns=activity&%40sort=activity&actor=&nosy=&type=&components=&versions=&dependencies=&assignee=&keywords=&priority=&%40group=priority&status=1&%40columns=status&resolution=&%40pagesize=50&%40startwith=0&%40queryname=&%40old-queryname=&%40action=search Some of them are really simple and can be committed easily. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 14:35:54 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 12:35:54 +0000 Subject: [issue2911] rewrite test_struct as a unittest In-Reply-To: <1213187627.7.0.45871819235.issue2911@psf.upfronthosting.co.za> Message-ID: <1afaf6160806110535l49e135csd834a0a34e4a9128@mail.gmail.com> Benjamin Peterson added the comment: On Wed, Jun 11, 2008 at 7:33 AM, Giampaolo Rodola' wrote: > > Giampaolo Rodola' added the comment: > > In case you're interested there are a bunch of other tests I converted: > http://bugs.python.org/issue?%40search_text=unittest&title=&%40columns=title&id=&%40columns=id&creation=&creator=giampaolo.rodola&activity=&%40columns=activity&%40sort=activity&actor=&nosy=&type=&components=&versions=&dependencies=&assignee=&keywords=&priority=&%40group=priority&status=1&%40columns=status&resolution=&%40pagesize=50&%40startwith=0&%40queryname=&%40old-queryname=&%40action=search > Some of them are really simple and can be committed easily. Ok. Will do after these stressful betas. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 14:39:48 2008 From: report at bugs.python.org (Jesse Noller) Date: Wed, 11 Jun 2008 12:39:48 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213187988.07.0.509400293296.issue3050@psf.upfronthosting.co.za> Jesse Noller added the comment: Additional things to clean up post-beta: - Review all docs fully to ensure the documented API is still in sync with the renames. - Restore the commented out tests in test_event - Restore the commented out test in test_bounded_semaphore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 14:48:48 2008 From: report at bugs.python.org (Jason Tishler) Date: Wed, 11 Jun 2008 12:48:48 +0000 Subject: [issue2234] cygwinccompiler.py fails for latest MinGW releases. In-Reply-To: <1204656219.89.0.991339984516.issue2234@psf.upfronthosting.co.za> Message-ID: <1213188528.38.0.723354063672.issue2234@psf.upfronthosting.co.za> Jason Tishler added the comment: There have been three different regular expressions proposed to resolve this issue: 1. http://bugs.python.org/issue2234 2. http://bugs.python.org/issue3013 3. http://cygwin.com/ml/cygwin/2008-05/msg00622.html Does anyone know which one is best? I would like to release a patched Cygwin Python 2.5.2 that resolves this issue, but I feel we should reach consensus on what regular expression to use before I do so. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 14:51:50 2008 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 11 Jun 2008 12:51:50 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1213188710.71.0.782645984813.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: And (mainly for Barry's benefit) a quick recap of why I think this is necessary for Python 3.0: For performance or correctness reasons, the interpreter is permitted to bypass the normal __getattribute__ when looking up special methods such as __print__ or __index__. Whether or not the normal attribute lookup machinery is bypassed for a specific special method is an application independent decision. In CPython's case, this bypassing can occur either because there is a tp_* slot dedicated to the method, or because the interpreter uses Py_TYPE(obj) and _PyType_Lookup instead of PyObject_GetAttr to find the method implementation (or type(obj).meth instead of obj.meth for special method lookups implemented in Python code). This behaviour creates a problem for value-based delegation such as that provided by weakref.proxy: unlike overriding __getattr__ on a classic class, merely overriding __getattribute__ on a new-style class instance is insufficient to be able to correctly delegate all of the special methods. The intent of providing a typetools.ProxyMixin (or alternatively a types.ProxyMixin class) is to allow fairly simply conversion of classic classes that implement value-based delegation to new-style classes by inheriting from ProxyMixin rather than inheriting from object directly. Given the close proximity of the beta perhaps I should PEP'ify this to get a formal yea or nay from Guido? I haven't managed to get much response to previous python-dev posts about it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 14:57:30 2008 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 11 Jun 2008 12:57:30 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1213189050.28.0.11040294458.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: bleh, "application independent decision" in my last post should read "interpreter implementation dependent decision". _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 15:01:01 2008 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 11 Jun 2008 13:01:01 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1213189261.83.0.544172708954.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: and "__print__" was meant to be "__unicode__"... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 15:03:25 2008 From: report at bugs.python.org (Thomas Herve) Date: Wed, 11 Jun 2008 13:03:25 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1213189405.83.0.44741881451.issue3051@psf.upfronthosting.co.za> Thomas Herve added the comment: Yes, the last commit did the trick. Thanks. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 15:10:46 2008 From: report at bugs.python.org (Aristotelis Mikropoulos) Date: Wed, 11 Jun 2008 13:10:46 +0000 Subject: [issue3078] tokenize.py improvements In-Reply-To: <1213189845.98.0.955979167249.issue3078@psf.upfronthosting.co.za> Message-ID: <1213189845.98.0.955979167249.issue3078@psf.upfronthosting.co.za> New submission from Aristotelis Mikropoulos : Various tokenize.py performance boosts and code clarifications. ---------- components: Library (Lib) files: tokenize.py.patch keywords: patch messages: 67965 nosy: Indy severity: normal status: open title: tokenize.py improvements type: performance versions: Python 2.5 Added file: http://bugs.python.org/file10581/tokenize.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 15:17:03 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Jun 2008 13:17:03 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1213190223.59.0.676252528899.issue3051@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Would like to make the 3.0 code use __lt__ only. Any objections? ---------- priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 15:18:01 2008 From: report at bugs.python.org (Thomas Herve) Date: Wed, 11 Jun 2008 13:18:01 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1213190281.01.0.0232634004021.issue3051@psf.upfronthosting.co.za> Thomas Herve added the comment: Sure, that's fine with me. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 15:19:49 2008 From: report at bugs.python.org (Jean-Paul Calderone) Date: Wed, 11 Jun 2008 13:19:49 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1213190389.31.0.0715443085379.issue3051@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: I tried this too and then wrote a couple unit tests for this. The one for the Python implementation which tests the case where only __le__ is defined fails, though. Diff attached. ---------- keywords: +patch Added file: http://bugs.python.org/file10582/test_heapq.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 15:24:25 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Jun 2008 13:24:25 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1213190664.99.0.342361413576.issue3051@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I saw no need to complicate the pure python code for this. Really, the client code should use __cmp__ or define all six rich comparisons. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 15:32:29 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Wed, 11 Jun 2008 13:32:29 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1213191148.96.0.0585794318536.issue2848@psf.upfronthosting.co.za> Humberto Diogenes added the comment: mimetools removal is almost complete, with the exception of only two broken tests: test_urllib2_localnet and test_xmlrpc. I'm not sure if it can make it to this beta, but at least it's really close. Added file: http://bugs.python.org/file10583/remove_mimetools.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 15:40:51 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Jun 2008 13:40:51 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1213191651.49.0.823144380939.issue2848@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Barry, can you take a look at this? Ideally, it should go it before the beta so it can get thoroughly exercised. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 15:46:45 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 13:46:45 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213192005.84.0.947497075438.issue3050@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Added file: http://bugs.python.org/file10584/py3k_failing.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 15:50:18 2008 From: report at bugs.python.org (Jean-Paul Calderone) Date: Wed, 11 Jun 2008 13:50:18 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1213192218.43.0.270425319848.issue3051@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: Thanks for the explanation. Unfortunately, even if we change our code to work with the new requirements, all the old code is still out there. Maybe this doesn't matter, since there are so many other incompatibilities between Python 2.5 and Python 2.6. And there aren't many cases where the extension module isn't available, anyway. It will be surprising and probably hard to debug if anyone runs into this, but I suppose it's possible that no one will. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 15:54:09 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Jun 2008 13:54:09 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1213192448.95.0.289273538468.issue3051@psf.upfronthosting.co.za> Raymond Hettinger added the comment: There should be no cases where the pure python code runs instead of the C code. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 16:15:13 2008 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 11 Jun 2008 14:15:13 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1206918832.8.0.542354120577.issue2517@psf.upfronthosting.co.za> Message-ID: <1213193712.94.0.687017756343.issue2517@psf.upfronthosting.co.za> Nick Coghlan added the comment: Minor cleanup of Simon's patch attached - aside from a couple of unneeded whitespace changes, it all looks good to me. Not checking it in yet, since it isn't critical for this week's beta release - I'd prefer to leave it until after that has been dealt with. Added file: http://bugs.python.org/file10585/exception-unicode-with-type-fetch-no-whitespace-changes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 16:20:05 2008 From: report at bugs.python.org (Tim Golden) Date: Wed, 11 Jun 2008 14:20:05 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213194005.32.0.316549964165.issue3050@psf.upfronthosting.co.za> Tim Golden added the comment: The _multiprocessing module is not building under Windows at the moment. Attempting to import multiprocessing (from an .exe build from the current svn) gives "ImportError: No module named _multiprocessing" and the test suite skips the test for the same reason. ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 16:20:24 2008 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 11 Jun 2008 14:20:24 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1213194024.72.0.0154523059412.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: New patch (proxymixin.diff) uploaded that correctly delegates __format__, as well as using an overridable return_inplace() method to generate the inplace operation return values. The _target attribute has also been made formally part of the public API (as 'target'), although you obviously need to explicitly invoke object.__getattribute__ in order for it to be visible. The name of the attribute is also available at the module level as _PROXY_TARGET_ATTR. Added file: http://bugs.python.org/file10586/proxymixin.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 16:21:35 2008 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 11 Jun 2008 14:21:35 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1213194095.78.0.0231671496707.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that I don't make any promises about the correctness of the ReST formatting in that latest patch - my Doc build is misbehaving at the moment, and I haven't had a chance to look at what is wrong with it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 16:22:18 2008 From: report at bugs.python.org (Travis Oliphant) Date: Wed, 11 Jun 2008 14:22:18 +0000 Subject: [issue762920] API Functions for PyArray Message-ID: <1213194138.15.0.349667514253.issue762920@psf.upfronthosting.co.za> Travis Oliphant added the comment: I will look at the patch, but generally I'm not inclined to give the array module more legs because I agree that the desired functionality should be put into the memoryview object and the buffer protocol. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 16:24:04 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 14:24:04 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1213194005.32.0.316549964165.issue3050@psf.upfronthosting.co.za> Message-ID: <1afaf6160806110723k7ea684b0m67ae97f51331b013@mail.gmail.com> Benjamin Peterson added the comment: On Wed, Jun 11, 2008 at 9:20 AM, Tim Golden wrote: > > Tim Golden added the comment: > > The _multiprocessing module is not building under Windows at the moment. > Attempting to import multiprocessing (from an .exe build from the > current svn) gives "ImportError: No module named _multiprocessing" and > the test suite skips the test for the same reason. Can you tell why it's not building? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 16:33:58 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 11 Jun 2008 14:33:58 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1213193712.94.0.687017756343.issue2517@psf.upfronthosting.co.za> Message-ID: <484FE252.10502@egenix.com> Marc-Andre Lemburg added the comment: On 2008-06-11 16:15, Nick Coghlan wrote: > Nick Coghlan added the comment: > > Minor cleanup of Simon's patch attached - aside from a couple of > unneeded whitespace changes, it all looks good to me. > > Not checking it in yet, since it isn't critical for this week's beta > release - I'd prefer to leave it until after that has been dealt with. > > Added file: http://bugs.python.org/file10585/exception-unicode-with-type-fetch-no-whitespace-changes.diff That approach is fine as well. I still like the idea to add a tp_unicode slot, though, since that's still missing for C extension types to benefit from. Perhaps we can have both ?! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 16:39:09 2008 From: report at bugs.python.org (Tim Golden) Date: Wed, 11 Jun 2008 14:39:09 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1afaf6160806110723k7ea684b0m67ae97f51331b013@mail.gmail.com> Message-ID: <484FE3AA.2080801@timgolden.me.uk> Tim Golden added the comment: Benjamin Peterson wrote: > Benjamin Peterson added the comment: > > On Wed, Jun 11, 2008 at 9:20 AM, Tim Golden wrote: >> Tim Golden added the comment: >> >> The _multiprocessing module is not building under Windows at the moment. >> Attempting to import multiprocessing (from an .exe build from the >> current svn) gives "ImportError: No module named _multiprocessing" and >> the test suite skips the test for the same reason. > > Can you tell why it's not building? I was hoping you wouldn't ask :) I can't run VS visually at the moment so I'm down to inspecting the .sln file by hand which I have no experience of. I suspect that someone better versed in VS solution files than I needs to add the module in. I'll try to get to it unless someone else chips in. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 16:39:38 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 11 Jun 2008 14:39:38 +0000 Subject: [issue2065] trunk version does not compile with vs8 and vc6 In-Reply-To: <1202727039.47.0.783651728329.issue2065@psf.upfronthosting.co.za> Message-ID: <1213195178.22.0.783168081861.issue2065@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: First, thank you for keeping these patches up to date. - The patch for 2.5 is OK for me. We could just add the a paragraph that appears in your patch for trunk (PC/VC6/readme.txt): +_msi + _msi.c. You need to install Windows Installer SDK to build this module. - I worked on your patch for trunk/ and py3k/ to allow compilation with a stock VC6 *without* a modern PlatformSDK installed (i.e NTDDI_VERSION is not defined) This is relevant only for socketmodule; with a stock VC6, IPV6 is not available, WSAIoctl is not exposed, and getaddrinfo() is emulated. - Replacing _wstat with GetFileAttributesW is good thing: stat("nul") says that the file exists! But it is not enough: try to "import con" or "import nul", before and after your patch. Fun in both cases (if you "import con", type some chars, and press ^Z) - The patches also work for VS8.0 (I just had to update the list of .c) I will try to come with updated files, and test them with VS2003 Express (VS7.1). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 16:47:15 2008 From: report at bugs.python.org (Josiah Carlson) Date: Wed, 11 Jun 2008 14:47:15 +0000 Subject: [issue1023290] proposed struct module format code addition Message-ID: <1213195635.16.0.518054680054.issue1023290@psf.upfronthosting.co.za> Josiah Carlson added the comment: This isn't about packing arrays of long integers in an array. I know the discussion is old, and I know the discussion is long, and honestly, I don't really need this particular functionality anymore (in the struct module in particular), but I still believe that being able to pack and unpack arbitrarily lengthed integers is useful. What is interesting is that this functionality was supposed to be in binascii years ago (which I resolved to myself as being sufficient), yet currently is not. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 16:49:20 2008 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 11 Jun 2008 14:49:20 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1206918832.8.0.542354120577.issue2517@psf.upfronthosting.co.za> Message-ID: <1213195760.84.0.599786243353.issue2517@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm not sure adding a dedicated method slot would be worth the hassle involved - Py3k drop backs to just the tp_str slot anyway, and the only thing you gain with a tp_unicode slot over _PyType_Lookup of a __unicode__ attribute is a small reduction in memory usage and a slight speed increase. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 16:53:05 2008 From: report at bugs.python.org (Simon Cross) Date: Wed, 11 Jun 2008 14:53:05 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1206918832.8.0.542354120577.issue2517@psf.upfronthosting.co.za> Message-ID: <1213195985.16.0.415371229913.issue2517@psf.upfronthosting.co.za> Simon Cross added the comment: Re msg67974: > Minor cleanup of Simon's patch attached - aside from a couple of > unneeded whitespace changes, it all looks good to me. > > Not checking it in yet, since it isn't critical for this week's beta > release - I'd prefer to leave it until after that has been dealt with. Thanks for the clean-up, Nick. The mixture of tabs and spaces in the current object.c was unpleasant :/. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 17:26:09 2008 From: report at bugs.python.org (Jesse Noller) Date: Wed, 11 Jun 2008 15:26:09 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213197969.88.0.33312365221.issue3050@psf.upfronthosting.co.za> Jesse Noller added the comment: Here is a diff for the tests under py3k, I applied the svnmerge, then ben's patch and made a couple of import changes. Added file: http://bugs.python.org/file10587/py3k_fixed.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 17:38:07 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Jun 2008 15:38:07 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1213198686.73.0.614955312871.issue643841@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The name Proxy seems too vague. This class is all about targeted delegation. Am curious, has this been out as a recipe; has it been used in combat yet? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 17:44:16 2008 From: report at bugs.python.org (Tim Golden) Date: Wed, 11 Jun 2008 15:44:16 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213199056.71.0.482418718694.issue3050@psf.upfronthosting.co.za> Tim Golden added the comment: I'm sorry; I've had a look and there's no chance of my updating the solution and project files by hand; and I can't run Visual Studio at the moment. I'll try emailing Trent or Christian in the hope that one of them's available to do it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 18:00:25 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 16:00:25 +0000 Subject: [issue3021] Lexical exception handlers In-Reply-To: <1212350626.42.0.00327926746922.issue3021@psf.upfronthosting.co.za> Message-ID: <1213200025.61.0.268860262171.issue3021@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Commited in r64121. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 18:04:11 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 16:04:11 +0000 Subject: [issue2507] Exception state lives too long in 3.0 In-Reply-To: <1206800918.45.0.478667091266.issue2507@psf.upfronthosting.co.za> Message-ID: <1213200251.09.0.309268875051.issue2507@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Solved by r64121. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 18:04:45 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 16:04:45 +0000 Subject: [issue2833] __exit__ silences the active exception In-Reply-To: <1210576013.94.0.462684443177.issue2833@psf.upfronthosting.co.za> Message-ID: <1213200285.66.0.996207140067.issue2833@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r64121. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 18:31:40 2008 From: report at bugs.python.org (Tim Golden) Date: Wed, 11 Jun 2008 16:31:40 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213201900.09.0.739891645152.issue3050@psf.upfronthosting.co.za> Tim Golden added the comment: Trent's supplied me with enough info to patch the project files manually. The attached patch against r64120 results in the _multiprocessing module building. I'm running the tests now but I'll upload the patch in any case. Added file: http://bugs.python.org/file10588/pcbuild.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 18:46:35 2008 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 11 Jun 2008 16:46:35 +0000 Subject: [issue2605] Descriptor instance attributes not interpreted consistently In-Reply-To: <1207822509.14.0.860100540347.issue2605@psf.upfronthosting.co.za> Message-ID: <1213202795.16.0.612846452873.issue2605@psf.upfronthosting.co.za> Guido van Rossum added the comment: The behavior observed is intentional. The docs should be updated. ---------- nosy: +gvanrossum resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 18:50:27 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 11 Jun 2008 16:50:27 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1213195760.84.0.599786243353.issue2517@psf.upfronthosting.co.za> Message-ID: <48500244.6060108@egenix.com> Marc-Andre Lemburg added the comment: On 2008-06-11 16:49, Nick Coghlan wrote: > Nick Coghlan added the comment: > > I'm not sure adding a dedicated method slot would be worth the hassle > involved - Py3k drop backs to just the tp_str slot anyway, and the only > thing you gain with a tp_unicode slot over _PyType_Lookup of a > __unicode__ attribute is a small reduction in memory usage and a slight > speed increase. AFAIK, _PyType_Lookup will only work for base types, ie. objects subclassing from object. C extension types often do not inherit from object, since the attribute access mechanisms and object creation are a lot simpler when not doing so. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 18:58:42 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 16:58:42 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213203522.08.0.997847030673.issue3050@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks very much Tim and Trent. I've merged multiprocessing into Py3k and added the Windows files. I hope that works. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 18:59:49 2008 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 11 Jun 2008 16:59:49 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1213203589.63.0.693125179902.issue643841@psf.upfronthosting.co.za> Guido van Rossum added the comment: I want to make this "bypass getattr" behavior mandatory for those operations that currently use it, forcing the issue for other implementations of Python. That's a doc change (but an important one!). There are probably many random places where the docs imply that getattr is used where it isn't. I am not sure that we need a proxy implementation in the stdlib; usually when proxying there is some intentional irregularity (that's why you're proxying) and I'm not sure how useful the mix-in class will be in practice. We should wait and see how effective it is in some realistic situations before accepting it into the stdlib. Also, typetools strikes me as a horrible name. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 19:03:17 2008 From: report at bugs.python.org (Will Brown) Date: Wed, 11 Jun 2008 17:03:17 +0000 Subject: [issue2234] cygwinccompiler.py fails for latest MinGW releases. In-Reply-To: <1213188528.38.0.723354063672.issue2234@psf.upfronthosting.co.za> Message-ID: <2D82356CD8BFF34A92BFB1EC38D5BE58050F77AD@XCH-NW-3V1.nw.nos.boeing.com> Will Brown added the comment: None of the above will work on both '2.18.50.20080523' & '1.2.3a' ------------------ William Brown ------------------ ------ Boeing Networked Systems Technology ------ Kent:253.657.5586 Blvu:425.373.2738 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 19:13:23 2008 From: report at bugs.python.org (Sharmila Sivakumar) Date: Wed, 11 Jun 2008 17:13:23 +0000 Subject: [issue3066] FD leak in urllib2 In-Reply-To: <1213009389.23.0.132424094421.issue3066@psf.upfronthosting.co.za> Message-ID: <1213204403.94.0.850075670557.issue3066@psf.upfronthosting.co.za> Sharmila Sivakumar added the comment: Since the socket object is added to a list, a reference to the object always exists right? That would mean that it would not be garbage collected as long as the reference exists. On the other hand, it should also be noted that in close method, the socket is not explicitly closed and for a single urlopen, atleast 3 sockets are opened. ---------- nosy: +sharmila _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 19:23:27 2008 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 11 Jun 2008 17:23:27 +0000 Subject: [issue3079] sys.exit() called from optparse - bad, bad, bad In-Reply-To: <1213205007.57.0.132667292732.issue3079@psf.upfronthosting.co.za> Message-ID: <1213205007.57.0.132667292732.issue3079@psf.upfronthosting.co.za> New submission from Skip Montanaro : This seems like a bug in optparse.OptionParser: def exit(self, status=0, msg=None): if msg: sys.stderr.write(msg) sys.exit(status) def error(self, msg): """error(msg : string) Print a usage message incorporating 'msg' to stderr and exit. If you override this in a subclass, it should not return -- it should either exit or raise an exception. """ self.print_usage(sys.stderr) self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg)) By default I think it should raise an exception when it encounters an error, not exit. Programmers shouldn't be forced to subclass code in the standard library to get recommended practice. If you feel this behavior can't be changed in 2.6 it should at least be corrected in 3.0. The cruel irony is that inside OptionParser.parse_args it actually catches both BadOptionError and OptionValueError but suppresses them by calling self.error() within the except block... *arrgggghhh*... The correct behavior there is (in my opinion) to get rid of the try/except statement altogether and just let the exceptions propagate. Other calls to self.error() should be replaced with suitable raise statements. Skip ---------- components: Library (Lib) keywords: easy messages: 67999 nosy: skip.montanaro priority: normal severity: normal status: open title: sys.exit() called from optparse - bad, bad, bad type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 19:26:36 2008 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 11 Jun 2008 17:26:36 +0000 Subject: [issue2997] PyNumberMethods has left-over fields in Py3 In-Reply-To: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> Message-ID: <1213205196.39.0.380873663184.issue2997@psf.upfronthosting.co.za> Guido van Rossum added the comment: I say let's go with the cleanup. Extensions that want to be compiled under 2.x and 3.0 will need lots of #ifdef code anyway. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 19:30:55 2008 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 11 Jun 2008 17:30:55 +0000 Subject: [issue3079] sys.exit() called from optparse - bad, bad, bad In-Reply-To: <1213205007.57.0.132667292732.issue3079@psf.upfronthosting.co.za> Message-ID: <1213205455.95.0.76369871071.issue3079@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 19:31:59 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 11 Jun 2008 17:31:59 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1213205519.95.0.463753417795.issue643841@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Thanks for the pronouncement Guido. We will not let this issue hold up the beta releases. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 19:46:21 2008 From: report at bugs.python.org (Jesse Noller) Date: Wed, 11 Jun 2008 17:46:21 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213206381.17.0.109079709321.issue3050@psf.upfronthosting.co.za> Jesse Noller added the comment: Debian PPC build crash: http://python.org/dev/buildbot/stable/ppc%20Debian%20unstable%203.0/buil ds/1063/step-test/0 ...snip Re-running test 'test_multiprocessing' in verbose mode test test_multiprocessing crashed -- : [Errno 38] Function not implemented Traceback (most recent call last): File "./Lib/test/regrtest.py", line 601, in runtest_inner indirect_test() File "/home/pybot/buildarea/3.0.klose-debian- ppc/build/Lib/test/test_multiprocessing.py", line 1764, in test_main ProcessesMixin.pool = multiprocessing.Pool(4) File "/home/pybot/buildarea/3.0.klose-debian- ppc/build/Lib/multiprocessing/__init__.py", line 225, in Pool return Pool(processes, initializer, initargs) File "/home/pybot/buildarea/3.0.klose-debian- ppc/build/Lib/multiprocessing/pool.py", line 84, in __init__ self._setup_queues() File "/home/pybot/buildarea/3.0.klose-debian- ppc/build/Lib/multiprocessing/pool.py", line 131, in _setup_queues self._inqueue = SimpleQueue() File "/home/pybot/buildarea/3.0.klose-debian- ppc/build/Lib/multiprocessing/queues.py", line 315, in __init__ self._rlock = Lock() File "/home/pybot/buildarea/3.0.klose-debian- ppc/build/Lib/multiprocessing/synchronize.py", line 106, in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1) File "/home/pybot/buildarea/3.0.klose-debian- ppc/build/Lib/multiprocessing/synchronize.py", line 38, in __init__ sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue) OSError: [Errno 38] Function not implemented [801671 refs] make: *** [buildbottest] Error 1 program finished with exit code 2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 19:55:42 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 11 Jun 2008 17:55:42 +0000 Subject: [issue2997] PyNumberMethods has left-over fields in Py3 In-Reply-To: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> Message-ID: <1213206942.33.0.60824088374.issue2997@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 20:09:43 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 11 Jun 2008 18:09:43 +0000 Subject: [issue2542] PyErr_ExceptionMatches must not fail In-Reply-To: <1207213140.65.0.87653801468.issue2542@psf.upfronthosting.co.za> Message-ID: <1213207783.27.0.133887613945.issue2542@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: This is a bug, not a new feature so it's not release critical for the first alphas. ---------- nosy: +barry priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 20:14:37 2008 From: report at bugs.python.org (Jesse Noller) Date: Wed, 11 Jun 2008 18:14:37 +0000 Subject: [issue3050] Implement PEP 371: multiprocessing module In-Reply-To: <1212753475.27.0.272334979501.issue3050@psf.upfronthosting.co.za> Message-ID: <1213208076.84.0.311175726038.issue3050@psf.upfronthosting.co.za> Jesse Noller added the comment: Small diff for the ACKs/NEWS file Added file: http://bugs.python.org/file10589/news.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 20:18:45 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 18:18:45 +0000 Subject: [issue2997] PyNumberMethods has left-over fields in Py3 In-Reply-To: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> Message-ID: <1213208325.93.0.0156662247489.issue2997@psf.upfronthosting.co.za> Changes by Benjamin Peterson : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 20:19:03 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 18:19:03 +0000 Subject: [issue2997] PyNumberMethods has left-over fields in Py3 In-Reply-To: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> Message-ID: <1213208343.71.0.658463800102.issue2997@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 20:24:57 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 11 Jun 2008 18:24:57 +0000 Subject: [issue3080] Full unicode import system In-Reply-To: <1213208697.49.0.984990811807.issue3080@psf.upfronthosting.co.za> Message-ID: <1213208697.49.0.984990811807.issue3080@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : This is the most difficult part of issue1342: """ On Windows, don't use the FileSystemEncoding on Windows for sys.path items. Instead, it should use the wide API to perform all system calls. Py3k shouldn't ever use the file system encoding for anything on Windows. """ This imply to rewrite all functions in import.c, and replace all char* arguments with unicode variables. ---------- components: Interpreter Core messages: 68005 nosy: amaury.forgeotdarc severity: normal status: open title: Full unicode import system versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 20:26:50 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 11 Jun 2008 18:26:50 +0000 Subject: [issue1342] Crash on Windows if Python runs from a directory with umlauts In-Reply-To: <1193456436.1.0.972609600257.issue1342@psf.upfronthosting.co.za> Message-ID: <1213208810.06.0.730826364098.issue1342@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Fixed as r64126, using Py_FileSystemDefaultEncoding. I close this issue, and open issue3080 to rewrite all functions in import.c with full unicode in mind. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 20:38:39 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Jun 2008 18:38:39 +0000 Subject: [issue1819] Speed hack for function calls with named parameters In-Reply-To: <1200271701.23.0.131498543337.issue1819@psf.upfronthosting.co.za> Message-ID: <1213209519.24.0.329045573608.issue1819@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a new patch against SVN trunk. Nothing changed, except that I updated pybench to test keyword arguments as well. Added file: http://bugs.python.org/file10590/namedparam2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 20:38:55 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 11 Jun 2008 18:38:55 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1213209535.8.0.281782211712.issue2630@psf.upfronthosting.co.za> Georg Brandl added the comment: Patch committed to Py3k branch in r64138. Thanks all! ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 20:58:55 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 11 Jun 2008 18:58:55 +0000 Subject: [issue1819] Speed hack for function calls with named parameters In-Reply-To: <1200271701.23.0.131498543337.issue1819@psf.upfronthosting.co.za> Message-ID: <1213210735.55.0.340674597671.issue1819@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: gvanrossum -> georg.brandl nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 21:13:53 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Jun 2008 19:13:53 +0000 Subject: [issue3081] Py_(X)SETREF macros In-Reply-To: <1213211633.2.0.340935924246.issue3081@psf.upfronthosting.co.za> Message-ID: <1213211633.2.0.340935924246.issue3081@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This is an implementation of the Py_SETREF and Py_XSETREF macros proposed in http://mail.python.org/pipermail/python-dev/2008-May/079862.html As an example, I added a few conversions among the extension modules. ---------- components: Extension Modules, Interpreter Core files: py_setref.patch keywords: patch messages: 68009 nosy: pitrou severity: normal status: open title: Py_(X)SETREF macros versions: Python 3.0 Added file: http://bugs.python.org/file10591/py_setref.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 21:28:20 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Jun 2008 19:28:20 +0000 Subject: [issue3081] Py_(X)SETREF macros In-Reply-To: <1213211633.2.0.340935924246.issue3081@psf.upfronthosting.co.za> Message-ID: <1213212500.78.0.296383776308.issue3081@psf.upfronthosting.co.za> Antoine Pitrou added the comment: FWIW, I also wanted to propose for Py_INCREF(op) to evaluate as (op), so that it can be used as return or assignment value, e.g.: return Py_INCREF(result); or: self->var = Py_INCREF(obj); but it's perhaps a bit more controversial. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 21:45:30 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 19:45:30 +0000 Subject: [issue3042] Add PEP 8 compliant aliases to threading module In-Reply-To: <1212670566.42.0.274403876451.issue3042@psf.upfronthosting.co.za> Message-ID: <1213213530.23.0.46747831158.issue3042@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Applied in r64125, and r64144. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 21:52:02 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 19:52:02 +0000 Subject: [issue3081] Py_(X)SETREF macros In-Reply-To: <1213211633.2.0.340935924246.issue3081@psf.upfronthosting.co.za> Message-ID: <1213213922.88.0.274297164208.issue3081@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +benjamin.peterson type: -> feature request versions: +Python 2.6 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 21:57:11 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Jun 2008 19:57:11 +0000 Subject: [issue3081] Py_(X)SETREF macros In-Reply-To: <1213211633.2.0.340935924246.issue3081@psf.upfronthosting.co.za> Message-ID: <1213214231.24.0.546267346583.issue3081@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Benjamin, the patch is against py3k, also it might also apply cleanly on trunk... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 22:00:09 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 20:00:09 +0000 Subject: [issue3081] Py_(X)SETREF macros In-Reply-To: <1213211633.2.0.340935924246.issue3081@psf.upfronthosting.co.za> Message-ID: <1213214409.01.0.464336095192.issue3081@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Sorry for the confusion. It seems to me this sort of thing would be useful in 2.6, too, so I marked it. ---------- versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 22:22:28 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 20:22:28 +0000 Subject: [issue2997] PyNumberMethods has left-over fields in Py3 In-Reply-To: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> Message-ID: <1213215748.33.0.265613091468.issue2997@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Applied in r64149. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 22:27:36 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 20:27:36 +0000 Subject: [issue3080] Full unicode import system In-Reply-To: <1213208697.49.0.984990811807.issue3080@psf.upfronthosting.co.za> Message-ID: <1213216056.4.0.0572866920094.issue3080@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I suspect importlib may help with this. ---------- nosy: +benjamin.peterson, brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 22:50:48 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Wed, 11 Jun 2008 20:50:48 +0000 Subject: [issue2744] Fix test_cProfile In-Reply-To: <1209770110.61.0.304892387875.issue2744@psf.upfronthosting.co.za> Message-ID: <1213217448.57.0.92251208138.issue2744@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I will try to fix this one with profile/cProfile merge. ---------- assignee: -> alexandre.vassalotti nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 23:14:23 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Jun 2008 21:14:23 +0000 Subject: [issue3082] test_multiprocessing broken In-Reply-To: <1213218863.36.0.875795212815.issue3082@psf.upfronthosting.co.za> Message-ID: <1213218863.36.0.875795212815.issue3082@psf.upfronthosting.co.za> New submission from Gregory P. Smith : Python 2.6a3+ (trunk:64150M, Jun 11 2008, 14:08:14) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. % ./python Lib/test/test_multiprocessing.py Fatal Python error: Invalid thread state for this thread Traceback (most recent call last): File "Lib/test/test_multiprocessing.py", line 1791, in main() File "Lib/test/test_multiprocessing.py", line 1788, in main test_main(unittest.TextTestRunner(verbosity=2).run) File "Lib/test/test_multiprocessing.py", line 1768, in test_main ManagerMixin.pool = ManagerMixin.manager.Pool(4) File "/home/greg/sandbox/python/trunk/Lib/multiprocessing/managers.py", line 647, in temp token, exp = self._create(typeid, *args, **kwds) File "/home/greg/sandbox/python/trunk/Lib/multiprocessing/managers.py", line 545, in _create conn = self._Client(self._address, authkey=self._authkey) File "/home/greg/sandbox/python/trunk/Lib/multiprocessing/connection.py", line 139, in Client answer_challenge(c, authkey) File "/home/greg/sandbox/python/trunk/Lib/multiprocessing/connection.py", line 380, in answer_challenge message = connection.recv_bytes(256) # reject large message EOFError [50971 refs] This is on a single cpu i686 linux system. ---------- components: Library (Lib) messages: 68017 nosy: gregory.p.smith priority: high severity: normal status: open title: test_multiprocessing broken type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 23:15:45 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 11 Jun 2008 21:15:45 +0000 Subject: [issue2548] Undetected error in exception handling In-Reply-To: <1207297002.01.0.980429495002.issue2548@psf.upfronthosting.co.za> Message-ID: <1213218945.35.0.0806254433687.issue2548@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: This is a bug that can be fixed after beta, so I'm knocking it back to critical for beta 1. ---------- priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 23:16:00 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 21:16:00 +0000 Subject: [issue3082] test_multiprocessing broken In-Reply-To: <1213218863.36.0.875795212815.issue3082@psf.upfronthosting.co.za> Message-ID: <1213218960.69.0.974322795845.issue3082@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Are you running a debug build? Please see #1683. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 23:22:08 2008 From: report at bugs.python.org (Eric Smith) Date: Wed, 11 Jun 2008 21:22:08 +0000 Subject: [issue3083] Add alternate (#) formatting for bin, oct, hex output for str.format() In-Reply-To: <1213219327.93.0.0491657155546.issue3083@psf.upfronthosting.co.za> Message-ID: <1213219327.93.0.0491657155546.issue3083@psf.upfronthosting.co.za> New submission from Eric Smith : Per Guido in http://mail.python.org/pipermail/python-3000/2008-May/013912.html, add this to the PEP 3101 (Advanced String Formatting) implementation. This will add the prefixes 0b, 0o, and 0x. ---------- assignee: eric.smith components: Interpreter Core messages: 68020 nosy: eric.smith priority: normal severity: normal status: open title: Add alternate (#) formatting for bin, oct, hex output for str.format() versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 23:23:41 2008 From: report at bugs.python.org (=?utf-8?q?P=C3=A1draig_Brady?=) Date: Wed, 11 Jun 2008 21:23:41 +0000 Subject: [issue1742669] "%d" format handling for long values Message-ID: <1213219421.63.0.857290632084.issue1742669@psf.upfronthosting.co.za> P?draig Brady

added the comment: A couple of comments. 1. This bug supersedes issue 1153226 That has good info, including the suggestion that one should be using the %.f format rather than %d in this case anyway 2. The patch here was actually applied in r61041 ---------- nosy: +pixelbeat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 23:23:53 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Jun 2008 21:23:53 +0000 Subject: [issue3082] test_multiprocessing broken In-Reply-To: <1213218863.36.0.875795212815.issue3082@psf.upfronthosting.co.za> Message-ID: <1213219432.95.0.661211401643.issue3082@psf.upfronthosting.co.za> Gregory P. Smith added the comment: ah yes that is indeed the same problem. marking this one as a dup. ---------- dependencies: +Thread local storage and PyGILState_* mucked up by os.fork() resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 23:25:04 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 11 Jun 2008 21:25:04 +0000 Subject: [issue2874] Remove use of the stat module in the stdlib In-Reply-To: <1210913145.44.0.456986373707.issue2874@psf.upfronthosting.co.za> Message-ID: <1213219504.29.0.884559702501.issue2874@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Perhaps collections.namedtuple() can be used with a custom subclass? In any case, it's not worth holding up the first beta for this. We can fix it after beta. Knocking this down to critical. ---------- nosy: +barry priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 23:26:38 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Jun 2008 21:26:38 +0000 Subject: [issue1683] Thread local storage and PyGILState_* mucked up by os.fork() In-Reply-To: <1198263226.4.0.968502752614.issue1683@psf.upfronthosting.co.za> Message-ID: <1213219598.77.0.434123647552.issue1683@psf.upfronthosting.co.za> Gregory P. Smith added the comment: we need this in before 2.6 is released. ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith priority: high -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 23:28:19 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 11 Jun 2008 21:28:19 +0000 Subject: [issue1819] Speed hack for function calls with named parameters In-Reply-To: <1213209519.24.0.329045573608.issue1819@psf.upfronthosting.co.za> Message-ID: <4850435C.2020405@egenix.com> Marc-Andre Lemburg added the comment: On 2008-06-11 20:38, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > > Here is a new patch against SVN trunk. Nothing changed, except that I > updated pybench to test keyword arguments as well. > > Added file: http://bugs.python.org/file10590/namedparam2.patch When changing parameters or other aspects of pybench tests, you *have* to update the version number of the test as well. Otherwise, pybench would compare apples with oranges. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jun 11 2008) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2008-07-07: EuroPython 2008, Vilnius, Lithuania 25 days to go :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 23:29:48 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 11 Jun 2008 21:29:48 +0000 Subject: [issue1819] Speed hack for function calls with named parameters In-Reply-To: <4850435C.2020405@egenix.com> Message-ID: <485043C9.9010206@egenix.com> Marc-Andre Lemburg added the comment: On 2008-06-11 23:27, M.-A. Lemburg wrote: > On 2008-06-11 20:38, Antoine Pitrou wrote: >> Antoine Pitrou added the comment: >> >> Here is a new patch against SVN trunk. Nothing changed, except that I >> updated pybench to test keyword arguments as well. >> >> Added file: http://bugs.python.org/file10590/namedparam2.patch > > When changing parameters or other aspects of pybench tests, you *have* > to update the version number of the test as well. Otherwise, pybench > would compare apples with oranges. BTW: It would probably be better to add a completely new test PythonNamedParameterCalls or something along those lines instead of changing an existing test. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 11 23:55:58 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Wed, 11 Jun 2008 21:55:58 +0000 Subject: [issue2917] merge pickle and cPickle in 3.0 In-Reply-To: <1211227162.29.0.0642317760161.issue2917@psf.upfronthosting.co.za> Message-ID: <1213221358.85.0.685956506447.issue2917@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I updated the patch to use the new module framework. Added file: http://bugs.python.org/file10592/add-cpickle-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 00:03:45 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Wed, 11 Jun 2008 22:03:45 +0000 Subject: [issue2918] Merge StringIO/cStringIO in 3.0 In-Reply-To: <1211227262.27.0.176120683389.issue2918@psf.upfronthosting.co.za> Message-ID: <1213221825.01.0.577340366284.issue2918@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I updated the patch to use the new module framework. Added file: http://bugs.python.org/file10593/add-stringio-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 00:46:29 2008 From: report at bugs.python.org (James Thomas) Date: Wed, 11 Jun 2008 22:46:29 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1213224389.71.0.571280765416.issue2912@psf.upfronthosting.co.za> James Thomas added the comment: Here is the patch (apply to platform.py) ---------- keywords: +patch Added file: http://bugs.python.org/file10594/platform.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 00:50:19 2008 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 11 Jun 2008 22:50:19 +0000 Subject: [issue3084] sys.exit() called from optparse - bad, bad, bad In-Reply-To: <18512.1923.657436.704863@montanaro-dyndns-org.local> Message-ID: <18512.1923.657436.704863@montanaro-dyndns-org.local> New submission from Skip Montanaro : This seems like a bug in optparse.OptionParser: def exit(self, status=0, msg=None): if msg: sys.stderr.write(msg) sys.exit(status) def error(self, msg): """error(msg : string) Print a usage message incorporating 'msg' to stderr and exit. If you override this in a subclass, it should not return -- it should either exit or raise an exception. """ self.print_usage(sys.stderr) self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg)) By default I think it should raise an exception when it encounters an error, not exit. Programmers shouldn't be forced to subclass code in the standard library to get recommended practice. If you feel this behavior can't be changed in 2.6 it should at least be corrected in 3.0. Skip ---------- messages: 68030 nosy: skip.montanaro severity: normal status: open title: sys.exit() called from optparse - bad, bad, bad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 00:59:25 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jun 2008 22:59:25 +0000 Subject: [issue1683] Thread local storage and PyGILState_* mucked up by os.fork() In-Reply-To: <1198263226.4.0.968502752614.issue1683@psf.upfronthosting.co.za> Message-ID: <1213225157.27.0.141702270933.issue1683@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Gregory, go ahead and apply and see if can stop the hell in the buildbots. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 01:01:27 2008 From: report at bugs.python.org (Jan Huelsbergen) Date: Wed, 11 Jun 2008 23:01:27 +0000 Subject: [issue3085] chapter 17.1.3.5 'Replacing os.popen*' in the Python library reference contains an error In-Reply-To: <1213225286.96.0.994890895881.issue3085@psf.upfronthosting.co.za> Message-ID: <1213225286.96.0.994890895881.issue3085@psf.upfronthosting.co.za> New submission from Jan Huelsbergen : the 'from' examples contain non-keyword args after keyword args: pipe = os.popen(cmd, mode='r', bufsize) should be pipe = os.popen(cmd, 'r', bufsize) and pipe = os.popen(cmd, mode='w', bufsize) should be pipe = os.popen(cmd, 'w', bufsize) ---------- assignee: georg.brandl components: Documentation messages: 68032 nosy: afoo, georg.brandl severity: normal status: open title: chapter 17.1.3.5 'Replacing os.popen*' in the Python library reference contains an error type: feature request versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 01:05:53 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Wed, 11 Jun 2008 23:05:53 +0000 Subject: [issue2918] Merge StringIO/cStringIO in 3.0 In-Reply-To: <1211227262.27.0.176120683389.issue2918@psf.upfronthosting.co.za> Message-ID: <1213225552.89.0.00132184526159.issue2918@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Committed in r64154. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 01:06:50 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Wed, 11 Jun 2008 23:06:50 +0000 Subject: [issue2917] merge pickle and cPickle in 3.0 In-Reply-To: <1211227162.29.0.0642317760161.issue2917@psf.upfronthosting.co.za> Message-ID: <1213225610.19.0.476317996312.issue2917@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Committed in r64152. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 01:07:45 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Wed, 11 Jun 2008 23:07:45 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1213225665.69.0.863711659102.issue2775@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Done with pickle and stringio. ---------- dependencies: -Merge StringIO/cStringIO in 3.0, merge pickle and cPickle in 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 01:27:31 2008 From: report at bugs.python.org (Adam Olsen) Date: Wed, 11 Jun 2008 23:27:31 +0000 Subject: [issue1683] Thread local storage and PyGILState_* mucked up by os.fork() In-Reply-To: <1198263226.4.0.968502752614.issue1683@psf.upfronthosting.co.za> Message-ID: <1213226851.3.0.0388252207873.issue1683@psf.upfronthosting.co.za> Adam Olsen added the comment: Updated version of roudkerk's patch. Adds the new function to pythread.h and is based off of current trunk. Note that Parser/intrcheck.c isn't used on my box, so it's completely untested. roudkerk's original analysis is correct. The TLS is never informed that the old thread is gone, so when it seems the same id again it assumes it is the old thread, which PyThreadState_Swap doesn't like. Added file: http://bugs.python.org/file10595/fork-thread-patch-2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 01:46:48 2008 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 11 Jun 2008 23:46:48 +0000 Subject: [issue3084] sys.exit() called from optparse - bad, bad, bad In-Reply-To: <18512.1923.657436.704863@montanaro-dyndns-org.local> Message-ID: <1213228008.72.0.947377788954.issue3084@psf.upfronthosting.co.za> Skip Montanaro added the comment: I originally sent this by email but never saw it pop up. I eventually submitted via the web. ---------- superseder: -> sys.exit() called from optparse - bad, bad, bad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 01:47:08 2008 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 11 Jun 2008 23:47:08 +0000 Subject: [issue3084] sys.exit() called from optparse - bad, bad, bad In-Reply-To: <18512.1923.657436.704863@montanaro-dyndns-org.local> Message-ID: <1213228028.6.0.0837949062578.issue3084@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 01:57:52 2008 From: report at bugs.python.org (Adam Olsen) Date: Wed, 11 Jun 2008 23:57:52 +0000 Subject: [issue1683] Thread local storage and PyGILState_* mucked up by os.fork() In-Reply-To: <1198263226.4.0.968502752614.issue1683@psf.upfronthosting.co.za> Message-ID: <1213228672.29.0.441457880161.issue1683@psf.upfronthosting.co.za> Adam Olsen added the comment: Incidentally, it doesn't seem necessary to reinitialize the lock. Posix duplicates the lock, so if you hold it when you fork your child will be able to unlock it and use it as normal. Maybe there's some non-Posix behaviour or something even more obscure when #401226 was done? (reinitializing is essentially harmless though, so in no way should this hold up release.) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 02:43:53 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 12 Jun 2008 00:43:53 +0000 Subject: [issue3086] sys.maxsize not available by using the latest Win32 build In-Reply-To: <1213231433.03.0.97189962489.issue3086@psf.upfronthosting.co.za> Message-ID: <1213231433.03.0.97189962489.issue3086@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : By using: http://www.python.org/dev/daily-msi/python-2.6.14041.msi C:\>C:\python26\python Python 2.6a3 (r26a3:62864, May 9 2008, 14:16:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.maxsize Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'maxsize' >>> ---------- messages: 68039 nosy: giampaolo.rodola severity: normal status: open title: sys.maxsize not available by using the latest Win32 build versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 02:52:11 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Jun 2008 00:52:11 +0000 Subject: [issue1819] Speed hack for function calls with named parameters In-Reply-To: <1200271701.23.0.131498543337.issue1819@psf.upfronthosting.co.za> Message-ID: <1213231931.48.0.0967429066595.issue1819@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Attaching a version that's a little faster and cleaner with PySequence_Fast_ITEMS. ---------- nosy: +rhettinger Added file: http://bugs.python.org/file10596/namedparam3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 04:08:21 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 12 Jun 2008 02:08:21 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1213236500.95.0.25578954312.issue2775@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: We've got what we've got for the first betas. ---------- nosy: +barry priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 04:08:36 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Jun 2008 02:08:36 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1213236516.17.0.433720120612.issue3008@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Saving this for after the first beta goes out. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 04:09:23 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 12 Jun 2008 02:09:23 +0000 Subject: [issue2919] Merge profile/cProfile in 3.0 In-Reply-To: <1211227334.77.0.551300594218.issue2919@psf.upfronthosting.co.za> Message-ID: <1213236563.53.0.855396139351.issue2919@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: This didn't get done for the betas, but we're still going to release. Knocking it down to critical. ---------- nosy: +barry priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 04:10:16 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 12 Jun 2008 02:10:16 +0000 Subject: [issue2885] Create the urllib package In-Reply-To: <1210914691.08.0.848288242706.issue2885@psf.upfronthosting.co.za> Message-ID: <1213236616.14.0.243061842934.issue2885@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: This didn't get done for the first beta. Please try to do it asap after the beta releases. ---------- nosy: +barry priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 04:42:20 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Jun 2008 02:42:20 +0000 Subject: [issue3087] Clean up Demos and Tools In-Reply-To: <1213238540.5.0.535212077097.issue3087@psf.upfronthosting.co.za> Message-ID: <1213238540.5.0.535212077097.issue3087@psf.upfronthosting.co.za> New submission from Benjamin Peterson : A good bug day task: Demos and to some extent Tools has a lot of rubbish in 3.0 that probably doesn't work with all the module removals and such. Somebody should go through them and chuck all the old stuff. ---------- components: Demos and Tools keywords: easy messages: 68045 nosy: benjamin.peterson priority: high severity: normal status: open title: Clean up Demos and Tools type: feature request versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 04:43:34 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 12 Jun 2008 02:43:34 +0000 Subject: [issue2849] Remove usage of rfc822 from the stdlib In-Reply-To: <1210726924.82.0.902490265063.issue2849@psf.upfronthosting.co.za> Message-ID: <1213238614.58.0.0530719672713.issue2849@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Reviewed and applied to Python 3.0 in r64161. The patch did not apply cleanly for 2.6. I'm going to bump this down to critical for the first betas. Humberto, can you back port it to Python 2.6? ---------- nosy: +barry priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 04:44:46 2008 From: report at bugs.python.org (Atsuo Ishimoto) Date: Thu, 12 Jun 2008 02:44:46 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1213238686.86.0.437345917878.issue2630@psf.upfronthosting.co.za> Atsuo Ishimoto added the comment: Great, thank you! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 04:51:01 2008 From: report at bugs.python.org (Senthil) Date: Thu, 12 Jun 2008 02:51:01 +0000 Subject: [issue2885] Create the urllib package In-Reply-To: <1210914691.08.0.848288242706.issue2885@psf.upfronthosting.co.za> Message-ID: <1213239061.02.0.793096139761.issue2885@psf.upfronthosting.co.za> Senthil added the comment: I shall give it a try and come out with results asap. Shall take Facundo's help (my GSoC mentor). ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 05:08:06 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Jun 2008 03:08:06 +0000 Subject: [issue2917] merge pickle and cPickle in 3.0 In-Reply-To: <1211227162.29.0.0642317760161.issue2917@psf.upfronthosting.co.za> Message-ID: <1213240086.04.0.838038249977.issue2917@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm sorry. I had to revert this. ---------- nosy: +benjamin.peterson priority: release blocker -> critical status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 05:36:04 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 12 Jun 2008 03:36:04 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1213241764.47.0.436192399193.issue2848@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: This patch works for me in Python 3.0. It's basically Humberto's patch with the two failing tests fixed. Added file: http://bugs.python.org/file10597/applied_mimetools.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 06:06:56 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 12 Jun 2008 04:06:56 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1213243616.61.0.653883423424.issue2848@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : Removed file: http://bugs.python.org/file10597/applied_mimetools.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 06:07:39 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 12 Jun 2008 04:07:39 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1213243658.98.0.954857812334.issue2848@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Actually, try this one. Added file: http://bugs.python.org/file10598/applied_mimetools.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 06:09:46 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 12 Jun 2008 04:09:46 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1213243786.67.0.990111214402.issue2848@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: r64164 in Python 3.0. This doesn't apply cleanly to Python 2.6; could someone please back port it? ---------- priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 06:48:45 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 12 Jun 2008 04:48:45 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> New submission from Barry A. Warsaw : For me, test_multiprocessing hangs consistently on OS X 10.5.3. It passes just fine on Ubuntu 8.04. ---------- components: Library (Lib) messages: 68053 nosy: barry priority: release blocker severity: normal status: open title: test_multiprocessing hangs on OS X 10.5.3 versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 06:52:18 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 12 Jun 2008 04:52:18 +0000 Subject: [issue3089] All 3.0 buildbots are red In-Reply-To: <1213246338.45.0.928026294572.issue3089@psf.upfronthosting.co.za> Message-ID: <1213246338.45.0.928026294572.issue3089@psf.upfronthosting.co.za> New submission from Barry A. Warsaw : Subject says it all. None of the 3.0 buildbots are passing. ---------- components: Build messages: 68054 nosy: barry priority: release blocker severity: normal status: open title: All 3.0 buildbots are red versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 07:23:59 2008 From: report at bugs.python.org (Ismail Donmez) Date: Thu, 12 Jun 2008 05:23:59 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213248238.97.0.339939500008.issue3088@psf.upfronthosting.co.za> Ismail Donmez added the comment: I can confirm this on Leopard too. ---------- nosy: +cartman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 08:00:57 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 12 Jun 2008 06:00:57 +0000 Subject: [issue3026] mmap broken with large files on 64bit system In-Reply-To: <1212373498.52.0.766248013838.issue3026@psf.upfronthosting.co.za> Message-ID: <1213250457.15.0.9878070597.issue3026@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: -> critical versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 08:02:04 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 12 Jun 2008 06:02:04 +0000 Subject: [issue3013] disutils fails with GNU ld (GNU Binutils) 2.18.50.20080523 In-Reply-To: <1212183234.85.0.030546530082.issue3013@psf.upfronthosting.co.za> Message-ID: <1213250524.35.0.218366404529.issue3013@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 08:10:27 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 12 Jun 2008 06:10:27 +0000 Subject: [issue2419] Remove all IRIX dependant modules from aifc module In-Reply-To: <1205911254.5.0.0435748947591.issue2419@psf.upfronthosting.co.za> Message-ID: <1213251027.22.0.927920547852.issue2419@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> duplicate status: open -> closed superseder: -> Remove cl usage from aifc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 09:58:08 2008 From: report at bugs.python.org (Tim Golden) Date: Thu, 12 Jun 2008 07:58:08 +0000 Subject: [issue3086] sys.maxsize not available by using the latest Win32 build In-Reply-To: <1213231433.03.0.97189962489.issue3086@psf.upfronthosting.co.za> Message-ID: <4850D6FF.10201@timgolden.me.uk> Tim Golden added the comment: Giampaolo Rodola' wrote: > New submission from Giampaolo Rodola' : > > By using: > http://www.python.org/dev/daily-msi/python-2.6.14041.msi > > > C:\>C:\python26\python > Python 2.6a3 (r26a3:62864, May 9 2008, 14:16:26) [MSC v.1500 32 bit > (Intel)] on > win32 > Type "help", "copyright", "credits" or "license" for more information. >>>> import sys >>>> sys.maxsize > Traceback (most recent call last): > File "", line 1, in > AttributeError: 'module' object has no attribute 'maxsize' It's there in a trunk build Python 2.6a3+ (trunk:64120:64164M, Jun 12 2008, 08:49:20) Type "help", "copyright", "credits" or "license" for more >>> import sys [34171 refs] >>> sys.maxsize 2147483647 [34173 refs] >>> ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 10:21:17 2008 From: report at bugs.python.org (C. E. Ball) Date: Thu, 12 Jun 2008 08:21:17 +0000 Subject: [issue1676] Fork/exec issues with Tk 8.5/Python 2.5.1 on OS X In-Reply-To: <1198200328.37.0.27301275997.issue1676@psf.upfronthosting.co.za> Message-ID: <1213258877.38.0.397337531031.issue1676@psf.upfronthosting.co.za> Changes by C. E. Ball : ---------- nosy: +ceball _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 14:57:00 2008 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 12 Jun 2008 12:57:00 +0000 Subject: [issue3086] sys.maxsize not available by using the latest Win32 build In-Reply-To: <1213231433.03.0.97189962489.issue3086@psf.upfronthosting.co.za> Message-ID: <1213275420.32.0.503428253528.issue3086@psf.upfronthosting.co.za> Guilherme Polo added the comment: I just checked that sys.maxsize was added May 20, so you just need a newer build. ---------- nosy: +gpolo status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 14:57:12 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Jun 2008 12:57:12 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1213243786.67.0.990111214402.issue2848@psf.upfronthosting.co.za> Message-ID: <1afaf6160806120556qb0626a3kfc55d2d06581bf2@mail.gmail.com> Benjamin Peterson added the comment: On Wed, Jun 11, 2008 at 11:09 PM, Barry A. Warsaw wrote: > > Barry A. Warsaw added the comment: > > r64164 in Python 3.0. This doesn't apply cleanly to Python 2.6; could > someone please back port it? Why does it need to be in 2.6? mimetools is still there. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 15:02:15 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Jun 2008 13:02:15 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213275735.78.0.835477385222.issue3088@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It passes for me on Leopard. Can you post the test running in verbose mode so we can see where it hangs? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 15:03:06 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Jun 2008 13:03:06 +0000 Subject: [issue3086] sys.maxsize not available by using the latest Win32 build In-Reply-To: <1213231433.03.0.97189962489.issue3086@psf.upfronthosting.co.za> Message-ID: <1213275786.61.0.366239877585.issue3086@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> out of date _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 15:05:24 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 12 Jun 2008 13:05:24 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1afaf6160806120556qb0626a3kfc55d2d06581bf2@mail.gmail.com> Message-ID: <59C8F58F-FDB2-4E12-B992-4FB868EDB04C@python.org> Barry A. Warsaw added the comment: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Jun 12, 2008, at 8:57 AM, Benjamin Peterson wrote: > Benjamin Peterson added the comment: > > On Wed, Jun 11, 2008 at 11:09 PM, Barry A. Warsaw > wrote: >> >> Barry A. Warsaw added the comment: >> >> r64164 in Python 3.0. This doesn't apply cleanly to Python 2.6; >> could >> someone please back port it? > > Why does it need to be in 2.6? mimetools is still there. I guess you're right, it doesn't. - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iQCVAwUBSFEfD3EjvBPtnXfVAQKrBwQAoOOjFenHlq0DVEtfeVSuG5/rPWHrzfQw OwoSlYWa5zkqWqjFdRG780rElbfAjgtz3J7Od8HENxUfsHBvH3bFM0PZCLSQRZMI UVP8dM1KIcBDOZoQPMoahM1Q7l16iCsayhauWEnJP2MIVje7D/rXO9jjpkQixRyi 3wkfmkNin0k= =gAB6 -----END PGP SIGNATURE----- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 15:16:26 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 12 Jun 2008 13:16:26 +0000 Subject: [issue3090] ARCHFLAGS parsing/concatenation in unixccompiler.py breaks when set to a string In-Reply-To: <1213276584.77.0.784242980637.issue3090@psf.upfronthosting.co.za> Message-ID: <1213276584.77.0.784242980637.issue3090@psf.upfronthosting.co.za> New submission from Jesse Noller : This is on osx 10.5.3, latest gcc tool chain. I have $ARCHFLAGS set to "-arch i386" to prevent the OS/X gcc from building PPC code (as I don't want/need it) - if I leave this set as-is, other applications build without error, intel only. If I don't unset it, here's the error: File "/Users/jesse/open_source/subversion/python- trunk/Lib/distutils/ccompiler.py", line 697, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/Users/jesse/open_source/subversion/python- trunk/Lib/distutils/unixccompiler.py", line 176, in _compile compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs) File "/Users/jesse/open_source/subversion/python- trunk/Lib/distutils/unixccompiler.py", line 79, in _darwin_compiler_fixup compiler_so = compiler_so + ' ' + os.environ['ARCHFLAGS'] TypeError: can only concatenate list (not "str") to list make: *** [sharedmods] Error 1 I've attached a possible patch for this which does a .split() on the os.environ['ARCHFLAGS'] variable, which fixes the issue ---------- components: Build files: unixccompiler.py.diff keywords: patch messages: 68061 nosy: jnoller severity: normal status: open title: ARCHFLAGS parsing/concatenation in unixccompiler.py breaks when set to a string versions: Python 2.6 Added file: http://bugs.python.org/file10599/unixccompiler.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 15:18:18 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 12 Jun 2008 13:18:18 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213276698.24.0.475620724384.issue3088@psf.upfronthosting.co.za> Jesse Noller added the comment: On python-3000 trunk, _multiprocessing doesn't even compile: /Users/jesse/open_source/subversion/python- 3000/Modules/_multiprocessing/semaphore.c: In function ?semlock_iszero?: /Users/jesse/open_source/subversion/python- 3000/Modules/_multiprocessing/semaphore.c:515: warning: unused variable ?sval? ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 15:19:50 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 12 Jun 2008 13:19:50 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213275735.78.0.835477385222.issue3088@psf.upfronthosting.co.za> Message-ID: <862894F4-674F-48E2-8C39-89AEE6EF6539@python.org> Barry A. Warsaw added the comment: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Jun 12, 2008, at 9:02 AM, Benjamin Peterson wrote: > It passes for me on Leopard. Can you post the test running in verbose > mode so we can see where it hangs? It never hangs when run standalone, though it crashes about half the time. Running it under gdb doesn't help; it always gives me an interrupted syste call in os.waidpid() in forking.py. The hang occurs during 'make test', and it's always the second run that hangs. Perhaps some lock isn't getting cleaned up properly the first time? - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iQCVAwUBSFEicXEjvBPtnXfVAQLGNwP/S6f2IrO7c7SET0Gx8FXqdPmot3jcmopx TFxDA5csh/pVaDQCVW6DiLMXsu2TkQGPPbbo8Bx9iPmV/iIHFqy4nDtETqqjKdRp BvVtBmvSrP6wmymlKFlFC5qdfbbvguZq/hO60XulQk+WU4F8N7oHQck0tA2JhdDh lS5SAFAIovA= =xzs6 -----END PGP SIGNATURE----- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 15:25:46 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 12 Jun 2008 13:25:46 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213277146.66.0.299421438749.issue3088@psf.upfronthosting.co.za> Jesse Noller added the comment: I did a make clean && ./configure && make and it started compiling for me again. Sorry for the noise. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 16:07:51 2008 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 12 Jun 2008 14:07:51 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213279670.72.0.998670236771.issue3088@psf.upfronthosting.co.za> Guido van Rossum added the comment: If it's only failing during the second run of "make test", typically there's some implicit dependency on something that is disturbed by running a test that's later in the suite of tests. This could be either the fault of that other test (not restoring some global setting or environment var) or the fault of the test that fails (making unwarranted assumptions or not initializing some needed settings before starting). If it works for some folks and not for others, on the same platform, compare the set of extension modules that are not built, reported by "make" in a message starting with "Failed to find the necessary bits to build these modules:". Likely, Barry has the most complete set, while Jesse has a few more extensions missing. Finding this is usually a painful process of bisecting the set of tests run. Randomizing the tests with regrtest.py -r might also be helpful. FWIW, when I tried (on Leopard) "make test TESTOPTS=test_multiprocessing" it hung on the first set. When I ran "./python Lib/test/test_multiprocess.py -v" it reported 122 tests passed. But when I ran "./python Lib/test/regrtest.py -v test_multiprocessing" one test failed: ====================================================================== ERROR: test_remote (test.test_multiprocessing.WithManagerTestRemoteManager) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/guido/p/Lib/test/test_multiprocessing.py", line 1167, in test_remote queue = manager2.get_queue() File "/Users/guido/p/Lib/multiprocessing/managers.py", line 650, in temp authkey=self._authkey, exposed=exp File "/Users/guido/p/Lib/multiprocessing/managers.py", line 902, in AutoProxy incref=incref) File "/Users/guido/p/Lib/multiprocessing/managers.py", line 711, in __init__ self._incref() File "/Users/guido/p/Lib/multiprocessing/managers.py", line 758, in _incref dispatch(conn, None, 'incref', (self._id,)) File "/Users/guido/p/Lib/multiprocessing/managers.py", line 94, in dispatch raise convert_to_error(kind, result) RemoteError: --------------------------------------------------------------------------- Traceback (most recent call last): File "/Users/guido/p/Lib/multiprocessing/managers.py", line 196, in handle_request result = func(c, *args, **kwds) File "/Users/guido/p/Lib/multiprocessing/managers.py", line 412, in incref self.id_to_refcount[ident] += 1 KeyError: '5f2828' --------------------------------------------------------------------------- ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 16:08:31 2008 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 12 Jun 2008 14:08:31 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213279711.96.0.0261104431341.issue3088@psf.upfronthosting.co.za> Guido van Rossum added the comment: I should add this was in the trunk (2.6). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 17:16:44 2008 From: report at bugs.python.org (Paul Melis) Date: Thu, 12 Jun 2008 15:16:44 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213283804.18.0.876793534386.issue3088@psf.upfronthosting.co.za> Paul Melis added the comment: I think I'm having a similar lockup on fedora core 4 (smp machine). This is with the py3k branch, freshly svn updated. When running "make test TESTOPTS=test_multiprocessing" the first of the two test runs always succeeds in something like 10-15 seconds, while the second one occasionally hangs. I tried running with -v as extra argument but can't get it to hang in that case (to figure out which test is the culprit). ---------- nosy: +paulmelis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 17:25:57 2008 From: report at bugs.python.org (Paul Melis) Date: Thu, 12 Jun 2008 15:25:57 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213284356.8.0.145896508054.issue3088@psf.upfronthosting.co.za> Paul Melis added the comment: After a few more runs with -v and redirecting output to a file it seems the lockup I get is in test_notify_all (test.test_multiprocessing.WithManagerTestCondition) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 17:42:24 2008 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 12 Jun 2008 15:42:24 +0000 Subject: [issue3091] Can't build datetime or time on py3k (r64171) In-Reply-To: <1213285344.4.0.409695975664.issue3091@psf.upfronthosting.co.za> Message-ID: <1213285344.4.0.409695975664.issue3091@psf.upfronthosting.co.za> New submission from Skip Montanaro : I'm fully up-to-date on my py3k branch (r64171). After a make clean I find that I can't build either the time or datetime modules. Here are errors from gcc: building 'time' extension gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/Users/skip/src/python/py3k/./Include -I/Users/skip/local/include -I. -IInclude -I./Include -I/opt/local/include -I/Users/skip/src/python/py3k/Include -I/Users/skip/src/python/py3k -c /Users/skip/src/python/py3k/Modules/strftime.c -o build/temp.macosx-10.3-i386-3.0/Users/skip/src/python/py3k/Modules/strftime.o /Users/skip/src/python/py3k/Modules/strftime.c: In function '_fmt': /Users/skip/src/python/py3k/Modules/strftime.c:377: error: 'tm' undeclared (first use in this function) /Users/skip/src/python/py3k/Modules/strftime.c:377: error: (Each undeclared identifier is reported only once /Users/skip/src/python/py3k/Modules/strftime.c:377: error: for each function it appears in.) building 'datetime' extension gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/Users/skip/src/python/py3k/./Include -I/Users/skip/local/include -I. -IInclude -I./Include -I/opt/local/include -I/Users/skip/src/python/py3k/Include -I/Users/skip/src/python/py3k -c /Users/skip/src/python/py3k/Modules/strftime.c -o build/temp.macosx-10.3-i386-3.0/Users/skip/src/python/py3k/Modules/strftime.o /Users/skip/src/python/py3k/Modules/strftime.c: In function '_fmt': /Users/skip/src/python/py3k/Modules/strftime.c:377: error: 'tm' undeclared (first use in this function) /Users/skip/src/python/py3k/Modules/strftime.c:377: error: (Each undeclared identifier is reported only once /Users/skip/src/python/py3k/Modules/strftime.c:377: error: for each function it appears in.) The environment is Mac OS X 10.5.3. Assigning to Barry since we're so close to beta. Skip ---------- assignee: barry messages: 68069 nosy: barry, skip.montanaro severity: normal status: open title: Can't build datetime or time on py3k (r64171) versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 20:19:45 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Jun 2008 18:19:45 +0000 Subject: [issue1819] Speed hack for function calls with named parameters In-Reply-To: <1200271701.23.0.131498543337.issue1819@psf.upfronthosting.co.za> Message-ID: <1213294784.82.0.0453935749259.issue1819@psf.upfronthosting.co.za> Antoine Pitrou added the comment: And here is a patch adding a new test in pybench as suggested by Marc-Andre Lemburg. Added file: http://bugs.python.org/file10600/pybench.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 20:20:05 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 12 Jun 2008 18:20:05 +0000 Subject: [issue2917] merge pickle and cPickle in 3.0 In-Reply-To: <1211227162.29.0.0642317760161.issue2917@psf.upfronthosting.co.za> Message-ID: <1213294805.32.0.969925327092.issue2917@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Okay, I fixed _pickle's integers unpickling on 64bit platforms. Here is the patch. Added file: http://bugs.python.org/file10601/fix_pickle_int64.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 20:40:34 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 12 Jun 2008 18:40:34 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213296034.84.0.5288957102.issue3088@psf.upfronthosting.co.za> Jesse Noller added the comment: It's taking me longer to get to this than I planned, any help is appreciated. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 21:06:33 2008 From: report at bugs.python.org (Jason Tishler) Date: Thu, 12 Jun 2008 19:06:33 +0000 Subject: [issue2234] cygwinccompiler.py fails for latest MinGW releases. In-Reply-To: <1204656219.89.0.991339984516.issue2234@psf.upfronthosting.co.za> Message-ID: <1213297593.22.0.461573275082.issue2234@psf.upfronthosting.co.za> Jason Tishler added the comment: I tested the regular expression in #3: (\d+\.\d+(\.(\d+))?([ab](\d+))?) and it worked for both '2.18.50.20080523' & '1.2.3a'. Additionally, it worked for the following test cases that I tried: 2.18.50a.20080523 2.18.50a 20080523 2.18.50 20080523 1.2.3 Unfortunately, I don't know what is the set of all possible version formats that "ld -v" can return. So, I don't know how to devise a regular expression guaranteed to work for all ld versions including future ones. AFAICT, we have only two options to resolve this issue: 1. Improve the regular expression as best we can and continue to change it as necessary in the future. 2. Remove the fragile version checking all together and make an explicit decision to only support modern binutils. Any opinions? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 21:40:28 2008 From: report at bugs.python.org (Bohdan Vlasyuk) Date: Thu, 12 Jun 2008 19:40:28 +0000 Subject: [issue3066] FD leak in urllib2 In-Reply-To: <1213204403.94.0.850075670557.issue3066@psf.upfronthosting.co.za> Message-ID: Bohdan Vlasyuk added the comment: The list is not the problem. The problem is the other reference, from "". Also note that the workaround (u.fp.recv = None) removes the second reference. This is fine (at least in CPython), because the socket is destroyed when the refcount reaches zero, thus calling the finalizer. Added file: http://bugs.python.org/file10602/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Thu Jun 12 21:43:05 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 12 Jun 2008 19:43:05 +0000 Subject: [issue3091] Can't build datetime or time on py3k (r64171) In-Reply-To: <1213285344.4.0.409695975664.issue3091@psf.upfronthosting.co.za> Message-ID: <1213299785.85.0.0420437584533.issue3091@psf.upfronthosting.co.za> Georg Brandl added the comment: Where does the strftime.c come from? It is not in the Python sources -- is this a Mac-specific thing? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 21:50:01 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Jun 2008 19:50:01 +0000 Subject: [issue3092] Wrong unicode size detection in pybench In-Reply-To: <1213300200.75.0.77296570553.issue3092@psf.upfronthosting.co.za> Message-ID: <1213300200.75.0.77296570553.issue3092@psf.upfronthosting.co.za> New submission from Antoine Pitrou : In py3k, pybench wrongly detects UCS2 builds as UCS4. Patch attached. ---------- components: Demos and Tools files: pybench_ucs.patch keywords: patch messages: 68076 nosy: pitrou severity: normal status: open title: Wrong unicode size detection in pybench type: behavior versions: Python 3.0 Added file: http://bugs.python.org/file10603/pybench_ucs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 21:56:57 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 12 Jun 2008 19:56:57 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213300617.72.0.740719978642.issue3088@psf.upfronthosting.co.za> Jesse Noller added the comment: I can get an intermittent (1 every 15 or so runs) lock in: test_get (__main__.WithProcessesTestQueue) ... Executed like this: ./python Lib/test/test_multiprocessing.py When I control-c it the stack looks like this: ...snip File "/root/py/python-3000/Lib/multiprocessing/pool.py", line 57, in worker task = get() File "/root/py/python-3000/Lib/multiprocessing/queues.py", line 337, in get task = get() File "/root/py/python-3000/Lib/multiprocessing/queues.py", line 339, in get racquire() KeyboardInterrupt task = get() File "/root/py/python-3000/Lib/multiprocessing/queues.py", line 337, in get task = get() File "/root/py/python-3000/Lib/multiprocessing/queues.py", line 337, in get return recv() File "/root/py/python-3000/Lib/pickle.py", line 1327, in loads racquire() KeyboardInterrupt racquire() KeyboardInterrupt def loads(s, *, encoding="ASCII", errors="strict"): KeyboardInterrupt I'm not seeing frequent locks/failures when run with regrtest, but I am seeing them with "make test TESTOPTS=test_multiprocessing" I've attached full output. Still trying to figure it out Added file: http://bugs.python.org/file10604/test_get.output _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 21:57:40 2008 From: report at bugs.python.org (Adam Olsen) Date: Thu, 12 Jun 2008 19:57:40 +0000 Subject: [issue3093] Namespace polution from multiprocessing In-Reply-To: <1213300660.18.0.995213086332.issue3093@psf.upfronthosting.co.za> Message-ID: <1213300660.18.0.995213086332.issue3093@psf.upfronthosting.co.za> New submission from Adam Olsen : All these in multiprocessing.h are lacking suitable py/_py/Py/_Py/PY/_PY prefixes: PyObject *mp_SetError(PyObject *Type, int num); extern PyObject *pickle_dumps; extern PyObject *pickle_loads; extern PyObject *pickle_protocol; extern PyObject *BufferTooShort; extern PyTypeObject SemLockType; extern PyTypeObject ConnectionType; extern PyTypeObject PipeConnectionType; extern HANDLE sigint_event; Additionally, win32_functions.c exposes Win32Type and create_win32_namespace. semaphore.c has sem_timedwait_save. multiprocessing.c has ProcessError. ---------- messages: 68078 nosy: Rhamphoryncus severity: normal status: open title: Namespace polution from multiprocessing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 21:59:25 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 12 Jun 2008 19:59:25 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213300765.76.0.0594147116661.issue3088@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- nosy: +roudkerk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 21:59:44 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 12 Jun 2008 19:59:44 +0000 Subject: [issue3093] Namespace polution from multiprocessing In-Reply-To: <1213300660.18.0.995213086332.issue3093@psf.upfronthosting.co.za> Message-ID: <1213300784.03.0.00167453428559.issue3093@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- nosy: +jnoller, roudkerk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 22:01:24 2008 From: report at bugs.python.org (Steven Wong) Date: Thu, 12 Jun 2008 20:01:24 +0000 Subject: [issue3094] By default, HTTPSConnection should send header "Host: somehost" instead of "Host: somehost:443" In-Reply-To: <1213300884.55.0.795438603527.issue3094@psf.upfronthosting.co.za> Message-ID: <1213300884.55.0.795438603527.issue3094@psf.upfronthosting.co.za> New submission from Steven Wong : Communicating over HTTPS at the default port of 443: import httplib conn = httplib.HTTPSConnection("my-secure-domain.com") conn.request("GET", "/") res = conn.getresponse() In the current implementation, the Host header sent in the request is: Host: my-secure-domain.com:443 The ":443" is unnecessary because the default port of HTTPS is 443. The attached patch file fixes this so that the Host header sent is simply: Host: my-secure-domain.com ---------- components: Library (Lib) files: httplib.py.patch keywords: patch messages: 68079 nosy: steven.w severity: normal status: open title: By default, HTTPSConnection should send header "Host: somehost" instead of "Host: somehost:443" type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10605/httplib.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 22:18:21 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Jun 2008 20:18:21 +0000 Subject: [issue3093] Namespace polution from multiprocessing In-Reply-To: <1213300660.18.0.995213086332.issue3093@psf.upfronthosting.co.za> Message-ID: <1213301901.17.0.475088387781.issue3093@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Is this really that much of an issue? multiprocessing lives in it's own directory and isn't part of the Python public API. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 22:23:24 2008 From: report at bugs.python.org (Adam Olsen) Date: Thu, 12 Jun 2008 20:23:24 +0000 Subject: [issue3095] multiprocessing initializes flags dict unsafely In-Reply-To: <1213302204.8.0.0176767503355.issue3095@psf.upfronthosting.co.za> Message-ID: <1213302204.8.0.0176767503355.issue3095@psf.upfronthosting.co.za> New submission from Adam Olsen : multiprocessing.c currently has code like this: temp = PyDict_New(); if (!temp) return; if (PyModule_AddObject(module, "flags", temp) < 0) return; PyModule_AddObject consumes the reference to temp, so it could conceivable be deleted before the rest of this function finishes. ---------- messages: 68081 nosy: Rhamphoryncus severity: normal status: open title: multiprocessing initializes flags dict unsafely versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 22:26:51 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 12 Jun 2008 20:26:51 +0000 Subject: [issue3092] Wrong unicode size detection in pybench In-Reply-To: <1213300200.75.0.77296570553.issue3092@psf.upfronthosting.co.za> Message-ID: <48518689.3050107@egenix.com> Marc-Andre Lemburg added the comment: On 2008-06-12 21:50, Antoine Pitrou wrote: > New submission from Antoine Pitrou : > > In py3k, pybench wrongly detects UCS2 builds as UCS4. Patch attached. Why is that ? Doesn't chr(100000) raise an exception in UCS2 builds ? unichr(100000) does raise an exception in Py2.x. Note that sys.maxunicode is not available in Python 2.1 which is why I chose try-except approach. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 22:30:37 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 12 Jun 2008 20:30:37 +0000 Subject: [issue3095] multiprocessing initializes flags dict unsafely In-Reply-To: <1213302204.8.0.0176767503355.issue3095@psf.upfronthosting.co.za> Message-ID: <1213302637.32.0.319482343446.issue3095@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- nosy: +jnoller, roudkerk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 22:36:35 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Thu, 12 Jun 2008 20:36:35 +0000 Subject: [issue2849] Remove usage of rfc822 from the stdlib In-Reply-To: <1210726924.82.0.902490265063.issue2849@psf.upfronthosting.co.za> Message-ID: <1213302995.9.0.850015686096.issue2849@psf.upfronthosting.co.za> Humberto Diogenes added the comment: [msg68060] >> Why does it need to be in 2.6? mimetools is still there. > > I guess you're right, it doesn't. So, does it make sense to backport this too? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 22:46:04 2008 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 12 Jun 2008 20:46:04 +0000 Subject: [issue3091] Can't build datetime or time on py3k (r64171) In-Reply-To: <1213299785.85.0.0420437584533.issue3091@psf.upfronthosting.co.za> Message-ID: <18513.35579.468954.308319@montanaro-dyndns-org.local> Skip Montanaro added the comment: Georg> Georg Brandl added the comment: Georg> Where does the strftime.c come from? It is not in the Python Georg> sources -- is this a Mac-specific thing? Whoops. My bad. Modified sandbox. Please reject. Skip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 22:49:16 2008 From: report at bugs.python.org (Will Brown) Date: Thu, 12 Jun 2008 20:49:16 +0000 Subject: [issue2234] cygwinccompiler.py fails for latest MinGW releases. In-Reply-To: <1213297593.22.0.461573275082.issue2234@psf.upfronthosting.co.za> Message-ID: <2D82356CD8BFF34A92BFB1EC38D5BE58050F77B3@XCH-NW-3V1.nw.nos.boeing.com> Will Brown added the comment: Maybe I have a problem with my test code... -------------------- import re def test_re(out_string): result = re.search('(\d+\.\d+(\.(\d+))?([ab](\d+))?)', out_string) print '--- msg00622 ---' print result.group(1) print result.group(2) print result.group(3) print result.group(4) print if __name__ == '__main__': out_string = '2.18.50.20080523' test_re(out_string) out_string = '1.2.3a' test_re(out_string) out_string = '2.18.50a.20080523' test_re(out_string) Results... --- msg00622 --- 2.18.50 .50 50 None --- msg00622 --- 1.2.3 .3 3 None --- msg00622 --- 2.18.50 .50 50 None -------------------- I would expect GNU to have a standard for version strings so this doesn't happen to EVERYONE when they deviate from the expected. A quick check in Google returned the following links for other packages... http://publib.boulder.ibm.com/tividd/td/ITCM/SC23-4712-01/en_US/HTML/cmm st19.htm http://java.sun.com/j2se/versioning_naming.html http://www.osgi.org/javadoc/r4/org/osgi/framework/Version.html Given that, I think I prefer 1 to 2. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 22:51:11 2008 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 12 Jun 2008 20:51:11 +0000 Subject: [issue3091] Can't build datetime or time on py3k (r64171) In-Reply-To: <1213285344.4.0.409695975664.issue3091@psf.upfronthosting.co.za> Message-ID: <1213303871.77.0.555004762391.issue3091@psf.upfronthosting.co.za> Skip Montanaro added the comment: My bad. Sorry for the noise. mods in my sandbox... ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 22:58:16 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Jun 2008 20:58:16 +0000 Subject: [issue3092] Wrong unicode size detection in pybench In-Reply-To: <48518689.3050107@egenix.com> Message-ID: <1213304293.5903.11.camel@fsol> Antoine Pitrou added the comment: Le jeudi 12 juin 2008 ? 20:26 +0000, Marc-Andre Lemburg a ?crit : > Doesn't chr(100000) raise an exception in UCS2 builds ? No, it returns a 2-character string. > Note that sys.maxunicode is not available in Python 2.1 > which is why I chose try-except approach. I understand, but is the py3k version of pybench still compatible with Python 2.1? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 22:59:15 2008 From: report at bugs.python.org (Aristotelis Mikropoulos) Date: Thu, 12 Jun 2008 20:59:15 +0000 Subject: [issue1778443] robotparser.py fixes Message-ID: <1213304355.95.0.223311470664.issue1778443@psf.upfronthosting.co.za> Aristotelis Mikropoulos added the comment: So, finally, will this patch be applied? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 23:00:43 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 12 Jun 2008 21:00:43 +0000 Subject: [issue3092] Wrong unicode size detection in pybench In-Reply-To: <1213300200.75.0.77296570553.issue3092@psf.upfronthosting.co.za> Message-ID: <1213304443.8.0.389200776532.issue3092@psf.upfronthosting.co.za> Georg Brandl added the comment: > No, it returns a 2-character string. Which hopefully is the proper surrogate sequence :) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 23:03:38 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Jun 2008 21:03:38 +0000 Subject: [issue1778443] robotparser.py fixes Message-ID: <1213304618.59.0.0425843561324.issue1778443@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Can we have a unified diff as per http://www.python.org/dev/patches/? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 23:16:36 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 12 Jun 2008 21:16:36 +0000 Subject: [issue2849] Remove usage of rfc822 from the stdlib In-Reply-To: <1213302995.9.0.850015686096.issue2849@psf.upfronthosting.co.za> Message-ID: <11D6F05A-5917-4516-82C9-D0A2D2D0BE1F@python.org> Barry A. Warsaw added the comment: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Jun 12, 2008, at 4:36 PM, Humberto Diogenes wrote: > Humberto Diogenes added the comment: > > [msg68060] >>> Why does it need to be in 2.6? mimetools is still there. >> >> I guess you're right, it doesn't. > > So, does it make sense to backport this too? No. Thanks, - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iQCVAwUBSFGSL3EjvBPtnXfVAQLooAP+PQK6Q9p6lDbmLkBgbQio5CXdckssMMyI yvj0DYvK5wBYCurCjOTZ5VFUQZTEloj6p/89qf3HScfUASlIie1vJJRUqCktPDLs THBicAS9lUXWLhmrD6ADgaLN88JMlTGnzpe03vBpScgFfy3fp8QHBoMzjud38amn ozB6lzB+mAQ= =qHGu -----END PGP SIGNATURE----- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 23:19:21 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Jun 2008 21:19:21 +0000 Subject: [issue1819] Speed hack for function calls with named parameters In-Reply-To: <1200271701.23.0.131498543337.issue1819@psf.upfronthosting.co.za> Message-ID: <1213305561.66.0.984974431833.issue1819@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Georg, do you want to go ahead and apply this. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 23:26:33 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Jun 2008 21:26:33 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1213305993.12.0.426404379126.issue2848@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is done. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 23:28:46 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Jun 2008 21:28:46 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1213306126.59.0.162913111689.issue2775@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- dependencies: -Remove mimetools usage from the stdlib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 23:33:24 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Jun 2008 21:33:24 +0000 Subject: [issue3092] Wrong unicode size detection in pybench In-Reply-To: <1213300200.75.0.77296570553.issue3092@psf.upfronthosting.co.za> Message-ID: <1213306404.83.0.180848950278.issue3092@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Which hopefully is the proper surrogate sequence :) Well at least that's what the doc string says! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 23:41:33 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 12 Jun 2008 21:41:33 +0000 Subject: [issue3092] Wrong unicode size detection in pybench In-Reply-To: <1213304293.5903.11.camel@fsol> Message-ID: <48519807.6020704@egenix.com> Marc-Andre Lemburg added the comment: On 2008-06-12 22:58, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > > Le jeudi 12 juin 2008 ? 20:26 +0000, Marc-Andre Lemburg a ?crit : >> Doesn't chr(100000) raise an exception in UCS2 builds ? > > No, it returns a 2-character string. Interesting... I wonder how applications will deal with this. They'd normally expect to get a length 1 string from chr() or unichr(). I think chr() should only behave in this way if given an option. Otherwise, it will definitely introduce hard to find bugs in ported applications (and probably even in newly written ones). Something like chr(x, surrogates=True) to enable returning 2 code points instead of raising an exception. >> Note that sys.maxunicode is not available in Python 2.1 >> which is why I chose try-except approach. > > I understand, but is the py3k version of pybench still > compatible with Python 2.1? You're right: probably not. Would be great to have the test on the Py2.x version as well - to see the difference in performance. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jun 12 2008) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2008-07-07: EuroPython 2008, Vilnius, Lithuania 24 days to go :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 23:42:09 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Jun 2008 21:42:09 +0000 Subject: [issue1569291] Speed-up in array_repeat() Message-ID: <1213306929.38.0.690025262481.issue1569291@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Georg, do you want to take it from here. ---------- assignee: rhettinger -> georg.brandl nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 23:51:48 2008 From: report at bugs.python.org (Marius Gedminas) Date: Thu, 12 Jun 2008 21:51:48 +0000 Subject: [issue3096] sphinx: sort warnings by filename In-Reply-To: <1213307508.32.0.469358901919.issue3096@psf.upfronthosting.co.za> Message-ID: <1213307508.32.0.469358901919.issue3096@psf.upfronthosting.co.za> New submission from Marius Gedminas : Here's a patch that makes Sphinx sort warnings about unused documents by file name. Without it you get them in seemingly arbitrary order, which makes it harder to parse, when your documents are scattered in a large tree. ---------- assignee: georg.brandl components: Documentation tools (Sphinx) files: sphinx-sort-warnings-by-filename.diff keywords: patch messages: 68097 nosy: georg.brandl, mgedmin severity: normal status: open title: sphinx: sort warnings by filename type: behavior Added file: http://bugs.python.org/file10606/sphinx-sort-warnings-by-filename.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 23:56:25 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Jun 2008 21:56:25 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1213307785.15.0.583385095824.issue2912@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for doing this. Would you please try on Windows the patch, I'm attaching now? Added file: http://bugs.python.org/file10607/platform2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 23:57:39 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 12 Jun 2008 21:57:39 +0000 Subject: [issue3096] sphinx: sort warnings by filename In-Reply-To: <1213307508.32.0.469358901919.issue3096@psf.upfronthosting.co.za> Message-ID: <1213307859.84.0.579107763388.issue3096@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, added in r64201. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 12 23:57:53 2008 From: report at bugs.python.org (Marius Gedminas) Date: Thu, 12 Jun 2008 21:57:53 +0000 Subject: [issue3097] sphinx: config option for exclude_dirnames In-Reply-To: <1213307873.74.0.0842689115594.issue3097@psf.upfronthosting.co.za> Message-ID: <1213307873.74.0.0842689115594.issue3097@psf.upfronthosting.co.za> New submission from Marius Gedminas : I'm building developer documentation for an existing project that already had reStructuredText files scattered in the source tree. Unfortunately these use the same extension (.txt) as functional doctest files, but fortunately tests live only in subdirectories named 'ftests'. Unfortunately, sphinx doesn't support globs in exclude_dirs or exclude_trees, so I cannot just exclude "**/ftests". It would help me if I could specify the exclude_dirnames option that's currently hardcoded inside BuildEnvironment.find_files in my conf.py. ---------- assignee: georg.brandl components: Documentation tools (Sphinx) messages: 68100 nosy: georg.brandl, mgedmin severity: normal status: open title: sphinx: config option for exclude_dirnames type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 00:08:50 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Jun 2008 22:08:50 +0000 Subject: [issue2493] Remove unused constants from optimized code objects In-Reply-To: <1206542855.67.0.168475253552.issue2493@psf.upfronthosting.co.za> Message-ID: <1213308530.8.0.844046839982.issue2493@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The issue with unused constants is an artifact of the peepholer running after the bytecode generation phase. When constant folding was written, I intentionally left-out a step to remove unused constants because of the code complexity, the fragility of the process, because the benefits were inconsequential, and because it added to compilation time. It would be better to wait for the AST optimizer to replace the peepholer. AST optimizations are upstream from bytecode generation, so the unused constant issue simply disappears. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 00:13:17 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Jun 2008 22:13:17 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> New submission from Benjamin Peterson : test test_sys failed -- Traceback (most recent call last): File "/temp/python/trunk/Lib/test/test_sys.py", line 549, in test_specialtypes size2=basicsize + sys.getsizeof(str(s))) File "/temp/python/trunk/Lib/test/test_sys.py", line 429, in check_sizeof self.assertEqual(result, size2, msg + str(size2)) AssertionError: wrong size for : got 28, expected 50.5109328552 ---------- assignee: schuppenies components: Interpreter Core messages: 68102 nosy: benjamin.peterson, schuppenies priority: critical severity: normal status: open title: sys.sizeof test fails with wide unicode type: behavior versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 00:16:12 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Jun 2008 22:16:12 +0000 Subject: [issue2849] Remove usage of rfc822 from the stdlib In-Reply-To: <1210726924.82.0.902490265063.issue2849@psf.upfronthosting.co.za> Message-ID: <1213308972.86.0.157263784302.issue2849@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I've removed the whole module in r64203. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 00:17:11 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Jun 2008 22:17:11 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1213309031.4.0.543223367246.issue2775@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- dependencies: -Remove usage of rfc822 from the stdlib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 00:19:44 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Jun 2008 22:19:44 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213309184.12.0.56582503288.issue3098@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It was recommended by Georg that you expose Py_UNICODE_SIZE in the _testcapi, since the size is not consistent across all platforms. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 00:51:48 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 12 Jun 2008 22:51:48 +0000 Subject: [issue2874] Remove use of the stat module in the stdlib In-Reply-To: <1210913145.44.0.456986373707.issue2874@psf.upfronthosting.co.za> Message-ID: <1213311108.31.0.361163167554.issue2874@psf.upfronthosting.co.za> Georg Brandl added the comment: This is a proof of concept how to add methods to a structseq type. Of course PyStructSequence_InitType could also get a companion PyStructSequence_InitTypeEx that takes a PyMethodDef* array. ---------- keywords: +patch nosy: +georg.brandl Added file: http://bugs.python.org/file10608/posix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 01:17:55 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 12 Jun 2008 23:17:55 +0000 Subject: [issue2065] trunk version does not compile with vs8 and vc6 In-Reply-To: <1202727039.47.0.783651728329.issue2065@psf.upfronthosting.co.za> Message-ID: <1213312675.86.0.775756281957.issue2065@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- assignee: -> amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 01:23:34 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Thu, 12 Jun 2008 23:23:34 +0000 Subject: [issue2159] dbmmodule inquiry function is performance prohibitive In-Reply-To: <1203640875.82.0.736964888757.issue2159@psf.upfronthosting.co.za> Message-ID: <1213313014.82.0.102043834171.issue2159@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: johansen, could you be happy returning True of False according to database being open/closed?. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 01:30:01 2008 From: report at bugs.python.org (johansen) Date: Thu, 12 Jun 2008 23:30:01 +0000 Subject: [issue2159] dbmmodule inquiry function is performance prohibitive In-Reply-To: <1203640875.82.0.736964888757.issue2159@psf.upfronthosting.co.za> Message-ID: <1213313400.64.0.427780024087.issue2159@psf.upfronthosting.co.za> johansen added the comment: Yes, True/False should be sufficient for our purposes. IIRC, we were trying to determine if we had a stale handle to the database and needed to open it again. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 02:04:19 2008 From: report at bugs.python.org (James Thomas) Date: Fri, 13 Jun 2008 00:04:19 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1213315459.06.0.269873159862.issue2912@psf.upfronthosting.co.za> James Thomas added the comment: Your patch works perfectly on windows. Thanks for your help. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 02:10:01 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 13 Jun 2008 00:10:01 +0000 Subject: [issue1683] Thread local storage and PyGILState_* mucked up by os.fork() In-Reply-To: <1198263226.4.0.968502752614.issue1683@psf.upfronthosting.co.za> Message-ID: <1213315801.44.0.147285583176.issue1683@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I applied this in r64212. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 02:15:21 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 00:15:21 +0000 Subject: [issue3093] Namespace polution from multiprocessing In-Reply-To: <1213300660.18.0.995213086332.issue3093@psf.upfronthosting.co.za> Message-ID: <1213316121.14.0.317958501082.issue3093@psf.upfronthosting.co.za> Adam Olsen added the comment: The directory is irrelevant. C typically uses a flat namespace for symbols. If python loads this library it will conflict with any other libraries using the same name. This has happened numerous times in the past, so there's no questioning the correct practises. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 02:16:37 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 13 Jun 2008 00:16:37 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1213316197.24.0.0902754917083.issue2912@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Marc, could you look at this please? ---------- assignee: -> lemburg nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 02:40:56 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 13 Jun 2008 00:40:56 +0000 Subject: [issue2065] trunk version does not compile with vs8 and vc6 In-Reply-To: <1202727039.47.0.783651728329.issue2065@psf.upfronthosting.co.za> Message-ID: <1213317656.18.0.514114858898.issue2065@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Thank you for progress! >- The patch for 2.5 is OK for me. We could just add the a paragraph that >appears in your patch for trunk (PC/VC6/readme.txt): >+_msi >+ _msi.c. You need to install Windows Installer SDK to build this >module. I agree. >- I worked on your patch for trunk/ and py3k/ to allow compilation with >a stock VC6 *without* a modern PlatformSDK installed (i.e NTDDI_VERSION >is not defined) >This is relevant only for socketmodule; with a stock VC6, IPV6 is not >available, WSAIoctl is not exposed, and getaddrinfo() is emulated. I'm not sure which is better way now. (with or without modern PSDK) >From cleaness of code, I think with modern PSDK is better. http://archives.devshed.com/forums/development-94/error-building-python-bindings-with-ms-visual-c-6-0t-2074150.html show subversion already seems to require modern PSDK to build it, if python uses modern PSDK and winsock2, workaround for socklen_t is not needed anymore. clean. (this workaround itself is quite easy though) Of cause, Amaury wants to go without modern PSDK, there is no strong reason I will disturb it. >- Replacing _wstat with GetFileAttributesW is good thing: stat("nul") >says that the file exists! >But it is not enough: try to "import con" or "import nul", before and >after your patch. Fun in both cases (if you "import con", type some >chars, and press ^Z) Interesting. Current release25-maint branch has same issue, but python2.5.2 doesn't have this issue. "import con" fails with following message. Something changed from latest release? >>> import con Traceback (most recent call last): File "", line 1, in ImportError: DLL load failed: ??????????????????? # It says "specified module cannot be found" in Japanese. Maybe is this win32 error message via FormatMessage()? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 02:52:31 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Jun 2008 00:52:31 +0000 Subject: [issue2065] trunk version does not compile with vs8 and vc6 In-Reply-To: <1202727039.47.0.783651728329.issue2065@psf.upfronthosting.co.za> Message-ID: <1213318351.49.0.726942904847.issue2065@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I just committed r64214, that can compile with vc6. When compiled with a separate SDK, socket.ioctl is available. With the stock vc6, the function is disabled _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 03:05:58 2008 From: report at bugs.python.org (James Thomas) Date: Fri, 13 Jun 2008 01:05:58 +0000 Subject: [issue3095] multiprocessing initializes flags dict unsafely In-Reply-To: <1213302204.8.0.0176767503355.issue3095@psf.upfronthosting.co.za> Message-ID: <1213319158.24.0.847160489745.issue3095@psf.upfronthosting.co.za> James Thomas added the comment: I believe this patch solves the problem. I added the line Py_DECREF(temp) after the code block shown above. I also changed the line if (PyDict_SetItemString(temp, #name, Py_BuildValue("i", name)) < 0) return to if (PyDict_SetItemString(PyObject_GetAttrString(module, "flags"), #name, Py_BuildValue("i", name)) < 0) return ---------- keywords: +patch nosy: +jjt009 Added file: http://bugs.python.org/file10609/multiprocessing.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 03:18:48 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Jun 2008 01:18:48 +0000 Subject: [issue3099] On windows, "import nul" always succeed In-Reply-To: <1213319928.58.0.193615390811.issue3099@psf.upfronthosting.co.za> Message-ID: <1213319928.58.0.193615390811.issue3099@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : on Windows, the stat() function always returns True for some special device names (nul, con, com1, lpt1...), even when followed by an extension. Thus "import con" manages to find that "con.py" exists, and tries to read from it... fun. A solution is to use GetFileAttributes() instead. Note that on python2.5.2, the error message suggest that we have such a problem, but fortunately the error is still an ImportError:: >>> import nul ImportError: DLL load failed: Le module sp?cifi? est introuvable. ---------- components: Windows messages: 68115 nosy: amaury.forgeotdarc, ocean-city severity: normal status: open title: On windows, "import nul" always succeed versions: Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 03:19:23 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Jun 2008 01:19:23 +0000 Subject: [issue2065] trunk version does not compile with vs8 and vc6 In-Reply-To: <1202727039.47.0.783651728329.issue2065@psf.upfronthosting.co.za> Message-ID: <1213319963.79.0.336897583215.issue2065@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Committed r64215 on py3k branch. Now both trunk and py3k compile with VC6, VS8 and VS9. I cannot run VS7.1; I will do 2.5 shortly. I also filed issue3099 about the funny "import nul". _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 03:48:07 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 01:48:07 +0000 Subject: [issue3095] multiprocessing initializes flags dict unsafely In-Reply-To: <1213302204.8.0.0176767503355.issue3095@psf.upfronthosting.co.za> Message-ID: <1213321687.42.0.935924935799.issue3095@psf.upfronthosting.co.za> Adam Olsen added the comment: This doesn't look right. PyDict_SetItemString doesn't steal the references passed to it, so your reference to flags will be leaked each time. Besides, I think it's a little cleaner to INCREF it before call PyModule_AddObject, then DECREF it at any point you return. Additionally, I've just noticed that the result of Py_BuildValue is getting leaked. It should be stored to a temporary, added to flags, then the temporary should be released. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 04:12:37 2008 From: report at bugs.python.org (Gabriel Genellina) Date: Fri, 13 Jun 2008 02:12:37 +0000 Subject: [issue3079] sys.exit() called from optparse - bad, bad, bad In-Reply-To: <1213205007.57.0.132667292732.issue3079@psf.upfronthosting.co.za> Message-ID: <1213323157.95.0.172555479269.issue3079@psf.upfronthosting.co.za> Changes by Gabriel Genellina : ---------- nosy: +gagenellina _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 04:13:25 2008 From: report at bugs.python.org (Senthil) Date: Fri, 13 Jun 2008 02:13:25 +0000 Subject: [issue3094] By default, HTTPSConnection should send header "Host: somehost" instead of "Host: somehost:443" In-Reply-To: <1213300884.55.0.795438603527.issue3094@psf.upfronthosting.co.za> Message-ID: <1213323205.95.0.510533147629.issue3094@psf.upfronthosting.co.za> Senthil added the comment: The HTTPSConnection class derives from HTTPConnection and the methods in the HTTPConnection assume that 1) It is either over the default HTTP port or 2) Over a different port (be it different HTTP port(8080?) or 443 for HTTPS etc) and in that case it sends the port along in the request header. Thats it. So, there is no bug here. Morever, RFC 2818 states that, for HTTPS default port is 443, but the implementation are free to choose any other ports over TLS as well. Invalid bug can be closed. Thanks. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 04:22:12 2008 From: report at bugs.python.org (Gabriel Genellina) Date: Fri, 13 Jun 2008 02:22:12 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1206918832.8.0.542354120577.issue2517@psf.upfronthosting.co.za> Message-ID: <1213323732.92.0.784584831495.issue2517@psf.upfronthosting.co.za> Changes by Gabriel Genellina : ---------- nosy: +gagenellina _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 04:50:25 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 13 Jun 2008 02:50:25 +0000 Subject: [issue2917] merge pickle and cPickle in 3.0 In-Reply-To: <1211227162.29.0.0642317760161.issue2917@psf.upfronthosting.co.za> Message-ID: <1213325425.14.0.91353746368.issue2917@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Restored _pickle in r64180. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 05:20:00 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 03:20:00 +0000 Subject: [issue3100] segfault after loading multiprocessing.reduction In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> New submission from Adam Olsen : $ ./python Python 2.6a3+ (unknown, Jun 12 2008, 20:10:55) [GCC 4.2.3 (Debian 4.2.3-1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing.reduction [55604 refs] >>> [55604 refs] Segmentation fault (core dumped) ---------- components: Extension Modules messages: 68120 nosy: Rhamphoryncus severity: normal status: open title: segfault after loading multiprocessing.reduction type: crash versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 05:25:46 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 03:25:46 +0000 Subject: [issue3100] segfault after loading multiprocessing.reduction In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213327546.23.0.838116844296.issue3100@psf.upfronthosting.co.za> Adam Olsen added the comment: op is a KeyedRef instance. The instance being cleared from the module is the multiprocessing.util._afterfork_registry. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb7d626b0 (LWP 2287)] 0x0809a131 in _Py_ForgetReference (op=0xb7a9a814) at Objects/object.c:2022 2022 if (op == &refchain || (gdb) bt #0 0x0809a131 in _Py_ForgetReference (op=0xb7a9a814) at Objects/object.c:2022 #1 0x0809a1a0 in _Py_Dealloc (op=0xb7a9a814) at Objects/object.c:2043 #2 0x080b436e in tupledealloc (op=0xb79ad1f4) at Objects/tupleobject.c:169 #3 0x0809a1ab in _Py_Dealloc (op=0xb79ad1f4) at Objects/object.c:2044 #4 0x08065bdf in PyObject_CallFunctionObjArgs (callable=0xb79baa84) at Objects/abstract.c:2716 #5 0x080cabc4 in handle_callback (ref=0xb7a9a814, callback=0xb79baa84) at Objects/weakrefobject.c:864 #6 0x080cad6e in PyObject_ClearWeakRefs (object=0xb79bd624) at Objects/weakrefobject.c:910 #7 0x08168971 in func_dealloc (op=0xb79bd624) at Objects/funcobject.c:453 #8 0x0809a1ab in _Py_Dealloc (op=0xb79bd624) at Objects/object.c:2044 #9 0x080b436e in tupledealloc (op=0xb79a65f4) at Objects/tupleobject.c:169 #10 0x0809a1ab in _Py_Dealloc (op=0xb79a65f4) at Objects/object.c:2044 #11 0x080b7c26 in clear_slots (type=0x82af4e4, self=0xb7a9a814) at Objects/typeobject.c:821 #12 0x080b806e in subtype_dealloc (self=0xb7a9a814) at Objects/typeobject.c:950 #13 0x0809a1ab in _Py_Dealloc (op=0xb7a9a814) at Objects/object.c:2044 #14 0x080915b2 in dict_dealloc (mp=0xb79b9674) at Objects/dictobject.c:907 #15 0x0809a1ab in _Py_Dealloc (op=0xb79b9674) at Objects/object.c:2044 #16 0x080915b2 in dict_dealloc (mp=0xb79b9494) at Objects/dictobject.c:907 #17 0x0809a1ab in _Py_Dealloc (op=0xb79b9494) at Objects/object.c:2044 #18 0x08068720 in instance_dealloc (inst=0xb79b6edc) at Objects/classobject.c:668 #19 0x0809a1ab in _Py_Dealloc (op=0xb79b6edc) at Objects/object.c:2044 #20 0x08090517 in insertdict (mp=0xb79a5b74, key=0xb7a9ae38, hash=-1896994012, value=0x81bdd6c) at Objects/dictobject.c:455 #21 0x08090da6 in PyDict_SetItem (op=0xb79a5b74, key=0xb7a9ae38, value=0x81bdd6c) at Objects/dictobject.c:697 #22 0x08095ad3 in _PyModule_Clear (m=0xb7a88334) at Objects/moduleobject.c:125 #23 0x08111443 in PyImport_Cleanup () at Python/import.c:479 #24 0x08120cb3 in Py_Finalize () at Python/pythonrun.c:430 #25 0x0805b618 in Py_Main (argc=1, argv=0xbfbaf434) at Modules/main.c:623 #26 0x0805a2e6 in main (argc=0, argv=0x0) at ./Modules/python.c:23 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 06:06:37 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 04:06:37 +0000 Subject: [issue3100] segfault from multiprocessing.util.register_after_fork In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213329997.57.0.0994383916428.issue3100@psf.upfronthosting.co.za> Adam Olsen added the comment: More specific test case. ---------- title: segfault after loading multiprocessing.reduction -> segfault from multiprocessing.util.register_after_fork Added file: http://bugs.python.org/file10610/register_after_fork-crash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 06:18:21 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 04:18:21 +0000 Subject: [issue3100] segfault from multiprocessing.util.register_after_fork In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213330701.46.0.2988122263.issue3100@psf.upfronthosting.co.za> Adam Olsen added the comment: Very specific test case, eliminating multiprocessing entirely. It may be an interaction between having the watched obj as its own key in the WeakValueDictionary and the order in which the two modules are cleared. Added file: http://bugs.python.org/file10611/outer.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 06:18:32 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 04:18:32 +0000 Subject: [issue3100] segfault from multiprocessing.util.register_after_fork In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213330712.21.0.473813807273.issue3100@psf.upfronthosting.co.za> Changes by Adam Olsen : Added file: http://bugs.python.org/file10612/inner.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 06:18:37 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 04:18:37 +0000 Subject: [issue3100] segfault from multiprocessing.util.register_after_fork In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213330717.43.0.957208896276.issue3100@psf.upfronthosting.co.za> Changes by Adam Olsen : Removed file: http://bugs.python.org/file10610/register_after_fork-crash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 06:19:07 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 04:19:07 +0000 Subject: [issue3100] segfault with WeakValueDictionary and module clearing In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213330747.36.0.978595390373.issue3100@psf.upfronthosting.co.za> Changes by Adam Olsen : ---------- title: segfault from multiprocessing.util.register_after_fork -> segfault with WeakValueDictionary and module clearing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 06:55:26 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 04:55:26 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213332926.11.0.960105812528.issue3100@psf.upfronthosting.co.za> Adam Olsen added the comment: Specific enough yet? Seems the WeakValueDictionary and the module clearing aren't necessary. A subclass of weakref is created. The target of this weakref is added as an attribute of the weakref. So long as a callback is present there will be a crash on shutdown. However, if the callback prints the attribute, you get a crash right then. The weakref claims to be dead, which shouldn't be possible when the weakref's attributes have a strong reference to the target. ---------- title: segfault with WeakValueDictionary and module clearing -> weakref subclass segfault Added file: http://bugs.python.org/file10613/weakref_subclass_cycle.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 06:55:39 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 04:55:39 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213332939.85.0.606679424439.issue3100@psf.upfronthosting.co.za> Changes by Adam Olsen : Removed file: http://bugs.python.org/file10612/inner.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 06:55:36 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 04:55:36 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213332936.19.0.351470151831.issue3100@psf.upfronthosting.co.za> Changes by Adam Olsen : Removed file: http://bugs.python.org/file10611/outer.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 07:08:35 2008 From: report at bugs.python.org (Steven Wong) Date: Fri, 13 Jun 2008 05:08:35 +0000 Subject: [issue3094] By default, HTTPSConnection should send header "Host: somehost" instead of "Host: somehost:443" In-Reply-To: <1213300884.55.0.795438603527.issue3094@psf.upfronthosting.co.za> Message-ID: <1213333715.38.0.0134052270188.issue3094@psf.upfronthosting.co.za> Steven Wong added the comment: Clarification: I am not saying that sending "Host: somehost:443" for an HTTPS connection at port 443 is a bug. It is in fact legal. Sending "Host: somehost" is also legal in this situation, and IMHO is the preferred behavior, because ":port" is redundant and not required when the default port of the protocol (HTTPS here) is being used. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 07:14:52 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 05:14:52 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213334091.99.0.730324798344.issue3100@psf.upfronthosting.co.za> Adam Olsen added the comment: 1. MyRef is released from the module as part of shutdown 2. MyRef's subtype_dealloc DECREFs its dictptr (not clearing it, as MyRef is dead and should be unreachable) 3. the dict DECREFs the Dummy (MyRef's target) 4. Dummy's subtype_dealloc calls PyObject_ClearWeakRefs to notify of its demise 5. the callback is called, with the dead MyRef as an argument 6. If MyRef's dict is accessed a segfault occurs. Presumably just calling the callback does enough damage to explain the segfault without accessing MyRef's dict. As I understand, a deleted weakref doesn't call its callback. However, subtype_dealloc doesn't call the base type's tp_dealloc until *after* it does everything else. Does it need a special case for weakrefs, or maybe a tp_predealloc slot? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 07:24:25 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 05:24:25 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213334665.39.0.892217937748.issue3100@psf.upfronthosting.co.za> Adam Olsen added the comment: Ahh, I missed a detail: when the callback is called the weakref has a refcount of 0, which is ICNREFed to 1 when getting put in the args, then drops down to 0 again when the args are DECREFed (causing it to get _Py_ForgetReference to be called a second time, which segfaults.) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 08:44:18 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 06:44:18 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213339458.22.0.393869380892.issue3100@psf.upfronthosting.co.za> Adam Olsen added the comment: Patch to add extra sanity checks to Py_INCREF (only if Py_DEBUG is set). If the refcount is 0 or negative if calls Py_FatalError. This should catch revival bugs such as this one a little more clearly. The patch also adds a little more checking to _Py_ForgetReference, so it's more likely to print an error rather than segfaulting. ---------- keywords: +patch Added file: http://bugs.python.org/file10614/python-incref-from-zero.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 08:57:48 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 13 Jun 2008 06:57:48 +0000 Subject: [issue3095] multiprocessing initializes flags dict unsafely In-Reply-To: <1213302204.8.0.0176767503355.issue3095@psf.upfronthosting.co.za> Message-ID: <1213340268.8.0.66415195416.issue3095@psf.upfronthosting.co.za> Georg Brandl added the comment: I think the easiest way is to just call AddObject after inserting the values. I fixed this, and the leaking BuildValue references, in r64223. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 09:03:33 2008 From: report at bugs.python.org (Senthil) Date: Fri, 13 Jun 2008 07:03:33 +0000 Subject: [issue3094] By default, HTTPSConnection should send header "Host: somehost" instead of "Host: somehost:443" In-Reply-To: <1213300884.55.0.795438603527.issue3094@psf.upfronthosting.co.za> Message-ID: <1213340613.0.0.355037673554.issue3094@psf.upfronthosting.co.za> Senthil added the comment: Yes, you are correct. I misunderstood the issue and the patch. Patch seems good to fix that. Sorry for the confusion and thank you. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 09:21:27 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 13 Jun 2008 07:21:27 +0000 Subject: [issue3093] Namespace polution from multiprocessing In-Reply-To: <1213300660.18.0.995213086332.issue3093@psf.upfronthosting.co.za> Message-ID: <1213341687.8.0.492776170483.issue3093@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Alternatively, I think the _multiprocessing module should be rewritten to use a single C file only, and make all symbols except its init function static. I agree with Adam that the current code needs to be fixed, one way or the other. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 09:21:50 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 07:21:50 +0000 Subject: [issue3095] multiprocessing initializes flags dict unsafely In-Reply-To: <1213302204.8.0.0176767503355.issue3095@psf.upfronthosting.co.za> Message-ID: <1213341710.54.0.68192194573.issue3095@psf.upfronthosting.co.za> Adam Olsen added the comment: Aww, that's cheating. (Why didn't I think of that?) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 09:30:20 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 13 Jun 2008 07:30:20 +0000 Subject: [issue3101] global function _add_one_to_C In-Reply-To: <1213342220.87.0.7161073703.issue3101@psf.upfronthosting.co.za> Message-ID: <1213342220.87.0.7161073703.issue3101@psf.upfronthosting.co.za> New submission from Martin v. L?wis : abstract.c defines two functions _add_one_to_C and _add_one_to_F. These apparently must be global, as memoryobject.c references them. Therefore, they should get a Py or _Py prefix. A short comment for what these functions actually do would also be appreciated. ---------- assignee: teoliphant messages: 68133 nosy: loewis, teoliphant severity: normal status: open title: global function _add_one_to_C versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 09:32:29 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Jun 2008 07:32:29 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213342349.66.0.947853692135.issue3100@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: All the versions I tried (2.4, 2.5, 2.6, 3.0) crash with the given script ---------- components: +Interpreter Core -Extension Modules nosy: +amaury.forgeotdarc versions: +Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 09:54:54 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 13 Jun 2008 07:54:54 +0000 Subject: [issue3102] ctypes defines global symbols In-Reply-To: <1213343694.16.0.290726791228.issue3102@psf.upfronthosting.co.za> Message-ID: <1213343694.16.0.290726791228.issue3102@psf.upfronthosting.co.za> New submission from Martin v. L?wis : ctypes defines a number of global symbols which aren't namespace-prefixed, such as AllocFunctionCallback, FreeClosure, GetType, IsSimpleSubType, MallocClosure, _AddTraceback, _CallProc, alloc_format_string, conversion_mode_encoding, conversion_mode_errors, get_error_object, getentry, module_methods (there are more, but the other ones can be understood as being unambiguously prefixed, such as with CData, CField, StgDict). It would be good if these symbols either are changed to static, or get a proper Py/_Py prefix. ---------- assignee: theller messages: 68135 nosy: loewis, theller severity: normal status: open title: ctypes defines global symbols _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 09:59:11 2008 From: report at bugs.python.org (Paul Melis) Date: Fri, 13 Jun 2008 07:59:11 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213343951.49.0.46137852329.issue3088@psf.upfronthosting.co.za> Paul Melis added the comment: I made a copy of test_multiprocessing.py (to test_mp.py) and basically removed all test classes, except _TestCondition. In it, I commented all test methods except test_notify_all. When run with make test TESTOPTS="-v test_mp" there's the lockups every few runs, but I also got (only three times in 40 or so runs so far): 9:57|paul at tabu:~/c/py3k-svn> make test TESTOPTS="-v test_mp" Failed to find the necessary bits to build these modules: _gestalt To find the necessary bits, look in setup.py in detect_modules() for the module's name. find ./Lib -name '*.py[co]' -print | xargs rm -f ./python -E -bb ./Lib/test/regrtest.py -v test_mp test_mp test_notify_all (test.test_mp.WithProcessesTestCondition) ... ok test_notify_all (test.test_mp.WithThreadsTestCondition) ... ok test_notify_all (test.test_mp.WithManagerTestCondition) ... ok ---------------------------------------------------------------------- Ran 3 tests in 1.087s OK 1 test OK. CAUTION: stdout isn't compared in verbose mode: a test that passes in verbose mode may fail without it. ./python -E -bb ./Lib/test/regrtest.py -v test_mp test_mp test_notify_all (test.test_mp.WithProcessesTestCondition) ... ok test_notify_all (test.test_mp.WithThreadsTestCondition) ... ok test_notify_all (test.test_mp.WithManagerTestCondition) ... Exception in thread Thread-28: Traceback (most recent call last): File "/home/paul/c/py3k-svn/Lib/threading.py", line 492, in _bootstrap_inner self.run() File "/home/paul/c/py3k-svn/Lib/threading.py", line 447, in run self._target(*self._args, **self._kwargs) File "/home/paul/c/py3k-svn/Lib/test/test_mp.py", line 208, in f cond.wait(timeout) File "/home/paul/c/py3k-svn/Lib/multiprocessing/managers.py", line 973, in wait return self._callmethod('wait', (timeout,)) File "/home/paul/c/py3k-svn/Lib/multiprocessing/managers.py", line 748, in _callmethod raise convert_to_error(kind, result) RuntimeError: cannot wait on un-aquired lock _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 10:00:46 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 13 Jun 2008 08:00:46 +0000 Subject: [issue3103] sqlite defines a few global symbols. In-Reply-To: <1213344046.17.0.166963020016.issue3103@psf.upfronthosting.co.za> Message-ID: <1213344046.17.0.166963020016.issue3103@psf.upfronthosting.co.za> New submission from Martin v. L?wis : While most global symbols in the _sqlite3 module use a sqlite_ or _sqlite_ prefix, some don't: _enable_callback_tracebacks, converters, microprotocols_adapt, microprotocols_add, psyco_adapters, psyco_microprotocols_adapt. It would be good if these could be made static, or get their own prefix. ---------- assignee: ghaering messages: 68137 nosy: ghaering, loewis severity: normal status: open title: sqlite defines a few global symbols. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 11:04:53 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Fri, 13 Jun 2008 09:04:53 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213347893.77.0.121412219859.issue3098@psf.upfronthosting.co.za> Robert Schuppenies added the comment: Are they any buildbots running with the "--enable-unicode=ucs4" option? Just curious. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 11:18:19 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 13 Jun 2008 09:18:19 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1213348699.36.0.831345667655.issue2912@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: There are two patches. Which one do you want me to look at ? Note that platform.py should stay Python 1.5.2 compatible, ie. no new builtins, no True/False. The second patch also appears to mix tabs/spaces. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 11:19:53 2008 From: report at bugs.python.org (Gabriel Genellina) Date: Fri, 13 Jun 2008 09:19:53 +0000 Subject: [issue839496] SimpleHTTPServer reports wrong content-length for text files Message-ID: <1213348793.08.0.878907598862.issue839496@psf.upfronthosting.co.za> Gabriel Genellina added the comment: As noted by Leo Jay in this message this bug was supposedly fixed but it is still present. Looks like the patch was only applied to release24-maint, not to the trunk. Both the 2.5 and the 2.6 sources don't have the patch applied. 3.0 doesn't have this problem but probably it was fixed independently. ---------- nosy: +gagenellina versions: +Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 11:21:19 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Jun 2008 09:21:19 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213348879.68.0.786939465493.issue3098@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I'm sure there wasn't any a few months ago. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 11:23:38 2008 From: report at bugs.python.org (GreaseMonkey) Date: Fri, 13 Jun 2008 09:23:38 +0000 Subject: [issue3104] overzealous garbage collector (dict) In-Reply-To: <1213349018.67.0.856453652888.issue3104@psf.upfronthosting.co.za> Message-ID: <1213349018.67.0.856453652888.issue3104@psf.upfronthosting.co.za> New submission from GreaseMonkey : When filled with a massive database (>16MB, i'm not sure how large it's meant to be), the dict object appears to mysteriously drop objects off the face of the earth (in this case list objects). Wouldn't it be more appropriate to splurt out a memory error rather than fail silently only to screw up in another way? ---------- components: Interpreter Core messages: 68142 nosy: GreaseMonkey severity: normal status: open title: overzealous garbage collector (dict) type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 12:08:32 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Jun 2008 10:08:32 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213351712.82.0.65145580502.issue3100@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It seems enough to simply skip deleted weakrefs in PyObject_ClearWeakRefs. Here is a tentative patch. Added file: http://bugs.python.org/file10615/weakref_cycle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 13:04:10 2008 From: report at bugs.python.org (Jason Tishler) Date: Fri, 13 Jun 2008 11:04:10 +0000 Subject: [issue2234] cygwinccompiler.py fails for latest MinGW releases. In-Reply-To: <1204656219.89.0.991339984516.issue2234@psf.upfronthosting.co.za> Message-ID: <1213355050.53.0.50948488638.issue2234@psf.upfronthosting.co.za> Jason Tishler added the comment: cygwinccompiler.py only uses the first group: $ fgrep group cygwinccompiler.py gcc_version = StrictVersion(result.group(1)) ld_version = StrictVersion(result.group(1)) dllwrap_version = StrictVersion(result.group(1)) So, I would like to move forward with the regular expression from http://cygwin.com/ml/cygwin/2008-05/msg00622.html: (\d+\.\d+(\.(\d+))?([ab](\d+))?) Can we get a consensus? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 13:09:50 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Jun 2008 11:09:50 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213355390.72.0.00182234173983.issue3100@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : Removed file: http://bugs.python.org/file10615/weakref_cycle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 13:10:47 2008 From: report at bugs.python.org (Paul Melis) Date: Fri, 13 Jun 2008 11:10:47 +0000 Subject: [issue3104] overzealous garbage collector (dict) In-Reply-To: <1213349018.67.0.856453652888.issue3104@psf.upfronthosting.co.za> Message-ID: <1213355447.72.0.0643311335115.issue3104@psf.upfronthosting.co.za> Paul Melis added the comment: What do you mean with ">16MB"? Is that the total size of all data held by the dictionary (and if so, how did you measure this)? How many keys are in the dictionary? And what indication do you have that elements are being dropped? ---------- nosy: +paulmelis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 13:14:17 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Jun 2008 11:14:17 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213355657.13.0.108391335288.issue3100@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: A new version of the patch, which tests the case of multiple weakrefs on the same object, that get deleted together: tp_dealloc of one weakref calls tp_dealloc of the second weakref, which calls tp_dealloc of the referenced object. Since the weakrefs are being deleted, no callback should fire. Added file: http://bugs.python.org/file10616/weakref_cycle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 14:25:38 2008 From: report at bugs.python.org (Aristotelis Mikropoulos) Date: Fri, 13 Jun 2008 12:25:38 +0000 Subject: [issue1778443] robotparser.py fixes Message-ID: <1213359938.41.0.114348286934.issue1778443@psf.upfronthosting.co.za> Aristotelis Mikropoulos added the comment: Sure. Added file: http://bugs.python.org/file10617/robotparser.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 14:30:50 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Jun 2008 12:30:50 +0000 Subject: [issue3104] overzealous garbage collector (dict) In-Reply-To: <1213349018.67.0.856453652888.issue3104@psf.upfronthosting.co.za> Message-ID: <1213360250.31.0.530703649149.issue3104@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Are you sure the keys for those list objects aren't just equal to others you insert in the dict? Witness: >>> d = {} >>> d[1] = 'a' >>> d {1: 'a'} >>> d[1.0] = 'b' >>> d {1: 'b'} I'm not sure what the memory limit is for dict objects, but 16MB sounds quite low. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 14:34:12 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Jun 2008 12:34:12 +0000 Subject: [issue3079] sys.exit() called from optparse - bad, bad, bad In-Reply-To: <1213205007.57.0.132667292732.issue3079@psf.upfronthosting.co.za> Message-ID: <1213360452.79.0.692529881328.issue3079@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The current behaviour is useful in that most of time, it is convenient to let OptionParser display a standard error message and bail out. However, having an attribute on the OptionParser object (e.g. exit_on_errors) to be able to change this behaviour is a reasonable proposition. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 14:38:15 2008 From: report at bugs.python.org (Jesse Noller) Date: Fri, 13 Jun 2008 12:38:15 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213360695.18.0.314587519864.issue3088@psf.upfronthosting.co.za> Jesse Noller added the comment: FWIW: In order to boost the logging level within the test(s) do the following: Search for LOG_LEVEL, set it to: LOG_LEVEL=util.SUBDEBUG And then in the main() replace: multiprocessing.get_logger().setLevel(LOG_LEVEL) With: multiprocessing.log_to_stderr(level=LOG_LEVEL) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 14:47:28 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Jun 2008 12:47:28 +0000 Subject: [issue1407] [performance] Too many closed() checkings In-Reply-To: <1194553833.1.0.901439748582.issue1407@psf.upfronthosting.co.za> Message-ID: <1213361248.38.0.331186128569.issue1407@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Is this issue still valid? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 14:58:32 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Jun 2008 12:58:32 +0000 Subject: [issue1542308] Nested finally in generators don't follow PEP 342 Message-ID: <1213361912.87.0.71522341376.issue1542308@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Is it useful to keep this bug open? Does it correspond to a real-world use case? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 15:17:57 2008 From: report at bugs.python.org (Jesse Noller) Date: Fri, 13 Jun 2008 13:17:57 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213363077.0.0.890231951694.issue3088@psf.upfronthosting.co.za> Jesse Noller added the comment: I also isolated the test(s) like Paul did, and it looks like a semi- consistent lock up in: File "/root/py/python-3000/Lib/multiprocessing/queues.py", line 337, in get racquire() This is running only the test_event test. The racquire traces back to synchronize.SemLock which calls into _multiprocessing.SemLock _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 15:20:46 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 13 Jun 2008 13:20:46 +0000 Subject: [issue3104] overzealous garbage collector (dict) In-Reply-To: <1213349018.67.0.856453652888.issue3104@psf.upfronthosting.co.za> Message-ID: <1213363246.77.0.970556586722.issue3104@psf.upfronthosting.co.za> Georg Brandl added the comment: You'll have to produce a test case for this "dropping" -- otherwise I don't believe that 16 MB cause *any* memory problems at all. ---------- nosy: +georg.brandl status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 15:21:10 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 13 Jun 2008 13:21:10 +0000 Subject: [issue2065] trunk version does not compile with vs8 and vc6 In-Reply-To: <1202727039.47.0.783651728329.issue2065@psf.upfronthosting.co.za> Message-ID: <1213363270.14.0.305750101264.issue2065@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Thank you for commit. I ziped patch for remaining issue. # Probably need to add _multiprocessing module, but not done yet. Added file: http://bugs.python.org/file10618/ocean-remaining.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 15:27:52 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 13 Jun 2008 13:27:52 +0000 Subject: [issue3079] sys.exit() called from optparse - bad, bad, bad In-Reply-To: <1213205007.57.0.132667292732.issue3079@psf.upfronthosting.co.za> Message-ID: <1213363672.51.0.133113191548.issue3079@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree with Antoine that the standard behavior is what you want in most simple command-line scripts. It's easy enough to replace the parser's exit function to just print the message, or raise an exception. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 15:37:14 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Jun 2008 13:37:14 +0000 Subject: [issue1407] [performance] Too many closed() checkings In-Reply-To: <1194553833.1.0.901439748582.issue1407@psf.upfronthosting.co.za> Message-ID: <1213364234.23.0.825756679117.issue1407@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I reproduce almost the same output. "function.closed" often come in pair, because TextIOWrapper.closed is a property which delegates to self.buffer.closed I think that the first check in TextIOWrapper.write() is not necessary: self.buffer.write(b) will also check for "self.buffer.closed", and there is not much code in-between. The only side-effect is the decoder state. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 15:39:16 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Jun 2008 13:39:16 +0000 Subject: [issue2065] trunk version does not compile with vs8 and vc6 In-Reply-To: <1202727039.47.0.783651728329.issue2065@psf.upfronthosting.co.za> Message-ID: <1213364356.39.0.991805862771.issue2065@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > Probably need to add _multiprocessing module, but not done yet. Yes, and I also forgot to "svn add" the new .vcproj in VS8.0 :-( _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 15:59:55 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Jun 2008 13:59:55 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213365595.54.0.524398143498.issue3098@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Do you really need to expose Py_UNICODE_SIZE? There is already sys.maxunicode, unless I'm missing something. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 16:09:10 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 13 Jun 2008 14:09:10 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213366149.6.0.446734366603.issue3098@psf.upfronthosting.co.za> Georg Brandl added the comment: It is true that sys.maxunicode reflects whether the build is using UCS-2 or UCS-4; however, the size of Py_UNICODE is not fixed by that, look at unicodeobject.h. (Though I don't think we have platforms that actually *do* use sizes other than 2 or 4, so we can of course be sloppy.) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 16:19:09 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 13 Jun 2008 14:19:09 +0000 Subject: [issue3081] Py_(X)SETREF macros In-Reply-To: <1213211633.2.0.340935924246.issue3081@psf.upfronthosting.co.za> Message-ID: <1213366749.34.0.398306454834.issue3081@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: A comment on the patch: Since object.h may be included from C++ extensions, you should not use a C++ keyword "new" as a variable name. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 16:20:13 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 13 Jun 2008 14:20:13 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1213366813.38.0.381920397946.issue2912@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Ok. I ran it through reindent.py and removed the True and False. Added file: http://bugs.python.org/file10619/platform3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 16:40:33 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 13 Jun 2008 14:40:33 +0000 Subject: [issue3099] On windows, "import nul" always succeed In-Reply-To: <1213319928.58.0.193615390811.issue3099@psf.upfronthosting.co.za> Message-ID: <1213368033.71.0.271312715828.issue3099@psf.upfronthosting.co.za> Georg Brandl added the comment: The title is misleading -- if what you show is correct then "import nul" doesn't succeed :) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 16:55:06 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Jun 2008 14:55:06 +0000 Subject: [issue3099] On windows, "import nul" always succeed In-Reply-To: <1213319928.58.0.193615390811.issue3099@psf.upfronthosting.co.za> Message-ID: <1213368906.61.0.695446442523.issue3099@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Sorry, I was not clear. With python 2.5.2, "import nul" correctly raises ImportError, even if the error message is slightly misleading. With a recent release25-maint (and all other branches), "import nul" does succeed, and creates an empty module. "import con" seems to block, it actually waits for the user to enter text and type ^Z. Then it prints to the console some bizarre text that looks like the content of a .pyc file: Python 2.5.3a0 (release25-maint, Jun 11 2008, 13:17:36) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import con ^Z a=1 b=2 c=3 ^Z ?? c ? @ s? d Z d? Z? d? S(? i? i? N(? t? bt? c( ( ( s? con.py ? s? ?? [27520 refs] >>> dir(con) ['__builtins__', '__doc__', '__file__', '__name__', 'b', 'c'] [27533 refs] _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 16:55:45 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 13 Jun 2008 14:55:45 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1213366813.38.0.381920397946.issue2912@psf.upfronthosting.co.za> Message-ID: <48528A6F.3040505@egenix.com> Marc-Andre Lemburg added the comment: On 2008-06-13 16:20, Benjamin Peterson wrote: > Benjamin Peterson added the comment: > > Ok. I ran it through reindent.py and removed the True and False. Thanks, but the all() is still there :-) You can change that to: ... or not filter(None, [system, node, release, version, machine]): should work on all Python versions. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 16:59:22 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 13 Jun 2008 14:59:22 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1213369162.78.0.903430787061.issue2912@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Wow, I really admire you for keeping it compatible with Python 1.5. As you may have noticed, I'm addicted to new feature. :) Added file: http://bugs.python.org/file10620/platform4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 17:05:59 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 13 Jun 2008 15:05:59 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1213369162.78.0.903430787061.issue2912@psf.upfronthosting.co.za> Message-ID: <48528CD3.9030106@egenix.com> Marc-Andre Lemburg added the comment: On 2008-06-13 16:59, Benjamin Peterson wrote: > Benjamin Peterson added the comment: > > Wow, I really admire you for keeping it compatible with Python 1.5. As > you may have noticed, I'm addicted to new feature. :) Yeah, well... it's a hobby :-) We can probably bump that to Python 2.1 or even 2.3 after 2.6 is out. The main reason for keeping 1.5.2 compatibility was mxCGIPython which started platform.py in the first place. Since it turned out to be useful for all kinds of things, it's good to be able to backport any changes to installations still using older Python versions. The patches look OK now. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jun 13 2008) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2008-07-07: EuroPython 2008, Vilnius, Lithuania 23 days to go :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 17:12:05 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 13 Jun 2008 15:12:05 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1213369925.55.0.943978214381.issue2912@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Ok. I applied the patch in r64233. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 17:14:48 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Jun 2008 15:14:48 +0000 Subject: [issue3099] On windows, "import nul" always succeed In-Reply-To: <1213319928.58.0.193615390811.issue3099@psf.upfronthosting.co.za> Message-ID: <1213370088.86.0.653556582348.issue3099@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I was wrong. It seems that an installed python works correctly, but a python running from its build directory has the problem. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 18:43:17 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Jun 2008 16:43:17 +0000 Subject: [issue3099] On windows, "import nul" always succeed In-Reply-To: <1213319928.58.0.193615390811.issue3099@psf.upfronthosting.co.za> Message-ID: <1213375397.41.0.208738075812.issue3099@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: OK, I think I got is now. The difference is between debug and release builds. Explanation: - in release build, "import nul" calls stat("nul.pyd") which succeeds. It then tries LoadLibrary("nul.pyd"), which fails with a DLL error. - in debug builds, "import nul" first tries stat("nul_d.pyd") which fails. It then tries stat("nul.py"), which succeeds to return an empty file! Whaaaa. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 18:46:57 2008 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 13 Jun 2008 16:46:57 +0000 Subject: [issue3079] sys.exit() called from optparse - bad, bad, bad In-Reply-To: <1213363672.51.0.133113191548.issue3079@psf.upfronthosting.co.za> Message-ID: <18514.42107.819452.960212@montanaro-dyndns-org.local> Skip Montanaro added the comment: Georg> I agree with Antoine that the standard behavior is what you want in most Georg> simple command-line scripts. Georg> It's easy enough to replace the parser's exit function to just print the Georg> message, or raise an exception. Check the code. Most of the time error is called without an exception having been raised. In one case it actually is called and swallows an exception that the code did raise. It would be preferable in my mind to always raise an exception. If you want, the default can be to catch them and ignore them as error() does now, but as it stands you can't raise anything more specific than OptParseError, and that's just a punt even though specific problems were detected by the code. Skip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 19:40:45 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 17:40:45 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213378845.25.0.957408396654.issue3100@psf.upfronthosting.co.za> Changes by Adam Olsen : ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 19:40:47 2008 From: report at bugs.python.org (Mark English) Date: Fri, 13 Jun 2008 17:40:47 +0000 Subject: [issue3105] Python 2.5.2 Windows Source Distribution missing Visual Studio 2005 ssl build files In-Reply-To: <1213378847.48.0.141429051265.issue3105@psf.upfronthosting.co.za> Message-ID: <1213378847.48.0.141429051265.issue3105@psf.upfronthosting.co.za> New submission from Mark English : *Problem* The directory structure of PCBuild8 differs from PCBuild in that each project has its own subdirectory. There is no subdirectory for _ssl, and the files that would belong in it are also omitted. *Solution* The attached files, based on those included with the Python 2.5.2 PCBuild release for windows in the svn Python25 maintenance trunk (http://svn.python.org/projects/python/branches/release25-maint/PCbuild/), should be placed in a new directory PCBuild8\_ssl. Once added to the parent solution file pcbuild.sln, the _ssl project will simply build if the normal instructions have been followed. *Changes* Since this is a change in location, both _ssl.mak and build_ssl.py have been altered to reflect the extra level of nesting. As a result, the #pragma comment(lib, "Python25") in pyconfig.h did not work. In order to add the appropriate directory to the LIB path in _ssl.mak, build_py.py now takes an additional (second) command line parameter derived from visual studio's $(PlatformName). This is used to define an variable PLATFORM_NAME passed to _ssl.mak which is used to deduce the directory containing python25.lib. The accompanying _ssl.vcproj has been migrated from the Visual Studio 2003 vcproj file in PCBuild, and passes the additional $(PlatformName) parameter. _ssl.mak has also been adjusted to output a .pdb file and keep the root _ssl directory clean, copying existing behaviour for all the other projects. This has resulted in some ugly usage of special path splitting NMAKE syntax (grep for %|fF.obj) which doesn't work with the @<< syntax. As a result the link stage has been split across several lines. Someone with a better knowledge of makefiles in general and NMAKE in particular can probably improve on this, but it does work, and is otherwise legible. Note that this sub-directory file structure is new in this release, and that the Python3k trunk seems to be reverting to the flat file structure. These additions are still helpful since they should just work out of the box, and allow people using the current recommended build of Python (2.5.2) to compile the ssl and hashlib modules. *Additional Details* Built on Windows XP SP2 with MSVS2005 SP1. Details appended to this message. Built against openssl-0.9.8h, which is later than the standard Python25 distribution. Note that the assembly file based build of openssl-0.9.8h, which is triggered by build_ssl.py, currently has a small bug. See http://www.mail-archive.com/openssl-dev at openssl.org/msg24059.html This is easily fixed by the following one line change to openssl-0.9.8h\crypto\perlasm\x86ms.pl "In this file, the line 273 containing "$extra" should be removed to be able to compile the generated assembly files." If an openssl build has been attempted prior to this step, delete all out32 and tmp32 directories under openssl-0.9.8h *Code and Patch* Attached is a zip file containing the altered files, and a patch generated using cygwin's diff run with the command line -uarN. The patch can be applied by: cd PCBuild8 mkdir _ssl cd _ssl patch -u -p1 < [wherever_the_patch_file_is_downloaded_to]\_ssl.patch *Tested* Compiles and imports fine with Release and Debug builds. Other builds (AMD, Itanium) untested. *Build Details* Compiled against openssl-0.9.8h Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP.050727-7600) Microsoft .NET Framework Version 2.0.50727 SP1 Installed Edition: Professional Microsoft Visual C++ 2005 77626-009-0000007-41042 Microsoft Visual C++ 2005 Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1 (KB926601) ---------- components: Build, Windows files: Python252-PCBuild8-_ssl.zip messages: 68172 nosy: MarkE severity: normal status: open title: Python 2.5.2 Windows Source Distribution missing Visual Studio 2005 ssl build files type: compile error versions: Python 2.5 Added file: http://bugs.python.org/file10621/Python252-PCBuild8-_ssl.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 20:32:25 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 18:32:25 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213381945.72.0.0851603980727.issue3100@psf.upfronthosting.co.za> Adam Olsen added the comment: Well, my attempt at a patch didn't work, and yours does, so I guess I have to support yours. ;) Can you review my python-incref-from-zero patch? It verifies the invariant that you need, that once an object hits a refcount of 0 it won't get raised again. (The possibility of __del__ makes me worry, but it *looks* okay.) gcmodule.c has an inline copy of handle_callbacks. Is it possible a collection could have the same problem we're fixing here? Minor nit: you're asserting cbcalled, but you're not using the generic callback, so it's meaningless. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 20:38:04 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Jun 2008 18:38:04 +0000 Subject: [issue3106] speedup some comparisons In-Reply-To: <1213382283.81.0.00112227094469.issue3106@psf.upfronthosting.co.za> Message-ID: <1213382283.81.0.00112227094469.issue3106@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This patch is an experiment in making faster some of the most common comparisons (str vs. str, int vs. int). I don't know if it may bring noticeable speedups in real-world situations, but here are the synthetic benchmark numbers (from pybench, "this" is the patched version and "other" is vanilla py3k): Test minimum run-time average run-time this other diff this other diff ------------------------------------------------------------------------------- CompareFloats: 182ms 173ms +5.4% 182ms 176ms +3.4% CompareFloatsIntegers: 238ms 232ms +2.3% 242ms 236ms +2.5% CompareIntegers: 237ms 277ms -14.4% 237ms 280ms -15.2% CompareInternedStrings: 163ms 257ms -36.7% 163ms 258ms -36.7% CompareLongs: 137ms 160ms -14.5% 137ms 162ms -15.6% CompareStrings: 149ms 170ms -12.1% 154ms 170ms -9.5% ------------------------------------------------------------------------------- Totals: 1105ms 1268ms -12.9% 1115ms 1281ms -13.0% ---------- components: Interpreter Core files: cpms.patch keywords: patch messages: 68174 nosy: pitrou severity: normal status: open title: speedup some comparisons type: performance versions: Python 3.0 Added file: http://bugs.python.org/file10622/cpms.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 20:38:31 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 13 Jun 2008 18:38:31 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213382311.27.0.585855768773.issue3100@psf.upfronthosting.co.za> Adam Olsen added the comment: Ahh, it seems gcmodule already considers the weakref to be reachable when it calls the callbacks, so it shouldn't be a problem. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 21:11:35 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Fri, 13 Jun 2008 19:11:35 +0000 Subject: [issue3048] getsizeof incorrect for Unicode strings In-Reply-To: <1212738433.49.0.637321178838.issue3048@psf.upfronthosting.co.za> Message-ID: <1213384295.28.0.380402667999.issue3048@psf.upfronthosting.co.za> Robert Schuppenies added the comment: Fixed in r64066. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 21:41:28 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Fri, 13 Jun 2008 19:41:28 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213386088.05.0.788488717698.issue3098@psf.upfronthosting.co.za> Changes by Robert Schuppenies : ---------- keywords: +patch Added file: http://bugs.python.org/file10623/maxunicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 21:42:06 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Fri, 13 Jun 2008 19:42:06 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213386126.17.0.363909754483.issue3098@psf.upfronthosting.co.za> Robert Schuppenies added the comment: sys.maxunicode is well defined to be either 0xFFFF for UCS-2 or 0x10FFFF for UCS-4 (see PyUnicode_GetMax). Py_UNICODE_SIZE is set in pyconfig.h to be either 2 or 4 during configuration. When >= 4, Py_UNICODE_WIDE is set which again influences sys.maxunicode. Thus, it currently is possible to derive Py_UNICODE_SIZE from sys.maxunicode. But it takes some indirections. So here are 2 possible patches, one which exposes Py_UNICODE_SIZE via _testcapi and one which assumes that sys.maxunicode reflects UCS-X settings. Since I am a fairly new Python developer and the new 4-eyes-per-commit policy for the beta phase, please decide which patch should be applied. Added file: http://bugs.python.org/file10624/Py_UNICODE.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 21:50:41 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 13 Jun 2008 19:50:41 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213386641.78.0.309074298637.issue3098@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Personally, I prefer the one with _testcapi.Py_UNICODE_SIZE because it is safe against future changes, but wait for someone else's opinion. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 21:51:42 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 13 Jun 2008 19:51:42 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213386702.14.0.033840851849.issue3098@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: It's actually very easy: Py_UNICODE is a 2-byte value for UCS-2 builds and 4 byte value for UCS-4 builds of Python. print ((sys.maxunicode < 66000) and 'UCS2' or 'UCS4') tells you which one you have. Note that you should *not* use the exact value of 0x10FFFF for UCS-4 - it's possible that the Unicode consortium decides to add more planes to the Universal Character Set... (though not likely). The above comparison is good enough to detect the number of bytes in a single code point, though. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 21:54:54 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 13 Jun 2008 19:54:54 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213386894.12.0.553810252503.issue3098@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: BTW: Here's another trick you can use: print 'sizeof(Py_UNICODE) =', len(u'\0'.encode('unicode-internal')) (for Py2.x) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 21:56:47 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Jun 2008 19:56:47 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213387007.78.0.997183118146.issue3098@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hmm, so it seems that in some UCS4 builds, sizeof(Py_UNICODE) could end up being more than 4 if the native int type is itself larger than 32 bits; although the latter is probably quite rare (64-bit platforms are usually either LP64 or LLP64). However, Py_UNICODE.patch is wrong in that it uses Py_UNICODE_SIZE rather than sizeof(Py_UNICODE). Py_UNICODE_SIZE itself is always either 2 or 4. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 22:18:24 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 13 Jun 2008 20:18:24 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213387007.78.0.997183118146.issue3098@psf.upfronthosting.co.za> Message-ID: <4852D60A.40504@egenix.com> Marc-Andre Lemburg added the comment: On 2008-06-13 21:56, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > > Hmm, so it seems that in some UCS4 builds, sizeof(Py_UNICODE) could end > up being more than 4 if the native int type is itself larger than 32 > bits; although the latter is probably quite rare (64-bit platforms are > usually either LP64 or LLP64). AFAIK, only Crays have this problem, but apart from that: I'd consider it a bug if sizeof(Py_UCS4) != 4. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 22:32:42 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Jun 2008 20:32:42 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <4852D60A.40504@egenix.com> Message-ID: <1213389159.5912.13.camel@fsol> Antoine Pitrou added the comment: Le vendredi 13 juin 2008 ? 20:18 +0000, Marc-Andre Lemburg a ?crit : > AFAIK, only Crays have this problem, but apart from that: I'd consider > it a bug if sizeof(Py_UCS4) != 4. Perhaps a #error can be added to that effect? Something like (untested): #if SIZEOF_INT == 4 typedef unsigned int Py_UCS4; #elif SIZEOF_LONG == 4 typedef unsigned long Py_UCS4; #else #error Could not find a 4-byte integer type for Py_UCS4, aborting #endif (of course we could also try harder to find an appropriate type, but I'm no specialist in C integer variations) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 23:01:08 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Fri, 13 Jun 2008 21:01:08 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213390868.57.0.918384345458.issue3098@psf.upfronthosting.co.za> Robert Schuppenies added the comment: I think you're right that sizeof(Py_UNICODE) is the correct value to use. But could you please explain to me how PY_UNICODE_TYPE is set, I cannot find it. Also, len(u'\0'.encode('unicode-internal')) does not work for Py3.0. Any suggestion how could this information can be retrieved in py3k? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 23:21:39 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 13 Jun 2008 21:21:39 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213392099.02.0.926215884573.issue3098@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I believe Py_UNICODE_TYPE is set be configure in pyconfig.h. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 13 23:59:39 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Fri, 13 Jun 2008 21:59:39 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213394379.62.0.613600272809.issue3098@psf.upfronthosting.co.za> Robert Schuppenies added the comment: Found it, thanks. Wrong use of grep :| _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 00:02:01 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 13 Jun 2008 22:02:01 +0000 Subject: [issue839496] SimpleHTTPServer reports wrong content-length for text files Message-ID: <1213394521.74.0.348532287197.issue839496@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: accepted -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 00:21:32 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Jun 2008 22:21:32 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213395692.08.0.395506931002.issue3100@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : Removed file: http://bugs.python.org/file10616/weakref_cycle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 00:27:25 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 13 Jun 2008 22:27:25 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213396045.22.0.927114926268.issue3100@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > you're asserting cbcalled, but you're not using the generic callback, > so it's meaningless. The new patch corrects this Added file: http://bugs.python.org/file10625/weakref_cycle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 00:59:29 2008 From: report at bugs.python.org (Tony Wallace) Date: Fri, 13 Jun 2008 22:59:29 +0000 Subject: [issue3107] memory leak in make test (in "test list"), 2.5.2 not 2.5.1, Linux 64bit In-Reply-To: <1213397967.45.0.45678659954.issue3107@psf.upfronthosting.co.za> Message-ID: <1213397967.45.0.45678659954.issue3107@psf.upfronthosting.co.za> New submission from Tony Wallace : [tony at gossamer Python-2.5.1]$ ./configure --prefix=/home/tony/root/usr/local/python-2.5.2 --enable-shared --enable-static [tony at gossamer bin]$ file python python: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), not stripped [tony at gossamer bin]$ uname -a Linux gossamer.ambric.local 2.4.21-40.ELsmp #1 SMP Wed Mar 15 13:46:01 EST 2006 x86_64 x86_64 x86_64 GNU/Linux [tony at gossamer bin]$ cat /etc/redhat-release CentOS release 3.6 (Final) ---------- components: Demos and Tools messages: 68188 nosy: hushp1pt severity: normal status: open title: memory leak in make test (in "test list"), 2.5.2 not 2.5.1, Linux 64bit type: resource usage versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 01:02:34 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Jun 2008 23:02:34 +0000 Subject: [issue3108] Implicit exception chaining (PEP 3134) In-Reply-To: <1213398154.56.0.602313713782.issue3108@psf.upfronthosting.co.za> Message-ID: <1213398154.56.0.602313713782.issue3108@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This patch implements implicit except chaining (__context__) as per PEP 3134, or not quite. The difference is that PyErr_Set* functions do set the __context__ attribute, otherwise I think it would make an annoying discrepancy between exceptions generated by Python modules and exceptions generated by C modules (especially when some parts are written in C and others in Python, e.g. the io library). Unimplemented are the modifications in exception reporting. ---------- components: Interpreter Core files: context.patch keywords: patch messages: 68189 nosy: pitrou severity: normal status: open title: Implicit exception chaining (PEP 3134) type: behavior versions: Python 3.0 Added file: http://bugs.python.org/file10626/context.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 01:46:04 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Jun 2008 23:46:04 +0000 Subject: [issue2632] performance problem in socket._fileobject.read In-Reply-To: <1208197816.87.0.564994342754.issue2632@psf.upfronthosting.co.za> Message-ID: <1213400764.34.0.452329173511.issue2632@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If it's fixed in 2.6 and 3.0, it shouldn't be release blocker anymore, now should it? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 01:46:55 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 13 Jun 2008 23:46:55 +0000 Subject: [issue2632] performance problem in socket._fileobject.read In-Reply-To: <1208197816.87.0.564994342754.issue2632@psf.upfronthosting.co.za> Message-ID: <1213400815.68.0.0354390165089.issue2632@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Well, it's a release blocker for 2.5.3. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 02:05:14 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Jun 2008 00:05:14 +0000 Subject: [issue3108] Implicit exception chaining (PEP 3134) In-Reply-To: <1213398154.56.0.602313713782.issue3108@psf.upfronthosting.co.za> Message-ID: <1213401914.2.0.28544197858.issue3108@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Guido, thanks for your comments. Here is a new patch addressing them. Added file: http://bugs.python.org/file10627/context2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 02:14:13 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Jun 2008 00:14:13 +0000 Subject: [issue3107] memory leak in make test (in "test list"), 2.5.2 not 2.5.1, Linux 64bit In-Reply-To: <1213397967.45.0.45678659954.issue3107@psf.upfronthosting.co.za> Message-ID: <1213402453.22.0.069688762452.issue3107@psf.upfronthosting.co.za> Martin v. L?wis added the comment: How do you know that there is a memory leak? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 02:07:55 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Jun 2008 00:07:55 +0000 Subject: [issue3109] test_multiprocessing seems fragile In-Reply-To: <1213402075.28.0.267049888199.issue3109@psf.upfronthosting.co.za> Message-ID: <1213402075.28.0.267049888199.issue3109@psf.upfronthosting.co.za> New submission from Antoine Pitrou : I had the following intermittent failure under py3k: [...] test_multiprocessing Process Process-24: Traceback (most recent call last): File "/home/antoine/py3k/context/Lib/multiprocessing/process.py", line 237, in _bootstrap self.run() File "/home/antoine/py3k/context/Lib/multiprocessing/process.py", line 93, in run self._target(*self._args, **self._kwargs) File "/home/antoine/py3k/context/Lib/test/test_multiprocessing.py", line 1390, in _remote client.connect(address) socket.error: [Errno 111] Connection refused ---------- components: Library (Lib), Tests messages: 68194 nosy: pitrou severity: normal status: open title: test_multiprocessing seems fragile versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 03:26:57 2008 From: report at bugs.python.org (Adam Olsen) Date: Sat, 14 Jun 2008 01:26:57 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213406817.49.0.192048772421.issue3100@psf.upfronthosting.co.za> Adam Olsen added the comment: Another minor nit: "if(current->ob_refcnt > 0)" should have a space after the "if". Otherwise it's looking good. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 03:31:19 2008 From: report at bugs.python.org (GreaseMonkey) Date: Sat, 14 Jun 2008 01:31:19 +0000 Subject: [issue3104] overzealous garbage collector (dict) In-Reply-To: <1213349018.67.0.856453652888.issue3104@psf.upfronthosting.co.za> Message-ID: <1213407079.59.0.822755240244.issue3104@psf.upfronthosting.co.za> GreaseMonkey added the comment: I mean that it actually *drops* values, not *overwrites* them. I have attached the script which demonstrates this quirk in the garbage collector (it also doubles as a library). The original text file was an IRC log. Shoving Charles Dickens' "Great Expectations" 17 times in a text file and then parsing it doesn't show this problem for some weird reason. I have python 2.5.1. Added file: http://bugs.python.org/file10628/markov.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 03:39:56 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Jun 2008 01:39:56 +0000 Subject: [issue3109] test_multiprocessing seems fragile In-Reply-To: <1213402075.28.0.267049888199.issue3109@psf.upfronthosting.co.za> Message-ID: <1213407596.31.0.958940613373.issue3109@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 03:40:00 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Jun 2008 01:40:00 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213407600.69.0.0838895318409.issue3100@psf.upfronthosting.co.za> Changes by Benjamin Peterson : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 08:43:17 2008 From: report at bugs.python.org (Ismail Donmez) Date: Sat, 14 Jun 2008 06:43:17 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213425797.64.0.0868143740425.issue3088@psf.upfronthosting.co.za> Ismail Donmez added the comment: Seems to work fine for me now with latest py3k branch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 09:00:06 2008 From: report at bugs.python.org (Adam Olsen) Date: Sat, 14 Jun 2008 07:00:06 +0000 Subject: [issue2320] Race condition in subprocess using stdin In-Reply-To: <1205760712.39.0.906940637593.issue2320@psf.upfronthosting.co.za> Message-ID: <1213426806.03.0.13747025133.issue2320@psf.upfronthosting.co.za> Adam Olsen added the comment: This is messy. File descriptors from other threads are leaking into child processes, and if the write end of a pipe never gets closed in all of them the read end won't get EOF. I suspect "cat"'s stdin is getting duplicated like that, but I haven't been able to verify - /proc//fd claims fd 0 is /dev/pts/2. Maybe libc does some remapping. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 09:01:34 2008 From: report at bugs.python.org (Tony Wallace) Date: Sat, 14 Jun 2008 07:01:34 +0000 Subject: [issue3107] memory leak in make test (in "test list"), 2.5.2 not 2.5.1, Linux 64bit In-Reply-To: <1213397967.45.0.45678659954.issue3107@psf.upfronthosting.co.za> Message-ID: <1213426894.48.0.957304805586.issue3107@psf.upfronthosting.co.za> Tony Wallace added the comment: > how do you know Here is the story, sorry I skipped it before- I was at work then. I was doing the basic build-from-source on RHEL (Centos) Linux, because I don't have root and I need to install it in $HOME/something. I don't try to change anything except the install location. See the ./configure command given before. I tried 2.5.2 because it was the latest + greatest. When I ran "make test", it ran OK until it got to "test_list". Then it got stuck until I killed it. Its very repeatable. In another window, "top" shows the python process's memory growing and growing, until it owns basically all available memory (8GB) after less than a minute or so. Then I tried python 2.5.1, built exactly the same way, and make test works OK- test_list completes in seconds. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 09:08:00 2008 From: report at bugs.python.org (Paul Melis) Date: Sat, 14 Jun 2008 07:08:00 +0000 Subject: [issue3104] overzealous garbage collector (dict) In-Reply-To: <1213349018.67.0.856453652888.issue3104@psf.upfronthosting.co.za> Message-ID: <1213427280.16.0.697134355522.issue3104@psf.upfronthosting.co.za> Paul Melis added the comment: The script is still not a test case, as it doesn't *demonstrate* the problem when run. You need to provide more information for this to be reproducable by others. - what exact input did you use? (e.g. include the IRC log file on which you claim a bug is exposed) - what output/behaviour did you expect for the given input? - how was the actual output/behaviour different from what was expected? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 09:31:13 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Jun 2008 07:31:13 +0000 Subject: [issue3107] memory leak in make test (in "test list"), 2.5.2 not 2.5.1, Linux 64bit In-Reply-To: <1213397967.45.0.45678659954.issue3107@psf.upfronthosting.co.za> Message-ID: <1213428672.92.0.155690271428.issue3107@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Are you by any chance using gcc 4.3? That compiler is known to miscompile Python, see issue3019 or issue2626. Also, I'm puzzled that your prompt says Python-2.5.1 when configuring with a prefix suggesting 2.5.2. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 10:15:56 2008 From: report at bugs.python.org (Tony Wallace) Date: Sat, 14 Jun 2008 08:15:56 +0000 Subject: [issue3107] memory leak in make test (in "test list"), 2.5.2 not 2.5.1, Linux 64bit In-Reply-To: <1213397967.45.0.45678659954.issue3107@psf.upfronthosting.co.za> Message-ID: <1213431356.72.0.616011643558.issue3107@psf.upfronthosting.co.za> Tony Wallace added the comment: > are you using gcc 4.3 No, I don't think so. [tony at gossamer tony]$ gcc --version gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-53) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. And make is definitely using gcc, not something else. > prompt 2.5.1 Good eye. I grabbed the file-python info from python 2.5.1 after I installed it (because 2.5.1 passed make test, I am planning to use that). Its true, I should have got that from the python 2.5.2, which I never did install- but unfortunately, it was deleted too soon. If it is important I can rebuild 2.5.2 again. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 10:19:28 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Jun 2008 08:19:28 +0000 Subject: [issue3107] memory leak in make test (in "test list"), 2.5.2 not 2.5.1, Linux 64bit In-Reply-To: <1213397967.45.0.45678659954.issue3107@psf.upfronthosting.co.za> Message-ID: <1213431568.21.0.377110292752.issue3107@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Are you willing to debug this? Otherwise, I'll have to close this as "works-for-me" (which it does, as it did for many other people). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 10:40:33 2008 From: report at bugs.python.org (Tony Wallace) Date: Sat, 14 Jun 2008 08:40:33 +0000 Subject: [issue3107] memory leak in make test (in "test list"), 2.5.2 not 2.5.1, Linux 64bit In-Reply-To: <1213397967.45.0.45678659954.issue3107@psf.upfronthosting.co.za> Message-ID: <1213432833.71.0.63563358105.issue3107@psf.upfronthosting.co.za> Tony Wallace added the comment: > are you willing Yes, so long as I don't need root, I can follow instructions OK. By the way, the same thing (memory leak 2.5.2) occurred on Centos 4.6, a different Linux box. Lets proceed on that Centos 4.6 box. Here are the particulars: Python-2.5.2]$ file python python: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), not stripped [tony at hathi Python-2.5.2]$ gcc --version gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-9) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [tony at hathi Python-2.5.2]$ cat /etc/redhat-release[tony at hathi CentOS release 4.6 (Final) [tony at hathi Python-2.5.2]$ uname -a Linux hathi.ambric.local 2.6.9-67.0.15.ELsmp #1 SMP Thu May 8 10:50:20 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux (after make test) test_largefile test_linuxaudiodev test_linuxaudiodev skipped -- Use of the `audio' resource not enabled test_list (stalls here so I dumped it) make: *** [test] Quit (another window, just before I dumped it) top - 01:36:31 up 4 days, 15:07, 5 users, load average: 2.70, 0.84, 0.32 Tasks: 87 total, 1 running, 86 sleeping, 0 stopped, 0 zombie Cpu(s): 3.8% us, 9.7% sy, 0.0% ni, 0.0% id, 86.0% wa, 0.0% hi, 0.5% si Mem: 15639112k total, 15610836k used, 28276k free, 280k buffers Swap: 24579440k total, 1533172k used, 23046268k free, 57676k cached PID USER PR NI %CPU TIME+ %MEM VIRT RES SHR S COMMAND 17190 tony 24 0 17 1:05.49 90.9 32.2g 13g 7200 D python 69 root 16 0 6 0:12.97 0.0 0 0 0 D kswapd0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 10:46:45 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Jun 2008 08:46:45 +0000 Subject: [issue3107] memory leak in make test (in "test list"), 2.5.2 not 2.5.1, Linux 64bit In-Reply-To: <1213397967.45.0.45678659954.issue3107@psf.upfronthosting.co.za> Message-ID: <1213433205.53.0.506431022009.issue3107@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Run "python Lib/test/test_lists.py" separately, and find out which specific test fails (to complete). Report that, and also try to separate that test's code into its own file, and see whether you can reproduce it there. If so, try to further strip it down as much as you can. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 16:37:23 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Jun 2008 14:37:23 +0000 Subject: [issue3104] overzealous garbage collector (dict) In-Reply-To: <1213349018.67.0.856453652888.issue3104@psf.upfronthosting.co.za> Message-ID: <1213454242.95.0.0972172178439.issue3104@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The original text file was an IRC log. Shoving Charles Dickens' "Great > Expectations" 17 times in a text file and then parsing it doesn't show > this problem for some weird reason. I'd say the "weird reason" is probably a bug in your script. For example the following appears very dubious: for o in self.wlist: if len(o) > 0xFF: o = o[:0xFF] fp.write(chr(len(o))) fp.write(o) for s in self.wlist[o]: In any case, the idea that one of Python's built-in containers would silently *drop* values (rather than segfault or produce a MemoryError) is in itself quite unbelievable, due to the way those containers funciton. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 17:28:53 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Jun 2008 15:28:53 +0000 Subject: [issue2650] re.escape should not escape underscore In-Reply-To: <1208441650.53.0.945063086485.issue2650@psf.upfronthosting.co.za> Message-ID: <1213457333.64.0.962794273447.issue2650@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Talking about performance, why use a loop to escape special characters when you could use a regular expression to escape them all at once? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 19:35:43 2008 From: report at bugs.python.org (roudkerk) Date: Sat, 14 Jun 2008 17:35:43 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213464943.67.0.956735676963.issue3088@psf.upfronthosting.co.za> roudkerk added the comment: I suspect the problems with WithManagerTestCondition.notify_all() may have to do with the thread safety of the proxies. If you replace Thread(...) by self.Process(...) in that test then the problem may go away. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 20:14:05 2008 From: report at bugs.python.org (Adam Olsen) Date: Sat, 14 Jun 2008 18:14:05 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213467245.65.0.628732101259.issue3088@psf.upfronthosting.co.za> Changes by Adam Olsen : ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 21:26:29 2008 From: report at bugs.python.org (Jesse Noller) Date: Sat, 14 Jun 2008 19:26:29 +0000 Subject: [issue3109] test_multiprocessing seems fragile In-Reply-To: <1213402075.28.0.267049888199.issue3109@psf.upfronthosting.co.za> Message-ID: <1213471589.44.0.897730941491.issue3109@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- nosy: +roudkerk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 21:26:45 2008 From: report at bugs.python.org (Jesse Noller) Date: Sat, 14 Jun 2008 19:26:45 +0000 Subject: [issue3109] test_multiprocessing seems fragile In-Reply-To: <1213402075.28.0.267049888199.issue3109@psf.upfronthosting.co.za> Message-ID: <1213471605.3.0.837361288273.issue3109@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: -> jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 21:30:27 2008 From: report at bugs.python.org (Jesse Noller) Date: Sat, 14 Jun 2008 19:30:27 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213471827.31.0.841093193709.issue3100@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- nosy: +roudkerk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 21:36:18 2008 From: report at bugs.python.org (Jesse Noller) Date: Sat, 14 Jun 2008 19:36:18 +0000 Subject: [issue3110] Multiprocessing package build problem on Solaris 10 In-Reply-To: <1213472177.07.0.795399068376.issue3110@psf.upfronthosting.co.za> Message-ID: <1213472177.07.0.795399068376.issue3110@psf.upfronthosting.co.za> New submission from Jesse Noller : Per skip's email: FWIW, it appears that Solaris doesn't define SEM_VALUE_MAX but does define _SEM_VALUE_MAX in sys/params.h. .../Modules/_multiprocessing/multiprocessing.c: In function 'init_multiprocessing': .../Modules/_multiprocessing/multiprocessing.c:253: error: 'SEM_VALUE_MAX' undeclared (first use in this function) .../Modules/_multiprocessing/multiprocessing.c:253: error: (Each undeclared identifier is reported only once .../Modules/_multiprocessing/multiprocessing.c:253: error: for each function it appears in.) On Windows the author simple #defines SEM_VALUE_MAX to be LONG_MAX. I used a little cpp action to define it: #ifndef SEM_VALUE_MAX # ifdef _SEM_VALUE_MAX # define SEM_VALUE_MAX _SEM_VALUE_MAX # else # define SEM_VALUE_MAX INT_MAX # endif #endif ---------- components: Extension Modules messages: 68210 nosy: jnoller, roudkerk, skip.montanaro severity: normal status: open title: Multiprocessing package build problem on Solaris 10 type: compile error versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 21:46:48 2008 From: report at bugs.python.org (Jesse Noller) Date: Sat, 14 Jun 2008 19:46:48 +0000 Subject: [issue3111] multiprocessing pkg Debian compilation error In-Reply-To: <1213472808.51.0.731079646072.issue3111@psf.upfronthosting.co.za> Message-ID: <1213472808.51.0.731079646072.issue3111@psf.upfronthosting.co.za> New submission from Jesse Noller : Both debian ia64 and PPC are failing the mp test suite with the following error: Re-running test 'test_multiprocessing' in verbose mode test test_multiprocessing crashed -- : [Errno 38] Function not implemented Traceback (most recent call last): File "./Lib/test/regrtest.py", line 554, in runtest_inner indirect_test() File "/home/pybot/buildarea/trunk.klose-debian- ppc/build/Lib/test/test_multiprocessing.py", line 1764, in test_main ProcessesMixin.pool = multiprocessing.Pool(4) File "/home/pybot/buildarea/trunk.klose-debian- ppc/build/Lib/multiprocessing/__init__.py", line 226, in Pool return Pool(processes, initializer, initargs) File "/home/pybot/buildarea/trunk.klose-debian- ppc/build/Lib/multiprocessing/pool.py", line 84, in __init__ self._setup_queues() File "/home/pybot/buildarea/trunk.klose-debian- ppc/build/Lib/multiprocessing/pool.py", line 131, in _setup_queues self._inqueue = SimpleQueue() File "/home/pybot/buildarea/trunk.klose-debian- ppc/build/Lib/multiprocessing/queues.py", line 315, in __init__ self._rlock = Lock() File "/home/pybot/buildarea/trunk.klose-debian- ppc/build/Lib/multiprocessing/synchronize.py", line 106, in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1) File "/home/pybot/buildarea/trunk.klose-debian- ppc/build/Lib/multiprocessing/synchronize.py", line 38, in __init__ sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue) OSError: [Errno 38] Function not implemented [674193 refs] make: *** [buildbottest] Error 1 program finished with exit code 2 Buildbots: http://www.python.org/dev/buildbot/stable/ppc%20Debian%20unstable%20trun k/builds/1607/step-test/0 http://www.python.org/dev/buildbot/stable/ia64%20Ubuntu%20trunk/builds/1 89/step-test/0 ---------- components: Extension Modules messages: 68211 nosy: jnoller, roudkerk severity: normal status: open title: multiprocessing pkg Debian compilation error versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 21:48:15 2008 From: report at bugs.python.org (Jesse Noller) Date: Sat, 14 Jun 2008 19:48:15 +0000 Subject: [issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error In-Reply-To: <1213472808.51.0.731079646072.issue3111@psf.upfronthosting.co.za> Message-ID: <1213472895.15.0.292925232453.issue3111@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- title: multiprocessing pkg Debian compilation error -> multiprocessing ppc Debian/ ia64 Ubuntu compilation error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 21:48:39 2008 From: report at bugs.python.org (Jesse Noller) Date: Sat, 14 Jun 2008 19:48:39 +0000 Subject: [issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error In-Reply-To: <1213472808.51.0.731079646072.issue3111@psf.upfronthosting.co.za> Message-ID: <1213472919.94.0.0397959473675.issue3111@psf.upfronthosting.co.za> Jesse Noller added the comment: Sorry, should have been debian PPC and ubuntu ia64 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 22:21:28 2008 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 14 Jun 2008 20:21:28 +0000 Subject: [issue3108] Implicit exception chaining (PEP 3134) In-Reply-To: <1213398154.56.0.602313713782.issue3108@psf.upfronthosting.co.za> Message-ID: <1213474888.63.0.677821005561.issue3108@psf.upfronthosting.co.za> Guido van Rossum added the comment: Submitted as r64281. We still need a doc patch and changes to the exception printing (perhaps also to traceback.py). Please open new issues for those. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 22:30:46 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Jun 2008 20:30:46 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1213475446.58.0.529901834278.issue3112@psf.upfronthosting.co.za> Message-ID: <1213475446.58.0.529901834278.issue3112@psf.upfronthosting.co.za> New submission from Benjamin Peterson : Traceback reporting needs to be altered to support exception chaining as per PEP 3134. ---------- components: Interpreter Core messages: 68214 nosy: benjamin.peterson priority: critical severity: normal status: open title: implement PEP 3134 exception reporting type: feature request versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 22:31:53 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Jun 2008 20:31:53 +0000 Subject: [issue3113] Document exception chaining In-Reply-To: <1213475513.28.0.247169838861.issue3113@psf.upfronthosting.co.za> Message-ID: <1213475513.28.0.247169838861.issue3113@psf.upfronthosting.co.za> New submission from Benjamin Peterson : PEP 3134's features need to be documented. ---------- assignee: georg.brandl components: Documentation messages: 68215 nosy: benjamin.peterson, georg.brandl priority: high severity: normal status: open title: Document exception chaining versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 22:32:06 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Jun 2008 20:32:06 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1213475446.58.0.529901834278.issue3112@psf.upfronthosting.co.za> Message-ID: <1213475526.63.0.63892117275.issue3112@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- versions: +Python 3.0 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 22:33:16 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Jun 2008 20:33:16 +0000 Subject: [issue3108] Implicit exception chaining (PEP 3134) In-Reply-To: <1213398154.56.0.602313713782.issue3108@psf.upfronthosting.co.za> Message-ID: <1213475596.7.0.142712705195.issue3108@psf.upfronthosting.co.za> Benjamin Peterson added the comment: See #3112 and #3113. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 22:39:11 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Jun 2008 20:39:11 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1213475446.58.0.529901834278.issue3112@psf.upfronthosting.co.za> Message-ID: <1213475951.42.0.220427850031.issue3112@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 22:39:31 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Jun 2008 20:39:31 +0000 Subject: [issue3113] Document exception chaining In-Reply-To: <1213475513.28.0.247169838861.issue3113@psf.upfronthosting.co.za> Message-ID: <1213475971.11.0.415745134625.issue3113@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 22:47:02 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Jun 2008 20:47:02 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1213475446.58.0.529901834278.issue3112@psf.upfronthosting.co.za> Message-ID: <1213476422.15.0.871996706322.issue3112@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thinking about this, I realized that an exception can become its own context if it is explicitly re-raised in its except handler (with "raise variable", not bare "raise"). Not a critical bug, but it should be fixed in order to avoid delayed garbage collection of such exceptions. (as for the exception reporting code, it will have to detect recursivity) >>> try: 1/0 ... except Exception as e: raise e ... Traceback (most recent call last): File "", line 2, in File "", line 1, in ZeroDivisionError: int division or modulo by zero >>> e = sys.last_value >>> e.__context__ ZeroDivisionError('int division or modulo by zero',) >>> e.__context__ is e True _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 22:55:14 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Jun 2008 20:55:14 +0000 Subject: [issue3114] bus error on lib2to3 In-Reply-To: <1213476914.28.0.330233447903.issue3114@psf.upfronthosting.co.za> Message-ID: <1213476914.28.0.330233447903.issue3114@psf.upfronthosting.co.za> New submission from Benjamin Peterson : I was just merging 2to3 work (and you'll have to do svnmerge.py merge in Lib/lib2to3 for this to work) into py3k and was running the tests when this rather alarming thing happended: $ ./python.exe Lib/test/regrtest.py test_lib2to3 ... test test_lib2to3 crashed -- : local variable 'result' referenced before assignment Traceback (most recent call last): File "Lib/test/regrtest.py", line 601, in runtest_inner Bus error Thinking this had something to do with r64281, I reverted it and got: test test_lib2to3 crashed -- : local variable 'result' referenced before assignment Fatal Python error: GC object already tracked Abort trap This probably isn't a lib2to3 problem, but that's how I got it. ---------- components: Interpreter Core messages: 68218 nosy: benjamin.peterson priority: release blocker severity: normal status: open title: bus error on lib2to3 type: crash versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 23:12:16 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Jun 2008 21:12:16 +0000 Subject: [issue3109] test_multiprocessing seems fragile In-Reply-To: <1213402075.28.0.267049888199.issue3109@psf.upfronthosting.co.za> Message-ID: <1213477935.98.0.636966161524.issue3109@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Apparently the error can happen in test_pickling: test_pickling (__main__.WithProcessesTestPicklingConnections) ... Process Process-24: Traceback (most recent call last): File "/home/antoine/py3k/traceback/Lib/multiprocessing/process.py", line 237, in _bootstrap self.run() File "/home/antoine/py3k/traceback/Lib/multiprocessing/process.py", line 93, in run self._target(*self._args, **self._kwargs) File "Lib/test/test_multiprocessing.py", line 1390, in _remote client.connect(address) socket.error: [Errno 111] Connection refused _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 23:15:30 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Jun 2008 21:15:30 +0000 Subject: [issue3109] test_multiprocessing seems fragile In-Reply-To: <1213402075.28.0.267049888199.issue3109@psf.upfronthosting.co.za> Message-ID: <1213478130.53.0.168228529228.issue3109@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Oh, in another regrtest run, test_multiprocessing just hanged without eating any CPU, this is what it printed after I pressed Ctrl-C: test_multiprocessing Process PoolWorker-5:4: Traceback (most recent call last): File "/home/antoine/py3k/traceback/Lib/multiprocessing/process.py", line 237, in _bootstrap Process PoolWorker-5:3: Traceback (most recent call last): File "/home/antoine/py3k/traceback/Lib/multiprocessing/process.py", line 237, in _bootstrap Process PoolWorker-5:2: Traceback (most recent call last): File "/home/antoine/py3k/traceback/Lib/multiprocessing/process.py", line 237, in _bootstrap Process PoolWorker-5:1: Traceback (most recent call last): File "/home/antoine/py3k/traceback/Lib/multiprocessing/process.py", line 237, in _bootstrap _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 23:27:38 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Jun 2008 21:27:38 +0000 Subject: [issue3114] bus error on lib2to3 In-Reply-To: <1213476914.28.0.330233447903.issue3114@psf.upfronthosting.co.za> Message-ID: <1213478858.49.0.141990843431.issue3114@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I have determined that this was caused by r64121. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 14 23:52:29 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Jun 2008 21:52:29 +0000 Subject: [issue3114] bus error on lib2to3 In-Reply-To: <1213476914.28.0.330233447903.issue3114@psf.upfronthosting.co.za> Message-ID: <1213480349.06.0.800218596486.issue3114@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I should mention the Bus error happens at test_future_builtins (lib2to3.tests.test_fixers.Test_filter). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 00:42:59 2008 From: report at bugs.python.org (philipspencer) Date: Sat, 14 Jun 2008 22:42:59 +0000 Subject: [issue3115] os.listdir randomly fails on occasions when it shouldn't In-Reply-To: <1213483378.87.0.0889155831871.issue3115@psf.upfronthosting.co.za> Message-ID: <1213483378.87.0.0889155831871.issue3115@psf.upfronthosting.co.za> New submission from philipspencer : Python's os.listdir function has the following code in Modules/posixmodule.c: errno = 0 ... for (;;) { Py_BEGIN_ALLOW_THREADS ep = readdir(dirp); Py_END_ALLOW_THREADS if (ep == NULL) break; ... a bunch of other stuff, including PyString_FromStringAndSize which calls malloc ... } if (errno != 0 && d != NULL) { The assumption is that errno will be nonzero only if readdir failed. However, this is not the case. GLibc's malloc will, in some rare cases, set errno even when it succeeds. So, during one pass through the loop errno gets set to ENOMEM and then it is still set to ENOMEM when the final readdir returns null at the end of the directory listing. The fix is to move the line "errno = 0" from outside the loop to right before the readdir inside the loop. That is the only way to ensure that, when the loop is exited with readdir returning null, the condition "errno != 0" is equivalent to "readdir actually failed." The attached patch does this. Without this patch, we experience frequent failures with the python tools "creatrepo" and "repomanage" when run on very large directories (> 5000 packages) on Fedora 8 systems; see RedHat bugzilla entry #451494. With the patch, the commands work as expected. The patch is against 2.5.1 but from what I can see of the posixmodule.c code from SVN it should apply cleanly there too. ---------- components: Extension Modules messages: 68223 nosy: philipspencer severity: normal status: open title: os.listdir randomly fails on occasions when it shouldn't type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 01:27:07 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Jun 2008 23:27:07 +0000 Subject: [issue3114] bus error on lib2to3 In-Reply-To: <1213476914.28.0.330233447903.issue3114@psf.upfronthosting.co.za> Message-ID: <1213486027.41.0.292461979501.issue3114@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The following patch fixes it, which is somehow a bit scary... ---------- keywords: +patch Added file: http://bugs.python.org/file10629/3114.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 01:50:43 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Jun 2008 23:50:43 +0000 Subject: [issue3114] bus error on lib2to3 In-Reply-To: <1213476914.28.0.330233447903.issue3114@psf.upfronthosting.co.za> Message-ID: <1213487443.76.0.571680959964.issue3114@psf.upfronthosting.co.za> Antoine Pitrou added the comment: And a test. Added file: http://bugs.python.org/file10630/test_3114.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 02:06:23 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 15 Jun 2008 00:06:23 +0000 Subject: [issue3114] bus error on lib2to3 In-Reply-To: <1213476914.28.0.330233447903.issue3114@psf.upfronthosting.co.za> Message-ID: <1213488383.44.0.1150720801.issue3114@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks very much. Committed in r64384. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 02:09:41 2008 From: report at bugs.python.org (Adam Olsen) Date: Sun, 15 Jun 2008 00:09:41 +0000 Subject: [issue3114] bus error on lib2to3 In-Reply-To: <1213476914.28.0.330233447903.issue3114@psf.upfronthosting.co.za> Message-ID: <1213488581.66.0.0873182222432.issue3114@psf.upfronthosting.co.za> Adam Olsen added the comment: I'm not sure that fix is 100% right - it fixes safety, but not correctness. Wouldn't it be more correct to move all 3 into temporaries, assign from tstate, then XDECREF the temporaries? Otherwise you're going to expose just the value or traceback, without a type set. ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 04:38:43 2008 From: report at bugs.python.org (Mike Lisanke) Date: Sun, 15 Jun 2008 02:38:43 +0000 Subject: [issue2475] Popen.poll always returns None In-Reply-To: <1206392349.51.0.854683862843.issue2475@psf.upfronthosting.co.za> Message-ID: <1213497523.63.0.29499292199.issue2475@psf.upfronthosting.co.za> Mike Lisanke added the comment: Isn't this a critical problem. The .poll() function serves as a means to check the status of the process started. When it continues to report 'None' to a process which has already terminated, it creates a false positive of a hung process. Dealing with recovery from an actual hung process is difficult enough. Having to deal with a bad detection that the process ran to completion on top of this, makes the use of subprocess difficult. Maybe I'm miss applying the .poll() function. I'm trying to detect that a process has hung, prior to calling .stdout.readlines(). The readlines() will hang my python script if the process is hung. Is there another way I should be doing this? Thanks, Mike ---------- nosy: +lisanke _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 05:28:46 2008 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 15 Jun 2008 03:28:46 +0000 Subject: [issue3114] bus error on lib2to3 In-Reply-To: <1213476914.28.0.330233447903.issue3114@psf.upfronthosting.co.za> Message-ID: <1213500526.18.0.267984234888.issue3114@psf.upfronthosting.co.za> Guido van Rossum added the comment: N.B. Benjamin made a typo in the revision, it's r64284. ---------- nosy: +gvanrossum resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 12:29:14 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 15 Jun 2008 10:29:14 +0000 Subject: [issue3116] Fix quadratic behavior for marshal.dumps() when len>32Mb In-Reply-To: <1213525754.0.0.788265280234.issue3116@psf.upfronthosting.co.za> Message-ID: <1213525754.0.0.788265280234.issue3116@psf.upfronthosting.co.za> New submission from Raymond Hettinger : Martin, can you give this a second review? See original discussion at: http://groups.google.com/group/comp.lang.python/browse_thread/thread/ac8 f121c5d043198# Patch replaces constant size over-allocation with the amortized linear growth strategy used for list.append(), matching its 12.5% over- allocation rate. ---------- assignee: loewis files: marshal.diff keywords: patch, patch messages: 68230 nosy: loewis, rhettinger priority: high severity: normal status: open title: Fix quadratic behavior for marshal.dumps() when len>32Mb type: resource usage versions: Python 2.6 Added file: http://bugs.python.org/file10631/marshal.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 15:18:54 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Sun, 15 Jun 2008 13:18:54 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213535934.83.0.167690904339.issue3098@psf.upfronthosting.co.za> Robert Schuppenies added the comment: If I understand configure correctly, PY_UNICODE_TYPE is only set when a type matching the size of $unicode_size is found. And this is set to either 2 or 4. Thus, sizeof(Py_UNICODE) should always return 2 or 4. If you agree, I would suggest using the method proposed by Marc in msg68179. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 15:33:05 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 15 Jun 2008 13:33:05 +0000 Subject: [issue3114] bus error on lib2to3 In-Reply-To: <1213476914.28.0.330233447903.issue3114@psf.upfronthosting.co.za> Message-ID: <1213536785.82.0.524527466118.issue3114@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Adam is right, we should use three temporaries so that the tstate is consistent when the former values are DECREf'ed. I'll produce a patch later today, unless someone beats me to it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 15:33:32 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 15 Jun 2008 13:33:32 +0000 Subject: [issue3114] bus error on lib2to3 In-Reply-To: <1213476914.28.0.330233447903.issue3114@psf.upfronthosting.co.za> Message-ID: <1213536811.88.0.645614297765.issue3114@psf.upfronthosting.co.za> Antoine Pitrou added the comment: PS: I don't think this is "release blocker" anymore. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 15:33:52 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 15 Jun 2008 13:33:52 +0000 Subject: [issue3114] bus error on lib2to3 In-Reply-To: <1213476914.28.0.330233447903.issue3114@psf.upfronthosting.co.za> Message-ID: <1213536832.6.0.313816688844.issue3114@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 15:39:10 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 15 Jun 2008 13:39:10 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213535934.83.0.167690904339.issue3098@psf.upfronthosting.co.za> Message-ID: <1213537147.5884.3.camel@fsol> Antoine Pitrou added the comment: Le dimanche 15 juin 2008 ? 13:18 +0000, Robert Schuppenies a ?crit : > If I understand configure correctly, PY_UNICODE_TYPE is only set when > a type matching the size of $unicode_size is found. And this is set to > either 2 or 4. Buf if PY_UNICODE_TYPE is not set in configure, unicodeobject.h tries to settle on a default value. Which turns out to be Py_UCS4 in UCS4 builds: http://hg.pitrou.net/public/py3k/py3k/file/da93fc81b086/Include/unicodeobject.h#l86 And Py_UCS4 itself will be larger than 4 bytes if the platform's int size is larger than that: http://hg.pitrou.net/public/py3k/py3k/file/da93fc81b086/Include/unicodeobject.h#l119 So if you want to be 100% correct, you should use sizeof(PY_UNICODE_TYPE) (or sizeof(Py_UNICODE), which is the same). If you don't want to, sys.maxunicode is sufficient :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 15:56:46 2008 From: report at bugs.python.org (Mathias Behrle) Date: Sun, 15 Jun 2008 13:56:46 +0000 Subject: [issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails Message-ID: <1213538206.8.0.498140594785.issue1424152@psf.upfronthosting.co.za> Mathias Behrle added the comment: Just supporting, that proxy support over https is widely used and important. I am wondering, why this request is open for more than 2 years. Mathias ---------- nosy: +matb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 15:57:13 2008 From: report at bugs.python.org (Martin Wilck) Date: Sun, 15 Jun 2008 13:57:13 +0000 Subject: [issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails Message-ID: <9ED873FF2263454A995F57CE14906D877EB8F76272@ABGEX71E.FSC.NET> Martin Wilck added the comment: I am not in my office. I'll be back on June 30, 2008. In urgent cases, please contact: Peter Pols or Gerhard Wichert Best regards Martin Wilck Added file: http://bugs.python.org/file10632/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Sun Jun 15 17:20:23 2008 From: report at bugs.python.org (Jesse Noller) Date: Sun, 15 Jun 2008 15:20:23 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213543223.23.0.238065505659.issue3088@psf.upfronthosting.co.za> Jesse Noller added the comment: After talking with Richard, I think the best way to attack this issue (and the other ones around suite unreliability) is to remove the unreliable test cases for the first beta, and then refactor the suite post beta with an eye towards reliability and clarity. Personally, I would like to break the suites up in the the test_multiprocessing.py script to be more in the vein of other tests in Lib/test/... I removed the more unreliable test cases while keeping the core ones and wrote a quick bash script to do a burn-in of the "make tests" command, for 100 loops, I was unable to get the tests to hang with the reduced suite. I ran the same thing on trunk and py3k just to make sure I could not get it to hang/crash. ---------- keywords: +patch Added file: http://bugs.python.org/file10633/test_multiprocessing_reduced.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 17:21:36 2008 From: report at bugs.python.org (Jesse Noller) Date: Sun, 15 Jun 2008 15:21:36 +0000 Subject: [issue3109] test_multiprocessing seems fragile In-Reply-To: <1213402075.28.0.267049888199.issue3109@psf.upfronthosting.co.za> Message-ID: <1213543296.22.0.72650958246.issue3109@psf.upfronthosting.co.za> Jesse Noller added the comment: See: http://bugs.python.org/msg68237 For Beta 1 I am proposing a reduced test suite to remove the more unreliable tests. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 17:22:55 2008 From: report at bugs.python.org (Jesse Noller) Date: Sun, 15 Jun 2008 15:22:55 +0000 Subject: [issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error In-Reply-To: <1213472808.51.0.731079646072.issue3111@psf.upfronthosting.co.za> Message-ID: <1213543375.95.0.374825294784.issue3111@psf.upfronthosting.co.za> Jesse Noller added the comment: This is also effecting gentoo x86. After speaking with Richard, he suggested that this could be a side-effect if the buildbot execution is happening in a chroot'ed environment. Barry, do you know if this is the case? ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 17:26:59 2008 From: report at bugs.python.org (Jesse Noller) Date: Sun, 15 Jun 2008 15:26:59 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213543619.13.0.0407844001441.issue3088@psf.upfronthosting.co.za> Jesse Noller added the comment: Here is the loop I ran the tests with: #!/bin/sh for (( i=1;i<=100;i+=1 )); do make test TESTOPTS="-v test_multiprocessing" done _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 18:24:38 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 15 Jun 2008 16:24:38 +0000 Subject: [issue3056] Simplify the Integral ABC In-Reply-To: <1212803845.73.0.399511532431.issue3056@psf.upfronthosting.co.za> Message-ID: <1213547078.41.0.924075703232.issue3056@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Added file: http://bugs.python.org/file10634/numbers3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 18:37:19 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 15 Jun 2008 16:37:19 +0000 Subject: [issue3116] Fix quadratic behavior for marshal.dumps() when len>32Mb In-Reply-To: <1213525754.0.0.788265280234.issue3116@psf.upfronthosting.co.za> Message-ID: <1213547839.08.0.71881253063.issue3116@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch looks fine to me. Notice that the code you are patching was never released, instead, it's the result of r63059, which was the resolution of issue1792. So please leave a message there also that you changed it again (and I do agree that the capping implemented in r63059 was misguided). Also, please consider backporting the resulting code to 2.5. ---------- assignee: loewis -> rhettinger resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 18:45:57 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Sun, 15 Jun 2008 16:45:57 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213548357.56.0.777249507776.issue3098@psf.upfronthosting.co.za> Robert Schuppenies added the comment: Correct is good, so here is a patch which exposes the size of Py_UNICODE via _testcapi. Added file: http://bugs.python.org/file10635/Py_UNICODE_SIZEOF.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 19:43:36 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 15 Jun 2008 17:43:36 +0000 Subject: [issue3109] test_multiprocessing seems fragile In-Reply-To: <1213543296.22.0.72650958246.issue3109@psf.upfronthosting.co.za> Message-ID: <1213551803.5884.9.camel@fsol> Antoine Pitrou added the comment: Le dimanche 15 juin 2008 ? 15:21 +0000, Jesse Noller a ?crit : > > For Beta 1 I am proposing a reduced test suite to remove the more > unreliable tests. This would be nice (especially the tests which make regrtest hang). I also suggest the offending tests be commented out rather than completely removed, so that we remember they were here :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 19:45:48 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 15 Jun 2008 17:45:48 +0000 Subject: [issue3114] bus error on lib2to3 In-Reply-To: <1213536785.82.0.524527466118.issue3114@psf.upfronthosting.co.za> Message-ID: <1213551944.5884.12.camel@fsol> Antoine Pitrou added the comment: Here is a patch against the current py3k, along with a stricter test (which fails both with the previous patch, and the original unpatched py3k). I've also checked the svnmerged test_lib2to3 doesn't crash. Added file: http://bugs.python.org/file10636/3114-better.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 3114-better.patch URL: From report at bugs.python.org Sun Jun 15 21:39:22 2008 From: report at bugs.python.org (Enrico Santoemma) Date: Sun, 15 Jun 2008 19:39:22 +0000 Subject: [issue3117] segfault with (None,) as argument in a def/lambda In-Reply-To: <1213558762.43.0.0830924414202.issue3117@psf.upfronthosting.co.za> Message-ID: <1213558762.43.0.0830924414202.issue3117@psf.upfronthosting.co.za> New submission from Enrico Santoemma : This wrong expression >>> lambda (None,):None and this statement >>> def f( (None,) ): pass crash the interpreter. Python 2.5.1 (r251:54863, Mar 7 2008, 03:41:45) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> lambda (None,):None Segmentation fault (core dumped) Not in 2.4: Python 2.4.4 (#2, Apr 12 2007, 21:03:11) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> lambda (None,):None File "", line 1 SyntaxError: assignment to None >>> ---------- messages: 68245 nosy: santoemma severity: normal status: open title: segfault with (None,) as argument in a def/lambda type: crash versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 21:48:45 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sun, 15 Jun 2008 19:48:45 +0000 Subject: [issue3115] os.listdir randomly fails on occasions when it shouldn't In-Reply-To: <1213483378.87.0.0889155831871.issue3115@psf.upfronthosting.co.za> Message-ID: <1213559325.63.0.260040839319.issue3115@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: You forgot the patch :-) ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 21:53:38 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 15 Jun 2008 19:53:38 +0000 Subject: [issue3117] segfault with (None,) as argument in a def/lambda In-Reply-To: <1213558762.43.0.0830924414202.issue3117@psf.upfronthosting.co.za> Message-ID: <1213559618.01.0.603409576605.issue3117@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r64300. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 22:02:50 2008 From: report at bugs.python.org (Collin Winter) Date: Sun, 15 Jun 2008 20:02:50 +0000 Subject: [issue2876] Write UserDict fixer for 2to3 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1213560170.21.0.711634134732.issue2876@psf.upfronthosting.co.za> Collin Winter added the comment: It's doable, but there's no existing support similar to what fix_imports provides. I won't have time to work on this for the foreseeable future, but if someone is interested in working on this, I'd add this challenge: implement this in a way that generalizes well and is better/easier than what fix_imports does. I never expected fix_imports's mechanism to be so heavily reused, and as a result it's ass-slow. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 22:06:19 2008 From: report at bugs.python.org (Adam Olsen) Date: Sun, 15 Jun 2008 20:06:19 +0000 Subject: [issue3114] bus error on lib2to3 In-Reply-To: <1213476914.28.0.330233447903.issue3114@psf.upfronthosting.co.za> Message-ID: <1213560379.63.0.759892280143.issue3114@psf.upfronthosting.co.za> Adam Olsen added the comment: Looking good. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 22:10:01 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 15 Jun 2008 20:10:01 +0000 Subject: [issue3114] bus error on lib2to3 In-Reply-To: <1213476914.28.0.330233447903.issue3114@psf.upfronthosting.co.za> Message-ID: <1213560601.1.0.613009803513.issue3114@psf.upfronthosting.co.za> Benjamin Peterson added the comment: done in r64302. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 15 22:50:03 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 15 Jun 2008 20:50:03 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213563003.21.0.112051678407.issue3098@psf.upfronthosting.co.za> Georg Brandl added the comment: Looks good to me. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 00:35:57 2008 From: report at bugs.python.org (philipspencer) Date: Sun, 15 Jun 2008 22:35:57 +0000 Subject: [issue3115] os.listdir randomly fails on occasions when it shouldn't In-Reply-To: <1213483378.87.0.0889155831871.issue3115@psf.upfronthosting.co.za> Message-ID: <1213569357.08.0.157020949876.issue3115@psf.upfronthosting.co.za> philipspencer added the comment: I submitted the patch using the File: pathname box in the issue tracker editing window. I am doing this from home using an older version of mozilla; perhaps the tracker software doesn't work well with that version? I will try one more time. If it still doesn't come through, the patch can be viewed at https://bugzilla.redhat.com/attachment.cgi?id=309374 ---------- keywords: +patch Added file: http://bugs.python.org/file10637/python-2.5.1-listdir.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 03:07:08 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 16 Jun 2008 01:07:08 +0000 Subject: [issue3056] Simplify the Integral ABC In-Reply-To: <1212803845.73.0.399511532431.issue3056@psf.upfronthosting.co.za> Message-ID: <1213578427.49.0.74230990756.issue3056@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Not much feedback on comp.lang.python. Does numbers3.diff look like what you had in mind? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 03:43:34 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 16 Jun 2008 01:43:34 +0000 Subject: [issue3116] Fix quadratic behavior for marshal.dumps() when len>32Mb In-Reply-To: <1213525754.0.0.788265280234.issue3116@psf.upfronthosting.co.za> Message-ID: <1213580614.81.0.402774644153.issue3116@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Applied in r64303. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 03:44:33 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 16 Jun 2008 01:44:33 +0000 Subject: [issue1792] o(n*n) marshal.dumps performance for largish objects with patch In-Reply-To: <1200061286.09.0.117532205028.issue1792@psf.upfronthosting.co.za> Message-ID: <1213580673.91.0.968513064976.issue1792@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Amended this fix to avoid quadratic behavior altogether. See issue 3116. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 04:23:26 2008 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Jun 2008 02:23:26 +0000 Subject: [issue3056] Simplify the Integral ABC In-Reply-To: <1212803845.73.0.399511532431.issue3056@psf.upfronthosting.co.za> Message-ID: <1213583006.82.0.728634516198.issue3056@psf.upfronthosting.co.za> Guido van Rossum added the comment: Mostly, but I *really* want to see unittests for this. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 04:23:39 2008 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Jun 2008 02:23:39 +0000 Subject: [issue3056] Simplify the Integral ABC In-Reply-To: <1212803845.73.0.399511532431.issue3056@psf.upfronthosting.co.za> Message-ID: <1213583019.9.0.784716905743.issue3056@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- assignee: gvanrossum -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 04:39:26 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 16 Jun 2008 02:39:26 +0000 Subject: [issue3118] test_math fails on 64bit In-Reply-To: <1213583966.69.0.618889033517.issue3118@psf.upfronthosting.co.za> Message-ID: <1213583966.69.0.618889033517.issue3118@psf.upfronthosting.co.za> New submission from Benjamin Peterson : Re-running failed tests in verbose mode Re-running test 'test_math' in verbose mode testAcos (test.test_math.MathTests) ... ok testAcosh (test.test_math.MathTests) ... ok testAsin (test.test_math.MathTests) ... ok testAsinh (test.test_math.MathTests) ... ok testAtan (test.test_math.MathTests) ... ok testAtan2 (test.test_math.MathTests) ... ok testAtanh (test.test_math.MathTests) ... ok testCeil (test.test_math.MathTests) ... ok testConstants (test.test_math.MathTests) ... ok testCopysign (test.test_math.MathTests) ... ok testCos (test.test_math.MathTests) ... ok testCosh (test.test_math.MathTests) ... ok testDegrees (test.test_math.MathTests) ... ok testExp (test.test_math.MathTests) ... ok testFabs (test.test_math.MathTests) ... ok testFactorial (test.test_math.MathTests) ... ok testFloor (test.test_math.MathTests) ... ok testFmod (test.test_math.MathTests) ... ok testFrexp (test.test_math.MathTests) ... ok testHypot (test.test_math.MathTests) ... ok testIsinf (test.test_math.MathTests) ... ok testIsnan (test.test_math.MathTests) ... ok testLdexp (test.test_math.MathTests) ... ok testLog (test.test_math.MathTests) ... ok testLog10 (test.test_math.MathTests) ... ok testLog1p (test.test_math.MathTests) ... ok testModf (test.test_math.MathTests) ... ok testPow (test.test_math.MathTests) ... ok testRadians (test.test_math.MathTests) ... ok testSin (test.test_math.MathTests) ... ok testSinh (test.test_math.MathTests) ... ok testSqrt (test.test_math.MathTests) ... ok testSum (test.test_math.MathTests) ... ok testTan (test.test_math.MathTests) ... ok testTanh (test.test_math.MathTests) ... ok test_exceptions (test.test_math.MathTests) ... ok test_testfile (test.test_math.MathTests) ... FAIL test_trunc (test.test_math.MathTests) ... ok Doctest: ieee754.txt ... ok ====================================================================== FAIL: test_testfile (test.test_math.MathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/trunk.klose-debian-ia64/build/Lib/test/test_math.py", line 939, in test_testfile self.fail(message) AssertionError: Unexpected OverflowError in test exp0042:exp(-745.0) ---------------------------------------------------------------------- Ran 39 tests in 46.087s FAILED (failures=1) test test_math failed -- Traceback (most recent call last): File "/home/pybot/buildarea/trunk.klose-debian-ia64/build/Lib/test/test_math.py", line 939, in test_testfile self.fail(message) AssertionError: Unexpected OverflowError in test exp0042:exp(-745.0) ---------- components: Library (Lib), Tests keywords: 64bit messages: 68257 nosy: benjamin.peterson priority: release blocker severity: normal status: open title: test_math fails on 64bit type: behavior versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 04:44:59 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 16 Jun 2008 02:44:59 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1213584299.03.0.417185481626.issue2735@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Guido, is it safe to safe this isn't going to happen? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 05:01:21 2008 From: report at bugs.python.org (Roger Upole) Date: Mon, 16 Jun 2008 03:01:21 +0000 Subject: [issue1474454] Allow PyArg_ParseTupleAndKeywords to unpack tuples Message-ID: <1213585281.07.0.0907346882798.issue1474454@psf.upfronthosting.co.za> Roger Upole added the comment: This functionality is subsumed in patch 1691070 (which has since been applied), so this can be closed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 05:22:25 2008 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Jun 2008 03:22:25 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1213586545.55.0.0843491027695.issue2735@psf.upfronthosting.co.za> Guido van Rossum added the comment: Yeah, let's just reject this. There doesn't appear to be much demand. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 05:25:17 2008 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Jun 2008 03:25:17 +0000 Subject: [issue2603] Make range __eq__ work In-Reply-To: <1207776487.99.0.710555963511.issue2603@psf.upfronthosting.co.za> Message-ID: <1213586717.15.0.374160469296.issue2603@psf.upfronthosting.co.za> Guido van Rossum added the comment: Methinks this one is also better rejected. Please reopen if you feel strongly. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 06:06:26 2008 From: report at bugs.python.org (Aaron Gallagher) Date: Mon, 16 Jun 2008 04:06:26 +0000 Subject: [issue3119] pickle.py is limited by python's call stack In-Reply-To: <1213589185.62.0.660916672679.issue3119@psf.upfronthosting.co.za> Message-ID: <1213589185.62.0.660916672679.issue3119@psf.upfronthosting.co.za> New submission from Aaron Gallagher : Currently, pickle.py in the stdlib is limited by the python call stack. For deeply recursive data structures, the default recursion limit of 1000 is not enough. The patch attached modifies pickle.py to instead use a deque object as a call stack. Pickler.save and other methods that increase the recursion depth are now generators which may yield either another generator or None, where yielding a generator adds it to the call stack. ---------- components: Library (Lib) files: pickle.patch keywords: patch messages: 68262 nosy: habnabit severity: normal status: open title: pickle.py is limited by python's call stack type: behavior versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10638/pickle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 06:36:04 2008 From: report at bugs.python.org (Roger Upole) Date: Mon, 16 Jun 2008 04:36:04 +0000 Subject: [issue3120] subprocess module truncates handles on AMD64 In-Reply-To: <1213590960.84.0.798719611709.issue3120@psf.upfronthosting.co.za> Message-ID: <1213590960.84.0.798719611709.issue3120@psf.upfronthosting.co.za> New submission from Roger Upole : HANDLEs are pointer sized values, but there are several places in _subprocess.c where it assumes they are the same size as longs which are still 4 bytes on win64. ---------- components: Windows messages: 68263 nosy: rupole severity: normal status: open title: subprocess module truncates handles on AMD64 versions: Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 07:00:11 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 16 Jun 2008 05:00:11 +0000 Subject: [issue1474454] Allow PyArg_ParseTupleAndKeywords to unpack tuples Message-ID: <1213592411.25.0.295298690745.issue1474454@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 10:32:09 2008 From: report at bugs.python.org (Ismail Donmez) Date: Mon, 16 Jun 2008 08:32:09 +0000 Subject: [issue3121] test_urllibnet fails In-Reply-To: <1213605129.04.0.398853048978.issue3121@psf.upfronthosting.co.za> Message-ID: <1213605129.04.0.398853048978.issue3121@psf.upfronthosting.co.za> New submission from Ismail Donmez : This is on Linux with latest py3k branch: test test_urllibnet failed -- Traceback (most recent call last): File "/home/cartman/Sources/py3k/Lib/test/test_urllibnet.py", line 145, in test_bad_address urllib.urlopen, "http://www.python.invalid./") AssertionError: IOError not raised by urlopen ---------- components: Tests messages: 68264 nosy: cartman severity: normal status: open title: test_urllibnet fails versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 11:57:20 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 16 Jun 2008 09:57:20 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213389159.5912.13.camel@fsol> Message-ID: <485638E3.7010403@egenix.com> Marc-Andre Lemburg added the comment: On 2008-06-13 22:32, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > > Le vendredi 13 juin 2008 ? 20:18 +0000, Marc-Andre Lemburg a ?crit : >> AFAIK, only Crays have this problem, but apart from that: I'd consider >> it a bug if sizeof(Py_UCS4) != 4. > > Perhaps a #error can be added to that effect? > Something like (untested): > > #if SIZEOF_INT == 4 > typedef unsigned int Py_UCS4; > #elif SIZEOF_LONG == 4 > typedef unsigned long Py_UCS4; > #else > #error Could not find a 4-byte integer type for Py_UCS4, aborting > #endif Sounds good ! > (of course we could also try harder to find an appropriate type, but I'm > no specialist in C integer variations) Python should really try to use uint32_t as fallback solution for UCS4 where available (and uint16_t for UCS2). We'd have to add an AC_TYPE_INT32_T and AC_TYPE_INT16_T check to configure: http://www.gnu.org/software/autoconf/manual/html_node/Particular-Types.html#Particular-Types and could then use typedef uint32_t Py_UCS4 and typedef uint16_t Py_UCS2 Note that the code for supporting UCS2/UCS4 is not really all that clean. It was a quick sprint between Martin and Fredrik and appears to be only half-done... e.g. there currently is no Py_UCS2. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 12:51:27 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Mon, 16 Jun 2008 10:51:27 +0000 Subject: [issue3122] sys.getsizeof() gives an AttributeError for _sre objects. In-Reply-To: <1213613487.11.0.64218401652.issue3122@psf.upfronthosting.co.za> Message-ID: <1213613487.11.0.64218401652.issue3122@psf.upfronthosting.co.za> New submission from Robert Schuppenies : >>> import re >>> import sys >>> r = re.compile('') >>> sys.getsizeof(r) Traceback (most recent call last): File "", line 1, in AttributeError: __sizeof__ This applies to objects of the types _sre.SRE_Pattern, _sre.SRE_Scanner, and _sre.SRE_Match. The attached patch addresses this issue. ---------- assignee: schuppenies components: Interpreter Core files: _sre_sizeof.patch keywords: patch, patch messages: 68266 nosy: schuppenies severity: normal status: open title: sys.getsizeof() gives an AttributeError for _sre objects. type: behavior versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10639/_sre_sizeof.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 15:50:43 2008 From: report at bugs.python.org (djc) Date: Mon, 16 Jun 2008 13:50:43 +0000 Subject: [issue3123] 2to3 fails In-Reply-To: <1213624242.61.0.802384871781.issue3123@psf.upfronthosting.co.za> Message-ID: <1213624242.61.0.802384871781.issue3123@psf.upfronthosting.co.za> New submission from djc : 2to3 fails in recent CPython trunk. This is because lib2to3 got some merges, but the 2to3 script wasn't updated to match. lib2to3.refactor.main() now requires a first argument which isn't given by the 2to3 script. ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 68267 nosy: benjamin.peterson, collinwinter, djc severity: normal status: open title: 2to3 fails versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 15:57:23 2008 From: report at bugs.python.org (Raghuram Devarakonda) Date: Mon, 16 Jun 2008 13:57:23 +0000 Subject: [issue3115] os.listdir randomly fails on occasions when it shouldn't In-Reply-To: <1213483378.87.0.0889155831871.issue3115@psf.upfronthosting.co.za> Message-ID: <1213624643.58.0.526715631981.issue3115@psf.upfronthosting.co.za> Raghuram Devarakonda added the comment: Isn't this similar to #1608818? ---------- nosy: +draghuram _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 16:37:31 2008 From: report at bugs.python.org (philipspencer) Date: Mon, 16 Jun 2008 14:37:31 +0000 Subject: [issue3115] os.listdir randomly fails on occasions when it shouldn't In-Reply-To: <1213483378.87.0.0889155831871.issue3115@psf.upfronthosting.co.za> Message-ID: <1213627051.22.0.454138253026.issue3115@psf.upfronthosting.co.za> philipspencer added the comment: Yes, it is the same issue. Sorry I didn't see the previous report -- I didn't imagine an issue like this, with such a simple fix, could have been reported back in 2006 without the fix ever having been implemented, so I didn't bother searching back that far! The fix in that report contains the same one-line fix as I proposed, plus additional changes to ensure that the code won't break if in the future additional changes are made to allow a second possible exit-out-of-the-loop-with-d-being-non-null code path. All that's strictly necessary to solve the current problem is the one line I proposed, but the other proposed changes would make the safer against future potential breakage if the code gets rearranged later. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 17:34:24 2008 From: report at bugs.python.org (Collin Winter) Date: Mon, 16 Jun 2008 15:34:24 +0000 Subject: [issue3123] 2to3 fails In-Reply-To: <1213624242.61.0.802384871781.issue3123@psf.upfronthosting.co.za> Message-ID: <1213630464.37.0.259736230642.issue3123@psf.upfronthosting.co.za> Collin Winter added the comment: Benjamin, you did the recent merges, no? Can you please fix this breakage? ---------- assignee: collinwinter -> benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 18:21:43 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 16 Jun 2008 16:21:43 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213386894.12.0.553810252503.issue3098@psf.upfronthosting.co.za> Message-ID: <48569313.1090200@egenix.com> Marc-Andre Lemburg added the comment: On 2008-06-13 21:54, Marc-Andre Lemburg wrote: > BTW: Here's another trick you can use: > > print 'sizeof(Py_UNICODE) =', len(u'\0'.encode('unicode-internal')) > > (for Py2.x) ... and for Py3.x: print(len(u'\0'.encode('unicode-internal'))) There's really no need to drop to C to get at sizeof(Py_UNICODE). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 19:00:07 2008 From: report at bugs.python.org (Senthil) Date: Mon, 16 Jun 2008 17:00:07 +0000 Subject: [issue3121] test_urllibnet fails In-Reply-To: <1213605129.04.0.398853048978.issue3121@psf.upfronthosting.co.za> Message-ID: <20080616165618.GB3570@gmail.com> Senthil added the comment: > This is on Linux with latest py3k branch: > > test test_urllibnet failed -- Traceback (most recent call last): > File "/home/cartman/Sources/py3k/Lib/test/test_urllibnet.py", line > 145, in test_bad_address > urllib.urlopen, "http://www.python.invalid./") > AssertionError: IOError not raised by urlopen Is this on the trunk? For me, test_bad_address test passes for test_urllibnet.py - This is on Fedora Core 2, with the just checkout trunk of py3k. That said, there are problems with email package instances ( which was replaced for mimetools). Shall work out for patch. ====================================================================== FAIL: test_info (__main__.urlopenNetworkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_urllibnet.py", line 91, in test_info "object returned by 'info' is not an instance of " AssertionError: object returned by 'info' is not an instance of email.message.Message ====================================================================== FAIL: test_header (__main__.urlretrieveNetworkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_urllibnet.py", line 184, in test_header "header is not an instance of email.message.Message") AssertionError: header is not an instance of email.message.Message ---------------------------------------------------------------------- ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 19:25:41 2008 From: report at bugs.python.org (Tony Wallace) Date: Mon, 16 Jun 2008 17:25:41 +0000 Subject: [issue3107] memory leak in make test (in "test list"), 2.5.2 not 2.5.1, Linux 64bit In-Reply-To: <1213397967.45.0.45678659954.issue3107@psf.upfronthosting.co.za> Message-ID: <1213637141.56.0.165871989758.issue3107@psf.upfronthosting.co.za> Tony Wallace added the comment: make test not only fails "test_list", it also fails "test_tuple" and "test_userlist". In all cases, the behavior looks the same -- memory expands to > 90% and you kill it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 19:25:47 2008 From: report at bugs.python.org (Thomas Heller) Date: Mon, 16 Jun 2008 17:25:47 +0000 Subject: [issue3124] test_multiprocessing segfaults on Windows In-Reply-To: <1213637147.58.0.717278933359.issue3124@psf.upfronthosting.co.za> Message-ID: <1213637147.58.0.717278933359.issue3124@psf.upfronthosting.co.za> New submission from Thomas Heller : When Python shuts down after running test_multiprocessing on Windows, a segfault occurs (this is with a debug build from trunk): > python26_d.dll!_Py_ForgetReference(_object * op=0x012de740) Line 2023 + 0xf bytes C python26_d.dll!_Py_Dealloc(_object * op=0x012de740) Line 2043 + 0x9 bytes C python26_d.dll!tupledealloc(PyTupleObject * op=0x00d58c78) Line 169 + 0x8a bytes C python26_d.dll!_Py_Dealloc(_object * op=0x00d58c78) Line 2044 + 0x7 bytes C python26_d.dll!PyObject_CallFunctionObjArgs(_object * callable=0x00d64090, ...) Line 2716 + 0x51 bytes C python26_d.dll!handle_callback(_PyWeakReference * ref=0x012de740, _object * callback=0x00d64090) Line 864 + 0xf bytes C python26_d.dll!PyObject_ClearWeakRefs(_object * object=0x012bcc98) Line 910 + 0xd bytes C python26_d.dll!func_dealloc(PyFunctionObject * op=0x012bcc98) Line 453 + 0x9 bytes C python26_d.dll!_Py_Dealloc(_object * op=0x012bcc98) Line 2044 + 0x7 bytes C python26_d.dll!tupledealloc(PyTupleObject * op=0x012ddeb8) Line 169 + 0x8a bytes C python26_d.dll!_Py_Dealloc(_object * op=0x012ddeb8) Line 2044 + 0x7 bytes C python26_d.dll!clear_slots(_typeobject * type=0x00cbbac8, _object * self=0x012de740) Line 821 + 0x51 bytes C python26_d.dll!subtype_dealloc(_object * self=0x012de740) Line 950 + 0xd bytes C python26_d.dll!_Py_Dealloc(_object * op=0x012de740) Line 2044 + 0x7 bytes C python26_d.dll!dict_dealloc(_dictobject * mp=0x00d538c0) Line 907 + 0x6c bytes C python26_d.dll!_Py_Dealloc(_object * op=0x00d538c0) Line 2044 + 0x7 bytes C python26_d.dll!dict_dealloc(_dictobject * mp=0x00d536c8) Line 907 + 0x6c bytes C python26_d.dll!_Py_Dealloc(_object * op=0x00d536c8) Line 2044 + 0x7 bytes C python26_d.dll!instance_dealloc(PyInstanceObject * inst=0x00d60bf8) Line 668 + 0x6c bytes C python26_d.dll!_Py_Dealloc(_object * op=0x00d60bf8) Line 2044 + 0x7 bytes C python26_d.dll!insertdict(_dictobject * mp=0x00d53620, _object * key=0x00d5c9b8, long hash=-1896994012, _object * value=0x1e2bb004) Line 455 + 0x51 bytes C python26_d.dll!PyDict_SetItem(_object * op=0x00d53620, _object * key=0x00d5c9b8, _object * value=0x1e2bb004) Line 697 + 0x15 bytes C python26_d.dll!_PyModule_Clear(_object * m=0x00d63968) Line 125 + 0x12 bytes C python26_d.dll!PyImport_Cleanup() Line 479 + 0x9 bytes C python26_d.dll!Py_Finalize() Line 452 C python26_d.dll!Py_Exit(int sts=0) Line 1690 C python26_d.dll!handle_system_exit() Line 1111 + 0x9 bytes C python26_d.dll!PyErr_PrintEx(int set_sys_last_vars=1) Line 1123 C python26_d.dll!PyErr_Print() Line 1030 + 0x7 bytes C python26_d.dll!PyRun_SimpleFileExFlags(_iobuf * fp=0x10311448, const char * filename=0x009d5d93, int closeit=1, PyCompilerFlags * flags=0x0022ff30) Line 931 C python26_d.dll!PyRun_AnyFileExFlags(_iobuf * fp=0x10311448, const char * filename=0x009d5d93, int closeit=1, PyCompilerFlags * flags=0x0022ff30) Line 731 + 0x15 bytes C python26_d.dll!Py_Main(int argc=5, char * * argv=0x009d5d68) Line 600 + 0x39 bytes C python_d.exe!main(int argc=5, char * * argv=0x009d5d68) Line 23 + 0xe bytes C python_d.exe!__tmainCRTStartup() Line 582 + 0x19 bytes C python_d.exe!mainCRTStartup() Line 399 C ---------- messages: 68274 nosy: theller severity: normal status: open title: test_multiprocessing segfaults on Windows type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 19:30:51 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 16 Jun 2008 17:30:51 +0000 Subject: [issue3124] test_multiprocessing segfaults on Windows In-Reply-To: <1213637147.58.0.717278933359.issue3124@psf.upfronthosting.co.za> Message-ID: <1213637451.87.0.95628152383.issue3124@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Can you check whether the patch for issue3100 corrects the problem? (see PyObject_ClearWeakRefs in the call stack) ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 19:31:42 2008 From: report at bugs.python.org (Thomas Heller) Date: Mon, 16 Jun 2008 17:31:42 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> New submission from Thomas Heller : test_ctypes, when run after testmultiprocessing, fails: ... ====================================================================== ERROR: test_simple (ctypes.test.test_pickling.PickleTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\svn\trunk\lib\ctypes\test\test_pickling.py", line 29, in test_simple dst = self.loads(self.dumps(src)) File "c:\svn\trunk\lib\ctypes\test\test_pickling.py", line 19, in dumps return pickle.dumps(item) File "c:\svn\trunk\lib\pickle.py", line 1366, in dumps Pickler(file, protocol).dump(obj) File "c:\svn\trunk\lib\pickle.py", line 224, in dump self.save(obj) File "c:\svn\trunk\lib\pickle.py", line 301, in save rv = reduce(obj) File "c:\svn\trunk\lib\multiprocessing\sharedctypes.py", line 121, in reduce_ctype assert_spawning(obj) File "c:\svn\trunk\lib\multiprocessing\forking.py", line 25, in assert_spawning ' through inheritance' % type(self).__name__ RuntimeError: c_long objects should only be shared between processes through inheritance ====================================================================== ERROR: test_simple (ctypes.test.test_pickling.PickleTest_1) ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\svn\trunk\lib\ctypes\test\test_pickling.py", line 29, in test_simple dst = self.loads(self.dumps(src)) File "c:\svn\trunk\lib\ctypes\test\test_pickling.py", line 71, in dumps return pickle.dumps(item, 1) File "c:\svn\trunk\lib\pickle.py", line 1366, in dumps Pickler(file, protocol).dump(obj) File "c:\svn\trunk\lib\pickle.py", line 224, in dump self.save(obj) File "c:\svn\trunk\lib\pickle.py", line 301, in save rv = reduce(obj) File "c:\svn\trunk\lib\multiprocessing\sharedctypes.py", line 121, in reduce_ctype assert_spawning(obj) File "c:\svn\trunk\lib\multiprocessing\forking.py", line 25, in assert_spawning ' through inheritance' % type(self).__name__ RuntimeError: c_long objects should only be shared between processes through inheritance ====================================================================== ERROR: test_simple (ctypes.test.test_pickling.PickleTest_2) ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\svn\trunk\lib\ctypes\test\test_pickling.py", line 29, in test_simple dst = self.loads(self.dumps(src)) File "c:\svn\trunk\lib\ctypes\test\test_pickling.py", line 75, in dumps return pickle.dumps(item, 2) File "c:\svn\trunk\lib\pickle.py", line 1366, in dumps Pickler(file, protocol).dump(obj) File "c:\svn\trunk\lib\pickle.py", line 224, in dump self.save(obj) File "c:\svn\trunk\lib\pickle.py", line 301, in save rv = reduce(obj) File "c:\svn\trunk\lib\multiprocessing\sharedctypes.py", line 121, in reduce_ctype assert_spawning(obj) File "c:\svn\trunk\lib\multiprocessing\forking.py", line 25, in assert_spawning ' through inheritance' % type(self).__name__ RuntimeError: c_long objects should only be shared between processes through inheritance ---------------------------------------------------------------------- ---------- messages: 68276 nosy: theller severity: normal status: open title: test_multiprocessing causes test_ctypes to fail versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 19:38:51 2008 From: report at bugs.python.org (Thomas Heller) Date: Mon, 16 Jun 2008 17:38:51 +0000 Subject: [issue3124] test_multiprocessing segfaults on Windows In-Reply-To: <1213637451.87.0.95628152383.issue3124@psf.upfronthosting.co.za> Message-ID: <4856A521.4080006@ctypes.org> Thomas Heller added the comment: Yes, the patch weakref_cycle.patch from #3100 fixes the problem. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 19:47:31 2008 From: report at bugs.python.org (Adam Olsen) Date: Mon, 16 Jun 2008 17:47:31 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213638451.68.0.814644027825.issue3125@psf.upfronthosting.co.za> Changes by Adam Olsen : ---------- nosy: +Rhamphoryncus, jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 19:53:04 2008 From: report at bugs.python.org (Jesse Noller) Date: Mon, 16 Jun 2008 17:53:04 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213638784.07.0.919031842639.issue3125@psf.upfronthosting.co.za> Jesse Noller added the comment: Adam, is this due to the c-code tainting you pointed out earlier? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 19:54:22 2008 From: report at bugs.python.org (Jesse Noller) Date: Mon, 16 Jun 2008 17:54:22 +0000 Subject: [issue3124] test_multiprocessing segfaults on Windows In-Reply-To: <1213637147.58.0.717278933359.issue3124@psf.upfronthosting.co.za> Message-ID: <1213638862.52.0.560577501489.issue3124@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 20:01:50 2008 From: report at bugs.python.org (Thomas Heller) Date: Mon, 16 Jun 2008 18:01:50 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213639310.15.0.389247991242.issue3125@psf.upfronthosting.co.za> Thomas Heller added the comment: IMO this problem occurs because multiprocessing registers pickling support for ctypes, but the ctypes in trunk already has support for pickling. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 20:13:00 2008 From: report at bugs.python.org (Adam Olsen) Date: Mon, 16 Jun 2008 18:13:00 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213639980.78.0.00806397060745.issue3125@psf.upfronthosting.co.za> Adam Olsen added the comment: Jesse, can you be more specific? Thomas, do you have a specific command to reproduce this? It runs fine if I do "./python -m test.regrtest -v test_multiprocessing test_ctypes". That's with amaury's patch from 3100 applied. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 20:19:42 2008 From: report at bugs.python.org (Tony Wallace) Date: Mon, 16 Jun 2008 18:19:42 +0000 Subject: [issue3107] memory leak in make test (in "test list"), 2.5.2 not 2.5.1, Linux 64bit In-Reply-To: <1213397967.45.0.45678659954.issue3107@psf.upfronthosting.co.za> Message-ID: <1213640382.32.0.339939546878.issue3107@psf.upfronthosting.co.za> Tony Wallace added the comment: in test_list.py, the following shows where it hit the memory leak: [tony at hathi Python-2.5.2]$ LD_LIBRARY_PATH=/home/tony/src/Python-2.5.2/Lib/:$LD_LIBRARY_PATH ./python -v Lib/test/test_list.py # installing zipimport hook import zipimport # builtin <<...>> Python 2.5.2 (r252:60911, Jun 14 2008, 01:31:25) [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2 Type "help", "copyright", "credits" or "license" for more information. # /home/tony/src/Python-2.5.2/Lib/unittest.pyc matches /home/tony/src/Python-2.5.2/Lib/unittest.py import unittest # precompiled from /home/tony/src/Python-2.5.2/Lib/unittest.pyc dlopen("/home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/time.so", 2); import time # dynamically loaded from /home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/time.so # /home/tony/src/Python-2.5.2/Lib/traceback.pyc matches /home/tony/src/Python-2.5.2/Lib/traceback.py import traceback # precompiled from /home/tony/src/Python-2.5.2/Lib/traceback.pyc import test # directory /home/tony/src/Python-2.5.2/Lib/test # /home/tony/src/Python-2.5.2/Lib/test/__init__.pyc matches /home/tony/src/Python-2.5.2/Lib/test/__init__.py import test # precompiled from /home/tony/src/Python-2.5.2/Lib/test/__init__.pyc # /home/tony/src/Python-2.5.2/Lib/test/test_support.pyc matches /home/tony/src/Python-2.5.2/Lib/test/test_support.py import test.test_support # precompiled from /home/tony/src/Python-2.5.2/Lib/test/test_support.pyc # /home/tony/src/Python-2.5.2/Lib/test/list_tests.pyc has bad mtime import test.list_tests # from /home/tony/src/Python-2.5.2/Lib/test/list_tests.py # wrote /home/tony/src/Python-2.5.2/Lib/test/list_tests.pyc # /home/tony/src/Python-2.5.2/Lib/test/seq_tests.pyc matches /home/tony/src/Python-2.5.2/Lib/test/seq_tests.py import test.seq_tests # precompiled from /home/tony/src/Python-2.5.2/Lib/test/seq_tests.pyc dlopen("/home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/itertools.so", 2); import itertools # dynamically loaded from /home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/itertools.so test_addmul (__main__.ListTest) ... ok test_append (__main__.ListTest) ... ok Terminated =========== in test_tuple.py, the following shows where it hit the memory leak: [tony at hathi Python-2.5.2]$ LD_LIBRARY_PATH=/home/tony/src/Python-2.5.2/Lib/:$LD_LIBRARY_PATH ./python -v Lib/test/test_tuple.py # installing zipimport hook import zipimport # builtin <<...>> Python 2.5.2 (r252:60911, Jun 14 2008, 01:31:25) [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2 Type "help", "copyright", "credits" or "license" for more information. # /home/tony/src/Python-2.5.2/Lib/unittest.pyc matches /home/tony/src/Python-2.5.2/Lib/unittest.py import unittest # precompiled from /home/tony/src/Python-2.5.2/Lib/unittest.pyc dlopen("/home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/time.so", 2); import time # dynamically loaded from /home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/time.so # /home/tony/src/Python-2.5.2/Lib/traceback.pyc matches /home/tony/src/Python-2.5.2/Lib/traceback.py import traceback # precompiled from /home/tony/src/Python-2.5.2/Lib/traceback.pyc import test # directory /home/tony/src/Python-2.5.2/Lib/test # /home/tony/src/Python-2.5.2/Lib/test/__init__.pyc matches /home/tony/src/Python-2.5.2/Lib/test/__init__.py import test # precompiled from /home/tony/src/Python-2.5.2/Lib/test/__init__.pyc # /home/tony/src/Python-2.5.2/Lib/test/test_support.pyc matches /home/tony/src/Python-2.5.2/Lib/test/test_support.py import test.test_support # precompiled from /home/tony/src/Python-2.5.2/Lib/test/test_support.pyc # /home/tony/src/Python-2.5.2/Lib/test/seq_tests.pyc matches /home/tony/src/Python-2.5.2/Lib/test/seq_tests.py import test.seq_tests # precompiled from /home/tony/src/Python-2.5.2/Lib/test/seq_tests.pyc dlopen("/home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/itertools.so", 2); import itertools # dynamically loaded from /home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/itertools.so test_addmul (__main__.TupleTest) ... ok Terminated =========== in test_userlist.py, the following shows where it hit the memory leak: [tony at hathi Python-2.5.2]$ LD_LIBRARY_PATH=/home/tony/src/Python-2.5.2/Lib/:$LD_LIBRARY_PATH ./python -v Lib/test/test_userlist.py # installing zipimport hook import zipimport # builtin <<...>> Python 2.5.2 (r252:60911, Jun 14 2008, 01:31:25) [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2 Type "help", "copyright", "credits" or "license" for more information. # /home/tony/src/Python-2.5.2/Lib/UserList.pyc matches /home/tony/src/Python-2.5.2/Lib/UserList.py import UserList # precompiled from /home/tony/src/Python-2.5.2/Lib/UserList.pyc # /home/tony/src/Python-2.5.2/Lib/unittest.pyc matches /home/tony/src/Python-2.5.2/Lib/unittest.py import unittest # precompiled from /home/tony/src/Python-2.5.2/Lib/unittest.pyc dlopen("/home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/time.so", 2); import time # dynamically loaded from /home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/time.so # /home/tony/src/Python-2.5.2/Lib/traceback.pyc matches /home/tony/src/Python-2.5.2/Lib/traceback.py import traceback # precompiled from /home/tony/src/Python-2.5.2/Lib/traceback.pyc import test # directory /home/tony/src/Python-2.5.2/Lib/test # /home/tony/src/Python-2.5.2/Lib/test/__init__.pyc matches /home/tony/src/Python-2.5.2/Lib/test/__init__.py import test # precompiled from /home/tony/src/Python-2.5.2/Lib/test/__init__.pyc # /home/tony/src/Python-2.5.2/Lib/test/test_support.pyc matches /home/tony/src/Python-2.5.2/Lib/test/test_support.py import test.test_support # precompiled from /home/tony/src/Python-2.5.2/Lib/test/test_support.pyc # /home/tony/src/Python-2.5.2/Lib/test/list_tests.pyc matches /home/tony/src/Python-2.5.2/Lib/test/list_tests.py import test.list_tests # precompiled from /home/tony/src/Python-2.5.2/Lib/test/list_tests.pyc # /home/tony/src/Python-2.5.2/Lib/test/seq_tests.pyc matches /home/tony/src/Python-2.5.2/Lib/test/seq_tests.py import test.seq_tests # precompiled from /home/tony/src/Python-2.5.2/Lib/test/seq_tests.pyc dlopen("/home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/itertools.so", 2); import itertools # dynamically loaded from /home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/itertools.so test_add_specials (__main__.UserListTest) ... ok test_addmul (__main__.UserListTest) ... ok test_append (__main__.UserListTest) ... ok Terminated ========== I commented out the following methods and reran the above tests. (the following only shows the starting line of each method, but I commented out the whole entire method) Lib/test/list_tests.py: 226: # def test_append(self): Lib/test/seq_tests.py: 248: # def test_addmul(self): When I re-ran the three tests (test_list, test_tuple, test_userlist), here is how they looked when I had to kill them: (test_list) # /home/tony/src/Python-2.5.2/Lib/test/seq_tests.pyc matches /home/tony/src/Python-2.5.2/Lib/test/seq_tests.py import test.seq_tests # precompiled from /home/tony/src/Python-2.5.2/Lib/test/seq_tests.pyc dlopen("/home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/itertools.so", 2); import itertools # dynamically loaded from /home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/itertools.so Terminated (test_tuple) # /home/tony/src/Python-2.5.2/Lib/test/seq_tests.pyc matches /home/tony/src/Python-2.5.2/Lib/test/seq_tests.py import test.seq_tests # precompiled from /home/tony/src/Python-2.5.2/Lib/test/seq_tests.pyc dlopen("/home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/itertools.so", 2); import itertools # dynamically loaded from /home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/itertools.so Terminated (test_userlist) # /home/tony/src/Python-2.5.2/Lib/test/list_tests.pyc matches /home/tony/src/Python-2.5.2/Lib/test/list_tests.py import test.list_tests # precompiled from /home/tony/src/Python-2.5.2/Lib/test/list_tests.pyc # /home/tony/src/Python-2.5.2/Lib/test/seq_tests.pyc matches /home/tony/src/Python-2.5.2/Lib/test/seq_tests.py import test.seq_tests # precompiled from /home/tony/src/Python-2.5.2/Lib/test/seq_tests.pyc dlopen("/home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/itertools.so", 2); import itertools # dynamically loaded from /home/tony/src/Python-2.5.2/build/lib.linux-x86_64-2.5/itertools.so test_add_specials (__main__.UserListTest) ... ok Terminated That is all the info I have time to get right now. If I get time later and no other instructions, I would try rebuilding without enable-dynamic or enable-static in the ./configure options _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 20:26:29 2008 From: report at bugs.python.org (Jesse Noller) Date: Mon, 16 Jun 2008 18:26:29 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213640789.19.0.104859088649.issue3125@psf.upfronthosting.co.za> Jesse Noller added the comment: Sorry Adam, I was referencing: http://bugs.python.org/issue3102 Also, it is possible issue: http://bugs.python.org/issue3102 is related? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 20:28:39 2008 From: report at bugs.python.org (Jesse Noller) Date: Mon, 16 Jun 2008 18:28:39 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213640919.12.0.190611369011.issue3125@psf.upfronthosting.co.za> Jesse Noller added the comment: Sorry, the first link should have been: http://bugs.python.org/issue3093 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 20:37:27 2008 From: report at bugs.python.org (Thomas Heller) Date: Mon, 16 Jun 2008 18:37:27 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213639980.78.0.00806397060745.issue3125@psf.upfronthosting.co.za> Message-ID: <4856B2E3.2060209@ctypes.org> Thomas Heller added the comment: Adam Olsen schrieb: > Thomas, do you have a specific command to reproduce this? It runs fine > if I do "./python -m test.regrtest -v test_multiprocessing test_ctypes". > That's with amaury's patch from 3100 applied. It seems the failure only occurs on Windows. On linux it does work for me too. See the traceback that I posted, and this: http://www.python.org/dev/buildbot/trunk/x86%20XP-3%20trunk/builds/1606/step-test/0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 20:45:55 2008 From: report at bugs.python.org (Adam Olsen) Date: Mon, 16 Jun 2008 18:45:55 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213641955.7.0.811713320929.issue3125@psf.upfronthosting.co.za> Adam Olsen added the comment: I see no common symbols between #3102 and #3092, so unless I missed something, they shouldn't be involved. I second the notion that multiprocessing's use of pickle is the triggering factor. Registering so many types is ugly, and IMO it shouldn't register anything it doesn't control. We should either register them global or not at all, and *never* as a side-effect of loading a separate module. I do see some win32-specific behaviour, which may be broken. Thomas, wanna try commenting out these two lines in sharedtypes.py:rebuild_ctype? if sys.platform == 'win32' and type_ not in copy_reg.dispatch_table: copy_reg.pickle(type_, reduce_ctype) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 20:47:18 2008 From: report at bugs.python.org (Jesse Noller) Date: Mon, 16 Jun 2008 18:47:18 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213642038.05.0.72755492562.issue3125@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- nosy: +roudkerk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 20:51:30 2008 From: report at bugs.python.org (Tony Wallace) Date: Mon, 16 Jun 2008 18:51:30 +0000 Subject: [issue3107] memory leak in make test (in "test list"), 2.5.2 not 2.5.1, Linux 64bit In-Reply-To: <1213397967.45.0.45678659954.issue3107@psf.upfronthosting.co.za> Message-ID: <1213642290.71.0.879863607295.issue3107@psf.upfronthosting.co.za> Tony Wallace added the comment: tried again with /configure --prefix=/home/tony/root/usr/local/python-2.5.2 --with-tcl --disable-shared No change But I noticed this when it recompiled. Maybe it is related. gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Objects/obmalloc.o Objects/obmalloc.c Objects/obmalloc.c: In function `new_arena': Objects/obmalloc.c:529: warning: comparison is always false due to limited range of data type (code fragment) /* Double the number of arena objects on each allocation. * Note that it's possible for `numarenas` to overflow. */ numarenas = maxarenas ? maxarenas << 1 : INITIAL_ARENA_OBJECTS; if (numarenas <= maxarenas) return NULL; /* overflow */ if (numarenas > PY_SIZE_MAX / sizeof(*arenas)) /* line 529 here */ return NULL; /* overflow */ nbytes = numarenas * sizeof(*arenas); arenaobj = (struct arena_object *)realloc(arenas, nbytes); if (arenaobj == NULL) return NULL; arenas = arenaobj; _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 20:52:11 2008 From: report at bugs.python.org (Thomas Heller) Date: Mon, 16 Jun 2008 18:52:11 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213641955.7.0.811713320929.issue3125@psf.upfronthosting.co.za> Message-ID: <4856B635.8090808@ctypes.org> Thomas Heller added the comment: > Adam Olsen added the comment: > > I see no common symbols between #3102 and #3092, so unless I missed > something, they shouldn't be involved. > > I second the notion that multiprocessing's use of pickle is the > triggering factor. Registering so many types is ugly, and IMO it > shouldn't register anything it doesn't control. We should either > register them global or not at all, and *never* as a side-effect of > loading a separate module. > > I do see some win32-specific behaviour, which may be broken. Thomas, > wanna try commenting out these two lines in sharedtypes.py:rebuild_ctype? > > if sys.platform == 'win32' and type_ not in copy_reg.dispatch_table: > copy_reg.pickle(type_, reduce_ctype) This fixes the failure in test_ctypes, but test_multiprocessing no longer works: c:\svn\trunk\PCbuild>.\\python_d -E -tt ../lib/test/regrtest.py test_multiprocessing test_ctypes test_multiprocessing Traceback (most recent call last): File "", line 1, in File "c:\svn\trunk\lib\multiprocessing\forking.py", line 297, in main self = load(from_parent) EOFError [48274 refs] Traceback (most recent call last): File "", line 1, in File "c:\svn\trunk\lib\multiprocessing\forking.py", line 297, in main self = load(from_parent) EOFError [48763 refs] test test_multiprocessing failed -- errors occurred; run in verbose mode for details test_ctypes 1 test OK. 1 test failed: test_multiprocessing [118894 refs] c:\svn\trunk\PCbuild> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 20:56:15 2008 From: report at bugs.python.org (Thomas Heller) Date: Mon, 16 Jun 2008 18:56:15 +0000 Subject: [issue3124] test_multiprocessing segfaults on Windows In-Reply-To: <4856A521.4080006@ctypes.org> Message-ID: <4856B73D.4020902@ctypes.org> Thomas Heller added the comment: > Thomas Heller added the comment: > > Yes, the patch weakref_cycle.patch from #3100 fixes the problem. BTW: I also get a segfault on Linux, which is fixed by this patch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 21:08:15 2008 From: report at bugs.python.org (Leandro Lucarella) Date: Mon, 16 Jun 2008 19:08:15 +0000 Subject: [issue2295] cPickle corner case - docs or bug? In-Reply-To: <1205608726.73.0.310899298914.issue2295@psf.upfronthosting.co.za> Message-ID: <1213643295.16.0.889413136321.issue2295@psf.upfronthosting.co.za> Leandro Lucarella added the comment: I'm having the same problem here. Error is: cPickle.PicklingError: Can't pickle qos.Device: it's not the same object as qos.Device If I use pickle module, it works fine. If I use cPickle module but with protocol=0, it works fine (protocol=1 or protocol=2 both fail). I'm trying to make a simple example that reproduce the problem, but I couldn't do it yet (small tests seems to work). So for now, I just can only offer the complete source code of my project[1] (see branch "python-bug-2295"). Not that the bug is exposed by the commit b0ef5dd[2], and it's only exposed in the "qos" module (other modules works fine). To see the backtrace it should be enough to download the project (you can download a tarball[3] or use git via git protocol[4] -preferred- or http[5]) and execute ./pymind [1] http://git.llucax.com.ar/?p=software/pymin.git;a=shortlog;h=refs/heads/python-bug-2295 [2] http://git.llucax.com.ar/?p=software/pymin.git;a=commitdiff;h=b0ef5ddfd5b04ecb09a18fb6f253c9f8a7db48a8 [3] http://git.llucax.com.ar/?p=software/pymin.git;a=snapshot;h=f19fc5b4f5eeda18a24b1f5a2d042fd206c9ed0f;sf=tgz [4] git clone git://git.llucax.com.ar/software/pymin.git [5] git clone http://git.llucax.com.ar/git/software/pymin.git ---------- nosy: +llucax _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 21:15:06 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 16 Jun 2008 19:15:06 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213643706.03.0.230043907565.issue3100@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Committed r64309, with the suggested whitespace change. Will backport. Concerning the INCREF patch: would a simple "assert(refcnt>0)" be enough? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 21:24:01 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 16 Jun 2008 19:24:01 +0000 Subject: [issue3124] test_multiprocessing segfaults on Windows In-Reply-To: <1213637147.58.0.717278933359.issue3124@psf.upfronthosting.co.za> Message-ID: <1213644241.62.0.834845475403.issue3124@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This is a duplicate of #3100, which has been corrected by r64309. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 21:40:34 2008 From: report at bugs.python.org (Leandro Lucarella) Date: Mon, 16 Jun 2008 19:40:34 +0000 Subject: [issue2295] cPickle corner case - docs or bug? In-Reply-To: <1205608726.73.0.310899298914.issue2295@psf.upfronthosting.co.za> Message-ID: <1213645234.21.0.754719768313.issue2295@psf.upfronthosting.co.za> Leandro Lucarella added the comment: I've noted that the problem goes away if I move the pymin/services/* directories (i.e., the packages in pymin/services) to another place (for example, a services directory in the root of the project). I still can't make a simple test to reproduce the problem. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 22:18:43 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 16 Jun 2008 20:18:43 +0000 Subject: [issue3123] 2to3 fails In-Reply-To: <1213624242.61.0.802384871781.issue3123@psf.upfronthosting.co.za> Message-ID: <1213647523.71.0.69714778808.issue3123@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for noticing. I apologize and fixed it in r64313. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 22:28:08 2008 From: report at bugs.python.org (Adam Olsen) Date: Mon, 16 Jun 2008 20:28:08 +0000 Subject: [issue3100] weakref subclass segfault In-Reply-To: <1213327200.12.0.747745402104.issue3100@psf.upfronthosting.co.za> Message-ID: <1213648088.85.0.161106866629.issue3100@psf.upfronthosting.co.za> Adam Olsen added the comment: Unfortunately, Py_INCREF is sometimes used in an expression (followed by a comma). I wouldn't expect an assert to be valid there (and I'd want to check ISO C to make sure it's portable, not just accepted by GCC). I'd like if Py_INCREF and friends were made into static inline functions, which *should* have identical performance (at least on GCC), but that's a more significant change. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 16 22:37:10 2008 From: report at bugs.python.org (Jesse Noller) Date: Mon, 16 Jun 2008 20:37:10 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213648630.32.0.751360813083.issue3088@psf.upfronthosting.co.za> Jesse Noller added the comment: I don't have commit rights, so I can't apply the test_multiprocessing_reduced.diff myself. Anyone willing? I think this should help the buildbots. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 00:54:06 2008 From: report at bugs.python.org (Bob Farrell) Date: Mon, 16 Jun 2008 22:54:06 +0000 Subject: [issue3126] Lib/logging/__init__.py assumes its stream has flush and close methods In-Reply-To: <1213656846.24.0.635505391372.issue3126@psf.upfronthosting.co.za> Message-ID: <1213656846.24.0.635505391372.issue3126@psf.upfronthosting.co.za> New submission from Bob Farrell : The documentation for the sys module says: "stdout and stderr needn't be built-in file objects: any object is acceptable as long as it has a write() method that takes a string argument." However, the logging module calls flush() and close() on StreamHandler.stream (and stream may be stdout), yet stdout does not apparently need to have these methods - this caused breakage for a program of mine that redirects stdout and can import arbitrary modules (it's an interactive interpreter). The attached patch checks that these two methods exist (using hastattr) before calling them. ---------- components: Library (Lib) files: __init__.py.patch keywords: patch messages: 68296 nosy: bobf severity: normal status: open title: Lib/logging/__init__.py assumes its stream has flush and close methods type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10640/__init__.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 00:56:39 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 16 Jun 2008 22:56:39 +0000 Subject: [issue3126] Lib/logging/__init__.py assumes its stream has flush and close methods In-Reply-To: <1213656846.24.0.635505391372.issue3126@psf.upfronthosting.co.za> Message-ID: <1213656999.88.0.200709240569.issue3126@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> vsajip nosy: +vsajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 01:44:28 2008 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 16 Jun 2008 23:44:28 +0000 Subject: [issue1774370] Add Tkinter.Checkbutton get() and set(value) Message-ID: <1213659868.32.0.557915250349.issue1774370@psf.upfronthosting.co.za> Guilherme Polo added the comment: The checkbutton widget doesn't have get and set commands, so I'm not sure why you said to look at its man page. But the idea of not needing to play with SomeVar creation is good, I like it, but then I would prefer to add it to all the other widgets that play with it. And it could be a property. ---------- nosy: +gpolo resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 02:01:48 2008 From: report at bugs.python.org (Tony Wallace) Date: Tue, 17 Jun 2008 00:01:48 +0000 Subject: [issue3107] memory leak in make test (in "test list"), 2.5.2 not 2.5.1, Linux 64bit In-Reply-To: <1213397967.45.0.45678659954.issue3107@psf.upfronthosting.co.za> Message-ID: <1213660908.1.0.150867829092.issue3107@psf.upfronthosting.co.za> Tony Wallace added the comment: > Objects/obmalloc.c:529: warning: > comparison is always false due to limited range of data type This compile complaint was definitely introduced in 2.5.2 by source changes from 2.5.1. So, there's a minor problem that could be fixed, anyway. However, replacing the 2.5.2 version of obmalloc.c with the 2.5.1 version and rebuilding (with incremental make this time) did NOT help the memory leak in test_list - I still get it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 02:23:55 2008 From: report at bugs.python.org (Adam Olsen) Date: Tue, 17 Jun 2008 00:23:55 +0000 Subject: [issue3107] memory leak in make test (in "test list"), 2.5.2 not 2.5.1, Linux 64bit In-Reply-To: <1213397967.45.0.45678659954.issue3107@psf.upfronthosting.co.za> Message-ID: <1213662235.45.0.805314818805.issue3107@psf.upfronthosting.co.za> Changes by Adam Olsen : ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 02:57:00 2008 From: report at bugs.python.org (Roger Serwy) Date: Tue, 17 Jun 2008 00:57:00 +0000 Subject: [issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface In-Reply-To: <1209319360.66.0.583090952017.issue2704@psf.upfronthosting.co.za> Message-ID: <1213664220.08.0.248748614246.issue2704@psf.upfronthosting.co.za> Roger Serwy added the comment: I rewrote the patch to better handle multi-line input. In rewriting the patch I realized that there can be many different ways to handle up/down key presses while the cursor is in the input region. Here is the behavior of this patch: For single line inputs: * If the cursor is at the end of the line, then up/down navigates the history. * If the cursor is not at the end of the line, then up/down places the cursor at the end, so that subsequent up/down navigates the history. For multi-line inputs: * If the cursor is at the end of the input and the input is in the history, then up/down navigates the history. * If the cursor is at the end of the input and the input is NOT in the history, then up will move the cursor up. * If the cursor is at the first line of the input, then up will be ignored. * If the cursor is on the last line of the input, then down will be ignored. If the cursor leaves the input area, either by pressing left at the start of the input area, or by clicking elsewhere in the text box, the up/down keys behave as they do now. If the cursor is outside the input area and a character key is pressed, the cursor is placed and the end of the input, and the character is placed there. Also, this patch fixes a subtle cursor placement bug when dealing with multi-line inputs. When navigating from line 2 to line 1 of a multi-line, the cursor can end up in the ">>>" prompt. This is fixed so that the cursor stays in the input area. Added file: http://bugs.python.org/file10641/PyShell.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 05:08:10 2008 From: report at bugs.python.org (Jeremy Hylton) Date: Tue, 17 Jun 2008 03:08:10 +0000 Subject: [issue2885] Create the urllib package In-Reply-To: <1213236616.14.0.243061842934.issue2885@psf.upfronthosting.co.za> Message-ID: Jeremy Hylton added the comment: Oops. Let me look at this tomorrow. It was down to one failing test that last time I checked. Jeremy On Wed, Jun 11, 2008 at 10:10 PM, Barry A. Warsaw wrote: > > Barry A. Warsaw added the comment: > > This didn't get done for the first beta. Please try to do it asap after > the beta releases. > > ---------- > nosy: +barry > priority: release blocker -> critical > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > Python-bugs-list mailing list > Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/jeremy%40alum.mit.edu > > _______________________________________ Python tracker _______________________________________ From jeremy at alum.mit.edu Tue Jun 17 05:02:56 2008 From: jeremy at alum.mit.edu (Jeremy Hylton) Date: Mon, 16 Jun 2008 23:02:56 -0400 Subject: [issue2885] Create the urllib package In-Reply-To: <1213236616.14.0.243061842934.issue2885@psf.upfronthosting.co.za> References: <1210914691.08.0.848288242706.issue2885@psf.upfronthosting.co.za> <1213236616.14.0.243061842934.issue2885@psf.upfronthosting.co.za> Message-ID: Oops. Let me look at this tomorrow. It was down to one failing test that last time I checked. Jeremy On Wed, Jun 11, 2008 at 10:10 PM, Barry A. Warsaw wrote: > > Barry A. Warsaw added the comment: > > This didn't get done for the first beta. Please try to do it asap after > the beta releases. > > ---------- > nosy: +barry > priority: release blocker -> critical > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > Python-bugs-list mailing list > Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/jeremy%40alum.mit.edu > > From report at bugs.python.org Tue Jun 17 06:57:50 2008 From: report at bugs.python.org (Ismail Donmez) Date: Tue, 17 Jun 2008 04:57:50 +0000 Subject: [issue3121] test_urllibnet fails In-Reply-To: <1213605129.04.0.398853048978.issue3121@psf.upfronthosting.co.za> Message-ID: <1213678669.82.0.32662351773.issue3121@psf.upfronthosting.co.za> Ismail Donmez added the comment: Just confirmed with svn revision 64322 of py3k branch. ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 07:23:02 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 17 Jun 2008 05:23:02 +0000 Subject: [issue2610] string representation of range and dictionary views In-Reply-To: <1207858708.98.0.537185652213.issue2610@psf.upfronthosting.co.za> Message-ID: <1213680182.53.0.244474364392.issue2610@psf.upfronthosting.co.za> Martin v. L?wis added the comment: After reviewing this again, I'm skeptical that this is a good idea. It doesn't achieve its original purpose (anymore), as it only changes tp_str for range objects (although it does change tp_repr for dict views - why this inconsistency?). So I'm -0 on the patch, meaning that I won't commit it, but won't object to anybody else committing it, either. Technically, in dictview_repr, the first call to PyUnicode_Concat isn't checked for exceptions. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 08:56:37 2008 From: report at bugs.python.org (Aldona Majorek) Date: Tue, 17 Jun 2008 06:56:37 +0000 Subject: [issue3127] Segfault provoked by generators and exceptions In-Reply-To: <1213685796.92.0.800027132009.issue3127@psf.upfronthosting.co.za> Message-ID: <1213685796.92.0.800027132009.issue3127@psf.upfronthosting.co.za> New submission from Aldona Majorek : Copy of issue 1579370 Programs using generators, exceptions and threads could crash. I was not able to make plain python program to crash, but python program embedded in C++ crashed very reliably. No more crashes after applying patch from 2.5 version stopped helped. I verified that bug and patch on python 2.4.3. Looking at the source code in svn, the same but lurks in latest 2.3 and 2.2 (since generators were introduced). ---------- components: Interpreter Core messages: 68303 nosy: amajorek, awaters, eric_noyau, klaas, loewis, mwh, nnorwitz, tim_one severity: normal status: open title: Segfault provoked by generators and exceptions type: crash versions: Python 2.2.3, Python 2.3, Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 09:16:28 2008 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9_Fritzsche?=) Date: Tue, 17 Jun 2008 07:16:28 +0000 Subject: [issue3128] Regex causes python to hang up? / loop infinite? In-Reply-To: <1213686983.49.0.329999493672.issue3128@psf.upfronthosting.co.za> Message-ID: <1213686983.49.0.329999493672.issue3128@psf.upfronthosting.co.za> New submission from Andr? Fritzsche : After struggling around with my code for nearly 1 hour now, I found out that one of my regular expressions with a special string causes python to hang up - not really hang up, because the processor usage is at nearly 100%, so I think the regex machine is looping infinite. Here is the regex-string: re_exc_line = re.compile ( # ignore everything before the first match r'^.*' + # first group (includes second | third) r'(?:' + # second group "(line) (file)" r'(?:' + # (text to ignore, line [number]) r'\([^,]+\s*,\s*line\s+(?P\d+)\)' + # any text ([filename]) any text r'.*\((?:(?P[^)]+))*\).*' + # end of second group r')' + # or r'|' + # third group "(file) (line)" r'(?:' + # ([filename]) r'\((?:(?P[^)]+))*\)' + # any text (text to ignore, line [number]) any text r'.*\([^,]+\s*,\s*line\s+(?P\d+)\).*' + # end of third group r')' + # end of first group r')' + # any text after it r'.*$' , re.I ) It should match either the construct: 1. """some optional text (text to ignore, line [12]) ([any_filename]) followed by optional text""" or: 2. """some optional text ([any_filename]) (text to ignore, line [12]) followed by optional text""" If first text matches, it is put into 'line1' and 'file1' and if the second one matches into 'line2' and 'file2' of the groupdict. For the upper both examples everything is ok, but having the following string (I had to change some pathnames, because they contained customer names): msg = ( r"Error: Error during parsing: invalid syntax " + r"(D:\Projects\retest\ver_700\lib\_test\test_sapekl.py, line 14) " + r"-- Error during parsing: invalid syntax " + r"(D:\projects\retest\ver_700\modules\sapekl\__init__.py, line 21) " + r"-- Attempted relative import in non-package, or beyond toplevel " + r"package") used with the upper regex: re_exc_line.match(msg) is running for two hours now (on a 3Ghz Machine)! I've attached everything as an example file and hope, I could help you. ---------- components: Regular Expressions files: re_problem.py messages: 68304 nosy: computercrustie severity: normal status: open title: Regex causes python to hang up? / loop infinite? type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10642/re_problem.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 09:24:48 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 17 Jun 2008 07:24:48 +0000 Subject: [issue3127] Segfault provoked by generators and exceptions In-Reply-To: <1213685796.92.0.800027132009.issue3127@psf.upfronthosting.co.za> Message-ID: <1213687488.32.0.221582961713.issue3127@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This is right, but there won't be any more 2.4 release. Either apply the patch to your local copy of the sources, or simply upgrade to 2.5. ---------- nosy: +amaury.forgeotdarc resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 09:52:11 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 17 Jun 2008 07:52:11 +0000 Subject: [issue3128] Regex causes python to hang up? / loop infinite? In-Reply-To: <1213686983.49.0.329999493672.issue3128@psf.upfronthosting.co.za> Message-ID: <1213689131.22.0.0269086269174.issue3128@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: To optimize your query, you could remove '^.*' and '.*$', and replace match() with search(). Now it returns instantly... ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 10:12:47 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Jun 2008 08:12:47 +0000 Subject: [issue2610] string representation of range and dictionary views In-Reply-To: <1207858708.98.0.537185652213.issue2610@psf.upfronthosting.co.za> Message-ID: <1213690367.38.0.267135517143.issue2610@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm also -1 on the patch and think it is the wrong solution. Efforts should probably be directed at hooking the output of the interactive interpreter. We already have code that suppresses None return values and assigns results to "_". That same code can also add custom interactive reporting for a few, known iterators. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 10:14:48 2008 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9_Fritzsche?=) Date: Tue, 17 Jun 2008 08:14:48 +0000 Subject: [issue3128] Regex causes python to hang up? / loop infinite? In-Reply-To: <1213686983.49.0.329999493672.issue3128@psf.upfronthosting.co.za> Message-ID: <1213690488.03.0.110240948911.issue3128@psf.upfronthosting.co.za> Andr? Fritzsche added the comment: Thank you for this answer. It solves my problem, but I think that the issues ist still existing - or not? (The regex is running on - 3 hours now) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 11:21:09 2008 From: report at bugs.python.org (Caleb Deveraux) Date: Tue, 17 Jun 2008 09:21:09 +0000 Subject: [issue3129] struct allows repeat spec. without a format specifier In-Reply-To: <1213694469.69.0.0950890622628.issue3129@psf.upfronthosting.co.za> Message-ID: <1213694469.69.0.0950890622628.issue3129@psf.upfronthosting.co.za> New submission from Caleb Deveraux : I'm not exactly sure if this is a bug or by design. Within the struct module, whenever you provide a format string containing a repeat count with no associated format specifier, the count is silently ignored. eg. >>> struct.pack("12345") '' >>> struct.pack("3s42", "abc") 'abc' (This also happens with unpack*, and pack_into) The attached patch changes the above behavior to the following: >>> struct.pack("12345") struct.error: repeat count given without format specifier >>> struct.pack("3s42", "abc") struct.error: repeat count given without format specifier Unit tests are included. The attached patch is built against revision 64324 of the python SVN trunk. Odd behavior observed in both 2.6 (svn r64324), and 2.5.2. (Tested on Ubuntu x86_64 w/ Linux kernel 2.6.24) ---------- components: Library (Lib) files: patch.p0 messages: 68309 nosy: carrus85 severity: normal status: open title: struct allows repeat spec. without a format specifier type: behavior versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file10643/patch.p0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 11:39:10 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Tue, 17 Jun 2008 09:39:10 +0000 Subject: [issue3130] In some UCS4 builds, sizeof(Py_UNICODE) could end up being more than 4. In-Reply-To: <1213695549.9.0.858416360908.issue3130@psf.upfronthosting.co.za> Message-ID: <1213695549.9.0.858416360908.issue3130@psf.upfronthosting.co.za> New submission from Robert Schuppenies : This issue is a branch from issue3098. Below a summary of the discussion: Antoine Pitrou wrote: > It seems that in some UCS4 builds, sizeof(Py_UNICODE) could end > up being more than 4 if the native int type is itself larger than 32 > bits; although the latter is probably quite rare (64-bit platforms are > usually either LP64 or LLP64). Marc-Andre Lemburg wrote: > AFAIK, only Crays have this problem, but apart from that: I'd consider > it a bug if sizeof(Py_UCS4) != 4. Antoine Pitrou wrote: > Perhaps a #error can be added to that effect? > Something like (untested): > > #if SIZEOF_INT == 4 > typedef unsigned int Py_UCS4; > #elif SIZEOF_LONG == 4 > typedef unsigned long Py_UCS4; > #else > #error Could not find a 4-byte integer type for Py_UCS4, aborting > #endif Marc-Andre Lemburg wrote: > Sounds good ! > > Python should really try to use uint32_t as fallback solution for > UCS4 where available (and uint16_t for UCS2). > > We'd have to add an AC_TYPE_INT32_T and AC_TYPE_INT16_T check to > configure: > > http://www.gnu.org/software/autoconf/manual/html_node/Particular-Types.html#Particular-Types > > and could then use > > typedef uint32_t Py_UCS4 > > and > > typedef uint16_t Py_UCS2 > > Note that the code for supporting UCS2/UCS4 is not really all that > clean. It was a quick sprint between Martin and Fredrik and appears > to be only half-done... e.g. there currently is no Py_UCS2. ---------- components: Unicode messages: 68310 nosy: schuppenies severity: normal status: open title: In some UCS4 builds, sizeof(Py_UNICODE) could end up being more than 4. type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 11:59:15 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Jun 2008 09:59:15 +0000 Subject: [issue3130] In some UCS4 builds, sizeof(Py_UNICODE) could end up being more than 4. In-Reply-To: <1213695549.9.0.858416360908.issue3130@psf.upfronthosting.co.za> Message-ID: <1213696755.83.0.649675516723.issue3130@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +effbot, lemburg, loewis, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 12:07:03 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 17 Jun 2008 10:07:03 +0000 Subject: [issue3128] Regex causes python to hang up? / loop infinite? In-Reply-To: <1213686983.49.0.329999493672.issue3128@psf.upfronthosting.co.za> Message-ID: <1213697223.75.0.276865899968.issue3128@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Are you sure your regexp will return what you want? The best match for the first part of the alternative is ("14", "D:\projects\retest\ver_700\modules\sapekl\__init__.py, line 21" ) The best match for the second part is ("D:\Projects\retest\ver_700\lib\_test\test_sapekl.py, line 14", "21" ) IOW, don't forget that the * operator will first try the longest possible match. Also, there seem to be an extra * here: # any text ([filename]) any text r'.*\((?:(?P[^)]+))*\).*' + ^ This alone can make the number of combinations explodes. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 12:34:10 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Tue, 17 Jun 2008 10:34:10 +0000 Subject: [issue3098] sys.sizeof test fails with wide unicode In-Reply-To: <1213308797.17.0.524206441717.issue3098@psf.upfronthosting.co.za> Message-ID: <1213698850.16.0.364116592566.issue3098@psf.upfronthosting.co.za> Robert Schuppenies added the comment: I followed Marc's advise and checked-in a corrected test. Besides, I opened a new issue to address the fallback solution for UCS4 and UCS2 (see issue3130). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 13:06:55 2008 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 17 Jun 2008 11:06:55 +0000 Subject: [issue3126] Lib/logging/__init__.py assumes its stream has flush and close methods In-Reply-To: <1213656846.24.0.635505391372.issue3126@psf.upfronthosting.co.za> Message-ID: <1213700815.62.0.0154504299199.issue3126@psf.upfronthosting.co.za> Vinay Sajip added the comment: Fix checked into SVN. Thanks for the patch. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 13:13:18 2008 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9_Fritzsche?=) Date: Tue, 17 Jun 2008 11:13:18 +0000 Subject: [issue3128] Regex causes python to hang up? / loop infinite? In-Reply-To: <1213686983.49.0.329999493672.issue3128@psf.upfronthosting.co.za> Message-ID: <1213701198.94.0.940668615634.issue3128@psf.upfronthosting.co.za> Andr? Fritzsche added the comment: Further I was, because the upper listed string wasn't expected for this code (until it occured the first time ;-) ) Normally there has been only one occurence of "(file) (.., line)" or "(.., line) (file)" per string, so the regex did quite do what I expected - never the less you are right - instead of the '*' operator I should have used a '?' operator for the repetition. So far many thanks for your recommendations - but the question is if it is ok that a regex may block a process such a long time? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 13:45:23 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 17 Jun 2008 11:45:23 +0000 Subject: [issue3128] Regex causes python to hang up? / loop infinite? In-Reply-To: <1213686983.49.0.329999493672.issue3128@psf.upfronthosting.co.za> Message-ID: <1213703122.83.0.41483137706.issue3128@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Yes, this can happen. See http://www.regular-expressions.info/catastrophic.html I am sure your regexp belongs to the same category. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 14:11:19 2008 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9_Fritzsche?=) Date: Tue, 17 Jun 2008 12:11:19 +0000 Subject: [issue3128] Regex causes python to hang up? / loop infinite? In-Reply-To: <1213686983.49.0.329999493672.issue3128@psf.upfronthosting.co.za> Message-ID: <1213704679.11.0.629993694463.issue3128@psf.upfronthosting.co.za> Andr? Fritzsche added the comment: Thanks for the link, it was very interesting to read what can happen in some circumstances. I think, the first two chapters can match to the problem. So the type of this issue should be feature request ;-) Never the less I learned something new, so the invested time wasn't wasted. Greez _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 14:29:50 2008 From: report at bugs.python.org (Brad Miller) Date: Tue, 17 Jun 2008 12:29:50 +0000 Subject: [issue2610] string representation of range and dictionary views In-Reply-To: <1213680182.53.0.244474364392.issue2610@psf.upfronthosting.co.za> Message-ID: Brad Miller added the comment: On Tue, Jun 17, 2008 at 12:23 AM, Martin v. L?wis wrote: > > Martin v. L?wis added the comment: > > After reviewing this again, I'm skeptical that this is a good idea. It > doesn't achieve its original purpose (anymore), as it only changes > tp_str for range objects (although it does change tp_repr for dict views > - why this inconsistency?). > The reason for the inconsistency is that there was a strong argument that the tp_repr for range already returned something useful that people could take advantage of in their code. The same was not the case for the dict views. I do not understand why you think that having the interpreter display when x.keys() is called is not an improvement over Maybe it is just because I spend a lot more time in the interactive interpreter that I see this as a big improvement. So if, as Raymond Hettinger suggests, the interpreter is the right place to make this change I'd still be happy to provide a patch if someone could give me a pointer for where to start looking. Brad > So I'm -0 on the patch, meaning that I won't commit it, but won't object > to anybody else committing it, either. > > Technically, in dictview_repr, the first call to PyUnicode_Concat isn't > checked for exceptions. > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 14:43:24 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Jun 2008 12:43:24 +0000 Subject: [issue3056] Simplify the Integral ABC In-Reply-To: <1212803845.73.0.399511532431.issue3056@psf.upfronthosting.co.za> Message-ID: <1213706603.96.0.0404647806531.issue3056@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Jeffrey, do you have an interest in taking it from here? ---------- assignee: rhettinger -> jyasskin nosy: +jyasskin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 14:57:32 2008 From: report at bugs.python.org (Haoyu Bai) Date: Tue, 17 Jun 2008 12:57:32 +0000 Subject: [issue3131] 2to3 can't find fixes_dir In-Reply-To: <1213707451.37.0.990669218912.issue3131@psf.upfronthosting.co.za> Message-ID: <1213707451.37.0.990669218912.issue3131@psf.upfronthosting.co.za> New submission from Haoyu Bai : After install Python 3.0 r64319 on my Linux system, running 2to3 given the below error: $ 2to3 hello23.py Traceback (most recent call last): File "/usr/bin/2to3", line 5, in sys.exit(refactor.main("lib2to3/fixes")) File "/usr/lib/python3.0/lib2to3/refactor.py", line 81, in main rt = RefactoringTool(fixer_dir, options) File "/usr/lib/python3.0/lib2to3/refactor.py", line 160, in __init__ self.pre_order, self.post_order = self.get_fixers() File "/usr/lib/python3.0/lib2to3/refactor.py", line 180, in get_fixers fix_names = get_all_fix_names(self.fixer_dir) File "/usr/lib/python3.0/lib2to3/refactor.py", line 95, in get_all_fix_names names = os.listdir(fixer_dir) OSError: [Errno 2] No such file or directory: 'lib2to3/fixes' ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 68319 nosy: bhy, collinwinter severity: normal status: open title: 2to3 can't find fixes_dir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 15:07:37 2008 From: report at bugs.python.org (Aristotelis Mikropoulos) Date: Tue, 17 Jun 2008 13:07:37 +0000 Subject: [issue3078] tokenize.py improvements In-Reply-To: <1213189845.98.0.955979167249.issue3078@psf.upfronthosting.co.za> Message-ID: <1213708057.58.0.342992458319.issue3078@psf.upfronthosting.co.za> Aristotelis Mikropoulos added the comment: So, will this patch be applied? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 15:11:58 2008 From: report at bugs.python.org (Aristotelis Mikropoulos) Date: Tue, 17 Jun 2008 13:11:58 +0000 Subject: [issue1778443] robotparser.py fixes Message-ID: <1213708318.82.0.819486736589.issue1778443@psf.upfronthosting.co.za> Aristotelis Mikropoulos added the comment: Is the patch, now, in an acceptable format? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 15:17:08 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 17 Jun 2008 13:17:08 +0000 Subject: [issue1778443] robotparser.py fixes Message-ID: <1213708628.83.0.765389763409.issue1778443@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Skip, are you still maintaining this? ---------- assignee: -> skip.montanaro nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 15:42:59 2008 From: report at bugs.python.org (Aristotelis Mikropoulos) Date: Tue, 17 Jun 2008 13:42:59 +0000 Subject: [issue1778443] robotparser.py fixes Message-ID: <1213710179.77.0.578756831562.issue1778443@psf.upfronthosting.co.za> Aristotelis Mikropoulos added the comment: Yes, why not? Actually, I am the original author of the patch, but I changed my username like I said above (in a previous post). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 15:43:42 2008 From: report at bugs.python.org (Aristotelis Mikropoulos) Date: Tue, 17 Jun 2008 13:43:42 +0000 Subject: [issue1778443] robotparser.py fixes Message-ID: <1213710222.03.0.119270765404.issue1778443@psf.upfronthosting.co.za> Aristotelis Mikropoulos added the comment: Oh, I am sorry, I thought you were talking to me. Excuse me. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 15:56:35 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Jun 2008 13:56:35 +0000 Subject: [issue3078] tokenize.py improvements In-Reply-To: <1213189845.98.0.955979167249.issue3078@psf.upfronthosting.co.za> Message-ID: <1213710995.56.0.144631352952.issue3078@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, I don't see any value in this kind of patch. The line "contline = += line" is broken. The "+=" transformations and else-clause eliminations trivially re-arrange code without any real savings. The "while 1" to "while True" transformation should not be done in Py2.x because the latter is much slower ("while True" requires loading a global variable and a test; in contrast, "while 1" is optimized to an unconditional jump. ---------- nosy: +rhettinger resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 16:04:54 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Jun 2008 14:04:54 +0000 Subject: [issue1778443] robotparser.py fixes Message-ID: <1213711494.2.0.0922356821689.issue1778443@psf.upfronthosting.co.za> Raymond Hettinger added the comment: These changes mostly look fine but shouldn't go it until after the beta. This is really the wrong time in the release cycle to be making minor spacing changes and making it harder to get a meaningful "svn ann". BTW, the first change should go the distance and use map() instead of a list comprehension: lines = map(str.strip, f) ---------- nosy: +rhettinger priority: normal -> low versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 16:34:21 2008 From: report at bugs.python.org (Aristotelis Mikropoulos) Date: Tue, 17 Jun 2008 14:34:21 +0000 Subject: [issue1778443] robotparser.py fixes Message-ID: <1213713261.61.0.0881296979244.issue1778443@psf.upfronthosting.co.za> Aristotelis Mikropoulos added the comment: OK _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 17:07:52 2008 From: report at bugs.python.org (Jesse Noller) Date: Tue, 17 Jun 2008 15:07:52 +0000 Subject: [issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error In-Reply-To: <1213472808.51.0.731079646072.issue3111@psf.upfronthosting.co.za> Message-ID: <1213715272.31.0.485297957671.issue3111@psf.upfronthosting.co.za> Jesse Noller added the comment: I believe this is a Linux-specific problem relating to chroot jails missing the /dev/shm filesystem. I am suggesting we skip the test for now if /dev/shm does not exist, via: if (sys.platform.startswith("linux"): if not os.path.exists("/dev/shm"): raise TestSkipped("Missing required /dev/shm device on Linux!") at the top of test_multiprocessing.py Anyone see a problem with this? ---------- nosy: +Rhamphoryncus, benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 17:59:34 2008 From: report at bugs.python.org (Sam Pablo Kuper) Date: Tue, 17 Jun 2008 15:59:34 +0000 Subject: [issue2931] optparse: various problems with unicode and gettext In-Reply-To: <1211297479.44.0.970954846769.issue2931@psf.upfronthosting.co.za> Message-ID: <1213718374.74.0.397948523996.issue2931@psf.upfronthosting.co.za> Sam Pablo Kuper added the comment: Using non-ASCII characters in an optparse help string also causes UnicodeDecodeErrors. Here's the relevant part of the traceback: File "/home/spk30/opt/ActivePython-2.5/lib/python2.5/optparse.py", line 1655, in print_help file.write(self.format_help().encode(encoding, "replace")) NB. Adding an encoding declaration at the beginning of the python script which used a non-ASCII character in an optparse help string didn't solve the problem. ---------- nosy: +sampablokuper versions: +Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 18:00:00 2008 From: report at bugs.python.org (Skip Montanaro) Date: Tue, 17 Jun 2008 16:00:00 +0000 Subject: [issue3110] Multiprocessing package build problem on Solaris 10 In-Reply-To: <1213472177.07.0.795399068376.issue3110@psf.upfronthosting.co.za> Message-ID: <18519.57206.136109.733421@montanaro-dyndns-org.local> Skip Montanaro added the comment: Jesse> Per skip's email: Jesse> FWIW, it appears that Solaris doesn't define SEM_VALUE_MAX but does Jesse> define Jesse> _SEM_VALUE_MAX in sys/params.h. ... Thanks for submitting the bug report. I wonder why the processing module installs on Solaris10 but multiprocessing fails to compile. Did the SEM_VALUE_MAX code change between the two variants? Skip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 18:58:41 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 17 Jun 2008 16:58:41 +0000 Subject: [issue3118] test_math fails on 64bit In-Reply-To: <1213583966.69.0.618889033517.issue3118@psf.upfronthosting.co.za> Message-ID: <1213721921.83.0.300164713225.issue3118@psf.upfronthosting.co.za> Mark Dickinson added the comment: I suspect that what's happening is that errno is being set to ERANGE on a subnormal results; this is somewhat ... um ... unorthodox. In that case, the fix would be to raise OverflowError when errno is set to ERANGE and the function result x is larger than 1, say, in absolute value. (Currently the code ignores errno=ERANGE only when x == 0.) Could someone with access to ia64 hardware test the attached patch? ---------- keywords: +patch nosy: +marketdickinson Added file: http://bugs.python.org/file10644/math_64.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 19:05:03 2008 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 17 Jun 2008 17:05:03 +0000 Subject: [issue3056] Simplify the Integral ABC In-Reply-To: <1212803845.73.0.399511532431.issue3056@psf.upfronthosting.co.za> Message-ID: <1213722303.62.0.879700285881.issue3056@psf.upfronthosting.co.za> Guido van Rossum added the comment: Raymond, mind if we roll back your previous (incorrect) changes? They really should not have been submitted in the first place. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 19:17:33 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Jun 2008 17:17:33 +0000 Subject: [issue3056] Simplify the Integral ABC In-Reply-To: <1212803845.73.0.399511532431.issue3056@psf.upfronthosting.co.za> Message-ID: <1213723053.75.0.522788178966.issue3056@psf.upfronthosting.co.za> Raymond Hettinger added the comment: No problem. Whatever you think is best. Still hoping that Jeffrey can take a look at the mixin approach and the __rand__ logic. No one else seems to have an interest and I won't have time to write the tests for a few days (they are complicated because Integral requires so many abstract methods to be defined before it will instantiate). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 19:29:32 2008 From: report at bugs.python.org (Adam Olsen) Date: Tue, 17 Jun 2008 17:29:32 +0000 Subject: [issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error In-Reply-To: <1213472808.51.0.731079646072.issue3111@psf.upfronthosting.co.za> Message-ID: <1213723772.78.0.736013992465.issue3111@psf.upfronthosting.co.za> Adam Olsen added the comment: I don't see a problem with skipping it, but if chroot is the problem, maybe the chroot environment should be fixed to include /dev/shm? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 19:38:32 2008 From: report at bugs.python.org (Jesse Noller) Date: Tue, 17 Jun 2008 17:38:32 +0000 Subject: [issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error In-Reply-To: <1213472808.51.0.731079646072.issue3111@psf.upfronthosting.co.za> Message-ID: <1213724312.03.0.579703453116.issue3111@psf.upfronthosting.co.za> Jesse Noller added the comment: I agree, fixing the chroot is the long-term solution, however this gets us over the beta hump _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 19:43:40 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Tue, 17 Jun 2008 17:43:40 +0000 Subject: [issue2636] Regexp 2.6 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1213724620.33.0.615366054985.issue2636@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: Well, it's time for another update on my progress... Some good news first: Atomic Grouping is now completed, tested and documented, and as stated above, is classified as issue2636-01 and related patches. Secondly, with caveats listed below, Named Match Group Attributes on a match object (item 2) is also more or less complete at issue2636-02 -- it only lacks documentation. Now, I want to also update my list of items. We left off at 11: Other Perl-specific modifications. Since that time, I have spawned a number of other branches, the first of which (issue2636-12) I am happy to announce is also complete! 12) Implement the changes to the documentation of re as per Jim J. Jewett suggestion from 2008-04-24 14:09. Again, this has been done. 13) Implement a grouptuples(...) method as per Mark Summerfield's suggest on 2008-05-28 09:38. grouptuples would take the same filtering parameters as the other group* functions, and would return a list of 3- tuples (unless only 1 group was requested). It should default to all match groups (1..n, not group 0, the matching string). 14) As per PEP-3131 and the move to Python 3.0, python will begin to allow full UNICODE-compliant identifier names. Correspondingly, it would be the responsibility of this item to allow UNICODE names for match groups. This would allow retrieval of UNICODE names via the group* functions or when combined with Item 3, the getitem handler (m[u'...']) (03+14) and the attribute name itself (e.g. getattr(m, u'...')) when combined with item 2 (02+14). 15) Change the Pattern_Type, Match_Type and Scanner_Type (experimental) to become richer Python Types. Specifically, add __doc__ strings to each of these types' methods and members. 16) Implement various FIXMEs. 16-1) Implement the FIXME such that if m is a MatchObject, del m.string will disassociate the original matched string from the match object; string would be the only member that would allow modification or deletion and you will not be able to modify the m.string value, only delete it. ----- Finally, I want to say a couple notes about Item 2: Firstly, as noted in Item 14, I wish to add support for UNICODE match group names, and the current version of the C-code would not allow that; it would only make sense to add UNICODE support if 14 is implemented, so adding support for UNICODE match object attributes would depend on both items 2 and 14. Thus, that would be implemented in issue2636-02+14. Secondly, there is a FIXME which I discussed in Item 16; I gave that problem it's own item and branch. Also, as stated in Item 15, I would like to add more robust help code to the Match object and bind __doc__ strings to the fixed attributes. Although this would not directly effect the Item 2 implementation, it would probably involve moving some code around in its vicinity. Finally, I would like suggestions on how to handle name collisions when match group names are provided as attributes. For instance, an expression like '(?P.*)' would match more or less any string and assign it to the name "pos". But "pos" is already an attribute of the Match object, and therefore pos cannot be exposed as a named match group attribute, since match.pos will return the usual meaning of pos for a match object, not the value of the capture group names "pos". I have 3 proposals as to how to handle this: a) Simply disallow the exposure of match group name attributes if the names collide with an existing member of the basic Match Object interface. b) Expose the reserved names through a special prefix notation, and for forward compatibility, expose all names via this prefix notation. In other words, if the prefix was 'k', match.kpos could be used to access pos; if it was '_', match._pos would be used. If Item 3 is implemented, it may be sufficient to allow access via match['pos'] as the canonical way of handling match group names using reserved words. c) Don't expose the names directly; only expose them through a prefixed name, e.g. match._pos or match.kpos. Personally, I like a because if Item 3 is implemented, it makes a fairly useful shorthand for retrieving keyword names when a keyword is used for a name. Also, we could put a deprecation warning in to inform users that eventually match groups names that are keywords in the Match Object will eventually be disallowed. However, I don't support restricting the match group names any more than they already are (they must be a valid python identifier only) so again I would go with a) and nothing more and that's what's implemented in issue2636-02.patch. ----- Now, rather than posting umteen patch files I am posting one bz2- compressed tar of ALL patch files for all threads, where each file is of the form: issue2636(-\d\d|+\d\d)*(-only)?.patch For instance, issue2636-01.patch is the p1 patch that is a difference between the current Python trunk and all that would need to be implemented to support Atomic Grouping / Possessive Qualifiers. Combined branches are combined with a PLUS ('+') and sub-branches concatenated with a DASH ('- '). Thus, "issue2636-01+09-01-01+10.patch" is a patch which combines the work from Item 1: Atomic Grouping / Possessive Qualifiers, the sub- sub branch of Item 9: Engine Cleanups and Item 10: Shared Constants. Item 9 has both a child and a grandchild. The Child (09-01) is my proposed engine redesign with the single loop; the grandchild (09-01-01) is the redesign with the triple loop. Finally the optional "-only" flag means that the diff is against the core SRE modifications branch and thus does not include the core branch changes. As noted above, Items 01, 02, 05, 07 and 12 should be considered more or less complete and ready for merging assuming I don't identify in my implementation of the other items that I neglected something in these. The rest, including the combined items, are all provided in the given tarball. Added file: http://bugs.python.org/file10645/issue2636-patches.tar.bz2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 19:43:54 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Tue, 17 Jun 2008 17:43:54 +0000 Subject: [issue2636] Regexp 2.6 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1213724634.89.0.0771612578116.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Removed file: http://bugs.python.org/file10052/issue2636-09.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 19:44:03 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Tue, 17 Jun 2008 17:44:03 +0000 Subject: [issue2636] Regexp 2.6 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1213724643.69.0.50722332296.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Removed file: http://bugs.python.org/file10467/issue2636.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 19:43:59 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Tue, 17 Jun 2008 17:43:59 +0000 Subject: [issue2636] Regexp 2.6 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1213724639.96.0.864854900578.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Removed file: http://bugs.python.org/file10428/issue2636-05-only.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 19:44:07 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Tue, 17 Jun 2008 17:44:07 +0000 Subject: [issue2636] Regexp 2.6 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1213724647.01.0.346085304832.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Removed file: http://bugs.python.org/file10468/issue2636-05.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 19:44:10 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Tue, 17 Jun 2008 17:44:10 +0000 Subject: [issue2636] Regexp 2.6 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1213724650.67.0.147563160052.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Removed file: http://bugs.python.org/file10469/issue2636-07.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 19:44:14 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Tue, 17 Jun 2008 17:44:14 +0000 Subject: [issue2636] Regexp 2.6 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1213724654.44.0.82480710726.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Removed file: http://bugs.python.org/file10470/issue2636-07-only.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 19:49:10 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Tue, 17 Jun 2008 17:49:10 +0000 Subject: [issue433030] SRE: Atomic Grouping (?>...) is not supported Message-ID: <1213724949.51.0.932948714286.issue433030@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: I have finished work on the Atomic Grouping / Possessive Qualifiers support and am including a patch to achieve this; however, http://bugs.python.org/issue2636 should be consulted for the complete list of changes in the works for the Regexp engine. ---------- keywords: +patch Added file: http://bugs.python.org/file10646/issue2636-01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 19:49:20 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Tue, 17 Jun 2008 17:49:20 +0000 Subject: [issue433030] SRE: Atomic Grouping (?>...) is not supported Message-ID: <1213724960.93.0.393122136112.issue433030@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Removed file: http://bugs.python.org/file9897/PyLibDiffs.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 20:50:54 2008 From: report at bugs.python.org (Adam Olsen) Date: Tue, 17 Jun 2008 18:50:54 +0000 Subject: [issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error In-Reply-To: <1213472808.51.0.731079646072.issue3111@psf.upfronthosting.co.za> Message-ID: <1213728613.38.0.836168294014.issue3111@psf.upfronthosting.co.za> Adam Olsen added the comment: I agree with your agreement. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 21:07:23 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Tue, 17 Jun 2008 19:07:23 +0000 Subject: [issue2636] Regexp 2.6 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1213729643.8.0.887077291791.issue2636@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: Sorry, as I stated in the last post, I generated the patches then realized that I was missing the documentation for Item 2, so I have updated the issue2636-02.patch file and am attaching that separately until the next release of the patch tarball. issue2636-02-only.patch should be ignored and I will only regenerate it with the correct documentation in the next tarball release so I can move on to either Character Classes or Relative Back-references. I wanna pause Item 3 for the moment because 2, 3, 13, 14, 15 and 16 all seem closely related and I need a break to allow my mind to wrap around the big picture before I try and tackle each one. Added file: http://bugs.python.org/file10647/issue2636-02.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 22:23:31 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 17 Jun 2008 20:23:31 +0000 Subject: [issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error In-Reply-To: <1213472808.51.0.731079646072.issue3111@psf.upfronthosting.co.za> Message-ID: <1213734211.61.0.24166681028.issue3111@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Jesse, I say go ahead and make it so. I think you should make another report thought to keep track of getting /dev/shm in the buildbot enviroment. (Is that a buildbot bug?) ---------- assignee: -> jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 22:55:44 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 17 Jun 2008 20:55:44 +0000 Subject: [issue3118] test_math fails on 64bit In-Reply-To: <1213583966.69.0.618889033517.issue3118@psf.upfronthosting.co.za> Message-ID: <1213736143.17.0.767047909994.issue3118@psf.upfronthosting.co.za> Mark Dickinson added the comment: I further suspect that no-one with access to ia64 is monitoring this issue. :-) So maybe this should just be checked in, and then reverted if it either causes other buildbots to fail or doesn't help with Ubuntu/ia64. Benjamin, are you in a position to verify that the patch looks sane and/or test it on Windows? It works for me on OS X 10.5/Intel and SuSE Linux/x86. I'm reasonably confident that the patch shouldn't break anything on already-working platforms, but with floating-point stuff it's always hard to be 100% certain. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 23:09:31 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 17 Jun 2008 21:09:31 +0000 Subject: [issue3004] Bug in slice.indices() In-Reply-To: <1212086155.65.0.0693111742843.issue3004@psf.upfronthosting.co.za> Message-ID: <1213736971.01.0.552716372701.issue3004@psf.upfronthosting.co.za> Mark Dickinson added the comment: Could you provide some tests for the fixed behaviour? I'll try to check this in (with appropriate tests) after the beta. ---------- assignee: -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 23:09:36 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 17 Jun 2008 21:09:36 +0000 Subject: [issue3118] test_math fails on 64bit In-Reply-To: <1213583966.69.0.618889033517.issue3118@psf.upfronthosting.co.za> Message-ID: <1213736976.53.0.539803003666.issue3118@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It looks fine to me. Please apply. ---------- assignee: -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 23:17:54 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 17 Jun 2008 21:17:54 +0000 Subject: [issue3118] test_math fails on 64bit In-Reply-To: <1213583966.69.0.618889033517.issue3118@psf.upfronthosting.co.za> Message-ID: <1213737474.53.0.497583472441.issue3118@psf.upfronthosting.co.za> Mark Dickinson added the comment: Committed, r64349. I'm watching the buildbots. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 23:18:46 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 17 Jun 2008 21:18:46 +0000 Subject: [issue3118] test_math fails on 64bit In-Reply-To: <1213737474.53.0.497583472441.issue3118@psf.upfronthosting.co.za> Message-ID: <1afaf6160806171418j2c6121eel8a76974ebb070be7@mail.gmail.com> Benjamin Peterson added the comment: On Tue, Jun 17, 2008 at 4:17 PM, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > Committed, r64349. I'm watching the buildbots. You can bet I am, too. :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 17 23:35:51 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 17 Jun 2008 21:35:51 +0000 Subject: [issue2610] string representation of range and dictionary views In-Reply-To: Message-ID: <48582E31.6030709@v.loewis.de> Martin v. L?wis added the comment: > I do not understand why you think that having the interpreter display > > when x.keys() is called is not an improvement over > I didn't say that the change in dict_keys is not an improvement, but that the patch doesn't achieve its objective anymore, which was to display range() nicely at the interactive prompt. > Maybe it is just because I spend a lot more time in the interactive > interpreter that I see this as a big improvement. So do I. But I typically display the dictionary itself when looking at it in an interactive prompt; I would not normally look at .keys(), except when I want to know what all the keys in the dictionary are, in which case the new repr won't help, either (and I will have to apply list() in 3.0, or, rather, sorted()) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 00:30:33 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 17 Jun 2008 22:30:33 +0000 Subject: [issue3132] implement PEP 3118 struct changes In-Reply-To: <1213741832.59.0.0620778602246.issue3132@psf.upfronthosting.co.za> Message-ID: <1213741832.59.0.0620778602246.issue3132@psf.upfronthosting.co.za> New submission from Benjamin Peterson : It seems the new modifiers to the struct.unpack/pack module that were proposed in PEP 3118 haven't been implemented yet. ---------- assignee: teoliphant messages: 68347 nosy: benjamin.peterson, teoliphant priority: critical severity: normal status: open title: implement PEP 3118 struct changes type: feature request versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 00:38:34 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 17 Jun 2008 22:38:34 +0000 Subject: [issue3118] test_math fails on 64bit In-Reply-To: <1213583966.69.0.618889033517.issue3118@psf.upfronthosting.co.za> Message-ID: <1213742314.22.0.304854400695.issue3118@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks Mark. That seems to have done the trick. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 00:44:35 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 17 Jun 2008 22:44:35 +0000 Subject: [issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error In-Reply-To: <1213472808.51.0.731079646072.issue3111@psf.upfronthosting.co.za> Message-ID: <1213742675.25.0.0576620235279.issue3111@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I committed the skip in r64356. Let's sit back and watch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 00:58:03 2008 From: report at bugs.python.org (Jesse Noller) Date: Tue, 17 Jun 2008 22:58:03 +0000 Subject: [issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error In-Reply-To: <1213742675.25.0.0576620235279.issue3111@psf.upfronthosting.co.za> Message-ID: <223759A1-9857-4C72-8EA6-26B79D27C81F@gmail.com> Jesse Noller added the comment: Did you add the import and fix the syntax error On Jun 17, 2008, at 6:44 PM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > I committed the skip in r64356. Let's sit back and watch. > > _______________________________________ > Python tracker > > _______________________________________ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 01:00:39 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 17 Jun 2008 23:00:39 +0000 Subject: [issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error In-Reply-To: <223759A1-9857-4C72-8EA6-26B79D27C81F@gmail.com> Message-ID: <1afaf6160806171600h2c8620ccid41774388a98bf9d@mail.gmail.com> Benjamin Peterson added the comment: 1 for 2. :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 01:08:35 2008 From: report at bugs.python.org (Jesse Noller) Date: Tue, 17 Jun 2008 23:08:35 +0000 Subject: [issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error In-Reply-To: <1afaf6160806171600h2c8620ccid41774388a98bf9d@mail.gmail.com> Message-ID: <20A70126-6A64-4390-A9AB-7D5C727EBF6F@gmail.com> Jesse Noller added the comment: I apologize, I should have just posted the diff On Jun 17, 2008, at 7:00 PM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > 1 for 2. :) > > _______________________________________ > Python tracker > > _______________________________________ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 01:09:19 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 17 Jun 2008 23:09:19 +0000 Subject: [issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error In-Reply-To: <20A70126-6A64-4390-A9AB-7D5C727EBF6F@gmail.com> Message-ID: <1afaf6160806171609n5d57bfd7p3fc810f76f7e6bc@mail.gmail.com> Benjamin Peterson added the comment: On Tue, Jun 17, 2008 at 6:08 PM, Jesse Noller wrote: > > Jesse Noller added the comment: > > I apologize, I should have just posted the diff It's not your fault. I'm impatient. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 01:29:17 2008 From: report at bugs.python.org (Alexey Shamrin) Date: Tue, 17 Jun 2008 23:29:17 +0000 Subject: [issue2931] optparse: various problems with unicode and gettext In-Reply-To: <1211297479.44.0.970954846769.issue2931@psf.upfronthosting.co.za> Message-ID: <1213745357.33.0.129558279727.issue2931@psf.upfronthosting.co.za> Alexey Shamrin added the comment: sampablokuper, I don't think your problem is relevant to this issue. In addition to encoding declaration you should use unicode strings: u"your non-ASCII text". Or wait for Python 3.0, where strings will be unicode by default. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 02:02:05 2008 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 18 Jun 2008 00:02:05 +0000 Subject: [issue2138] Add a factorial function In-Reply-To: <1203329368.91.0.915653416666.issue2138@psf.upfronthosting.co.za> Message-ID: <1213747324.87.0.2917819374.issue2138@psf.upfronthosting.co.za> Mark Dickinson added the comment: It looks like there's a refcounting bug in the code: if the call to PyNumber_Multiply fails then iobj gets DECREF'd twice. This means that a keyboard interrupt of factorial() can exit the interpreter: Python 2.6a3+ (trunk:64341M, Jun 17 2008, 13:19:01) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from math import factorial [36374 refs] >>> factorial(10**9) ^CFatal Python error: /Users/dickinsm/python_source/trunk/Modules/mathmodule.c:562 object at 0x81f63c has negative ref count -1 Abort trap _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 02:25:18 2008 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 18 Jun 2008 00:25:18 +0000 Subject: [issue1778443] robotparser.py fixes Message-ID: <1213748718.71.0.0158385580888.issue1778443@psf.upfronthosting.co.za> Skip Montanaro added the comment: I suppose I'm as good a person to continue maintaining this as any, though my time is largely spent doing other stuff these days. The patch doesn't apply cleanly right now and lots of the changes it suggests have been made already (or done in slightly different ways). I've attached a simplified patch which takes care of the only two changes I see which seem to still be worthwhile. Assigning to Benjamin and changing resolution to "remind" so he can either apply himself when the time is right or toss it back to me. (I apologize, but I am not intimately tuned into the alpha/beta release process at the moment.) Skip ---------- assignee: skip.montanaro -> benjamin.peterson resolution: -> remind Added file: http://bugs.python.org/file10648/rb.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 02:25:25 2008 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 18 Jun 2008 00:25:25 +0000 Subject: [issue1778443] robotparser.py fixes Message-ID: <1213748725.46.0.954451785977.issue1778443@psf.upfronthosting.co.za> Changes by Skip Montanaro : Removed file: http://bugs.python.org/file8179/robotparser.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 02:25:30 2008 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 18 Jun 2008 00:25:30 +0000 Subject: [issue1778443] robotparser.py fixes Message-ID: <1213748730.92.0.806291949923.issue1778443@psf.upfronthosting.co.za> Changes by Skip Montanaro : Removed file: http://bugs.python.org/file10617/robotparser.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 05:43:26 2008 From: report at bugs.python.org (Sam Pablo Kuper) Date: Wed, 18 Jun 2008 03:43:26 +0000 Subject: [issue2931] optparse: various problems with unicode and gettext In-Reply-To: <1211297479.44.0.970954846769.issue2931@psf.upfronthosting.co.za> Message-ID: <1213760606.3.0.274194960566.issue2931@psf.upfronthosting.co.za> Sam Pablo Kuper added the comment: ash, you are correct; my bad. Thanks for the heads-up. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 09:13:26 2008 From: report at bugs.python.org (Mark Summerfield) Date: Wed, 18 Jun 2008 07:13:26 +0000 Subject: [issue2636] Regexp 2.6 (modifications to current re 2.2.2) In-Reply-To: <1213724620.33.0.615366054985.issue2636@psf.upfronthosting.co.za> Message-ID: <200806180813.08212.mark@qtrac.eu> Mark Summerfield added the comment: [snip] > 13) Implement a grouptuples(...) method as per Mark Summerfield's > suggest on 2008-05-28 09:38. grouptuples would take the same filtering > parameters as the other group* functions, and would return a list of 3- > tuples (unless only 1 group was requested). It should default to all > match groups (1..n, not group 0, the matching string). :-) [snip] > Finally, I would like suggestions on how to handle name collisions when > match group names are provided as attributes. For instance, an > expression like '(?P.*)' would match more or less any string and > assign it to the name "pos". But "pos" is already an attribute of the > Match object, and therefore pos cannot be exposed as a named match group > attribute, since match.pos will return the usual meaning of pos for a > match object, not the value of the capture group names "pos". > > I have 3 proposals as to how to handle this: > > a) Simply disallow the exposure of match group name attributes if the > names collide with an existing member of the basic Match Object > interface. I don't like the prefix ideas and now that you've spelt it out I don't like the sometimes m.foo will work and sometimes it won't. So I prefer m['foo'] to be the canonical way because that guarantees your code is always consistent. ------------------------------------------------------------ BTW I wanted to do a simple regex to match a string that might or might not be quoted, and that could contain quotes (but not those used to delimit it). My first attempt was illegal: (?P['"])?([^(?=quote)])+(?(quote)(?=quote)) It isn't hard to work round but it did highlight the fact that you can't use captures inside character classes. I don't know if Perl allows this; I guess if it doesn't then Python shouldn't either since GvR wants the engine to be Perl compatible. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 10:13:51 2008 From: report at bugs.python.org (Ivan Vilata i Balaguer) Date: Wed, 18 Jun 2008 08:13:51 +0000 Subject: [issue2931] optparse: various problems with unicode and gettext In-Reply-To: <1211297479.44.0.970954846769.issue2931@psf.upfronthosting.co.za> Message-ID: <1213776830.62.0.494701929889.issue2931@psf.upfronthosting.co.za> Ivan Vilata i Balaguer added the comment: What I find most bothersome is that ``optparse`` is being inconsistent in the types of localised strings it expects. It needs Unicode strings for snippets forming part of the help message, while it expects normal strings in other places like ``OptionParser.error()`` --a fact which isn't documented at all, BTW. I've been developing a medium app lately with localised messages all over the place using several packages in the standard library and ``optarparse``'s help messages are the only place where Unicode strings have been required. I'm not saying that ``optparse`` shouldn't use Unicode, but it'd be nice if it was consistent and the fact was documented. I'm attaching a tiny script which uses ``optparse``. Just try to change any appearance of the ``s`` normal string to Unicode ``us`` or vice-versa, then call the program with ``--help`` or no arguments (it requires one) and you get a ``UnicodeError``. Thanks! ---------- nosy: +ivilata Added file: http://bugs.python.org/file10649/optparse_unicode.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 10:26:58 2008 From: report at bugs.python.org (Ivan Vilata i Balaguer) Date: Wed, 18 Jun 2008 08:26:58 +0000 Subject: [issue2931] optparse: various problems with unicode and gettext In-Reply-To: <1211297479.44.0.970954846769.issue2931@psf.upfronthosting.co.za> Message-ID: <1213777618.92.0.0516064899561.issue2931@psf.upfronthosting.co.za> Ivan Vilata i Balaguer added the comment: The attached version of ``optparse_unicode.py`` doensn't depend on a UTF-8 locale, sorry. Added file: http://bugs.python.org/file10650/optparse_unicode2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 11:28:33 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 18 Jun 2008 09:28:33 +0000 Subject: [issue3133] CGIHTTPRequestHandler does not work on windows In-Reply-To: <1213781312.07.0.218615060623.issue3133@psf.upfronthosting.co.za> Message-ID: <1213781312.07.0.218615060623.issue3133@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : On windows, test_httpservers fails with the error: File "C:\python\py3k\Lib\http\server.py", line 1104, in run_cgi exec(open(scriptfile).read(), {"__name__": "__main__"}) File "", line 3, in File "C:\python\py3k\Lib\socket.py", line 222, in write return self._sock.send(b) TypeError: send() argument 1 must be bytes or read-only buffer, not str There are two problems there: - Lib/http/server.py still looks for os.popen2 or os.popen3 to start a subprocess; these functions have been removed, this code should be rewritten using the subprocess module. - the fallback method, which exec() the cgi script in the python interpreter, fails because sys.stdout should be set to a TextIOWrapper, not a binary socket file. Certainly the fallback method could be removed: every platform implements subprocess nowadays. ---------- components: Library (Lib), Windows messages: 68361 nosy: amaury.forgeotdarc severity: normal status: open title: CGIHTTPRequestHandler does not work on windows versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 14:54:22 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 18 Jun 2008 12:54:22 +0000 Subject: [issue3133] CGIHTTPRequestHandler does not work on windows In-Reply-To: <1213781312.07.0.218615060623.issue3133@psf.upfronthosting.co.za> Message-ID: <1213793662.69.0.405440393184.issue3133@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The attached patch uses subprocess when fork is not available. test_httpservers now passes on windows ---------- keywords: +patch Added file: http://bugs.python.org/file10651/httpserver.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 15:32:24 2008 From: report at bugs.python.org (Jesse Noller) Date: Wed, 18 Jun 2008 13:32:24 +0000 Subject: [issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error In-Reply-To: <1213472808.51.0.731079646072.issue3111@psf.upfronthosting.co.za> Message-ID: <1213795944.61.0.13015957169.issue3111@psf.upfronthosting.co.za> Jesse Noller added the comment: I switched to a more aggressive skip as it doesn't seem /dev/shm is the culprit (at least from overnight runs). I committed it in r64375 on trunk and I am going to wait for the build bots to run on trunk before merging. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 16:28:41 2008 From: report at bugs.python.org (Raghuram Devarakonda) Date: Wed, 18 Jun 2008 14:28:41 +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: <1213799320.95.0.336776715731.issue2571@psf.upfronthosting.co.za> Raghuram Devarakonda added the comment: Richard, I see the following very clearly mentioned in the doc: "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." Even though this seems like unnecessary, at least it is documented. If you want to push for automatically setting use_rawinput when 'stdin' is not None, you will need to submit a patch and convince some core developer to agree with you. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 17:46:23 2008 From: report at bugs.python.org (roudkerk) Date: Wed, 18 Jun 2008 15:46:23 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213803983.72.0.291871675284.issue3125@psf.upfronthosting.co.za> roudkerk added the comment: This patch to sharedctypes should fix the problem by adding a __reduce_ex__() method to a shared ctype object instead of using copy_reg. ---------- keywords: +patch Added file: http://bugs.python.org/file10652/sharedctypes.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 17:56:46 2008 From: report at bugs.python.org (Arnaud Bergeron) Date: Wed, 18 Jun 2008 15:56:46 +0000 Subject: [issue3004] Bug in slice.indices() In-Reply-To: <1212086155.65.0.0693111742843.issue3004@psf.upfronthosting.co.za> Message-ID: <1213804606.86.0.198962035271.issue3004@psf.upfronthosting.co.za> Arnaud Bergeron added the comment: Would these do? self.assertEqual(slice(None, -10 ).indices(10), (0, 0, 1)) self.assertEqual(slice(None, -11, ).indices(10), (0, 0, 1)) self.assertEqual(slice(None, -12, -1).indices(10), (9, -1, -1)) If yes, test_slice.patch adds them. Added file: http://bugs.python.org/file10653/test_slice.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 18:10:40 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 18 Jun 2008 16:10:40 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213805440.49.0.9588534301.issue3125@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: But why this is win32 specific? Is it because windows cannot fork(), so data has to be copied through the pickle mechanism? In this case let's remove the "if win32" statement, and always execute the body. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 19:37:38 2008 From: report at bugs.python.org (roudkerk) Date: Wed, 18 Jun 2008 17:37:38 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213810657.59.0.0655414271964.issue3125@psf.upfronthosting.co.za> roudkerk added the comment: > But why this is win32 specific? > > Is it because windows cannot fork(), so data has to be copied through > the pickle mechanism? > In this case let's remove the "if win32" statement, and always execute > the body. Yes, on Windows pickling is needed to pass data to a child process. In other contexts these objects are NOT picklable because you would have to worry about garbage collection of the original object before the copy is rebuilt by the other process. On unix pickling will always fail even if it "if win32" statement was removed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 20:13:46 2008 From: report at bugs.python.org (Thomas Heller) Date: Wed, 18 Jun 2008 18:13:46 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213803983.72.0.291871675284.issue3125@psf.upfronthosting.co.za> Message-ID: <48595052.3020109@ctypes.org> Thomas Heller added the comment: roudkerk schrieb: > roudkerk added the comment: > > This patch to sharedctypes should fix the problem by adding a > __reduce_ex__() method to a shared ctype object instead of using copy_reg. I can confirm that the patch fixes the problem on Windows (running test_ctypes before test_multiprocessing). However, the patch did not apply cleanly to current SVN trunk - I had to manually patch the code. I'll attach the patch that I have now when I run 'svn diff' as multiprocessing.patch (hope it works, sending as email attachment). Added file: http://bugs.python.org/file10654/multiprocessing.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: multiprocessing.patch URL: From report at bugs.python.org Wed Jun 18 20:42:13 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Jun 2008 18:42:13 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1213475446.58.0.529901834278.issue3112@psf.upfronthosting.co.za> Message-ID: <1213814533.58.0.46092689686.issue3112@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 20:43:11 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Jun 2008 18:43:11 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1213475446.58.0.529901834278.issue3112@psf.upfronthosting.co.za> Message-ID: <1213814591.38.0.227829604014.issue3112@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Does anyone know why there is the following test in pythonrun.c: http://hg.pitrou.net/public/py3k/py3k/file/c143699d8dee/Python/pythonrun.c#l1346 Can PyErr_Display be called with something else than a PyException instance? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 20:53:19 2008 From: report at bugs.python.org (Jesse Noller) Date: Wed, 18 Jun 2008 18:53:19 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213815199.62.0.173242355384.issue3125@psf.upfronthosting.co.za> Jesse Noller added the comment: Thomas' patch applied and runs clean for me - does anyone have a problem with me submitting it? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 21:49:20 2008 From: report at bugs.python.org (Jean Brouwers) Date: Wed, 18 Jun 2008 19:49:20 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1213818560.06.0.492034634025.issue2898@psf.upfronthosting.co.za> Jean Brouwers added the comment: Three questions on the sizeof.patch: 1) In the first line of function dict_sizeof() + res = sizeof(PyDictObject) + sizeof(mp->ma_table); is the sizeof(mp->ma_table) counted twice? 2) Since functions list_sizeof and dict_sizeof return the allocated size, including the over-allocation, should function string_sizeof not include the sentinel null character? 3) Are tuples left out on purpose? If not, here is an implementation for Objects/tupleobject.c: .... static PyObject * tuple_sizeof(PyTupleObject *v) { Py_ssize_t res; res = _PyObject_SIZE(&PyTuple_Type) + Py_SIZE(v) * sizeof(void*); return PyInt_FromSsize_t(res); } PyDoc_STRVAR(sizeof_doc, "T.__sizeof__() -- size of T in bytes"); .... static PyMethodDef tuple_methods[] = { {"__getnewargs__", (PyCFunction)tuple_getnewargs, METH_NOARGS}, {"__sizeof__", (PyCFunction)tuple_sizeof, METH_NOARGS, sizeof_doc}, .... /Jean Brouwers ---------- nosy: +MrJean1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 22:49:50 2008 From: report at bugs.python.org (David Vitek) Date: Wed, 18 Jun 2008 20:49:50 +0000 Subject: [issue3134] shutil references undefined WindowsError symbol In-Reply-To: <1213822190.13.0.727070543552.issue3134@psf.upfronthosting.co.za> Message-ID: <1213822190.13.0.727070543552.issue3134@psf.upfronthosting.co.za> New submission from David Vitek : If copystat fails in copytree on a non-windows box, you will get: NameError: global name 'WindowsError' is not defined: ... except WindowsError: ---------- components: Library (Lib) files: p.patch keywords: patch messages: 68373 nosy: dvitek severity: normal status: open title: shutil references undefined WindowsError symbol type: crash versions: Python 2.5 Added file: http://bugs.python.org/file10655/p.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 22:57:00 2008 From: report at bugs.python.org (Raghuram Devarakonda) Date: Wed, 18 Jun 2008 20:57:00 +0000 Subject: [issue3134] shutil references undefined WindowsError symbol In-Reply-To: <1213822190.13.0.727070543552.issue3134@psf.upfronthosting.co.za> Message-ID: <1213822620.74.0.775003421725.issue3134@psf.upfronthosting.co.za> Raghuram Devarakonda added the comment: This is same as #2549 which also reported the same problem. In fact, the problem was originally found in #1545. As I said there, the proposed patch has a very small problem. Can you please take a look? ---------- nosy: +draghuram _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 18 23:15:30 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Jun 2008 21:15:30 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1213475446.58.0.529901834278.issue3112@psf.upfronthosting.co.za> Message-ID: <1213823730.44.0.592270571217.issue3112@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Two other questions: 1) Should I expose a PyErr_DisplaySingle API to display an exception without chaining? 2) Should PyErr_Display return an integer value (0: success, -1: failure) rather than void as it currently does? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 00:03:06 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 18 Jun 2008 22:03:06 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213810657.59.0.0655414271964.issue3125@psf.upfronthosting.co.za> Message-ID: Amaury Forgeot d'Arc added the comment: roudkerk wrote: > Yes, on Windows pickling is needed to pass data to a child process. In > other contexts these objects are NOT picklable because you would have to > worry about garbage collection of the original object before the copy is > rebuilt by the other process. On unix pickling will always fail even if > it "if win32" statement was removed. I am not sure to understand. Can you elaborate? How is memory management different between windows and unix? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 00:10:53 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Wed, 18 Jun 2008 22:10:53 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1213827052.9.0.270758511508.issue2898@psf.upfronthosting.co.za> Robert Schuppenies added the comment: Jean Brouwers wrote: > 1) In the first line of function dict_sizeof() > + res = sizeof(PyDictObject) + sizeof(mp->ma_table); > is the sizeof(mp->ma_table) counted twice? Yes, you are right. I'll fix this. > 2) Since functions list_sizeof and dict_sizeof return the allocated > size, including the over-allocation, should function string_sizeof not > include the sentinel null character? Isn't this addressed by taking PyStringObject.ob_sval into account? It is allocated with 1 char length and thus always included. If I understand the creation of strings correctly, the corresponding memory is always allocated with PyObject_MALLOC(sizeof(PyStringObject) + size) which should mean that the space for the null terminating character is included in the sizeof(PyStringObject). > > > 3) Are tuples left out on purpose? No, that slipped the initial patch. I corrected in r64230. > .... > static PyObject * > tuple_sizeof(PyTupleObject *v) > { > Py_ssize_t res; > > res = _PyObject_SIZE(&PyTuple_Type) + Py_SIZE(v) * > sizeof(void*); > return PyInt_FromSsize_t(res); > } > .... Your implementation is like the applied changes from me, with one difference. The basicsize of a tuple is defined as "sizeof(PyTupleObject) - sizeof(PyObject *)" When a tuple's memory is allocated, the required space is computed roughly like this (typeobj)->tp_basicsize + (nitems)*(typeobj)->tp_itemsize Thus, I understand the memory allocated by a tuple to be res = PyTuple_Type.tp_basicsize + Py_SIZE(v) * sizeof(PyObject *); _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 00:16:54 2008 From: report at bugs.python.org (George Sakkis) Date: Wed, 18 Jun 2008 22:16:54 +0000 Subject: [issue3135] inspect.getcallargs() In-Reply-To: <1213827414.08.0.250071294589.issue3135@psf.upfronthosting.co.za> Message-ID: <1213827414.08.0.250071294589.issue3135@psf.upfronthosting.co.za> New submission from George Sakkis : I'd like to propose a new function for inclusion to the inspect module -- getcallargs(func, *args, **kwds) -- that returns a dict which maps the formal arguments of a function (or other callable) to the values passed as args and kwds, just as Python has to do when calling func(*args, **kwds). For example: >>> def func(a, b='foo', c=None, *x, **y): ... pass >>> sorted(getcallargs(func, 5, z=3, b=2).items()) [('a', 5), ('b', 2), ('c', None), ('x', ()), ('y', {'z': 3})] This is handy when writing decorators, or more generally when one would want to do some minimal type checking without actually calling the function. I have posted a recipe at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/551779; I can clean it up and submit a proper patch if it's deemed useful enough for the stdlib. ---------- components: Library (Lib) messages: 68378 nosy: gsakkis severity: normal status: open title: inspect.getcallargs() type: feature request versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 00:20:25 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 18 Jun 2008 22:20:25 +0000 Subject: [issue3133] CGIHTTPRequestHandler does not work on windows In-Reply-To: <1213781312.07.0.218615060623.issue3133@psf.upfronthosting.co.za> Message-ID: <1213827625.22.0.880421546607.issue3133@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Committed change r64389. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 00:24:43 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 18 Jun 2008 22:24:43 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1213475446.58.0.529901834278.issue3112@psf.upfronthosting.co.za> Message-ID: <1213827883.58.0.44534077901.issue3112@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a draft patch for those who want to take a look. (it works but the final cleanup is waiting for the API decisions mentioned above) ---------- keywords: +patch Added file: http://bugs.python.org/file10656/exc_reporting.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 01:08:09 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 18 Jun 2008 23:08:09 +0000 Subject: [issue1489] test_socket_ssl hanhs on Windows (deadlock) In-Reply-To: <1195766591.59.0.212085206705.issue1489@psf.upfronthosting.co.za> Message-ID: <1213830489.42.0.943589601933.issue1489@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Kind of fixed: test_socket_ssl was removed in both trunk and py3k branches. "tests are now in test_ssl.py" ---------- nosy: +amaury.forgeotdarc resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 01:26:22 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 18 Jun 2008 23:26:22 +0000 Subject: [issue2885] Create the urllib package In-Reply-To: <1210914691.08.0.848288242706.issue2885@psf.upfronthosting.co.za> Message-ID: <1213831582.68.0.527941389121.issue2885@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Seems this was done in r64385. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 01:27:41 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 18 Jun 2008 23:27:41 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1213831661.26.0.00367116784292.issue2775@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- dependencies: -Create the urllib package _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 01:38:14 2008 From: report at bugs.python.org (Brett Cannon) Date: Wed, 18 Jun 2008 23:38:14 +0000 Subject: [issue2885] Create the urllib package In-Reply-To: <1210914691.08.0.848288242706.issue2885@psf.upfronthosting.co.za> Message-ID: <1213832294.16.0.217509324331.issue2885@psf.upfronthosting.co.za> Brett Cannon added the comment: It's actually not quite done yet since the docs still need to be updated. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 01:38:52 2008 From: report at bugs.python.org (Brett Cannon) Date: Wed, 18 Jun 2008 23:38:52 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1213832332.46.0.105268781949.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Create the urllib package _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 02:22:01 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 19 Jun 2008 00:22:01 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213834921.35.0.976994288883.issue3088@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'm going to knock this one down to critical since it's working for me now on OS X and buildbot looks green. We can address any additional patches after the beta release. ---------- priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 02:22:44 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 19 Jun 2008 00:22:44 +0000 Subject: [issue3089] All 3.0 buildbots are red In-Reply-To: <1213246338.45.0.928026294572.issue3089@psf.upfronthosting.co.za> Message-ID: <1213834963.96.0.273705947089.issue3089@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: There are green buildbots now so I'm releasing beta 1. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 02:22:57 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 19 Jun 2008 00:22:57 +0000 Subject: [issue3089] All 3.0 buildbots are red In-Reply-To: <1213246338.45.0.928026294572.issue3089@psf.upfronthosting.co.za> Message-ID: <1213834977.44.0.875624028285.issue3089@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: There are green buildbots now so I'm releasing beta 1. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 02:33:48 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 19 Jun 2008 00:33:48 +0000 Subject: [issue2885] Create the urllib package In-Reply-To: <1210914691.08.0.848288242706.issue2885@psf.upfronthosting.co.za> Message-ID: <1213835628.24.0.693756329731.issue2885@psf.upfronthosting.co.za> Brett Cannon added the comment: And I don't know if the proper additions to 2to3 and a warning in urllib.urlopen() in 2.6 has been done (is urllib.urlopen() so different from urllib2.urlopen() that the warning should be from any usage, or only if incompatible arguments are used?). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 03:02:04 2008 From: report at bugs.python.org (Leandro Lucarella) Date: Thu, 19 Jun 2008 01:02:04 +0000 Subject: [issue3136] [PATCH] logging.config.fileConfig() compulsivly disable all existing loggers In-Reply-To: <1213837323.33.0.0675974065144.issue3136@psf.upfronthosting.co.za> Message-ID: <1213837323.33.0.0675974065144.issue3136@psf.upfronthosting.co.za> New submission from Leandro Lucarella : When using logging.config.fileConfig() in a large project, with several nested loggers, is very counterintuitive and annoying that this function disable all non-configured-via-fileConfig() loggers, because it forces the config file to configure *all* the loggers there, which makes the file unmaintainable, and throws the beauty of hierarchical loggers to the trash. Attached is a sample patch that adds a new option "disable_existing_loggers" to fileConfig() function (defaulting to True, to make it backward-compatible) to control this behavior. If you like the idea I can update the documentation and add some testcases too. You can see a simple example about the problem and solution here: log.py: http://pastebin.lugmen.org.ar/4204 log.ini: http://pastebin.lugmen.org.ar/4205 without the patch, the output is: logger:DEBUG: log debug logger:INFO: log info logger:WARNING: log warning logger:ERROR: log error logger:CRITICAL: log critical With the patch (and passing disable_existing_loggers=False to fileConfig()) yields this output: logger:DEBUG: log debug logger:INFO: log info logger:WARNING: log warning logger:ERROR: log error logger:CRITICAL: log critical logger.sublogger:DEBUG: sublog debug logger.sublogger:INFO: sublog info logger.sublogger:WARNING: sublog warning logger.sublogger:ERROR: sublog error logger.sublogger:CRITICAL: sublog critical As one could expect when reading the logging module docs: """ getLogger() returns a reference to a logger instance with the specified if it it is provided, or root if not. The names are period-separated hierarchical structures. Multiple calls to getLogger() with the same name will return a reference to the same logger object. Loggers that are further down in the hierarchical list are children of loggers higher up in the list. For example, given a logger with a name of foo, loggers with names of foo.bar, foo.bar.baz, and foo.bam are all children of foo. Child loggers propagate messages up to their parent loggers. Because of this, it is unnecessary to define and configure all the loggers an application uses. It is sufficient to configure a top-level logger and create child loggers as needed. """ ---------- components: Library (Lib) files: logging.config.disable_existing_loggers.patch keywords: patch messages: 68388 nosy: llucax severity: normal status: open title: [PATCH] logging.config.fileConfig() compulsivly disable all existing loggers versions: Python 2.5 Added file: http://bugs.python.org/file10657/logging.config.disable_existing_loggers.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 03:04:42 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 19 Jun 2008 01:04:42 +0000 Subject: [issue3136] [PATCH] logging.config.fileConfig() compulsivly disable all existing loggers In-Reply-To: <1213837323.33.0.0675974065144.issue3136@psf.upfronthosting.co.za> Message-ID: <1213837482.68.0.411270899651.issue3136@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> vsajip nosy: +vsajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 03:05:19 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 19 Jun 2008 01:05:19 +0000 Subject: [issue3009] 3.0a5 tarballs contain the code twice In-Reply-To: <1212149632.97.0.414084166273.issue3009@psf.upfronthosting.co.za> Message-ID: <1213837519.6.0.800930216023.issue3009@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: This must have been a packaging snafu for 3.0a5. The candidate 3.0b1 tarball looks fine. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 03:28:14 2008 From: report at bugs.python.org (Richard King) Date: Thu, 19 Jun 2008 01:28:14 +0000 Subject: [issue2571] cmd.py always uses raw_input, even when another stdin is specified In-Reply-To: <1213799320.95.0.336776715731.issue2571@psf.upfronthosting.co.za> Message-ID: <4859B625.6090200@comcast.net> Richard King added the comment: There were some other things I wanted too so I just made my own cmd.py. -Rick Raghuram Devarakonda wrote: > Raghuram Devarakonda added the comment: > > Richard, I see the following very clearly mentioned in the doc: > > "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." > > Even though this seems like unnecessary, at least it is documented. If > you want to push for automatically setting use_rawinput when 'stdin' is > not None, you will need to submit a patch and convince some core > developer to agree with you. > > _______________________________________ > Python tracker > > _______________________________________ > ------------------------------------------------------------------------ > > > No virus found in this incoming message. > Checked by AVG. > Version: 8.0.100 / Virus Database: 270.4.0/1506 - Release Date: 6/17/2008 4:30 PM > _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 09:59:53 2008 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 19 Jun 2008 07:59:53 +0000 Subject: [issue3136] [PATCH] logging.config.fileConfig() compulsivly disable all existing loggers In-Reply-To: <1213837323.33.0.0675974065144.issue3136@psf.upfronthosting.co.za> Message-ID: <1213862392.46.0.356371184857.issue3136@psf.upfronthosting.co.za> Vinay Sajip added the comment: Without the patch, but simply moving the fileConfig() call to above where the loggers are initialised, the output is the same as your patched sample, viz. logger:DEBUG: log debug logger:INFO: log info logger:WARNING: log warning logger:ERROR: log error logger:CRITICAL: log critical logger.sublogger:DEBUG: sublog debug logger.sublogger:INFO: sublog info logger.sublogger:WARNING: sublog warning logger.sublogger:ERROR: sublog error logger.sublogger:CRITICAL: sublog critical See http://pastebin.lugmen.org.ar/4208 ---------- resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 10:04:37 2008 From: report at bugs.python.org (Geoffrey Bache) Date: Thu, 19 Jun 2008 08:04:37 +0000 Subject: [issue3137] Python doesn't handle SIGINT well if it arrives during interpreter startup In-Reply-To: <1213862677.34.0.00995012597112.issue3137@psf.upfronthosting.co.za> Message-ID: <1213862677.34.0.00995012597112.issue3137@psf.upfronthosting.co.za> New submission from Geoffrey Bache : If a python script receives SIGINT while the interpreter is starting up, it's possible to get the message "import site failed; use -v for traceback" printed on standard error and for execution to proceed. It also seems to be possible to get half-imported modules and for the script to fail later claiming that something like "os.getenv" doesn't exist. If I do as instructed and use -v for traceback I get something like: 'import site' failed; traceback: Traceback (most recent call last): File "/usr/lib/python2.4/site.py", line 61, in ? import os File "/usr/lib/python2.4/os.py", line 683, in ? import copy_reg as _copy_reg File "/usr/lib/python2.4/copy_reg.py", line 5, in ? """ KeyboardInterrupt I imagine there exists some code like try: import site except: sys.stderr.write("import site failed; use -v for traceback\n") though I couldn't find any. If so, it seems clear that KeyboardInterrupt needs to be re-raised, or Python's special handler for SIGINT installed rather later. ---------- components: Interpreter Core messages: 68392 nosy: gjb1002 severity: normal status: open title: Python doesn't handle SIGINT well if it arrives during interpreter startup versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 10:08:17 2008 From: report at bugs.python.org (Dex) Date: Thu, 19 Jun 2008 08:08:17 +0000 Subject: [issue3138] Hang when calling get() on an empty queue in the queue module In-Reply-To: <1213862897.02.0.570715389583.issue3138@psf.upfronthosting.co.za> Message-ID: <1213862897.02.0.570715389583.issue3138@psf.upfronthosting.co.za> New submission from Dex : This behavior appears in Python 3.0b1. If you use queue.Queue and call the get method on the empty queue, it appears to hang. The same behavior seems to be evident in the PriorityQueue too. ---------- messages: 68393 nosy: slash2314 severity: normal status: open title: Hang when calling get() on an empty queue in the queue module type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 10:24:26 2008 From: report at bugs.python.org (Simon Cross) Date: Thu, 19 Jun 2008 08:24:26 +0000 Subject: [issue2517] Error when printing an exception containing a Unicode string In-Reply-To: <1206918832.8.0.542354120577.issue2517@psf.upfronthosting.co.za> Message-ID: <1213863866.02.0.604909711454.issue2517@psf.upfronthosting.co.za> Simon Cross added the comment: Justing prodding the issue again now that the betas are out. What's the next step? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 11:23:19 2008 From: report at bugs.python.org (Ismail Donmez) Date: Thu, 19 Jun 2008 09:23:19 +0000 Subject: [issue3121] test_urllibnet fails In-Reply-To: <1213605129.04.0.398853048978.issue3121@psf.upfronthosting.co.za> Message-ID: <1213867399.5.0.0675940933514.issue3121@psf.upfronthosting.co.za> Ismail Donmez added the comment: Works fine in trunk now, can someone please close this bug? Thanks. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 11:32:28 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 19 Jun 2008 09:32:28 +0000 Subject: [issue3138] Hang when calling get() on an empty queue in the queue module In-Reply-To: <1213862897.02.0.570715389583.issue3138@psf.upfronthosting.co.za> Message-ID: <1213867948.59.0.874913673641.issue3138@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: 2.5 has the same behavior: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import Queue >>> q = Queue.Queue() >>> q.get() .... block forever ... Did you get different results? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 11:37:02 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 19 Jun 2008 09:37:02 +0000 Subject: [issue3121] test_urllibnet fails In-Reply-To: <1213605129.04.0.398853048978.issue3121@psf.upfronthosting.co.za> Message-ID: <1213868222.37.0.450974243804.issue3121@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 12:06:54 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 19 Jun 2008 10:06:54 +0000 Subject: [issue3139] print is not thread safe In-Reply-To: <1213870014.47.0.920261148604.issue3139@psf.upfronthosting.co.za> Message-ID: <1213870014.47.0.920261148604.issue3139@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : I found this problem when adding "print" statements to multi-threaded code. When applying the attached diff to a py3k installation, the output on screen always contains some garbage. The following code is an extract of fileio_write (in Modules/_fileio.c), but the same behavior appears everywhere: if (!PyArg_ParseTuple(args, "s#", &ptr, &n)) return NULL; Py_BEGIN_ALLOW_THREADS errno = 0; n = write(self->fd, ptr, n); Py_END_ALLOW_THREADS io.BufferedWriter calls this function with a bytearray. In this case, the GIL is released when holding a pointer to the bytearray data. But another thread may mutate the bytearray in between, the pointer becomes stale and can lead to segfaults or funny results. ---------- components: Interpreter Core files: test_threaded_print.diff keywords: patch messages: 68397 nosy: amaury.forgeotdarc severity: normal status: open title: print is not thread safe type: crash versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10658/test_threaded_print.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 13:03:53 2008 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 19 Jun 2008 11:03:53 +0000 Subject: [issue3139] print is not thread safe In-Reply-To: <1213870014.47.0.920261148604.issue3139@psf.upfronthosting.co.za> Message-ID: <1213873433.01.0.0524402800666.issue3139@psf.upfronthosting.co.za> Guilherme Polo added the comment: Wasn't that always known ? Maybe I'm missing something here. ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 14:01:32 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Thu, 19 Jun 2008 12:01:32 +0000 Subject: [issue2636] Regexp 2.6 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1213876892.22.0.67555623534.issue2636@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: Thanks for weighing in Mark! Actually, your point is valid and quite fair, though I would not assume that Item 3 would be included just because Item 2 isn't. I will do my best to develop both, but I do not make the final decision as to what python includes. That having been said, 3 seems very likely at this point so we may be okay, but let me give this one more try as I think I have a better solution to make Item 2 more palatable. Let's say we have 5 choices here: > a) Simply disallow the exposure of match group name attributes if the > names collide with an existing member of the basic Match Object > interface. > > b) Expose the reserved names through a special prefix notation, and > for forward compatibility, expose all names via this prefix notation. > In other words, if the prefix was 'k', match.kpos could be used to > access pos; if it was '_', match._pos would be used. If Item 3 is > implemented, it may be sufficient to allow access via match['pos'] as > the canonical way of handling match group names using reserved words. > > c) Don't expose the names directly; only expose them through a > prefixed name, e.g. match._pos or match.kpos. d) (As Mark suggested) we drop Item 2 completely. I have not invested much work in this so that would not bother me, but IMHO I actually prefer Item 2 to 3 so I would really like to see it preserved in some form. e) Add an option, re.MATCH_ATTRIBUTES, that is used as a Match Creation flag. When the re.MATCH_ATTRIBUTES or re.A flag is included in the compile, or (?a) is included in the pattern, it will do 2 things. First, it will raise an exception if either a) there exists an unnamed capture group or b) the capture group name is a reserved keyword. In addition to this, I would put in a hook to support a from __future__ so that any post 2.6 changes to the match object type can be smoothly integrated a version early to allow programmers to change when any future changes come. Secondly, I would *conditionally* allow arbitrary capture group name via the __getattr__ handler IFF that flag was present; otherwise you could not access Capture Groups by name via match.foo. I really like the idea of e) so I'm taking Item 2 out of the "ready for merge" category and going to put it in the queue for the modifications spelled out above. I'm not too worried about our flags differing from Perl too much as we did base our first 4 on Perl (x, s, m, i), but subsequently added Unicode and Locale, which Perl does not have, and never implemented o (since our caching semantic already pretty much gives every expression that), e (which is specific to Perl syntax AFAICT) and g (which can be simulated via re.split). So I propose we take A and implement it as I've specified and that is the current goal of Item 2. Once this is done and working, we can decide whether it should be included in the python trunk. How does that sound to you, Mark and anyone else who wishes to weigh in? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 14:28:53 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 19 Jun 2008 12:28:53 +0000 Subject: [issue3139] print is not thread safe In-Reply-To: <1213870014.47.0.920261148604.issue3139@psf.upfronthosting.co.za> Message-ID: <1213878533.13.0.714434027203.issue3139@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The problem is not only about concurrent prints. It is about invalid pointer passed to a C function. Here is an example that reliably crashes the interpreter on my windows machine: import bz2, threading bz2c = bz2.BZ2Compressor() b = bytearray(b"a" * 1000000) def f(): for x in range(10): b[:] = b"" b[:] = bytearray(b"a" * 1000000) threading.Thread(target=f).start() for x in range(10): bz2c.compress(b) bz2c.compress is a slow function, that happens to accept bytearray and to release the GIL. If the other thread reallocates the bytearray, bz2c.compress will read invalid data. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 14:49:03 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 19 Jun 2008 12:49:03 +0000 Subject: [issue3138] Hang when calling get() on an empty queue in the queue module In-Reply-To: <1213862897.02.0.570715389583.issue3138@psf.upfronthosting.co.za> Message-ID: <1213879743.43.0.372479009103.issue3138@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It's intended that Queue.get blocks until something is put on the Queue. If you don't want it to block use Queue.get(False). ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 14:54:23 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 19 Jun 2008 12:54:23 +0000 Subject: [issue3139] print is not thread safe In-Reply-To: <1213870014.47.0.920261148604.issue3139@psf.upfronthosting.co.za> Message-ID: <1213880063.76.0.74565752744.issue3139@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 14:57:36 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 19 Jun 2008 12:57:36 +0000 Subject: [issue3137] Python doesn't handle SIGINT well if it arrives during interpreter startup In-Reply-To: <1213862677.34.0.00995012597112.issue3137@psf.upfronthosting.co.za> Message-ID: <1213880256.8.0.223974719303.issue3137@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Yes, the C startup code in pythonrun.c has a lot of bare-except statements. ---------- nosy: +benjamin.peterson type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 15:02:13 2008 From: report at bugs.python.org (Mark Summerfield) Date: Thu, 19 Jun 2008 13:02:13 +0000 Subject: [issue3140] str.format("{0:n}") poss. bug with setlocale() In-Reply-To: <1213880533.51.0.166006060243.issue3140@psf.upfronthosting.co.za> Message-ID: <1213880533.51.0.166006060243.issue3140@psf.upfronthosting.co.za> New submission from Mark Summerfield : Python 30b1 >>> import locale >>> locale.setlocale(locale.LC_ALL, "en_US.UTF-8") 'en_US.UTF-8' >>> for x in (1234,12345,123456,1234567,12345678,123456789,1234567890,12345678900): print("[{0:>20n}]".format(x)) [ 1,234] [ 12,345] [ 123,456] [ 1,234,567] [ 12,345,678] [ 123,456,789] [ 1,234,567,890] [ 12,345,678,900] I expected that the commas would not increase the width, but maybe this was the intended behaviour? ---------- messages: 68403 nosy: mark severity: normal status: open title: str.format("{0:n}") poss. bug with setlocale() type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 15:02:35 2008 From: report at bugs.python.org (Leandro Lucarella) Date: Thu, 19 Jun 2008 13:02:35 +0000 Subject: [issue3136] [PATCH] logging.config.fileConfig() compulsivly disable all existing loggers In-Reply-To: <1213837323.33.0.0675974065144.issue3136@psf.upfronthosting.co.za> Message-ID: <1213880555.4.0.86483271428.issue3136@psf.upfronthosting.co.za> Leandro Lucarella added the comment: The problem is you can't always do that call before using the loggers. In my case, I get the logging config file via command-line arguments (using optparse), but before I can't even know what logging config file to load, I have log calls. Please reopen the bug, the actual solution is not flexible enough. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 15:15:12 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 19 Jun 2008 13:15:12 +0000 Subject: [issue3140] str.format("{0:n}") poss. bug with setlocale() In-Reply-To: <1213880533.51.0.166006060243.issue3140@psf.upfronthosting.co.za> Message-ID: <1213881312.34.0.870017779599.issue3140@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> eric.smith nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 15:15:28 2008 From: report at bugs.python.org (Mark Summerfield) Date: Thu, 19 Jun 2008 13:15:28 +0000 Subject: [issue3141] Linux build requires Mac module _gestalt In-Reply-To: <1213881328.23.0.078926061011.issue3141@psf.upfronthosting.co.za> Message-ID: <1213881328.23.0.078926061011.issue3141@psf.upfronthosting.co.za> New submission from Mark Summerfield : When you build 30b1 on Linux (I tried Fedora 8 and Xubuntu 8) you get a message that make failed to find the bits to build "_gestalt", which I think is a Mac-thing not a Linux thing. Anyway, Barry asked me to add this as a bug. ---------- components: Build messages: 68405 nosy: mark severity: normal status: open title: Linux build requires Mac module _gestalt versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 15:21:26 2008 From: report at bugs.python.org (Mark Summerfield) Date: Thu, 19 Jun 2008 13:21:26 +0000 Subject: [issue3142] urllib docs don't match the new modules In-Reply-To: <1213881685.97.0.203143368554.issue3142@psf.upfronthosting.co.za> Message-ID: <1213881685.97.0.203143368554.issue3142@psf.upfronthosting.co.za> New submission from Mark Summerfield : Py30b1 The module renaming of urllib's modules (and the getting rid of urllib2) has been done---but this isn't reflected in the docs. ---------- assignee: georg.brandl components: Documentation messages: 68406 nosy: georg.brandl, mark severity: normal status: open title: urllib docs don't match the new modules versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 15:22:01 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 19 Jun 2008 13:22:01 +0000 Subject: [issue3141] Linux build requires Mac module _gestalt In-Reply-To: <1213881328.23.0.078926061011.issue3141@psf.upfronthosting.co.za> Message-ID: <1213881721.92.0.643127447022.issue3141@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Done in r64405. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 15:34:56 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 19 Jun 2008 13:34:56 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213882496.11.0.914713231663.issue3125@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: -> jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 15:35:24 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 19 Jun 2008 13:35:24 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213882524.97.0.0977561641043.issue3088@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: -> jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 15:36:01 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 19 Jun 2008 13:36:01 +0000 Subject: [issue3110] Multiprocessing package build problem on Solaris 10 In-Reply-To: <1213472177.07.0.795399068376.issue3110@psf.upfronthosting.co.za> Message-ID: <1213882561.66.0.475844190437.issue3110@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: -> jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 15:40:07 2008 From: report at bugs.python.org (Eric Smith) Date: Thu, 19 Jun 2008 13:40:07 +0000 Subject: [issue3140] str.format("{0:n}") poss. bug with setlocale() In-Reply-To: <1213880533.51.0.166006060243.issue3140@psf.upfronthosting.co.za> Message-ID: <1213882807.09.0.99199470249.issue3140@psf.upfronthosting.co.za> Eric Smith added the comment: I'd say that's a bug. I'll look at it. ---------- components: +Interpreter Core nosy: +talin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 16:15:54 2008 From: report at bugs.python.org (Mark Summerfield) Date: Thu, 19 Jun 2008 14:15:54 +0000 Subject: [issue2636] Regexp 2.6 (modifications to current re 2.2.2) In-Reply-To: <1213876892.22.0.67555623534.issue2636@psf.upfronthosting.co.za> Message-ID: <200806191515.45882.mark@qtrac.eu> Mark Summerfield added the comment: [snip] It seems to me that both using a special prefix or adding an option are adding a lot of baggage and will increase the learning curve. The nice thing about (3) (even without slicing) is that it seems a v. natural extension. But (2) seems magical (i.e., Perl-like rather than Pythonic) which I really don't like. BTW I just noticed this: '<_sre.SRE_Pattern object at 0x9ded020>' >>> "{0!r}".format(rx) '<_sre.SRE_Pattern object at 0x9ded020>' >>> "{0!s}".format(rx) '<_sre.SRE_Pattern object at 0x9ded020>' >>> "{0!a}".format(rx) That's fair enough, but maybe for !s the output should be rx.pattern? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 16:39:54 2008 From: report at bugs.python.org (Raghuram Devarakonda) Date: Thu, 19 Jun 2008 14:39:54 +0000 Subject: [issue2571] cmd.py always uses raw_input, even when another stdin is specified In-Reply-To: <4859B625.6090200@comcast.net> Message-ID: <2c51ecee0806190739g4e033c5axf930a6b22a63391b@mail.gmail.com> Raghuram Devarakonda added the comment: On Wed, Jun 18, 2008 at 9:28 PM, Richard King wrote: > > Richard King added the comment: > > There were some other things I wanted too so I just made my own cmd.py. Yes. Lot of people seem to use their own versions of cmd.py. Recently, I also implemented another class on top of cmd.Cmd in order to have more useful functionality. I have seen at least three implementations ('cmdln' on googlecode, 'CommandLoop' and 'cmd2' on pypi). I hope that after some heavy use, I will be able to submit some patches to the standard library module. There is already one in #1294. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 16:46:26 2008 From: report at bugs.python.org (Senthil) Date: Thu, 19 Jun 2008 14:46:26 +0000 Subject: [issue3142] urllib docs don't match the new modules In-Reply-To: <1213881685.97.0.203143368554.issue3142@psf.upfronthosting.co.za> Message-ID: <1213886785.6.0.79090278239.issue3142@psf.upfronthosting.co.za> Senthil added the comment: I saw this coming. I am working on this Mark, Georg. Will be done with this by Saturday (21st-Jun). issue2885 is not closed yet and mentions about docs and other things pending. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 17:32:01 2008 From: report at bugs.python.org (Eric Smith) Date: Thu, 19 Jun 2008 15:32:01 +0000 Subject: [issue3140] str.format("{0:n}") poss. bug with setlocale() In-Reply-To: <1213880533.51.0.166006060243.issue3140@psf.upfronthosting.co.za> Message-ID: <1213889521.12.0.0128902453796.issue3140@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 18:48:50 2008 From: report at bugs.python.org (Forest Wilkinson) Date: Thu, 19 Jun 2008 16:48:50 +0000 Subject: [issue3143] development docs waste a lot of horizontal space on left nav bar In-Reply-To: <1213894130.5.0.901866798504.issue3143@psf.upfronthosting.co.za> Message-ID: <1213894130.5.0.901866798504.issue3143@psf.upfronthosting.co.za> New submission from Forest Wilkinson : I was just browsing the development docs, and noticed that the new left-side navigation bar wastes a lot of horizontal space on the web page. It fills nearly a third of my browser window (at its usual size) with useless blank space, at the expense of the pertinent information. This makes it harder to get much use out of a docs window placed next to my editor window, since I am now forced to switch active windows and/or scroll around the docs window in order to read the section I'm working with. In a few cases, it leaves space for so few words per line that even the visible part of the docs actually become harder to read (especially with text justification). For comparison, here are screen shots from the old and new documentation: http://hestiafire.org/forest/img/doc25.png http://hestiafire.org/forest/img/doc26.png Is this side bar going to be present in the final release of the python 2.6 docs? I hope not. It's a significant loss in readability, IMHO. ---------- assignee: georg.brandl components: Documentation messages: 68412 nosy: forest, georg.brandl severity: normal status: open title: development docs waste a lot of horizontal space on left nav bar versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 19:07:29 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 19 Jun 2008 17:07:29 +0000 Subject: [issue3143] development docs waste a lot of horizontal space on left nav bar In-Reply-To: <1213894130.5.0.901866798504.issue3143@psf.upfronthosting.co.za> Message-ID: <1213895249.51.0.599542600065.issue3143@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I agree with this bug entry. Also, since pages are usually long, if the left nav bar is really to be useful it should use some "fixed" positioning in the CSS (that is, doesn't move when the rest of the page is scrolled). (of course this could also be considered bikeshedding :-)) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 19:16:27 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Thu, 19 Jun 2008 17:16:27 +0000 Subject: [issue1528620] Python 2.5b2 fails to build on Solaris 10 (Sun Compiler) Message-ID: <1213895787.47.0.118493783005.issue1528620@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Closing, per the last comment. ---------- resolution: -> fixed status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 19:27:40 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Thu, 19 Jun 2008 17:27:40 +0000 Subject: [issue839496] SimpleHTTPServer reports wrong content-length for text files Message-ID: <1213896461.0.0.900948624141.issue839496@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 20:01:02 2008 From: report at bugs.python.org (roudkerk) Date: Thu, 19 Jun 2008 18:01:02 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213898461.96.0.5212531569.issue3125@psf.upfronthosting.co.za> roudkerk added the comment: > I am not sure to understand. Can you elaborate? > How is memory management different between windows and unix? Removing the "if win32" bits will not make shared ctypes objects picklable on unix. Even on windows there are only picklable in the context of spawning a child process. I do not want to encourage people to try to transfer objects which wrap operating system resources between running processes using pickling because it is error prone unless done very carefully: one needs to find some way of "keeping the resource alive" until the target process gets a chance to unpickle the data. (The source process must not close its handle to the resource until the target process obtains its own handle, which may not happen for a long time.) The simplest way to avoid such problems is to only share such resources through inheritance. I do add some pickling support to some types on Windows, but only to emulate the behaviour that Unix gets for free using fork(). (On Windows trying to transfer objects like locks or shared ctypes objects over a pipe or queue will, by design, fail with a RuntimeError) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 21:18:29 2008 From: report at bugs.python.org (Justin Cappos) Date: Thu, 19 Jun 2008 19:18:29 +0000 Subject: [issue3144] popen / popen[234] inconsistent fd behavior In-Reply-To: <1213903108.91.0.624214427386.issue3144@psf.upfronthosting.co.za> Message-ID: <1213903108.91.0.624214427386.issue3144@psf.upfronthosting.co.za> New submission from Justin Cappos : The behavior of popen vs popen[2-4] differs with respect to open file descriptors (at least on the Linux implementation of popen). popen does not close file descriptors, thus processes retain open file descriptors from their parent. This is likely not desirable for security and stability reasons. If this isn't fixed, at a minimum it would be a good thing to document. Here is an example that demonstrates the issue: <<< start of open_and_popen.py>>> # This will not be printed if popen closes file descriptors import os myfd = os.open("open_and_popen.py",os.O_RDONLY) readfo = os.popen("python print_from_fd.py "+str(myfd),"r") print "os.popen results in:" print readfo.read() # it will print the first line of the file here readfo.close() (junkinfo, readfo) = os.popen2("python print_from_fd.py "+str(myfd),"r") junkinfo.close() print "os.popen2 results in:" print readfo.read() # the child got an error, so this is just the error text readfo.close() os.close(myfd) <<< end of open_and_popen.py>>> <<< start of print_from_fd.py>>> import os import sys print os.read(int(sys.argv[1]),60) <<< end of print_from_fd.py>>> ---------- components: Library (Lib) messages: 68416 nosy: justincappos severity: normal status: open title: popen / popen[234] inconsistent fd behavior type: security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 21:19:11 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 19 Jun 2008 19:19:11 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213903151.47.0.819782284898.issue3125@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Why not use a custom Pickler in this case? It would to be enough to copy the self.dispatch dictionary, and add the special types there. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 21:32:31 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 19 Jun 2008 19:32:31 +0000 Subject: [issue3144] popen / popen[234] inconsistent fd behavior In-Reply-To: <1213903108.91.0.624214427386.issue3144@psf.upfronthosting.co.za> Message-ID: <1213903951.78.0.510105384861.issue3144@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This is so true that these functions are now documented as deprecated: http://docs.python.org/dev/library/os.html#os.popen2 Please use the subprocess.Popen class instead, which gives a much better interface to processes. ---------- nosy: +amaury.forgeotdarc resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 21:58:18 2008 From: report at bugs.python.org (Michael Yang) Date: Thu, 19 Jun 2008 19:58:18 +0000 Subject: [issue3145] help> modules os raises UnicodeDecodeError In-Reply-To: <1213905498.05.0.86036305634.issue3145@psf.upfronthosting.co.za> Message-ID: <1213905498.05.0.86036305634.issue3145@psf.upfronthosting.co.za> New submission from Michael Yang : >>> help() help> modules os Here is a list of matching modules. Enter any module name to get more help. posix - This module provides access to operating system ... stringprep - Library that exposes various tables found in the StringPrep RFC 3454. Traceback (most recent call last): File "", line 1, in ... File "/home/michael/python3/3.0b1/lib/python3.0/codecs.py", line 300, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf8' codec can't decode bytes in position 8-11: invalid data ---------- components: Interpreter Core messages: 68419 nosy: msyang severity: normal status: open title: help> modules os raises UnicodeDecodeError type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 22:05:36 2008 From: report at bugs.python.org (Raghuram Devarakonda) Date: Thu, 19 Jun 2008 20:05:36 +0000 Subject: [issue3134] shutil references undefined WindowsError symbol In-Reply-To: <1213822190.13.0.727070543552.issue3134@psf.upfronthosting.co.za> Message-ID: <1213905936.64.0.759380980513.issue3134@psf.upfronthosting.co.za> Raghuram Devarakonda added the comment: I submitted a patch at http://codereview.appspot.com/2384. Please take a look. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 22:06:21 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 19 Jun 2008 20:06:21 +0000 Subject: [issue3145] help> modules os raises UnicodeDecodeError In-Reply-To: <1213905498.05.0.86036305634.issue3145@psf.upfronthosting.co.za> Message-ID: <1213905981.91.0.316865770843.issue3145@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I added some print statements, and it appears that the function is trying to read get the source of "test.badsyntax_pep3120" ! ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 22:09:06 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 19 Jun 2008 20:09:06 +0000 Subject: [issue2885] Create the urllib package In-Reply-To: <1210914691.08.0.848288242706.issue2885@psf.upfronthosting.co.za> Message-ID: <1213906146.43.0.117422157914.issue2885@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Just remember to close #3142 when you're done. ---------- dependencies: +urllib docs don't match the new modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 22:36:31 2008 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 19 Jun 2008 20:36:31 +0000 Subject: [issue3054] test_disutils fails In-Reply-To: <1212788058.33.0.328120732213.issue3054@psf.upfronthosting.co.za> Message-ID: <1213907791.3.0.40502746768.issue3054@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Looks like this has exposed some ugly code. From setup.py: # Figure out the location of the source code for extension modules # (This logic is copied in distutils.test.test_sysconfig, # so building in a separate directory does not break test_distutils.) I believe the proper fix is to move some of the code from setup.py into sysconfig so that it does more than just set "python_build" when running inside a Python build directory. For example, it should also add /Include to the standard list of includes that distutils uses. The attached patch fixes test_build_ext.py to use the right source file (perhaps it should be tested on Windows). The test still fails because Python.h cannot be found. ---------- nosy: +nas Added file: http://bugs.python.org/file10659/test_ext_src.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 22:46:00 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 19 Jun 2008 20:46:00 +0000 Subject: [issue3142] urllib docs don't match the new modules In-Reply-To: <1213881685.97.0.203143368554.issue3142@psf.upfronthosting.co.za> Message-ID: <1213908360.06.0.674880746837.issue3142@psf.upfronthosting.co.za> Georg Brandl added the comment: Great! When finished with the docs, just check them in, I'll look over it then. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 22:55:11 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 19 Jun 2008 20:55:11 +0000 Subject: [issue3145] help> modules os raises UnicodeDecodeError In-Reply-To: <1213905498.05.0.86036305634.issue3145@psf.upfronthosting.co.za> Message-ID: <1213908911.58.0.858731832274.issue3145@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Corrected with r64411. Thanks for the report! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 19 23:12:12 2008 From: report at bugs.python.org (Vincent Manis) Date: Thu, 19 Jun 2008 21:12:12 +0000 Subject: [issue3146] Sphinx/LaTeX fails on Python 3.0b1 documentation In-Reply-To: <1213909932.21.0.41888332926.issue3146@psf.upfronthosting.co.za> Message-ID: <1213909932.21.0.41888332926.issue3146@psf.upfronthosting.co.za> New submission from Vincent Manis : When attempting to build the LaTeX for the documentation provided with Python 3.0b1, the following error is produced while writing the Library documentation (full backtrace provided). I am running Sphinx on Python 2.5. Traceback (most recent call last): File "/Users/vmanis/myenv/py3k/Doc/tools/sphinx/__init__.py", line 135, in main app.builder.build_update() File "/Users/vmanis/myenv/py3k/Doc/tools/sphinx/builder.py", line 194, in build_update self.build(['__all__'], to_build) File "/Users/vmanis/myenv/py3k/Doc/tools/sphinx/builder.py", line 238, in build self.write(docnames, updated_docnames, method) File "/Users/vmanis/myenv/py3k/Doc/tools/sphinx/builder.py", line 852, in write docwriter.write(doctree, destination) File "/Users/vmanis/myenv/py3k/Doc/tools/docutils/writers/__init__.py", line 78, in write self.translate() File "/Users/vmanis/myenv/py3k/Doc/tools/sphinx/latexwriter.py", line 70, in translate self.document.walkabout(visitor) File "/Users/vmanis/myenv/py3k/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/Users/vmanis/myenv/py3k/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/Users/vmanis/myenv/py3k/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/Users/vmanis/myenv/py3k/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/Users/vmanis/myenv/py3k/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/Users/vmanis/myenv/py3k/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/Users/vmanis/myenv/py3k/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/Users/vmanis/myenv/py3k/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/Users/vmanis/myenv/py3k/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/Users/vmanis/myenv/py3k/Doc/tools/docutils/nodes.py", line 151, in walkabout visitor.dispatch_visit(self) File "/Users/vmanis/myenv/py3k/Doc/tools/docutils/nodes.py", line 1502, in dispatch_visit return method(node) File "/Users/vmanis/myenv/py3k/Doc/tools/sphinx/latexwriter.py", line 1012, in unknown_visit raise NotImplementedError("Unknown node: " + node.__class__.__name__) NotImplementedError: Unknown node: subscript ---------- assignee: georg.brandl components: Documentation, Documentation tools (Sphinx) messages: 68426 nosy: georg.brandl, vmanis1 severity: normal status: open title: Sphinx/LaTeX fails on Python 3.0b1 documentation type: crash versions: Python 2.5, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 00:35:23 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 19 Jun 2008 22:35:23 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1213475446.58.0.529901834278.issue3112@psf.upfronthosting.co.za> Message-ID: <1213914923.39.0.88719519513.issue3112@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yet another question. There is a slight discrepancy between tracebacks generated by the builtin-reporting and tracebacks generated by traceback.py. With built-in reporting: Traceback (most recent call last): File "", line 1, in File "f.py", line 22, in raise_cause inner_raise_cause() File "f.py", line 13, in inner_raise_cause raise KeyError from e KeyError With traceback.py: Traceback (most recent call last): File "", line 1, in File "f.py", line 22, in raise_cause inner_raise_cause() File "f.py", line 13, in inner_raise_cause raise KeyError from e KeyError As you see, indentation of code lines is different. Should we harmonize those behaviours? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 00:42:13 2008 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 19 Jun 2008 22:42:13 +0000 Subject: [issue3136] [PATCH] logging.config.fileConfig() compulsivly disable all existing loggers In-Reply-To: <1213837323.33.0.0675974065144.issue3136@psf.upfronthosting.co.za> Message-ID: <1213915333.68.0.712014436714.issue3136@psf.upfronthosting.co.za> Vinay Sajip added the comment: Fixed checked into trunk. ---------- resolution: invalid -> fixed status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 00:43:46 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 19 Jun 2008 22:43:46 +0000 Subject: [issue3147] tests for sys.getsizeof fail on win64 In-Reply-To: <1213915426.19.0.16089164965.issue3147@psf.upfronthosting.co.za> Message-ID: <1213915426.19.0.16089164965.issue3147@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : the buildbot "AMD64 W2k8 trunk" systematically fails with the messages: ====================================================================== FAIL: test_specialtypes (test.test_sys.SizeofTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "S:\buildbots\python.x64\trunk.nelson-win64\build\lib\test\test_sys.py", line 534, in test_specialtypes self.check_sizeof({}, h + 3*l + 3*p + 8*(l + 2*p)) File "S:\buildbots\python.x64\trunk.nelson-win64\build\lib\test\test_sys.py", line 431, in check_sizeof self.assertEqual(result, size, msg + str(size)) AssertionError: wrong size for : got 272, expected 224 ====================================================================== FAIL: test_standardtypes (test.test_sys.SizeofTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "S:\buildbots\python.x64\trunk.nelson-win64\build\lib\test\test_sys.py", line 455, in test_standardtypes self.check_sizeof(True, h + l) File "S:\buildbots\python.x64\trunk.nelson-win64\build\lib\test\test_sys.py", line 431, in check_sizeof self.assertEqual(result, size, msg + str(size)) AssertionError: wrong size for : got 40, expected 32 It seems that this platform is special: sizeof(long)==4 and sizeof(size_t)==8 ---------- assignee: schuppenies components: Interpreter Core messages: 68429 nosy: amaury.forgeotdarc, schuppenies severity: normal status: open title: tests for sys.getsizeof fail on win64 type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 02:00:30 2008 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 20 Jun 2008 00:00:30 +0000 Subject: [issue3054] test_disutils fails In-Reply-To: <1212788058.33.0.328120732213.issue3054@psf.upfronthosting.co.za> Message-ID: <1213920029.92.0.523312469964.issue3054@psf.upfronthosting.co.za> Neil Schemenauer added the comment: I think my previous patch combined with sysconfig_builddir.patch fixes this issue. Someone will need to test on other platforms. Note that the messy code in setup.py and in the tests should still be cleaned up. BTW, distutils is a den of stinking evil. ;-) Added file: http://bugs.python.org/file10660/sysconfig_builddir.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 02:04:41 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 20 Jun 2008 00:04:41 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1213920281.41.0.701732236842.issue3125@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Here is a patch that implements a custom pickler for multiprocessing.forking. copy_reg has been completely replaced by calls to ForkingPickler.register(): the global registry is not modified. Added file: http://bugs.python.org/file10661/no_copyreg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 02:06:27 2008 From: report at bugs.python.org (Jean Brouwers) Date: Fri, 20 Jun 2008 00:06:27 +0000 Subject: [issue3148] multiprocessing test hangs In-Reply-To: <1213920386.95.0.298819928633.issue3148@psf.upfronthosting.co.za> Message-ID: <1213920386.95.0.298819928633.issue3148@psf.upfronthosting.co.za> New submission from Jean Brouwers : The test_multiprocessing hangs with both Python 2.6b1 and 3.0b1 on MacOS X 10.4.11 (Intel) but only when using make test. However, the test runs and passes in both builds if run separately, e.g. with ./python Lib/test/test_mutliprocessing.py. ---------- components: Tests messages: 68432 nosy: MrJean1 severity: normal status: open title: multiprocessing test hangs type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 02:18:23 2008 From: report at bugs.python.org (Jean Brouwers) Date: Fri, 20 Jun 2008 00:18:23 +0000 Subject: [issue3148] multiprocessing test hangs In-Reply-To: <1213920386.95.0.298819928633.issue3148@psf.upfronthosting.co.za> Message-ID: <1213921103.16.0.85259943383.issue3148@psf.upfronthosting.co.za> Jean Brouwers added the comment: Sorry, this issue has already been raised in #3088. Please ignore. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 02:19:10 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 20 Jun 2008 00:19:10 +0000 Subject: [issue3148] multiprocessing test hangs In-Reply-To: <1213920386.95.0.298819928633.issue3148@psf.upfronthosting.co.za> Message-ID: <1213921150.01.0.0859741048589.issue3148@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> duplicate status: open -> closed superseder: -> test_multiprocessing hangs on OS X 10.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 02:26:31 2008 From: report at bugs.python.org (Leandro Lucarella) Date: Fri, 20 Jun 2008 00:26:31 +0000 Subject: [issue3136] [PATCH] logging.config.fileConfig() compulsivly disable all existing loggers In-Reply-To: <1213837323.33.0.0675974065144.issue3136@psf.upfronthosting.co.za> Message-ID: <1213921591.25.0.931158314994.issue3136@psf.upfronthosting.co.za> Leandro Lucarella added the comment: Thank you very much _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 02:41:08 2008 From: report at bugs.python.org (Leandro Lucarella) Date: Fri, 20 Jun 2008 00:41:08 +0000 Subject: [issue3136] [PATCH] logging.config.fileConfig() compulsivly disable all existing loggers In-Reply-To: <1213837323.33.0.0675974065144.issue3136@psf.upfronthosting.co.za> Message-ID: <1213922468.51.0.8270016165.issue3136@psf.upfronthosting.co.za> Leandro Lucarella added the comment: Here is a patch to add some documentation on the new fileConfig() argument. Is not much, but it's better than nothing =) Added file: http://bugs.python.org/file10662/logging.config.disable_existing_loggers.doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 02:54:01 2008 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 20 Jun 2008 00:54:01 +0000 Subject: [issue3054] test_disutils fails In-Reply-To: <1212788058.33.0.328120732213.issue3054@psf.upfronthosting.co.za> Message-ID: <1213923241.85.0.485360657595.issue3054@psf.upfronthosting.co.za> Neil Schemenauer added the comment: One final patch for today (get_python_inc.patch). The patch combines my previous two patches and also cleans up some ugly code in setup.py and test_sysconfig.py. The source of the ugliness was that get_python_inc() did not work when running from within a build directory. The patch also fixes the header dependency feature introduced in svn r60287 (it assumed that builddir == srcdir and also that os.path.sep == '/'). Added file: http://bugs.python.org/file10663/get_python_inc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 02:54:22 2008 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 20 Jun 2008 00:54:22 +0000 Subject: [issue3054] test_disutils fails In-Reply-To: <1212788058.33.0.328120732213.issue3054@psf.upfronthosting.co.za> Message-ID: <1213923262.43.0.23332481067.issue3054@psf.upfronthosting.co.za> Changes by Neil Schemenauer : Removed file: http://bugs.python.org/file10659/test_ext_src.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 02:54:27 2008 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 20 Jun 2008 00:54:27 +0000 Subject: [issue3054] test_disutils fails In-Reply-To: <1212788058.33.0.328120732213.issue3054@psf.upfronthosting.co.za> Message-ID: <1213923267.84.0.762537019906.issue3054@psf.upfronthosting.co.za> Changes by Neil Schemenauer : Removed file: http://bugs.python.org/file10660/sysconfig_builddir.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 03:03:38 2008 From: report at bugs.python.org (Facundo Batista) Date: Fri, 20 Jun 2008 01:03:38 +0000 Subject: [issue754016] urlparse goes wrong with IP:port without scheme Message-ID: <1213923818.14.0.872039806432.issue754016@psf.upfronthosting.co.za> Changes by Facundo Batista : ---------- assignee: georg.brandl -> facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 03:26:05 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Jun 2008 01:26:05 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1213925165.47.0.985378592439.issue3008@psf.upfronthosting.co.za> Raymond Hettinger added the comment: To address the ideas brought-up so far, here's a new version that can work with eval. The same appoach extends to oct and hex as well: def newbin(f): """ >>> newbin(3.125) '0b11001 * 2.0 ** -3' """ n, d = f.as_integer_ratio() s = '%s * 2.0 ** %d' % (bin(n), -math.log(d, 2.0)) return s ---------- keywords: +patch Added file: http://bugs.python.org/file10664/floatdisp.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 03:38:33 2008 From: report at bugs.python.org (Jean Brouwers) Date: Fri, 20 Jun 2008 01:38:33 +0000 Subject: [issue3149] multiprocessing build fails on Solaris 10 In-Reply-To: <1213925912.95.0.611829708771.issue3149@psf.upfronthosting.co.za> Message-ID: <1213925912.95.0.611829708771.issue3149@psf.upfronthosting.co.za> New submission from Jean Brouwers : The multiprocessing module fails to build on Solaris 10 when using the Sun C compiler. The failure is due to one missing symbol SEM_VALUE_MAX. Defining that symbol (e.g. as _POSIX_SEM_VALUE_MAX) builds the _multiprocessing module for both 32- and 64-bit. However, for 32-bit, 5 tests from test_multiprocessing fail due to the missing _ctypes module. For 64-bit, the first 3 tests fail (like for 32-bit) but the 4th test hangs. Here is a log: ./python Lib/test/test_multiprocessing.py test_array (__main__.WithProcessesTestArray) ... ERROR test_getobj_getlock_obj (__main__.WithProcessesTestArray) ... ERROR test_rawarray (__main__.WithProcessesTestArray) ... ERROR test_notify (__main__.WithProcessesTestCondition) ... Process Process-1: Traceback (most recent call last): File "/..../64/Python-2.6b1/Lib/multiprocessing/process.py", line 237, in _bootstrap self.run() File "/.../64/Python-2.6b1/Lib/multiprocessing/process.py", line 93, in run self._target(*self._args, **self._kwargs) File "Lib/test/test_multiprocessing.py", line 610, in f sleeping.release() ValueError: semaphore or lock released too many times This is Solaris 10 on an Ultra20 (Opteron) machine: > uname -a SunOS unknown 5.10 Generic_118855-14 i86pc i386 i86pc > cc -v cc: Sun C 5.8 2005/10/13 ---------- components: Build messages: 68438 nosy: MrJean1 severity: normal status: open title: multiprocessing build fails on Solaris 10 type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 03:59:14 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Fri, 20 Jun 2008 01:59:14 +0000 Subject: [issue3150] multiprocessing module not being installed In-Reply-To: <1213927152.64.0.995620300444.issue3150@psf.upfronthosting.co.za> Message-ID: <1213927152.64.0.995620300444.issue3150@psf.upfronthosting.co.za> New submission from Humberto Diogenes : The new multiprocessing module is not being installed: $ python3.0 Python 3.0b1+ (py3k:64417, Jun 19 2008, 21:25:46) [GCC 4.0.1 (Apple Inc. build 5483)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing Traceback (most recent call last): File "", line 1, in ImportError: No module named multiprocessing >>> After adding it to Makefile.pre.in and rebuilding/reinstalling: $ python3.0 Python 3.0b1+ (py3k:64417M, Jun 19 2008, 22:50:25) [GCC 4.0.1 (Apple Inc. build 5483)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing >>> ---------- components: Installation files: install_multiprocessing.patch keywords: patch messages: 68439 nosy: hdiogenes severity: normal status: open title: multiprocessing module not being installed versions: Python 3.0 Added file: http://bugs.python.org/file10665/install_multiprocessing.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 04:00:34 2008 From: report at bugs.python.org (Jesse Noller) Date: Fri, 20 Jun 2008 02:00:34 +0000 Subject: [issue3150] multiprocessing module not being installed In-Reply-To: <1213927152.64.0.995620300444.issue3150@psf.upfronthosting.co.za> Message-ID: <1213927234.38.0.295751831694.issue3150@psf.upfronthosting.co.za> Jesse Noller added the comment: Is this a make && make install? ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 04:00:55 2008 From: report at bugs.python.org (Jesse Noller) Date: Fri, 20 Jun 2008 02:00:55 +0000 Subject: [issue3150] multiprocessing module not being installed In-Reply-To: <1213927152.64.0.995620300444.issue3150@psf.upfronthosting.co.za> Message-ID: <1213927255.06.0.303684182133.issue3150@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: -> jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 04:01:23 2008 From: report at bugs.python.org (Jesse Noller) Date: Fri, 20 Jun 2008 02:01:23 +0000 Subject: [issue3149] multiprocessing build fails on Solaris 10 In-Reply-To: <1213925912.95.0.611829708771.issue3149@psf.upfronthosting.co.za> Message-ID: <1213927283.4.0.702659283774.issue3149@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: -> jnoller nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 04:03:37 2008 From: report at bugs.python.org (Jesse Noller) Date: Fri, 20 Jun 2008 02:03:37 +0000 Subject: [issue3143] development docs waste a lot of horizontal space on left nav bar In-Reply-To: <1213894130.5.0.901866798504.issue3143@psf.upfronthosting.co.za> Message-ID: <1213927417.69.0.0109382712282.issue3143@psf.upfronthosting.co.za> Jesse Noller added the comment: +1 coat to the bikeshed, the new layout is painful unless you're at a higher resolution/bigger window ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 04:04:50 2008 From: report at bugs.python.org (Jesse Noller) Date: Fri, 20 Jun 2008 02:04:50 +0000 Subject: [issue3149] multiprocessing build fails on Solaris 10 In-Reply-To: <1213925912.95.0.611829708771.issue3149@psf.upfronthosting.co.za> Message-ID: <1213927490.59.0.329074203734.issue3149@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- nosy: +roudkerk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 04:15:32 2008 From: report at bugs.python.org (Jesse Noller) Date: Fri, 20 Jun 2008 02:15:32 +0000 Subject: [issue3150] multiprocessing module not being installed In-Reply-To: <1213927152.64.0.995620300444.issue3150@psf.upfronthosting.co.za> Message-ID: <1213928132.53.0.761167835606.issue3150@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 04:16:18 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Fri, 20 Jun 2008 02:16:18 +0000 Subject: [issue3150] multiprocessing module not being installed In-Reply-To: <1213927152.64.0.995620300444.issue3150@psf.upfronthosting.co.za> Message-ID: <1213928178.41.0.914451951945.issue3150@psf.upfronthosting.co.za> Humberto Diogenes added the comment: Jesse, not install, but altinstall: sudo rm -fr /usr/local/lib/python3.0 make clean make && sudo make altinstall Forgot to mention that it was originally reported by Rodrigo Fenrrir. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 04:20:26 2008 From: report at bugs.python.org (Jesse Noller) Date: Fri, 20 Jun 2008 02:20:26 +0000 Subject: [issue3150] multiprocessing module not being installed In-Reply-To: <1213927152.64.0.995620300444.issue3150@psf.upfronthosting.co.za> Message-ID: <1213928426.71.0.715776056445.issue3150@psf.upfronthosting.co.za> Jesse Noller added the comment: Thanks. This is what I get from running out of subversion all the time. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 04:42:26 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Jun 2008 02:42:26 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1213929746.09.0.282382488884.issue3008@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file10664/floatdisp.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 04:42:59 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Jun 2008 02:42:59 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1213929779.44.0.94182409184.issue3008@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Added file: http://bugs.python.org/file10666/float.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 04:47:50 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 20 Jun 2008 02:47:50 +0000 Subject: [issue3150] multiprocessing module not being installed In-Reply-To: <1213927152.64.0.995620300444.issue3150@psf.upfronthosting.co.za> Message-ID: <1213930070.7.0.783964852385.issue3150@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think r64422 should do the trick. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 05:23:06 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Jun 2008 03:23:06 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1213932186.21.0.553840264498.issue3008@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Added file: http://bugs.python.org/file10667/float2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 05:33:09 2008 From: report at bugs.python.org (Senthil) Date: Fri, 20 Jun 2008 03:33:09 +0000 Subject: [issue3143] development docs waste a lot of horizontal space on left nav bar In-Reply-To: <1213927417.69.0.0109382712282.issue3143@psf.upfronthosting.co.za> Message-ID: <20080620033257.GC3678@gmail.com> Senthil added the comment: +1 to support this bug entry. Even though I have wide-monitor (1680x1050), keeping such a wide left side margin is a pain when reading the new docs. I was looking for the settings if there is any way to turn off the left navigation or change the CSS style to a more plain one. Nope, it is not there. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 10:54:40 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Jun 2008 08:54:40 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1213952080.08.0.141005224329.issue3008@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The other reviewers asked for: * same treatment for oct() and hex() * platform independent exact representation of floats * fixed-size exponential style output instead of tons of leading zeros * output that round-trips through eval() * use Py2.6 octal format in 2.6, and 3.0 format in 3.0 Attaching a patch with tests. Added file: http://bugs.python.org/file10668/float3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 11:29:31 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 20 Jun 2008 09:29:31 +0000 Subject: [issue2110] Implement __format__ for Decimal In-Reply-To: <1202994255.28.0.383332155678.issue2110@psf.upfronthosting.co.za> Message-ID: <1213954171.8.0.699556201022.issue2110@psf.upfronthosting.co.za> Mark Dickinson added the comment: Reopening this; I'd like to have a second go at implementing the 'n' format specifier for the Decimal type. See issue 2802 for hints about how to go about this. ---------- assignee: facundobatista -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 11:59:12 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 20 Jun 2008 09:59:12 +0000 Subject: [issue3004] Bug in slice.indices() In-Reply-To: <1213804606.86.0.198962035271.issue3004@psf.upfronthosting.co.za> Message-ID: <5c6f2a5d0806200259h2f1442fep9a7bd258b6e333a7@mail.gmail.com> Mark Dickinson added the comment: On Wed, Jun 18, 2008 at 4:56 PM, Arnaud Bergeron wrote: > > Arnaud Bergeron added the comment: > > Would these do? > > self.assertEqual(slice(None, -10 ).indices(10), (0, 0, 1)) > self.assertEqual(slice(None, -11, ).indices(10), (0, 0, 1)) > self.assertEqual(slice(None, -12, -1).indices(10), (9, -1, -1)) > Perfect. Thank you. If this is changed, then I think the following should also be changed: (9, 10, -1) I believe the second index here should be 9, not 10. Do you agree? With these two changes the code, while marginally more complicated, is actually easier to understand than before, since exactly the same processing is applied to both the start and stop indices. I think this is as it should be. Added file: http://bugs.python.org/file10669/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Fri Jun 20 11:59:59 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 20 Jun 2008 09:59:59 +0000 Subject: [issue3004] Bug in slice.indices() In-Reply-To: <1212086155.65.0.0693111742843.issue3004@psf.upfronthosting.co.za> Message-ID: <1213955999.82.0.317796370679.issue3004@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file10669/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 12:01:24 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 20 Jun 2008 10:01:24 +0000 Subject: [issue3004] Bug in slice.indices() In-Reply-To: <1212086155.65.0.0693111742843.issue3004@psf.upfronthosting.co.za> Message-ID: <1213956084.28.0.440608116908.issue3004@psf.upfronthosting.co.za> Mark Dickinson added the comment: Sorry: looks like I messed up that last post. The example should be: >>> slice(10, 10, -1).indices(10) # expect (9, 9, -1) (9, 10, -1) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 12:49:17 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 20 Jun 2008 10:49:17 +0000 Subject: [issue3004] Bug in slice.indices() In-Reply-To: <1212086155.65.0.0693111742843.issue3004@psf.upfronthosting.co.za> Message-ID: <1213958957.75.0.23696560019.issue3004@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a new patch that incorporates Arnaud's fix and tests, together with a few extra tests. While I expect that this change will affect very little code, I think it's the right thing to do, because: - start and stop are now processed identically, making the source code easier to understand, and the behaviour easier to explain. - expected invariants now hold even in corner cases; for example, after: start, stop, step = my_slice.indices(length) it's guaranteed that 0 <= start <= stop <= length if step is positive, and length-1 >= start >= stop >= -1 if step is negative. However, I'd like a second opinion from another core developer before checking this in. Added file: http://bugs.python.org/file10670/issue3004.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 12:52:59 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 20 Jun 2008 10:52:59 +0000 Subject: [issue3004] Bug in slice.indices() In-Reply-To: <1212086155.65.0.0693111742843.issue3004@psf.upfronthosting.co.za> Message-ID: <1213959179.05.0.336537781123.issue3004@psf.upfronthosting.co.za> Mark Dickinson added the comment: > 0 <= start <= stop <= length if step is positive, and > length-1 >= start >= stop >= -1 if step is negative. That should be: 0 <= start <= length and 0 <= stop <= length (step > 0), and length-1 >= start >= -1, length-1 >= stop >= -1 (step < 0); it's not guaranteed that start <= stop always holds in the first case, or that start >= stop in the second. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 13:07:03 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Jun 2008 11:07:03 +0000 Subject: [issue3004] Bug in slice.indices() In-Reply-To: <1212086155.65.0.0693111742843.issue3004@psf.upfronthosting.co.za> Message-ID: <1213960023.66.0.80378675936.issue3004@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: marketdickinson -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 13:34:09 2008 From: report at bugs.python.org (Matt Kern) Date: Fri, 20 Jun 2008 11:34:09 +0000 Subject: [issue1615158] POSIX capabilities support Message-ID: <1213961649.6.0.753749297337.issue1615158@psf.upfronthosting.co.za> Matt Kern added the comment: Updated patch with numerous changes, which (hopefully) address the issues you raised. Added file: http://bugs.python.org/file10671/patch-20080620-1232.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 13:50:10 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 20 Jun 2008 11:50:10 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1213962610.9.0.275381619206.issue3008@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I don't like this modification of a PyString object: + n = PyString_GET_SIZE(conv); + conv_str = PyString_AS_STRING(conv); + /* Remove the trailing 'L' if present */ + if (n && conv_str[n-1] == 'L') + conv_str[n-1] = '\0'; + result = PyString_FromFormat("%s * 2.0 ** %d", conv_str, exp); The string may have other references (ex: all single-char strings are shared) and it seems unwise to directly modify the memory. Also, tests should check if negative numbers have the same representation as their absolute value (with the sign). It is not obvious from the implementation, which uses floor(). ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 14:15:48 2008 From: report at bugs.python.org (Matt Kern) Date: Fri, 20 Jun 2008 12:15:48 +0000 Subject: [issue1615158] POSIX capabilities support Message-ID: <1213964148.82.0.696269683631.issue1615158@psf.upfronthosting.co.za> Matt Kern added the comment: Updated patch with further documentation fixes. Added file: http://bugs.python.org/file10672/patch-20080620-1314.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 14:38:22 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 20 Jun 2008 12:38:22 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1213965502.61.0.98487351018.issue3008@psf.upfronthosting.co.za> Mark Dickinson added the comment: The patch looks good to me. It's a bit unfortunate that -0.0 doesn't round-trip correctly (the sign of the zero gets lost): >>> eval(bin(-0.0)) 0.0 I don't know whether it's worth special-casing this; the output would have to be in a different format: '-0b0 * 2.0 ** 0' isn't good enough, since unary minus has higher precedence than multiplication. ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 14:44:02 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 20 Jun 2008 12:44:02 +0000 Subject: [issue2110] Implement __format__ for Decimal In-Reply-To: <1202994255.28.0.383332155678.issue2110@psf.upfronthosting.co.za> Message-ID: <1213965842.49.0.230207694981.issue2110@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 14:54:57 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Jun 2008 12:54:57 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1213966497.1.0.757305014479.issue3008@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Hmm, I don't see a way to preserve -0.0 without varying from the standard format. Attaching an updated patch for Amaury's comments. Added file: http://bugs.python.org/file10673/float4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 15:01:31 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Jun 2008 13:01:31 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1213966891.38.0.56073396662.issue3008@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Added file: http://bugs.python.org/file10674/float5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 15:06:53 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Jun 2008 13:06:53 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1213967213.18.0.832439000174.issue3008@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Mark, I added tests for Inf/Nan. Will this work on all platforms? Added file: http://bugs.python.org/file10675/float5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 15:07:10 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Jun 2008 13:07:10 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1213967230.12.0.040353272711.issue3008@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file10674/float5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 15:10:48 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Jun 2008 13:10:48 +0000 Subject: [issue3004] Bug in slice.indices() In-Reply-To: <1212086155.65.0.0693111742843.issue3004@psf.upfronthosting.co.za> Message-ID: <1213967448.2.0.946359730714.issue3004@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Looks like a straight-forward patch. ---------- assignee: rhettinger -> marketdickinson resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 15:24:10 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 20 Jun 2008 13:24:10 +0000 Subject: [issue3131] 2to3 can't find fixes_dir In-Reply-To: <1213707451.37.0.990669218912.issue3131@psf.upfronthosting.co.za> Message-ID: <1213968250.74.0.39791795164.issue3131@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Collin, how does this look? #!/usr/bin/env python from lib2to3 import refactor import sys import os fixers = os.path.join(os.path.dirname(refactor.__file__), "fixes") sys.exit(refactor.main(fixers)) ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 16:26:22 2008 From: report at bugs.python.org (Raghuram Devarakonda) Date: Fri, 20 Jun 2008 14:26:22 +0000 Subject: [issue1545] shutil fails when copying to NTFS in Linux In-Reply-To: <1196665730.42.0.657784597912.issue1545@psf.upfronthosting.co.za> Message-ID: <1213971982.78.0.222089174153.issue1545@psf.upfronthosting.co.za> Raghuram Devarakonda added the comment: I have submitted a patch (http://codereview.appspot.com/2384) for WindowsError issue as it is reported in two other bugs #3134 and #2549. I have only tested on Linux so I would appreciate if some one who have access to windows can test it as well. Considering that the fix is simple and more bugs are being opened for the same problem, it is worthwhile to check this in quickly. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 16:30:52 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 20 Jun 2008 14:30:52 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1213972252.02.0.0557862816018.issue3008@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Mark, I added tests for Inf/Nan. Will this work on all platforms? I think the tests should work on all common to semicommon platforms, including on all the buildbots. They won't work on non IEEE 754 platforms (float('nan') will throw an exception). Then again, neither will all the Inf/NaN tests in test_math.py. Sigh. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 16:57:21 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 20 Jun 2008 14:57:21 +0000 Subject: [issue3004] Bug in slice.indices() In-Reply-To: <1212086155.65.0.0693111742843.issue3004@psf.upfronthosting.co.za> Message-ID: <1213973841.61.0.941213061484.issue3004@psf.upfronthosting.co.za> Mark Dickinson added the comment: Committed, r64426. Thanks for the report, Arnaud. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 17:16:21 2008 From: report at bugs.python.org (robert forkel) Date: Fri, 20 Jun 2008 15:16:21 +0000 Subject: [issue3151] elementtree serialization bug for weird namespace urls In-Reply-To: <1213974981.57.0.313909578004.issue3151@psf.upfronthosting.co.za> Message-ID: <1213974981.57.0.313909578004.issue3151@psf.upfronthosting.co.za> New submission from robert forkel : when serializing elementtrees with weird namespaces like {$stuff}, the generated xml is not valid: Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 IDLE 1.2.1 ==== No Subprocess ==== >>> from xml.etree import ElementTree as et >>> e = et.fromstring('') >>> e.tag '{${stuff}}localname' >>> t = et.ElementTree(e) >>> from StringIO import StringIO >>> f = StringIO() >>> t.write(f) >>> f.seek(0) >>> print f.read() ---------- components: Library (Lib) messages: 68463 nosy: xrotwang severity: normal status: open title: elementtree serialization bug for weird namespace urls type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 17:31:42 2008 From: report at bugs.python.org (Helmut Jarausch) Date: Fri, 20 Jun 2008 15:31:42 +0000 Subject: [issue3131] 2to3 can't find fixes_dir In-Reply-To: <1213707451.37.0.990669218912.issue3131@psf.upfronthosting.co.za> Message-ID: <1213975902.8.0.660375160365.issue3131@psf.upfronthosting.co.za> Helmut Jarausch added the comment: The suggested fix succeeds but then the next problem occurs Traceback (most recent call last): File "/usr/local/bin/2to3", line 6, in sys.exit(refactor.main(fixers)) File "/usr/local/lib/python3.0/lib2to3/refactor.py", line 81, in main rt = RefactoringTool(fixer_dir, options) File "/usr/local/lib/python3.0/lib2to3/refactor.py", line 160, in __init__ self.pre_order, self.post_order = self.get_fixers() File "/usr/local/lib/python3.0/lib2to3/refactor.py", line 185, in get_fixers mod = __import__(fixer_pkg + ".fix_" + fix_name, {}, {}, ["*"]) ValueError: Empty module name ---------- nosy: +HWJ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 17:34:33 2008 From: report at bugs.python.org (Jean Brouwers) Date: Fri, 20 Jun 2008 15:34:33 +0000 Subject: [issue3149] multiprocessing build fails on Solaris 10 In-Reply-To: <1213925912.95.0.611829708771.issue3149@psf.upfronthosting.co.za> Message-ID: <1213976073.56.0.0579956383521.issue3149@psf.upfronthosting.co.za> Jean Brouwers added the comment: One more comment on SEM_VALUE_MAX for Solaris. _POSIX_SEM_VALUE_MAX is defined in on Solaris and that header file must be included. Better might be to use _SEM_VALUE_MAX which is defined in and that header files needs to be included as well. Rerhaps, INT_MAX is best. /usr/include/limits.h:#define _POSIX_SEM_NSEMS_MAX 256 /usr/include/limits.h:#define _POSIX_SEM_VALUE_MAX 32767 /usr/include/sys/param.h:#define _SEM_NSEMS_MAX INT_MAX /usr/include/sys/param.h:#define _SEM_VALUE_MAX INT_MAX Btw, the value of _POSIX_SEM_MAX_VALUE is 32767. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 17:41:11 2008 From: report at bugs.python.org (Miki Tebeka) Date: Fri, 20 Jun 2008 15:41:11 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213976471.62.0.070516225932.issue3088@psf.upfronthosting.co.za> Miki Tebeka added the comment: Still hangs for me on the 2.6 trunk on Ubuntu 8.04 ---------- nosy: +tebeka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 17:46:02 2008 From: report at bugs.python.org (Jesse Noller) Date: Fri, 20 Jun 2008 15:46:02 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1213976762.1.0.152762861584.issue3088@psf.upfronthosting.co.za> Jesse Noller added the comment: Where exactly does it hang Miki? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 17:58:58 2008 From: report at bugs.python.org (Qiangning Hong) Date: Fri, 20 Jun 2008 15:58:58 +0000 Subject: [issue2277] MozillaCookieJar does not support Firefox3 cookie files In-Reply-To: <1205310956.06.0.761612370729.issue2277@psf.upfronthosting.co.za> Message-ID: <1213977538.64.0.245991665806.issue2277@psf.upfronthosting.co.za> Changes by Qiangning Hong : ---------- nosy: +hongqn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 21:53:22 2008 From: report at bugs.python.org (Georgij Kondratjev) Date: Fri, 20 Jun 2008 19:53:22 +0000 Subject: [issue3131] 2to3 can't find fixes_dir In-Reply-To: <1213707451.37.0.990669218912.issue3131@psf.upfronthosting.co.za> Message-ID: <1213991602.64.0.220901886258.issue3131@psf.upfronthosting.co.za> Georgij Kondratjev added the comment: Do what Benjamin Peterson suggested and also edit get_fixers(self) in refactor.py so fixer_pkg is initialized like this: fixer_pkg = os.path.relpath(self.fixer_dir, os.path.join(os.path.dirname(__file__), '..')) fixer_pkg = fixer_pkg.replace(os.path.sep, ".") This works for me. ---------- nosy: +orivej _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 22:07:34 2008 From: report at bugs.python.org (Georgij Kondratjev) Date: Fri, 20 Jun 2008 20:07:34 +0000 Subject: [issue3131] 2to3 can't find fixes_dir In-Reply-To: <1213707451.37.0.990669218912.issue3131@psf.upfronthosting.co.za> Message-ID: <1213992454.62.0.922920556852.issue3131@psf.upfronthosting.co.za> Georgij Kondratjev added the comment: Here is the patch (against both current svn and beta 1). ---------- keywords: +patch Added file: http://bugs.python.org/file10676/2to3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 22:13:09 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 20 Jun 2008 20:13:09 +0000 Subject: [issue3143] development docs waste a lot of horizontal space on left nav bar In-Reply-To: <1213894130.5.0.901866798504.issue3143@psf.upfronthosting.co.za> Message-ID: <1213992789.64.0.977751197336.issue3143@psf.upfronthosting.co.za> Georg Brandl added the comment: I know about this and will think about possible ways out of it. Of course if someone has a patch it will probably be faster. ---------- components: +Documentation tools (Sphinx) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 22:17:50 2008 From: report at bugs.python.org (Georgij Kondratjev) Date: Fri, 20 Jun 2008 20:17:50 +0000 Subject: [issue3131] 2to3 can't find fixes_dir In-Reply-To: <1213707451.37.0.990669218912.issue3131@psf.upfronthosting.co.za> Message-ID: <1213993070.23.0.992916379584.issue3131@psf.upfronthosting.co.za> Georgij Kondratjev added the comment: After uploading the patch I noticed -#!/usr/bin/env python +#!/usr/bin/python3.0 in it. They just should be dropped. Added file: http://bugs.python.org/file10677/2to3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 22:28:57 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 20 Jun 2008 20:28:57 +0000 Subject: [issue3131] 2to3 can't find fixes_dir In-Reply-To: <1213707451.37.0.990669218912.issue3131@psf.upfronthosting.co.za> Message-ID: <1213993737.29.0.544060555936.issue3131@psf.upfronthosting.co.za> Benjamin Peterson added the comment: The patch looks good, but I'm going to let Collin deal with it because I'm not sure if he wants to maintain backwards compatibility with older version. (os.path.relpath was introduced in 2.6) ---------- priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 22:36:34 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 20 Jun 2008 20:36:34 +0000 Subject: [issue3152] ast module docs document private attribute In-Reply-To: <1213994193.88.0.922592845049.issue3152@psf.upfronthosting.co.za> Message-ID: <1213994193.88.0.922592845049.issue3152@psf.upfronthosting.co.za> New submission from Brett Cannon : The docs for the ast module document the '_fields' attribute on AST instances. Either that documentation needs to go away or the attribute needs to be renamed as the leading underscore means it is private to the internal API. ---------- assignee: georg.brandl components: Documentation keywords: easy messages: 68473 nosy: brett.cannon, georg.brandl priority: critical severity: normal status: open title: ast module docs document private attribute type: behavior versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 22:41:32 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 20 Jun 2008 20:41:32 +0000 Subject: [issue3152] ast module docs document private attribute In-Reply-To: <1213994193.88.0.922592845049.issue3152@psf.upfronthosting.co.za> Message-ID: <1213994492.57.0.205261852669.issue3152@psf.upfronthosting.co.za> Georg Brandl added the comment: I disagree. The AST classes are auto-generated, the leading underscore of _fields is there to avoid clashes with field names from the AST types. This is similar to http://docs.python.org/dev/library/collections#collections.somenamedtuple._fields which shouldn't be renamed, but isn't private either. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 22:48:04 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 20 Jun 2008 20:48:04 +0000 Subject: [issue3151] elementtree serialization bug for weird namespace urls In-Reply-To: <1213974981.57.0.313909578004.issue3151@psf.upfronthosting.co.za> Message-ID: <1213994884.93.0.0467093609315.issue3151@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: A one-letter fix :-) (the localname cannot contain special characters) ---------- assignee: -> effbot keywords: +patch nosy: +amaury.forgeotdarc, effbot Added file: http://bugs.python.org/file10678/etree.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 23:04:28 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Jun 2008 21:04:28 +0000 Subject: [issue3152] ast module docs document private attribute In-Reply-To: <1213994193.88.0.922592845049.issue3152@psf.upfronthosting.co.za> Message-ID: <1213995868.08.0.768266370699.issue3152@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This is consistent with the methods in named tuples (also to avoid name clashes). ---------- components: +None keywords: +26backport nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 23:13:04 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 20 Jun 2008 21:13:04 +0000 Subject: [issue1615158] POSIX capabilities support Message-ID: <1213996383.75.0.179394022037.issue1615158@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Unfortunately, these changes missed the beta for 2.6, so it must be delayed until 2.7. ---------- versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 23:36:06 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 20 Jun 2008 21:36:06 +0000 Subject: [issue3153] sqlite leaks on error In-Reply-To: <1213997766.53.0.685117931663.issue3153@psf.upfronthosting.co.za> Message-ID: <1213997766.53.0.685117931663.issue3153@psf.upfronthosting.co.za> New submission from Adam Olsen : Found in Modules/_sqlite/cursor.c: self->statement = PyObject_New(pysqlite_Statement, &pysqlite_StatementTy pe); if (!self->statement) { goto error; } rc = pysqlite_statement_create(self->statement, self->connection, operation); if (rc != SQLITE_OK) { self->statement = 0; goto error; } Besides the ugliness of allocating the object before passing it to the "create" function, if pysqlite_statement_create fails, the object is leaked. ---------- components: Extension Modules messages: 68478 nosy: Rhamphoryncus severity: normal status: open title: sqlite leaks on error type: resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 23:47:33 2008 From: report at bugs.python.org (Miki Tebeka) Date: Fri, 20 Jun 2008 21:47:33 +0000 Subject: [issue3154] "Quick search" box renders too long on FireFox 3 In-Reply-To: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> Message-ID: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> New submission from Miki Tebeka : See gray area in attached screenshot ---------- assignee: georg.brandl components: Documentation files: doc.png messages: 68479 nosy: georg.brandl, tebeka severity: normal status: open title: "Quick search" box renders too long on FireFox 3 versions: Python 2.6 Added file: http://bugs.python.org/file10679/doc.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 20 23:59:50 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 20 Jun 2008 21:59:50 +0000 Subject: [issue3152] ast module docs document private attribute In-Reply-To: <1213994193.88.0.922592845049.issue3152@psf.upfronthosting.co.za> Message-ID: <1213999190.47.0.581117149593.issue3152@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I agree with Georg and Raymond, closing this as "won't fix". ---------- nosy: +loewis resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 00:00:29 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 20 Jun 2008 22:00:29 +0000 Subject: [issue3154] "Quick search" box renders too long on FireFox 3 In-Reply-To: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> Message-ID: <1213999229.33.0.0243307204971.issue3154@psf.upfronthosting.co.za> Adam Olsen added the comment: Works for me. ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 00:54:47 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 20 Jun 2008 22:54:47 +0000 Subject: [issue3154] "Quick search" box renders too long on FireFox 3 In-Reply-To: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> Message-ID: <1214002487.58.0.384659600861.issue3154@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Are you using a pre-final version of Firefox? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 01:17:26 2008 From: report at bugs.python.org (Miki Tebeka) Date: Fri, 20 Jun 2008 23:17:26 +0000 Subject: [issue3154] "Quick search" box renders too long on FireFox 3 In-Reply-To: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> Message-ID: <1214003846.08.0.464716779255.issue3154@psf.upfronthosting.co.za> Miki Tebeka added the comment: Using final version (on Ubuntu 8.04) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 01:23:27 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 20 Jun 2008 23:23:27 +0000 Subject: [issue3155] Python should expose a pthread_cond_timedwait API for threading In-Reply-To: <1214004207.53.0.484694251636.issue3155@psf.upfronthosting.co.za> Message-ID: <1214004207.53.0.484694251636.issue3155@psf.upfronthosting.co.za> New submission from Gregory P. Smith : Currently the threading module has loops in it such as threading.Condition.wait's loop that attempts to acquire a lock in non-blocking mode and if it fails, sleeps for a while and trys again. (with exponential backoff of sleep time from 500us to 50ms in the current implementation). This is inefficient. Perhaps pthread_cond_timedwait does the same thing internally in some implementations but even if so, it will do it a lot more efficiently than doing it in python. We should expose a PyThread_acquire_lock API that accepts a timeout and uses pthread_cond_timedwait (or the equivalent on other OSes) when available. caveats? This may alter behavior with regards to KeyboardInterrupt exceptions coming in being processed or not depending on the particular OS timedwait implementation. ---------- components: Interpreter Core messages: 68484 nosy: gregory.p.smith priority: normal severity: normal status: open title: Python should expose a pthread_cond_timedwait API for threading type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 01:25:57 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 20 Jun 2008 23:25:57 +0000 Subject: [issue3154] "Quick search" box renders too long on FireFox 3 In-Reply-To: <1214003846.08.0.464716779255.issue3154@psf.upfronthosting.co.za> Message-ID: Adam Olsen added the comment: That's the same version I'm using. Maybe there's some font size differences? I'm also on a 64-bit AMD. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 01:25:57 2008 From: report at bugs.python.org (Miki Tebeka) Date: Fri, 20 Jun 2008 23:25:57 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1214004357.42.0.0866973025852.issue3088@psf.upfronthosting.co.za> Miki Tebeka added the comment: Jesse, I just run "make test", it runs until test_multiprocessing and then hangs there _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 01:35:00 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 20 Jun 2008 23:35:00 +0000 Subject: [issue3156] bytes type has inconsistent methods (append, insert) In-Reply-To: <1214004899.96.0.722439580753.issue3156@psf.upfronthosting.co.za> Message-ID: <1214004899.96.0.722439580753.issue3156@psf.upfronthosting.co.za> New submission from A.M. Kuchling : bytearray's methods aren't consistent in what they accept. append() takes either an int or a character: >>> b = bytearray('abc') >>> b.append(76) ; b bytearray(b'abcL') >>> b.append('M') ; b bytearray(b'abcLM') .insert() accepts only integers: >>> b.insert(0, 97) ; b bytearray(b'aabcLM') >>> b.insert(0, 'a') ; b Traceback (most recent call last): File "", line 1, in TypeError: an integer is required Both PEP 358 and the docstring for .append() only document 'int' as a legal input, so I suspect append() is wrong here. ---------- messages: 68487 nosy: akuchling severity: normal status: open title: bytes type has inconsistent methods (append, insert) type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 01:36:07 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 20 Jun 2008 23:36:07 +0000 Subject: [issue3151] elementtree serialization bug for weird namespace urls In-Reply-To: <1213974981.57.0.313909578004.issue3151@psf.upfronthosting.co.za> Message-ID: <1214004967.11.0.616170085785.issue3151@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 04:27:58 2008 From: report at bugs.python.org (Stephen Lewis) Date: Sat, 21 Jun 2008 02:27:58 +0000 Subject: [issue3157] sqlite3 minor documentation issues In-Reply-To: <1214015278.07.0.0768576663136.issue3157@psf.upfronthosting.co.za> Message-ID: <1214015278.07.0.0768576663136.issue3157@psf.upfronthosting.co.za> New submission from Stephen Lewis : The documentation for several methods in the sqlite3 library seems to be at odds with the function names: sqlite3.Cursor.fetchone --> "Fetches several rows from the resultset." sqlite3.Cursor.fetchmany --> "Fetches all rows from the resultset." sqlite3.Cursor.fetchall --> "Fetches one row from the resultset." This is apparent on Ubuntu's packaged version 2.5.2-2ubuntu4, and a quick glance at the online SVN repository implies that its present in the trunk. Also, it might be helpful the documentation for sqlite3.connect were to mention that it takes a file name as a parameter :) ---------- assignee: georg.brandl components: Documentation messages: 68488 nosy: georg.brandl, slewis severity: normal status: open title: sqlite3 minor documentation issues versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 04:31:45 2008 From: report at bugs.python.org (=?utf-8?q?Fernando_P=C3=A9rez?=) Date: Sat, 21 Jun 2008 02:31:45 +0000 Subject: [issue3158] Doctest fails to find doctests in extension modules In-Reply-To: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> Message-ID: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> New submission from Fernando P?rez : Doctest fails to find doctests defined in extension modules. With tools like cython (http://cython.org) it's trivially easy to add docstrings to extension code, a task that is much less pleasant with hand-written extensions. The following patch is a minimal fix for the problem: --- doctest_ori.py 2008-06-20 19:22:56.000000000 -0700 +++ doctest.py 2008-06-20 19:23:53.000000000 -0700 @@ -887,7 +887,8 @@ for valname, val in obj.__dict__.items(): valname = '%s.%s' % (name, valname) # Recurse to functions & classes. - if ((inspect.isfunction(val) or inspect.isclass(val)) and + if ((inspect.isfunction(val) or inspect.isclass(val) or + inspect.isbuiltin(val) ) and self._from_module(module, val)): self._find(tests, val, valname, module, source_lines, globs, seen) However, it is likely not sufficient as it doesn't take into account the __test__ dict, for which probably the same change would work, just a few lines later. Furthermore, the real issue is in my view in the distinction made by inspect between isfunction() and isbuiltin() for the sake of analyzing docstrings. isfunction() returns false for a function that is defined in an extension module (though it *is* a function) while isbuiltin returns True (though it is *not* a builtin). For purposes of doctesting, doctest should simply care: - That it is a function. - That it has a docstring that can be parsed. But in too many places in doctest there are currently assumptions about being able to extract full source, line numbers, etc. Hopefully this quick fix can be applied as it will immediately make doctest work with large swaths of extension code, while a proper rethinking of doctest is made. BTW, in that process doctest will hopefully be made more modular and flexible: its current structure forces massive copy/paste subclassing for any kind of alternate use, since it has internally hardwired use of its own classes. Doctest is tremendously useful, but it really could use with some structural reorganization to make it more flexible (cleanly). ---------- components: Library (Lib) messages: 68489 nosy: fer_perez severity: normal status: open title: Doctest fails to find doctests in extension modules versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 08:40:29 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Jun 2008 06:40:29 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1214030429.46.0.736505280959.issue3008@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Applied in r64438 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 09:52:20 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 21 Jun 2008 07:52:20 +0000 Subject: [issue3158] Doctest fails to find doctests in extension modules In-Reply-To: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> Message-ID: <1214034740.5.0.213967159348.issue3158@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: For me, a 'function' is written in Python, a 'builtin' is written in C. The fact that it is defined in an extension module is irrelevant, and depends on the implementation: zlib is an extension module on Unix, but is linked inside python26.dll on Windows. maybe inspect.isroutine() is the correct test here. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 11:19:26 2008 From: report at bugs.python.org (Helmut Jarausch) Date: Sat, 21 Jun 2008 09:19:26 +0000 Subject: [issue3131] 2to3 can't find fixes_dir In-Reply-To: <1213707451.37.0.990669218912.issue3131@psf.upfronthosting.co.za> Message-ID: <1214039965.87.0.959264348505.issue3131@psf.upfronthosting.co.za> Helmut Jarausch added the comment: This patch seems to work, but when invoked it tries to write to /usr/local/lib/python3.0/lib2to3 ( I get root: Writing failed:[Errno 13] Permission denied: '/usr/local/lib/ python3.0/lib2to3/PatternGrammar3.0.0.beta.1.pickle' ) I hope this will be handled during install in future. Furthermore, as a test, I copied refactor.py to xxx.py and ran 2to3 on xxx.py Here I get RefactoringTool: Can't parse xxx.py: ParseError: bad input: type=22, value='=', context=('', (67, 71)) This error message is a bit terse for someone not knowing the details of 2to3 Thanks for the patch, Helmut. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 11:51:17 2008 From: report at bugs.python.org (Aristotelis Mikropoulos) Date: Sat, 21 Jun 2008 09:51:17 +0000 Subject: [issue3159] glob.py improvements In-Reply-To: <1214041877.01.0.817721592815.issue3159@psf.upfronthosting.co.za> Message-ID: <1214041877.01.0.817721592815.issue3159@psf.upfronthosting.co.za> New submission from Aristotelis Mikropoulos : Simplified some of the code, improving performance and readability. ---------- components: Library (Lib) files: glob.py.patch keywords: patch messages: 68493 nosy: Indy severity: normal status: open title: glob.py improvements type: performance versions: Python 2.5 Added file: http://bugs.python.org/file10680/glob.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 12:40:21 2008 From: report at bugs.python.org (Georgij Kondratjev) Date: Sat, 21 Jun 2008 10:40:21 +0000 Subject: [issue3131] 2to3 can't find fixes_dir In-Reply-To: <1213707451.37.0.990669218912.issue3131@psf.upfronthosting.co.za> Message-ID: <1214044821.08.0.930849755806.issue3131@psf.upfronthosting.co.za> Georgij Kondratjev added the comment: > when invoked it tries to write to /usr/local/lib/python3.0/lib2to3 2to3 always worked like this. I always had to run it as root. Seems weird for me too. > Furthermore, as a test, I copied refactor.py to xxx.py and ran 2to3 on xxx.py It seems to be a bug with 2to3 processing refactor.py. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 14:23:35 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 21 Jun 2008 12:23:35 +0000 Subject: [issue3131] 2to3 can't find fixes_dir In-Reply-To: <1213707451.37.0.990669218912.issue3131@psf.upfronthosting.co.za> Message-ID: <1214051015.02.0.392436297108.issue3131@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 16:30:04 2008 From: report at bugs.python.org (Ricardo Quesada) Date: Sat, 21 Jun 2008 14:30:04 +0000 Subject: [issue3101] global function _add_one_to_C In-Reply-To: <1213342220.87.0.7161073703.issue3101@psf.upfronthosting.co.za> Message-ID: <1214058604.32.0.975264982849.issue3101@psf.upfronthosting.co.za> Ricardo Quesada added the comment: This seems to be fixed in r62348 http://svn.python.org/view?rev=62348&view=rev ---------- nosy: +riq _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 16:49:26 2008 From: report at bugs.python.org (Manuel Kaufmann) Date: Sat, 21 Jun 2008 14:49:26 +0000 Subject: [issue3085] chapter 17.1.3.5 'Replacing os.popen*' in the Python library reference contains an error In-Reply-To: <1213225286.96.0.994890895881.issue3085@psf.upfronthosting.co.za> Message-ID: <1214059766.42.0.786211151876.issue3085@psf.upfronthosting.co.za> Manuel Kaufmann added the comment: I fixed this error, I attach the patch. ---------- keywords: +patch nosy: +humitos Added file: http://bugs.python.org/file10681/libsubprocess.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 16:52:28 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 21 Jun 2008 14:52:28 +0000 Subject: [issue3043] Recursion bug in deepcopy In-Reply-To: <1212699830.74.0.302463788027.issue3043@psf.upfronthosting.co.za> Message-ID: <1214059948.87.0.612377885556.issue3043@psf.upfronthosting.co.za> Facundo Batista added the comment: Two weeks passed, closing it manually (see http://mail.python.org/pipermail/python-dev/2008-February/076992.html). ---------- nosy: +facundobatista status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 17:03:04 2008 From: report at bugs.python.org (Ricardo Quesada) Date: Sat, 21 Jun 2008 15:03:04 +0000 Subject: [issue3062] Turtle speed() function has no effect under Mac OS X In-Reply-To: <1212923215.43.0.432854849061.issue3062@psf.upfronthosting.co.za> Message-ID: <1214060584.19.0.818653293294.issue3062@psf.upfronthosting.co.za> Ricardo Quesada added the comment: turtle.py was replaced by a new module in r63929 . I can't reproduce this bug with this revision, so it seems to be fixed. using: os/x 10.5.3 intel. ---------- nosy: +riq _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 17:14:00 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 21 Jun 2008 15:14:00 +0000 Subject: [issue3101] global function _add_one_to_C In-Reply-To: <1213342220.87.0.7161073703.issue3101@psf.upfronthosting.co.za> Message-ID: <1214061239.98.0.0674040276638.issue3101@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Ok, so it's fixed for the trunk, but not Py3k. The trunk fix doesn't port to 3k, since the functions are called inside memoryobject.c (so making them static would break that module). ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 17:31:57 2008 From: report at bugs.python.org (Viktor Ferenczi) Date: Sat, 21 Jun 2008 15:31:57 +0000 Subject: [issue3160] Building a Win32 binary installer crashes In-Reply-To: <1214062316.76.0.502930697885.issue3160@psf.upfronthosting.co.za> Message-ID: <1214062316.76.0.502930697885.issue3160@psf.upfronthosting.co.za> New submission from Viktor Ferenczi : Python 3.0b1, official MSI installer. Checkout source code of this project: http://code.google.com/p/anntools/ Enter into the root of your working copy and try to build a Win32 installer: C:\Python30\python.exe setup.py bdist_wininst NOTE: You might want to replace the path above with you Python installation path. Please ensure, that Python 3.0 is used, since all other versions from 2.4 to 2.6b1 works well. You will get the following traceback during the build process: Traceback (most recent call last): File "setup.py", line 37, in "anntools", File "C:\python30\lib\distutils\core.py", line 149, in setup dist.run_commands() File "C:\python30\lib\distutils\dist.py", line 941, in run_commands self.run_command(cmd) File "C:\python30\lib\distutils\dist.py", line 961, in run_command cmd_obj.run() File "C:\python30\lib\distutils\command\bdist_wininst.py", line 177, in run self.create_exe(arcname, fullname, self.bitmap) File "C:\python30\lib\distutils\command\bdist_wininst.py", line 263, in create_exe cfgdata = cfgdata + "\0" TypeError: can't concat bytes to str ---------- components: Distutils messages: 68500 nosy: complex severity: normal status: open title: Building a Win32 binary installer crashes type: crash versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 17:38:07 2008 From: report at bugs.python.org (Viktor Ferenczi) Date: Sat, 21 Jun 2008 15:38:07 +0000 Subject: [issue3160] Building a Win32 binary installer crashes In-Reply-To: <1214062316.76.0.502930697885.issue3160@psf.upfronthosting.co.za> Message-ID: <1214062687.51.0.950571411825.issue3160@psf.upfronthosting.co.za> Viktor Ferenczi added the comment: Fixed by appending the b (bytes) prefix to three string literals concatenated to cfgdata in C:\python30\lib\distutils\command\bdist_wininst.py: Line #262: # Append the pre-install script cfgdata = cfgdata + b"\0" if self.pre_install_script: script_data = open(self.pre_install_script, "r").read() cfgdata = cfgdata + script_data + b"\n\0" else: # empty pre-install script cfgdata = cfgdata + b"\0" file.write(cfgdata) Sorry for the source code fragment. I'll try to submit a patch instead next time. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 17:48:59 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 21 Jun 2008 15:48:59 +0000 Subject: [issue2701] csv.reader accepts string instead of file object (duck typing gone bad) In-Reply-To: <1209265191.29.0.100156108517.issue2701@psf.upfronthosting.co.za> Message-ID: <1214063339.22.0.0426573646878.issue2701@psf.upfronthosting.co.za> Facundo Batista added the comment: Skip is right, this is working ok. ---------- nosy: +facundobatista resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 17:49:30 2008 From: report at bugs.python.org (Anthony Lenton) Date: Sat, 21 Jun 2008 15:49:30 +0000 Subject: [issue2732] curses.textpad loses characters at the end of lines In-Reply-To: <1209659981.45.0.724290161206.issue2732@psf.upfronthosting.co.za> Message-ID: <1214063369.99.0.0632172016215.issue2732@psf.upfronthosting.co.za> Anthony Lenton added the comment: This doesn't happen to me with 2.6 compiled from HEAD, or with 2.5.2 shipped with Ubuntu Hardy. In both cases the output is: Contents of text box: '123456789\n123456789\n' ---------- nosy: +elachuni _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 17:55:55 2008 From: report at bugs.python.org (Simon Cross) Date: Sat, 21 Jun 2008 15:55:55 +0000 Subject: [issue3161] Missing import for sys in _abcoll In-Reply-To: <1214063755.65.0.272418702742.issue3161@psf.upfronthosting.co.za> Message-ID: <1214063755.65.0.272418702742.issue3161@psf.upfronthosting.co.za> New submission from Simon Cross : The _hash method of the Set ABC uses sys.maxsize but doesn't import sys. The attached patch (against trunk) imports sys and adds a test to show the problem. There are also still some other _abcoll.py cleanups waiting in issue 2226. ---------- components: Library (Lib), Tests files: abcoll-hash.diff keywords: patch messages: 68504 nosy: hodgestar severity: normal status: open title: Missing import for sys in _abcoll versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10682/abcoll-hash.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 17:56:40 2008 From: report at bugs.python.org (Nubis) Date: Sat, 21 Jun 2008 15:56:40 +0000 Subject: [issue1817] module-cgi: handling GET and POST together In-Reply-To: <1200189536.91.0.809582793643.issue1817@psf.upfronthosting.co.za> Message-ID: <1214063800.78.0.0946083703055.issue1817@psf.upfronthosting.co.za> Nubis added the comment: This was pretty much done when I got here. It broked the other cgi_test (which tests some other corner cases). Patch includes modifications to Lib/cgi.py and adds Lib/test/test_cgi_post_qs.py to test the new features. This should be closed by now, but since this is my first patch, just let me know what else should I do to get it closed. thanks! ---------- keywords: +patch nosy: +Nubis versions: +Python 2.6 Added file: http://bugs.python.org/file10683/post_qs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 17:57:59 2008 From: report at bugs.python.org (Simon Cross) Date: Sat, 21 Jun 2008 15:57:59 +0000 Subject: [issue3161] Missing import for sys in _abcoll In-Reply-To: <1214063755.65.0.272418702742.issue3161@psf.upfronthosting.co.za> Message-ID: <1214063879.75.0.830562749086.issue3161@psf.upfronthosting.co.za> Simon Cross added the comment: One could also make a case for simply removing the _hash method since it doesn't look like anything is using it? And anything that was using it would already be broken? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 17:59:22 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 21 Jun 2008 15:59:22 +0000 Subject: [issue3132] implement PEP 3118 struct changes In-Reply-To: <1213741832.59.0.0620778602246.issue3132@psf.upfronthosting.co.za> Message-ID: <1214063962.44.0.541910230725.issue3132@psf.upfronthosting.co.za> Jean Brouwers added the comment: If the struct changes are made, add also 2 formats for C types ssize_t and size_t, perhaps 'z' resp. 'Z'. In particular since on platforms sizeof(size_t) != sizeof(long). ---------- nosy: +MrJean1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 18:02:38 2008 From: report at bugs.python.org (=?utf-8?q?Manuel_Murad=C3=A1s?=) Date: Sat, 21 Jun 2008 16:02:38 +0000 Subject: [issue1044479] docs for Py_UNICODE are wrong Message-ID: <1214064158.02.0.506548922091.issue1044479@psf.upfronthosting.co.za> Manuel Murad?s added the comment: This looks fixed to me. The current documentation is much more clear. Look: http://docs.python.org/api/unicodeObjects.html ---------- nosy: +dieresys _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 18:04:57 2008 From: report at bugs.python.org (Ricardo Quesada) Date: Sat, 21 Jun 2008 16:04:57 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1214064297.3.0.540276322051.issue2813@psf.upfronthosting.co.za> Ricardo Quesada added the comment: Do you expect to have support for float, double and long double ? Also, do you expect to have support for precision-modifiers ? ---------- nosy: +riq _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 18:38:07 2008 From: report at bugs.python.org (=?utf-8?q?Manuel_Murad=C3=A1s?=) Date: Sat, 21 Jun 2008 16:38:07 +0000 Subject: [issue1044479] docs for Py_UNICODE are wrong Message-ID: <1214066287.29.0.390519230605.issue1044479@psf.upfronthosting.co.za> Manuel Murad?s added the comment: This is the link to the current py_unicode documentation: http://docs.python.org/dev/c-api/unicode.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 18:40:53 2008 From: report at bugs.python.org (sebastian serrano) Date: Sat, 21 Jun 2008 16:40:53 +0000 Subject: [issue3001] RLock's are SLOW In-Reply-To: <1212074891.45.0.23606216758.issue3001@psf.upfronthosting.co.za> Message-ID: <1214066453.72.0.628330871591.issue3001@psf.upfronthosting.co.za> sebastian serrano added the comment: Running with python -O the timing gets a little closer between Lock and RLock. This code won't be easy to improve in performance. The heaviest call is current_thread(), used at lines: 117: me = current_thread() 137: if self.__owner is not current_thread(): and only consist on: 788: def current_thread(): 789: try: 790: return _active[_get_ident()] 791: except KeyError: 792: ##print "current_thread(): no current thread for", _get_ident() 793: return _DummyThread() Simple profiler dump: $../python-trunk/python -O rlock.py time Lock 0.720541000366 time RLock 4.90231084824 400004 function calls in 0.982 CPU seconds Ordered by: internal time, call count ncalls tottime percall cumtime percall filename:lineno(function) 100000 0.304 0.000 0.390 0.000 threading.py:116(acquire) 100000 0.278 0.000 0.360 0.000 threading.py:136(release) 1 0.232 0.232 0.982 0.982 rlock.py:27(testRLock) 200000 0.168 0.000 0.168 0.000 threading.py:788(current_thread) 1 0.000 0.000 0.000 0.000 threading.py:103(__init__) 1 0.000 0.000 0.000 0.000 threading.py:98(RLock) 1 0.000 0.000 0.000 0.000 threading.py:76(__init__) 0 0.000 0.000 profile:0(profiler) ---------- nosy: +sserrano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 18:41:28 2008 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 21 Jun 2008 16:41:28 +0000 Subject: [issue1817] module-cgi: handling GET and POST together In-Reply-To: <1200189536.91.0.809582793643.issue1817@psf.upfronthosting.co.za> Message-ID: <1214066488.06.0.88527834411.issue1817@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks for your contribution! To get this commmitted, please draw the attention of someone else on python-dev (or if you're an IRC person try #python-dev at freenote, IIRC). I'd recommend moving the tests into the existing test_cgi.py. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 18:46:01 2008 From: report at bugs.python.org (Neil Muller) Date: Sat, 21 Jun 2008 16:46:01 +0000 Subject: [issue1491] BaseHTTPServer incorrectly implements response code 100 In-Reply-To: <1195822360.07.0.215272908737.issue1491@psf.upfronthosting.co.za> Message-ID: <1214066761.72.0.0415116021545.issue1491@psf.upfronthosting.co.za> Neil Muller added the comment: The attached patch is against recent svn (r64442), and adds samwyse's refactoring of the class. The test for server responses is made less restrictive when the request isn't HTTP/1.1. ---------- nosy: +Neil Muller Added file: http://bugs.python.org/file10684/BaseHTTPServer_continue_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 18:51:12 2008 From: report at bugs.python.org (Rodolpho Eckhardt) Date: Sat, 21 Jun 2008 16:51:12 +0000 Subject: [issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError In-Reply-To: <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za> Message-ID: <1214067071.04.0.098191225201.issue2118@psf.upfronthosting.co.za> Rodolpho Eckhardt added the comment: Verified Werneck's patch and it also works on 2.6 and 3.0. However, the previous code used to present a "friendly" message about non-numeric ports: "socket.error: nonnumeric port" and now it raises "ValueError: invalid literal for int() with base 10". Should it be changed to inform that the exception is due to a non-numeric port? (Just wrap int(port) with a try and change the raised exception) ---------- nosy: +rodolpho versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 19:01:58 2008 From: report at bugs.python.org (Adrianna Pinska) Date: Sat, 21 Jun 2008 17:01:58 +0000 Subject: [issue2776] urllib2.urlopen() gets confused with path with // in it In-Reply-To: <1210109415.44.0.221361539235.issue2776@psf.upfronthosting.co.za> Message-ID: <1214067717.94.0.646771597054.issue2776@psf.upfronthosting.co.za> Adrianna Pinska added the comment: I have written a test to go with my patch. Added file: http://bugs.python.org/file10685/doubleslash_test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 19:09:41 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 21 Jun 2008 17:09:41 +0000 Subject: [issue2683] subprocess.Popen.communicate takes bytes, not str In-Reply-To: <1209063440.61.0.967116488341.issue2683@psf.upfronthosting.co.za> Message-ID: <1214068181.59.0.290153444544.issue2683@psf.upfronthosting.co.za> Changes by Martin v. L?wis : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 19:12:11 2008 From: report at bugs.python.org (admin) Date: Sat, 21 Jun 2008 17:12:11 +0000 Subject: [issue2683] subprocess.Popen.communicate takes bytes, not str In-Reply-To: <1209063440.61.0.967116488341.issue2683@psf.upfronthosting.co.za> Message-ID: <1214068331.21.0.405533788459.issue2683@psf.upfronthosting.co.za> admin added the comment: What is wrong? Documentation or method? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 19:13:41 2008 From: report at bugs.python.org (Simon Cross) Date: Sat, 21 Jun 2008 17:13:41 +0000 Subject: [issue3162] ssl.SSLSocket implements methods that are overriden by socket.socket.__init__ and methods with incorrect names. In-Reply-To: <1214068420.92.0.41617535069.issue3162@psf.upfronthosting.co.za> Message-ID: <1214068420.92.0.41617535069.issue3162@psf.upfronthosting.co.za> New submission from Simon Cross : It appears that ssl.SSLSocket attempts to override some of the methods socket.socket delegates to the underlying _socket.socket methods. However, this overriding fails because socket.socket.__init__ replaces all the methods mentioned in _delegate_methods. These methods are: recv, recvfrom, recv_into, recvfrom_into, send and sendto. ssl.SSLSocket implements recv and send. Neither of these overrides will actually work. ssl.SSLSocket also implements recv_from and send_to which seem to be attempts to override recvfrom and sendto. In the Py3k branch it looks like the overriding done by socket.socket.__init__ is gone so that these methods are now potentially overridable. This could potentially be emulated in trunk by checking for the methods using hasattr(...) before overriding them. I'm happy to create patches which fix the method names and clean up the methods on both branches and add tests. I just want to check that I have an accurate picture of what's needed before starting on them. ---------- components: Library (Lib) messages: 68517 nosy: hodgestar severity: normal status: open title: ssl.SSLSocket implements methods that are overriden by socket.socket.__init__ and methods with incorrect names. versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 19:16:16 2008 From: report at bugs.python.org (Adam Olsen) Date: Sat, 21 Jun 2008 17:16:16 +0000 Subject: [issue3155] Python should expose a pthread_cond_timedwait API for threading In-Reply-To: <1214004207.53.0.484694251636.issue3155@psf.upfronthosting.co.za> Message-ID: <1214068576.91.0.795077925799.issue3155@psf.upfronthosting.co.za> Changes by Adam Olsen : ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 19:28:42 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 21 Jun 2008 17:28:42 +0000 Subject: [issue1044479] docs for Py_UNICODE are wrong Message-ID: <1214069320.91.0.650607810799.issue1044479@psf.upfronthosting.co.za> Facundo Batista added the comment: Thanks Thomas and Manuel! ---------- nosy: +facundobatista resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 19:30:36 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 21 Jun 2008 17:30:36 +0000 Subject: [issue3017] Verify doc updates for the decimal module In-Reply-To: <1212236968.69.0.449256777548.issue3017@psf.upfronthosting.co.za> Message-ID: <1214069436.43.0.581099088965.issue3017@psf.upfronthosting.co.za> Facundo Batista added the comment: Reviewed and updated it, in the trunk and 3.0. Thank you! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 19:31:17 2008 From: report at bugs.python.org (Anthony Lenton) Date: Sat, 21 Jun 2008 17:31:17 +0000 Subject: [issue2569] default_scheme in urlparse.urlparse() useless In-Reply-To: <1207557475.98.0.0117394691364.issue2569@psf.upfronthosting.co.za> Message-ID: <1214069477.6.0.816504903553.issue2569@psf.upfronthosting.co.za> Anthony Lenton added the comment: In http://bugs.python.org/issue754016 there's already a discussion about this. The RFC that urlparse is following (rfc 1808) requires the net_loc component to start with // even if the scheme component is missing, which is why urlparse("www","http") puts the 'www' in to the path component instead of net_loc. It seems that this is indeed the intended behavior, and the patch for issue 754016 adds a docfix clarifying this. ---------- nosy: +elachuni _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 19:33:47 2008 From: report at bugs.python.org (=?utf-8?q?Mart=C3=ADn_Conte_Mac_Donell?=) Date: Sat, 21 Jun 2008 17:33:47 +0000 Subject: [issue1534607] IndexError: Add bad index to msg Message-ID: <1214069626.98.0.0414476338387.issue1534607@psf.upfronthosting.co.za> Mart?n Conte Mac Donell added the comment: I don't think this is bearly needed. This error messages (IndexError: list index out of range) comes from so long ago that those kind of changes makes me feel worried. ---------- nosy: +Reflejo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 19:35:54 2008 From: report at bugs.python.org (Anthony Lenton) Date: Sat, 21 Jun 2008 17:35:54 +0000 Subject: [issue2569] default_scheme in urlparse.urlparse() useless In-Reply-To: <1207557475.98.0.0117394691364.issue2569@psf.upfronthosting.co.za> Message-ID: <1214069754.45.0.708243750691.issue2569@psf.upfronthosting.co.za> Changes by Anthony Lenton : ---------- nosy: +facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 19:38:12 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 21 Jun 2008 17:38:12 +0000 Subject: [issue2569] default_scheme in urlparse.urlparse() useless In-Reply-To: <1207557475.98.0.0117394691364.issue2569@psf.upfronthosting.co.za> Message-ID: <1214069892.03.0.0437429492322.issue2569@psf.upfronthosting.co.za> Facundo Batista added the comment: Thanks (pk) and Anthony! ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 19:42:17 2008 From: report at bugs.python.org (duane Bailey) Date: Sat, 21 Jun 2008 17:42:17 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1214070137.26.0.563103899939.issue2813@psf.upfronthosting.co.za> duane Bailey added the comment: Well, precision modifiers would be nice, but I don't think that they're necessarily needed. General floating point support, however, is needed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 19:44:30 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 21 Jun 2008 17:44:30 +0000 Subject: [issue2888] pprint produces different output in 2.6 and 3.0 In-Reply-To: <1210918255.72.0.267363953828.issue2888@psf.upfronthosting.co.za> Message-ID: <1214070270.63.0.130017487009.issue2888@psf.upfronthosting.co.za> Facundo Batista added the comment: Commited in 64446, thank you all! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 19:50:13 2008 From: report at bugs.python.org (=?utf-8?q?Fernando_P=C3=A9rez?=) Date: Sat, 21 Jun 2008 17:50:13 +0000 Subject: [issue3158] Doctest fails to find doctests in extension modules In-Reply-To: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> Message-ID: <1214070613.9.0.657800230174.issue3158@psf.upfronthosting.co.za> Fernando P?rez added the comment: I think there are two issues that need to be separated: 1. The doctest bug. I'm happy with any resolution for it, and I'm not claiming that my patch is the best approach. isroutine() indeed works in my case, and if that approach works well in general for doctest, I'm perfectly happy with it. 2. Terminology. I really disagree with the idea that - 'function' describes the implementation language of an object instead of whether it's a standalone callable (vs an object method). - 'builtin' doesn't mean the object is "built into the shipped Python" but instead that it's "written in C". The language exposes its builtins via the __builtin__ module precisely to declare what is part of itself, and it even has in the documentation: http://docs.python.org/lib/built-in-funcs.html a section that starts: """2.1 Built-in Functions The Python interpreter has a number of functions built into it that are always available.""" Nowhere does it say that "builtins are written in C and functions in Python". In summary, I'm happy with any fix for the bug, but I very strongly disagree with a use of terminology that is confusing and misleading (and which unfortunately is enshrined in the inspect and types modules in how they distinguish 'Function' from 'BuiltinFunctionType'). And by the way, by 'extension module' I mean to describe C-extensions, since that is how most C code is shipped by third-party authors, those affected by this bug (since the stdlib doesn't seem to use doctests itself for its own testing of C code). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 20:03:22 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 21 Jun 2008 18:03:22 +0000 Subject: [issue754016] urlparse goes wrong with IP:port without scheme Message-ID: <1214071402.55.0.930406859032.issue754016@psf.upfronthosting.co.za> Facundo Batista added the comment: Senthil, your patch is wrong, see: >>> import urlparse >>> urlparse.urlparse('1.2.3.4:80','http') ParseResult(scheme='http', netloc='', path='1.2.3.4:80', params='', query='', fragment='') The netloc should be "1.2.3.4:80", note the composition of an URL: :///;?# Please fix it and test it applying the patch to the test I'm submitting here... Added file: http://bugs.python.org/file10686/test_urlparse.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 20:05:52 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 21 Jun 2008 18:05:52 +0000 Subject: [issue3163] module struct support for ssize_t and size_t In-Reply-To: <1214071551.33.0.650558563727.issue3163@psf.upfronthosting.co.za> Message-ID: <1214071551.33.0.650558563727.issue3163@psf.upfronthosting.co.za> New submission from Jean Brouwers : Attached is a (simplistic) patch for the struct module to support C types ssize_t and size_t with format characters 'z' resp. 'Z'. The patch updates Python 2.6b1 files Modules/_struct.c and Doc/library/struct.rst. Note, format character 'Z' is also proposed in PEP 3118 for C type complex and that has to be something else, perhaps 'C'. ---------- components: Library (Lib) files: struct_size_t.patch keywords: patch messages: 68528 nosy: MrJean1 severity: normal status: open title: module struct support for ssize_t and size_t type: feature request versions: Python 2.6 Added file: http://bugs.python.org/file10687/struct_size_t.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 20:05:50 2008 From: report at bugs.python.org (David Kwast) Date: Sat, 21 Jun 2008 18:05:50 +0000 Subject: [issue3062] Turtle speed() function has no effect under Mac OS X In-Reply-To: <1212923215.43.0.432854849061.issue3062@psf.upfronthosting.co.za> Message-ID: <1214071550.44.0.395877614899.issue3062@psf.upfronthosting.co.za> David Kwast added the comment: I wrote a small python program to test turtle speed in OSX. I tested with trunk and py3k branch. The string input works differently with 2.5, 2.6 and 3.0. The turtle is slower in 2.5 and almost the same speed in 2.6 and 3.0. Here are my test results: david-kwasts-macbook:turtle davidkwast$ ../python_3k/python speedy.py 0:00:04.640639 0:00:02.031436 david-kwasts-macbook:turtle davidkwast$ ../python_trunk/python speedy.py 0:00:04.598181 0:00:02.048452 david-kwasts-macbook:turtle davidkwast$ python speedy.py (Python version < 2.6 don't support int in speed funtion) 0:00:18.343453 ---------- nosy: +david.kwast versions: +Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10688/speedy.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 20:10:32 2008 From: report at bugs.python.org (Nubis) Date: Sat, 21 Jun 2008 18:10:32 +0000 Subject: [issue1817] module-cgi: handling GET and POST together In-Reply-To: <1200189536.91.0.809582793643.issue1817@psf.upfronthosting.co.za> Message-ID: <1214071832.68.0.422681285454.issue1817@psf.upfronthosting.co.za> Nubis added the comment: I moved the test into the current test_cgi.py, and also added the docs and NEWS. This patch also includes all the previous changes and is the only one that needs to be merged. Now I think it def should be closed :) Added file: http://bugs.python.org/file10689/post_qs_final.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 20:17:47 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 21 Jun 2008 18:17:47 +0000 Subject: [issue3163] module struct support for ssize_t and size_t In-Reply-To: <1214071551.33.0.650558563727.issue3163@psf.upfronthosting.co.za> Message-ID: <1214072267.22.0.621790050284.issue3163@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Now that Python 2.6 is in beta, new features should be deferred to 2.7. ---------- nosy: +loewis versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 20:26:28 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 21 Jun 2008 18:26:28 +0000 Subject: [issue3163] module struct support for ssize_t and size_t In-Reply-To: <1214071551.33.0.650558563727.issue3163@psf.upfronthosting.co.za> Message-ID: <1214072788.29.0.616735579459.issue3163@psf.upfronthosting.co.za> Jean Brouwers added the comment: Please ignore the first patch. Use the rev2 patch which includes an update for test file Lib/test/test_struct.py as well. Added file: http://bugs.python.org/file10690/struct_size_t.rev2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 20:26:35 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 21 Jun 2008 18:26:35 +0000 Subject: [issue3163] module struct support for ssize_t and size_t In-Reply-To: <1214071551.33.0.650558563727.issue3163@psf.upfronthosting.co.za> Message-ID: <1214072795.48.0.600693874379.issue3163@psf.upfronthosting.co.za> Changes by Jean Brouwers : Removed file: http://bugs.python.org/file10687/struct_size_t.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 20:34:14 2008 From: report at bugs.python.org (Matias Gonzalez) Date: Sat, 21 Jun 2008 18:34:14 +0000 Subject: [issue2325] isinstance(anything, MetaclassThatDefinesInstancecheck) raises instead of returning False In-Reply-To: <1205772306.86.0.317312162506.issue2325@psf.upfronthosting.co.za> Message-ID: <1214073254.41.0.199772663608.issue2325@psf.upfronthosting.co.za> Matias Gonzalez added the comment: This is not a bug. Function __instancecheck__ should be a classmethod. >>> class Meta(type): ... @classmethod ... def __instancecheck__(self, other): ... return False ... >>> isinstance(3, Meta) False ---------- nosy: +mato2000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 20:45:46 2008 From: report at bugs.python.org (Anthony Lenton) Date: Sat, 21 Jun 2008 18:45:46 +0000 Subject: [issue754016] urlparse goes wrong with IP:port without scheme Message-ID: <1214073946.21.0.107963197076.issue754016@psf.upfronthosting.co.za> Anthony Lenton added the comment: I agree with facundobatista that the patch is bad, but for a different reason: it now breaks with: >>> import urlparse >>> urlparse.urlparse ('http:') Traceback (most recent call last): File "", line 1, in File "/home/anthony/svn/python26/Lib/urlparse.py", line 108, in urlparse tuple = urlsplit(url, scheme, allow_fragments) File "/home/anthony/svn/python26/Lib/urlparse.py", line 148, in urlsplit if i > 0 and not url[i+1].isdigit(): IndexError: string index out of range I'm afraid that it it's not evident that the expected behavior isn't evident. Take for example: >>> import urlparse >>> urlparse.urlparse('some.com', 'http') ParseResult(scheme='http', netloc='', path='some.com', params='', query='', fragment='') Is the url referring to the some.com domain or to a windows executable file? If you're using urlparse to parse only absolute urls then probably you want the first component to be considered a net_loc, but not if you're thinking of accepting also relative urls. It would probably be better to be explicit and raise an exception if the url is invalid, so that the user can prepend a '//' and resubmit if needed. Also we'd probably stop seeing bugreports about this issue :) ---------- nosy: +elachuni _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 20:59:07 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 21 Jun 2008 18:59:07 +0000 Subject: [issue1817] module-cgi: handling GET and POST together In-Reply-To: <1200189536.91.0.809582793643.issue1817@psf.upfronthosting.co.za> Message-ID: <1214074747.33.0.367744193701.issue1817@psf.upfronthosting.co.za> Facundo Batista added the comment: Commited the final Nubis' version in r64447. Fixed, :). Thank you all! ---------- nosy: +facundobatista resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 21:02:54 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 21 Jun 2008 19:02:54 +0000 Subject: [issue754016] urlparse goes wrong with IP:port without scheme Message-ID: <1214074974.58.0.405189588907.issue754016@psf.upfronthosting.co.za> Changes by Facundo Batista : Removed file: http://bugs.python.org/file10686/test_urlparse.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 21:10:08 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 21 Jun 2008 19:10:08 +0000 Subject: [issue754016] urlparse goes wrong with IP:port without scheme Message-ID: <1214075408.89.0.541716569918.issue754016@psf.upfronthosting.co.za> Facundo Batista added the comment: I agree with Anthony here, because if you let people write without the "//" at the beginning, you'll never know if they're entering a net location or a relative path. So, the better behaviour to be as explicit as possible should be: >>> urlparse.urlparse('1.2.3.4:80','http') Traceback!!! ValueError() >>> urlparse.urlparse('//1.2.3.4:80','http') ('http', '1.2.3.4:80', '', '', '', '') So, to close this issue, we should fix the code to behave like indicated in the first case. What do you think? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 21:22:17 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 21 Jun 2008 19:22:17 +0000 Subject: [issue3001] RLock's are SLOW In-Reply-To: <1214066453.72.0.628330871591.issue3001@psf.upfronthosting.co.za> Message-ID: <1214076128.5874.32.camel@fsol> Antoine Pitrou added the comment: Le samedi 21 juin 2008 ? 16:40 +0000, sebastian serrano a ?crit : > sebastian serrano added the comment: > > Running with python -O the timing gets a little closer between Lock and > RLock. This code won't be easy to improve in performance. > The heaviest call is current_thread(), used at lines: > 117: me = current_thread() > 137: if self.__owner is not current_thread(): One could always try to rewrite RLock by replacing calls to threading.current_thread() with thread.get_ident(). However, given the profile table you have appended, it will only save at most 30% of the time. If someone needs a more important speed-up, he should reimplement the RLock type in C (and contribute it back :-)). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 21:50:33 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 21 Jun 2008 19:50:33 +0000 Subject: [issue1083895] functions replaced by subprocess should point to its docs Message-ID: <1214077833.4.0.463189630774.issue1083895@psf.upfronthosting.co.za> Facundo Batista added the comment: The best is to leave that section where it is, because it'll remain there in the Py3 docs, but to point to this section from the other places. So, in the deprecated functions I added an alert to review specially a section of the subprocess documentation that helps with the replacing of those functions. ---------- nosy: +facundobatista resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 22:26:20 2008 From: report at bugs.python.org (Bruno Gola) Date: Sat, 21 Jun 2008 20:26:20 +0000 Subject: [issue3156] bytes type has inconsistent methods (append, insert) In-Reply-To: <1214004899.96.0.722439580753.issue3156@psf.upfronthosting.co.za> Message-ID: <1214079980.91.0.454616593882.issue3156@psf.upfronthosting.co.za> Bruno Gola added the comment: The following patch fixes the behavior, .append and .insert will accept only integer as parameters. Is this really the desired behavior? I mean, why not to accept a character for both methods? There are two tests in Lib/test/test_io.py that uses the old behavior for .append(). ---------- keywords: +patch nosy: +brunogola Added file: http://bugs.python.org/file10691/issue3156.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 22:30:43 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 21 Jun 2008 20:30:43 +0000 Subject: [issue1199808] installation problem with python 2.4.1 on Win2k system Message-ID: <1214080243.87.0.57677313138.issue1199808@psf.upfronthosting.co.za> Facundo Batista added the comment: Can we close this? The OP didn't answer for almost three years... and the 2.4 to download is now 2.4.5... ---------- nosy: +facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 22:44:24 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 21 Jun 2008 20:44:24 +0000 Subject: [issue1199808] installation problem with python 2.4.1 on Win2k system Message-ID: <1214081064.89.0.760169977257.issue1199808@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 22:45:58 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 21 Jun 2008 20:45:58 +0000 Subject: [issue1159425] 2.4 crashes when try to exit app and mulitple threads active Message-ID: <1214081158.12.0.157750767278.issue1159425@psf.upfronthosting.co.za> Facundo Batista added the comment: Does this still happen with newer Python versions? Could you provide an example code? Thanks! ---------- nosy: +facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 23:03:00 2008 From: report at bugs.python.org (Angel Freire) Date: Sat, 21 Jun 2008 21:03:00 +0000 Subject: [issue3164] cPickle calls to save_string and save_unicode with unicode objects. In-Reply-To: <1214082180.06.0.267605807985.issue3164@psf.upfronthosting.co.za> Message-ID: <1214082180.06.0.267605807985.issue3164@psf.upfronthosting.co.za> New submission from Angel Freire : If Python trunk is compiled using Py_USING_UNICODE it'll call both, save_str and save_unicode for an string object. The patch adds a break to the case statment in case it encounters a unicode or str. ---------- components: Library (Lib) files: cpickle-unicode-r64448.diff keywords: patch messages: 68541 nosy: cuerty severity: normal status: open title: cPickle calls to save_string and save_unicode with unicode objects. versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10692/cpickle-unicode-r64448.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 23:05:32 2008 From: report at bugs.python.org (Anthony Lenton) Date: Sat, 21 Jun 2008 21:05:32 +0000 Subject: [issue1556] Failure when calling __str__ for MIMEBase(message, rfc822) objects In-Reply-To: <1196869876.98.0.0449623543334.issue1556@psf.upfronthosting.co.za> Message-ID: <1214082332.43.0.318824735803.issue1556@psf.upfronthosting.co.za> Anthony Lenton added the comment: I don't really think the MIMEBase class is supposed to be used like this, or at all: it behaves more like a Multipart message in that it expects to carry a list of MIMEBase objects as a payload (not a string!) though it doesn't define a boundary by default. You can carry on using the MIMEBase class, but changing the line that says: attachment.set_payload(file(filename).read( )) for: attachment.set_payload([MIMEText(file(filename).read())]) I'd recommend you to use: attachment = Message() attachment.set_payload(file(filename).read()) or if you want a multipart message: attachment = MIMEMultipart() text = MIMEText(file(filename).read()) attachment.attach(text) ---------- nosy: +elachuni _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 23:07:30 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 21 Jun 2008 21:07:30 +0000 Subject: [issue888830] POP3 lib timeout Message-ID: <1214082450.18.0.608904346368.issue888830@psf.upfronthosting.co.za> Facundo Batista added the comment: This is a standard behaviour, and you shouldn't document it in *all* the modules. BTW, now in the POP3 lib you already have a timeout, :) ---------- nosy: +facundobatista resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 23:10:51 2008 From: report at bugs.python.org (Angel Freire) Date: Sat, 21 Jun 2008 21:10:51 +0000 Subject: [issue3165] cPickle recursion problem In-Reply-To: <1214082651.25.0.91375820207.issue3165@psf.upfronthosting.co.za> Message-ID: <1214082651.25.0.91375820207.issue3165@psf.upfronthosting.co.za> New submission from Angel Freire : A single Picklerobject->nesting++ will not take into consideration the stack overhead caused by calls from save->save_{list,dict}->batch{list,dict}. ---------- components: Library (Lib) files: cpickle-r64448.diff keywords: patch messages: 68544 nosy: cuerty severity: normal status: open title: cPickle recursion problem versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10693/cpickle-r64448.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 23:12:00 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 21 Jun 2008 21:12:00 +0000 Subject: [issue3166] Make conversions from long to float correctly rounded. In-Reply-To: <1214082720.03.0.30402071522.issue3166@psf.upfronthosting.co.za> Message-ID: <1214082720.03.0.30402071522.issue3166@psf.upfronthosting.co.za> New submission from Mark Dickinson : If n is a Python long, then one might expect float(n) to return the closest float to n. Currently it doesn't do this. For example (with Python 2.6, on OS X 10.5.2/Intel): >>> n = 295147905179352891391L The closest float to n is equal to n+1. But float(n) returns the further of the two floats bracketing n, equal to n-65535: >>> float(n) 2.9514790517935283e+20 >>> long(float(n)) 295147905179352825856L >>> n - long(float(n)) 65535L It's fairly straightforward to fix PyLong_AsDouble to return the closest double to a given long integer n (using the round-half-to-even rule in the case of a tie). The attached patch does this. Having a correctly rounded float(n) can be useful for testing other floating-point routines that are supposed to be correctly rounded. ---------- components: Interpreter Core files: long_as_double.patch keywords: patch messages: 68545 nosy: marketdickinson severity: normal status: open title: Make conversions from long to float correctly rounded. type: feature request versions: Python 2.6 Added file: http://bugs.python.org/file10694/long_as_double.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 23:12:42 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 21 Jun 2008 21:12:42 +0000 Subject: [issue1556] Failure when calling __str__ for MIMEBase(message, rfc822) objects In-Reply-To: <1196869876.98.0.0449623543334.issue1556@psf.upfronthosting.co.za> Message-ID: <1214082761.98.0.49353231499.issue1556@psf.upfronthosting.co.za> Facundo Batista added the comment: I agree with Anthony. If you have any further questions regarding how to use this library feel free to ask them in python-list. ---------- nosy: +facundobatista resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 23:15:16 2008 From: report at bugs.python.org (=?utf-8?q?Manuel_Murad=C3=A1s?=) Date: Sat, 21 Jun 2008 21:15:16 +0000 Subject: [issue449227] rlcompleter add "(" to callables feature Message-ID: <1214082916.24.0.426060454633.issue449227@psf.upfronthosting.co.za> Manuel Murad?s added the comment: Here is a new patch against 2.6. ---------- nosy: +dieresys Added file: http://bugs.python.org/file10695/rlcompleter2.6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 23:20:37 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 21 Jun 2008 21:20:37 +0000 Subject: [issue3162] ssl.SSLSocket implements methods that are overriden by socket.socket.__init__ and methods with incorrect names. In-Reply-To: <1214068420.92.0.41617535069.issue3162@psf.upfronthosting.co.za> Message-ID: <1214083237.34.0.541351843194.issue3162@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 23:47:25 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 21 Jun 2008 21:47:25 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> New submission from Jean Brouwers : There are 2 math test failures with 32-bit Python 2.6b1 and 3.0b1 on Solaris 10 both built with Sun's C compiler. The failures do *not* occur for the 64-bit builds. The same compiler options are used for all these builds (except -xtarget=native vs -xtarget=native64). ====================================================================== FAIL: testLog (__main__.MathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_math.py", line 419, in testLog self.assertRaises(ValueError, math.log, NINF) AssertionError: ValueError not raised ====================================================================== FAIL: testLog10 (__main__.MathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_math.py", line 441, in testLog10 self.assertRaises(ValueError, math.log10, NINF) AssertionError: ValueError not raised ---------------------------------------------------------------------- ---------- components: Tests messages: 68548 nosy: MrJean1 severity: normal status: open title: math test fails on Solaris 10 type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 23:54:38 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 21 Jun 2008 21:54:38 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> New submission from Jean Brouwers : There is on cmath test failure with 64-bit Python 2.6b1 and 3.0b1 on Solaris 10. The failure does not occur in the 32-bit builds. All builds are compiled with Sun's C compiler using the same options (except -xtarget=native vs -xtarget=native64). ====================================================================== FAIL: test_cmath_matches_math (__main__.CMathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_cmath.py", line 294, in test_cmath_matches_math self.rAssertAlmostEqual(math.log(v, base), z.real) File "Lib/test/test_cmath.py", line 128, in rAssertAlmostEqual self.fail("%s and %s are not sufficiently close" % (repr(a), repr(b))) AssertionError: 6.6438561897747244 and 0.71244141339823108 are not sufficiently close ---------- components: Tests messages: 68549 nosy: MrJean1 severity: normal status: open title: cmath test fails on Solaris 10 type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 21 23:59:12 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sat, 21 Jun 2008 21:59:12 +0000 Subject: [issue1180470] BaseHTTPServer uses deprecated mimetools.Message Message-ID: <1214085552.09.0.40225852561.issue1180470@psf.upfronthosting.co.za> Humberto Diogenes added the comment: This was solved in Python 3.0: http.server now uses email.parser (issue2848), which is not vulnerable to the DoS attack mentioned by Nick. Should we backport these changes to 2.6? As HTTPMessage's base class was changed to email.message, additional work would be necessary to maintain API compatibility (ie.: implementing an interface similar to mimetools.Message in HTTPMessage). ---------- nosy: +hdiogenes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 00:20:41 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sat, 21 Jun 2008 22:20:41 +0000 Subject: [issue600362] relocate cgi.parse_qs() into urlparse Message-ID: <1214086841.66.0.483181560176.issue600362@psf.upfronthosting.co.za> Humberto Diogenes added the comment: The patch is not applying cleanly. BTW, urlparse has been renamed to urllib.parse, but the old docs are still there (urlparse.rst). ---------- nosy: +hdiogenes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 01:21:44 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 21 Jun 2008 23:21:44 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1214090504.45.0.635217319334.issue2813@psf.upfronthosting.co.za> Jean Brouwers added the comment: Attached is a patch attempting to provide support for %f with precision in PyString_FromFormat* based on file Objects/stringobject.c of Python 2.6b1. Note, only %f is support but %lf is not and silently ignored. ---------- keywords: +patch nosy: +MrJean1 Added file: http://bugs.python.org/file10696/stringobject_format_f.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 01:33:29 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 21 Jun 2008 23:33:29 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1214091209.57.0.153528081607.issue2813@psf.upfronthosting.co.za> Changes by Jean Brouwers : Removed file: http://bugs.python.org/file10696/stringobject_format_f.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 01:34:26 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 21 Jun 2008 23:34:26 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1214091266.97.0.494371815979.issue2813@psf.upfronthosting.co.za> Changes by Jean Brouwers : Added file: http://bugs.python.org/file10697/stringobject_format_f.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 01:58:59 2008 From: report at bugs.python.org (Jason Williams) Date: Sat, 21 Jun 2008 23:58:59 +0000 Subject: [issue3169] email/header.py doesn't handle Base64 headers that have been insufficiently padded. In-Reply-To: <1214092738.57.0.399756790289.issue3169@psf.upfronthosting.co.za> Message-ID: <1214092738.57.0.399756790289.issue3169@psf.upfronthosting.co.za> New submission from Jason Williams : email/header.py:decode_header() Line 95: dec = email.base64mime.decode(encoded) Headers that contain Subject or From headers which are Base64 encoded and are insufficiently padded raise a HeaderParseError. The actual padding error is begin generated in binascii.a2b_base64 and bubbling up as a HeaderParseError in header.py. decode_header() should detect the padding error (Base64 text length does not evenly divide by 3) and automatically add padding before handing off to a2b_base64. The problem usually occurs with spam. Example problem header: Subject: =?iso-8859-1?B? UHJldmVudCBGb3JlY2xvc3VyZSAmIFNhdmUgWW91ciBIb21lIA=?= Properly Padded: Subject: =?iso-8859-1?B? UHJldmVudCBGb3JlY2xvc3VyZSAmIFNhdmUgWW91ciBIb21lIA==?= ---------- components: Library (Lib) messages: 68553 nosy: jasonjwwilliams severity: normal status: open title: email/header.py doesn't handle Base64 headers that have been insufficiently padded. type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 04:38:16 2008 From: report at bugs.python.org (alejandro david weil) Date: Sun, 22 Jun 2008 02:38:16 +0000 Subject: [issue2378] UnboundLocalError when trying to raise exceptions inside execfile In-Reply-To: <1205808945.1.0.883835206976.issue2378@psf.upfronthosting.co.za> Message-ID: <1214102296.65.0.801543687436.issue2378@psf.upfronthosting.co.za> alejandro david weil added the comment: Shorter trigger code.. ---------- nosy: +tenuki Added file: http://bugs.python.org/file10698/test_broken3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 04:59:54 2008 From: report at bugs.python.org (alejandro david weil) Date: Sun, 22 Jun 2008 02:59:54 +0000 Subject: [issue2378] UnboundLocalError when trying to raise exceptions inside execfile In-Reply-To: <1205808945.1.0.883835206976.issue2378@psf.upfronthosting.co.za> Message-ID: <1214103594.07.0.0563390993916.issue2378@psf.upfronthosting.co.za> alejandro david weil added the comment: Some debugging helper code and my conclutions of one work day: debughelper.tgZ: -test_broken1/2.py one does triggers the bug, the other doesn't) -rtest.sh executes boths and compares its outputs -frameobject.c.diff applied to Objects/frameobject.c, adds some debug info. What I found: 1. The CustomException is disappearing from locals() 2. PyFrame_FastToLocals() (from that .c file) is updating the locals, and removing that exception from there. 3. In the failing case this code: if (deref) { assert(PyCell_Check(value)); value = PyCell_GET(value); } is returning value==NULL. Don't know why that happens. But you could inspect out1.txt/out2.txt made with rtest.sh, and could discover something.. Added file: http://bugs.python.org/file10699/debughelper.tgz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 05:47:07 2008 From: report at bugs.python.org (Brett Cannon) Date: Sun, 22 Jun 2008 03:47:07 +0000 Subject: [issue3170] test_pydoc has no way to regenerate pristine data In-Reply-To: <1214106427.35.0.304484848957.issue3170@psf.upfronthosting.co.za> Message-ID: <1214106427.35.0.304484848957.issue3170@psf.upfronthosting.co.za> New submission from Brett Cannon : test_pydoc relies on pristine data to verify that the tests pass. Unfortunately there is no automated way to regenerate that pristine data, making the test easily fail if something global (e.g., __loader__ attributes on all modules) is introduced. This was seen on Python 3.0 but might also be an issue in 2.6. ---------- assignee: benjamin.peterson components: Tests messages: 68556 nosy: benjamin.peterson, brett.cannon priority: low severity: normal status: open title: test_pydoc has no way to regenerate pristine data type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 06:00:39 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sun, 22 Jun 2008 04:00:39 +0000 Subject: [issue600362] relocate cgi.parse_qs() into urlparse Message-ID: <1214107239.2.0.248320036689.issue600362@psf.upfronthosting.co.za> Humberto Diogenes added the comment: Correction: the patch does apply cleanly to 2.6, without breaking tests. It just needs to be ported to 3.0 (new urllib package). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 07:51:40 2008 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 22 Jun 2008 05:51:40 +0000 Subject: [issue3171] operator.*slice() should be deprecated in 2.6 In-Reply-To: <1214113899.38.0.968396659077.issue3171@psf.upfronthosting.co.za> Message-ID: <1214113899.38.0.968396659077.issue3171@psf.upfronthosting.co.za> New submission from Stefan Behnel : operator.delslice() and friends were removed in Python 3.0, as the underlying object methods no longer exist. In the same way that the slicing special methods were deprecated in favour of the item methods should the functions in the operator module be deprecated (or at least receive a warning that they will disappear in future interpreter versions). ---------- assignee: georg.brandl components: Documentation, Library (Lib) messages: 68558 nosy: georg.brandl, scoder severity: normal status: open title: operator.*slice() should be deprecated in 2.6 versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 09:04:59 2008 From: report at bugs.python.org (Adam Olsen) Date: Sun, 22 Jun 2008 07:04:59 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1213475446.58.0.529901834278.issue3112@psf.upfronthosting.co.za> Message-ID: <1214118298.94.0.429406658597.issue3112@psf.upfronthosting.co.za> Adam Olsen added the comment: * cause/context cycles should be avoided. Naive traceback printing could become confused, and I can't think of any accidental way to provoke it (besides the problem mentioned here.) * I suspect PyErr_Display handled string exceptions in 2.x, and this is an artifact of that * No opinion on PyErr_DisplaySingle * PyErr_Display is used by PyErr_Print, and it must end up with no active exception. Additionally, third party code may depend on this semantic. Maybe PyErr_DisplayEx? * +1 on standardizing tracebacks ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 10:19:54 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 22 Jun 2008 08:19:54 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214122794.3.0.635988090294.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'll take a look. ---------- assignee: -> marketdickinson nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 10:20:46 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 22 Jun 2008 08:20:46 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214122846.03.0.309931321556.issue3168@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> marketdickinson nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 10:32:57 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 22 Jun 2008 08:32:57 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214123577.07.0.00155354837971.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: Could you tell me what >>> import math >>> math.log(float('-inf')) gives instead of the expected ValueError? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 14:06:54 2008 From: report at bugs.python.org (Andi Albrecht) Date: Sun, 22 Jun 2008 12:06:54 +0000 Subject: [issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header In-Reply-To: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> Message-ID: <1214136414.48.0.213530823136.issue1974@psf.upfronthosting.co.za> Andi Albrecht added the comment: For me this issue seems to be a duplicate of issue1645148. In my opinion the test case that checks if headers created by strings or Header instances are equal is incorrect. It shouldn't set the continuation whitespace explicitly when creating a Headers instance. I would expect that A) msg['aheader'] = 'a long string that breaks, but shortened here' and B) msg['aheader'] = Header('a long string that breaks, but shortened here') result in the same output. But for A) a Header instance is initialized in Generator._write_headers() with continuation_ws set to `\t` and for B) the default ' ' is used (see http://bugs.python.org/msg31102). I'm uploading a patch that modifies test_string_headerinst_eq() to what I think it should look like with this message. Of course, this test will fail at the moment, but maybe you agree that the Header instance in this test should be initialized without explicitly setting continuation_ws. ---------- keywords: +patch nosy: +aalbrecht Added file: http://bugs.python.org/file10700/py_issue1974.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 15:37:13 2008 From: report at bugs.python.org (Facundo Batista) Date: Sun, 22 Jun 2008 13:37:13 +0000 Subject: [issue2722] os.getcwd fails for long path names on linux In-Reply-To: <1209513713.72.0.856883129402.issue2722@psf.upfronthosting.co.za> Message-ID: <1214141833.08.0.0431076128608.issue2722@psf.upfronthosting.co.za> Facundo Batista added the comment: Went for the malloc only patch. Just fixed a small detail (weird corner case if malloc returned NULL first time, res will be unassigned). The test could be better (no necessity of using a recursive function, it could be done with a while), but it works. Commited in r64452. ---------- nosy: +facundobatista resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 15:56:12 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 22 Jun 2008 13:56:12 +0000 Subject: [issue2732] curses.textpad loses characters at the end of lines In-Reply-To: <1209659981.45.0.724290161206.issue2732@psf.upfronthosting.co.za> Message-ID: <1214142971.65.0.558462920472.issue2732@psf.upfronthosting.co.za> A.M. Kuchling added the comment: This bug was fixed in 2.5 and 2.6, in rev. 60118 and 60119. Thanks for your bug report! ---------- assignee: -> akuchling nosy: +akuchling resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 16:07:13 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 22 Jun 2008 14:07:13 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1214118298.94.0.429406658597.issue3112@psf.upfronthosting.co.za> Message-ID: <1214143625.6056.8.camel@fsol> Antoine Pitrou added the comment: Le dimanche 22 juin 2008 ? 07:04 +0000, Adam Olsen a ?crit : > Adam Olsen added the comment: > > * cause/context cycles should be avoided. Naive traceback printing > could become confused, and I can't think of any accidental way to > provoke it (besides the problem mentioned here.) You mean they should be detected when the exception is set? I was afraid that it may make exception raising slower. Reporting is not performance sensitive in comparison to exception raising. (the "problem mentioned here" is already avoided in the patch, but the detection of other cycles is deferred to exception reporting for the reason given above) > * PyErr_Display is used by PyErr_Print, and it must end up with no > active exception. Additionally, third party code may depend on this > semantic. Maybe PyErr_DisplayEx? I was not proposing to change the exception swallowing semantics, just to add a return value indicating if any errors had occurred while displaying the exception. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 17:27:49 2008 From: report at bugs.python.org (Facundo Batista) Date: Sun, 22 Jun 2008 15:27:49 +0000 Subject: [issue3164] cPickle calls to save_string and save_unicode with unicode objects. In-Reply-To: <1214082180.06.0.267605807985.issue3164@psf.upfronthosting.co.za> Message-ID: <1214148469.41.0.404621210763.issue3164@psf.upfronthosting.co.za> Facundo Batista added the comment: Commited in 64455, thank you! ---------- nosy: +facundobatista resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 17:30:27 2008 From: report at bugs.python.org (Facundo Batista) Date: Sun, 22 Jun 2008 15:30:27 +0000 Subject: [issue3165] cPickle recursion problem In-Reply-To: <1214082651.25.0.91375820207.issue3165@psf.upfronthosting.co.za> Message-ID: <1214148627.2.0.305561168223.issue3165@psf.upfronthosting.co.za> Facundo Batista added the comment: What is this fixing? Could you please provide a test cases that fails without this patch? Thank you!! ---------- nosy: +facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 18:06:06 2008 From: report at bugs.python.org (Chris Withers) Date: Sun, 22 Jun 2008 16:06:06 +0000 Subject: [issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header In-Reply-To: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> Message-ID: <1214150766.24.0.315839102037.issue1974@psf.upfronthosting.co.za> Chris Withers added the comment: Andi, I'm in total agreement with you :-) (so if this bug could get fixed, both issues could get closed) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 19:17:36 2008 From: report at bugs.python.org (Adam Olsen) Date: Sun, 22 Jun 2008 17:17:36 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1214143625.6056.8.camel@fsol> Message-ID: Adam Olsen added the comment: On Sun, Jun 22, 2008 at 8:07 AM, Antoine Pitrou wrote: > You mean they should be detected when the exception is set? I was afraid > that it may make exception raising slower. Reporting is not performance > sensitive in comparison to exception raising. > > (the "problem mentioned here" is already avoided in the patch, but the > detection of other cycles is deferred to exception reporting for the > reason given above) I meant only that trivial cycles should be detected. However, I hadn't read your patch, so I didn't realize you already knew of a way to create a non-trivial cycle. This has placed a niggling doubt in my mind about chaining the exceptions, rather than the tracebacks. Hrm. >> * PyErr_Display is used by PyErr_Print, and it must end up with no >> active exception. Additionally, third party code may depend on this >> semantic. Maybe PyErr_DisplayEx? > > I was not proposing to change the exception swallowing semantics, just > to add a return value indicating if any errors had occurred while > displaying the exception. Ahh, harmless then, but to what benefit? Wouldn't the traceback module be better suited to any possible error reporting? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 20:12:26 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 22 Jun 2008 18:12:26 +0000 Subject: [issue3085] chapter 17.1.3.5 'Replacing os.popen*' in the Python library reference contains an error In-Reply-To: <1213225286.96.0.994890895881.issue3085@psf.upfronthosting.co.za> Message-ID: <1214158346.04.0.164510429221.issue3085@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r64461. Thanks! ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 20:32:31 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 22 Jun 2008 18:32:31 +0000 Subject: [issue3157] sqlite3 minor documentation issues In-Reply-To: <1214015278.07.0.0768576663136.issue3157@psf.upfronthosting.co.za> Message-ID: <1214159550.98.0.699412963648.issue3157@psf.upfronthosting.co.za> Georg Brandl added the comment: I fixed the docstring in r64463 (2.5 branch, already fixed in trunk) and expanded the connect() docstring in r64464. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 20:57:35 2008 From: report at bugs.python.org (Manuel Kaufmann) Date: Sun, 22 Jun 2008 18:57:35 +0000 Subject: [issue3085] chapter 17.1.3.5 'Replacing os.popen*' in the Python library reference contains an error In-Reply-To: <1213225286.96.0.994890895881.issue3085@psf.upfronthosting.co.za> Message-ID: <1214161055.62.0.683987052936.issue3085@psf.upfronthosting.co.za> Manuel Kaufmann added the comment: This bug was reported on Python 2.5 version and was applied on 2.6 branch. That's correct? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 21:03:06 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 22 Jun 2008 19:03:06 +0000 Subject: [issue3146] Sphinx/LaTeX fails on Python 3.0b1 documentation In-Reply-To: <1213909932.21.0.41888332926.issue3146@psf.upfronthosting.co.za> Message-ID: <1214161386.0.0.319523015229.issue3146@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, should be fixed with Sphinx r64465. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 21:04:09 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 22 Jun 2008 19:04:09 +0000 Subject: [issue3085] chapter 17.1.3.5 'Replacing os.popen*' in the Python library reference contains an error In-Reply-To: <1213225286.96.0.994890895881.issue3085@psf.upfronthosting.co.za> Message-ID: <1214161449.17.0.686103132999.issue3085@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't maintain the 2.5 docs anymore, at least for such minor bugs. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 21:04:29 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 22 Jun 2008 19:04:29 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: Message-ID: <1214161461.6056.44.camel@fsol> Antoine Pitrou added the comment: Le dimanche 22 juin 2008 ? 17:17 +0000, Adam Olsen a ?crit : > I meant only that trivial cycles should be detected. However, I > hadn't read your patch, so I didn't realize you already knew of a way > to create a non-trivial cycle. > > This has placed a niggling doubt in my mind about chaining the > exceptions, rather than the tracebacks. Hrm. Chaining the tracebacks rather than the exceptions loses important information: what is the nature of the exception which is the cause or context of the current exception? It is improbable to create such a cycle involuntarily, it means you raise an old exception in replacement of a newer one caused by the older, which I think is quite contorted. It is also quite easy to avoid creating the cycle, simply by re-raising outside of any except handler. > Ahh, harmless then, but to what benefit? I don't know, I've never used that API, I just proposed returning that error code since it is computed inside the function anyway. But let's drop that proposal. Same for PyErr_DisplaySingle if nobody cares. > Wouldn't the traceback > module be better suited to any possible error reporting? I suppose built-in reporting is needed when reporting a grave error such as a MemoryError (C code can avoid doing any memory allocations), or an error that occurred during startup before any pure Python modules could be initialized (how would you report a syntax error in the traceback module itself?). But application code should use the traceback module rather than try to access the C API. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 21:23:23 2008 From: report at bugs.python.org (Adam Olsen) Date: Sun, 22 Jun 2008 19:23:23 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1214161461.6056.44.camel@fsol> Message-ID: Adam Olsen added the comment: On Sun, Jun 22, 2008 at 1:04 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Le dimanche 22 juin 2008 ? 17:17 +0000, Adam Olsen a ?crit : >> I meant only that trivial cycles should be detected. However, I >> hadn't read your patch, so I didn't realize you already knew of a way >> to create a non-trivial cycle. >> >> This has placed a niggling doubt in my mind about chaining the >> exceptions, rather than the tracebacks. Hrm. > > Chaining the tracebacks rather than the exceptions loses important > information: what is the nature of the exception which is the cause or > context of the current exception? I assumed each leg of the traceback would reference the relevant exception. Although.. this is effectively the same as creating a new exception instance when reraised, rather than modifying the old one. Reusing the old is done for performance I believe. > It is improbable to create such a cycle involuntarily, it means you > raise an old exception in replacement of a newer one caused by the > older, which I think is quite contorted. It is also quite easy to avoid > creating the cycle, simply by re-raising outside of any except handler. I'm not convinced. try: ... # Lookup except A as a: # Lookup failed try: ... # Fallback except B as b: # Fallback failed raise a # The original exception is of the type we want For this behaviour, this is the most natural way to write it. Conceptually, there shouldn't be a cycle - the traceback should be the lookup, then the fallback, then whatever code is about this - exactly the order the code executed in. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 21:33:34 2008 From: report at bugs.python.org (Facundo Batista) Date: Sun, 22 Jun 2008 19:33:34 +0000 Subject: [issue1523853] 2.4.2 file.read caches EOF state Message-ID: <1214163214.61.0.278164977394.issue1523853@psf.upfronthosting.co.za> Facundo Batista added the comment: In Linux, it seems to be the behaviour of the underlying C function 'fread'. Do you think it's ok to add the following line in the read() documentation? """ As this function depends of the underlying C function :cfunc:`fread`, inheritates its behaviour in details like caching EOF and others. """ Assigning this to George, to reword that in nicer English and apply. Regards, ---------- assignee: -> georg.brandl nosy: +facundobatista, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 21:48:55 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 22 Jun 2008 19:48:55 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: Message-ID: <1214164129.6056.63.camel@fsol> Antoine Pitrou added the comment: Le dimanche 22 juin 2008 ? 19:23 +0000, Adam Olsen a ?crit : > For this behaviour, this is the most natural way to write it. > Conceptually, there shouldn't be a cycle I agree your example is not far-fetched. How about avoiding cycles for implicit chaining, and letting users shoot themselves in the foot with explicit ?recursive chaining if they want? Detection would be cheap enough, just a simple loop without any memory allocation. > the traceback should be the > lookup, then the fallback, then whatever code is about this - exactly > the order the code executed in. It would be the reverse: first the fallback, then the re-raised exception. The last caught exception is always reported last, because it's supposed to be the "main" or "highest-level" one. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 21:57:52 2008 From: report at bugs.python.org (Adam Olsen) Date: Sun, 22 Jun 2008 19:57:52 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1214164129.6056.63.camel@fsol> Message-ID: Adam Olsen added the comment: On Sun, Jun 22, 2008 at 1:48 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Le dimanche 22 juin 2008 ? 19:23 +0000, Adam Olsen a ?crit : >> For this behaviour, this is the most natural way to write it. >> Conceptually, there shouldn't be a cycle > > I agree your example is not far-fetched. How about avoiding cycles for > implicit chaining, and letting users shoot themselves in the foot with > explicit ?recursive chaining if they want? Detection would be cheap > enough, just a simple loop without any memory allocation. That's still O(n). I'm not so easily convinced it's cheap enough. And for that matter, I'm not convinced it's correct. The inner exception's context becomes clobbered when we modify the outer exception's traceback. The inner's context should reference the traceback as it was at that point. This would all be a lot easier if reraising always created a new exception. Can you think of a way to skip that only when we can be sure its safe? Maybe as simple as counting the references to it? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 22:20:04 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 22 Jun 2008 20:20:04 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: Message-ID: <1214165998.6056.81.camel@fsol> Antoine Pitrou added the comment: Le dimanche 22 juin 2008 ? 19:57 +0000, Adam Olsen a ?crit : > That's still O(n). I'm not so easily convinced it's cheap enough. O(n) when n will almost never be greater than 5 (and very often equal to 1 or 2), and when the unit is the cost of a pointer dereference plus the cost of a pointer comparison, still sounds cheap. We could bench it anyway. > And for that matter, I'm not convinced it's correct. The inner > exception's context becomes clobbered when we modify the outer > exception's traceback. The inner's context should reference the > traceback as it was at that point. Yes, I've just thought about that, it's a bit annoying... We have to decide what is more annoying: that, or a reference cycle that can delay deallocation of stuff attached to an exception (including local variables attached to the tracebacks)? (just a small note: it's exception objects that are chained, not tracebacks... we never modify tracebacks at any point) > This would all be a lot easier if reraising always created a new > exception. How do you duplicate an instance of an user-defined exception? Using an equivalent of copy.deepcopy()? It will probably end up much more expensive than the above-mentioned O(n) search. > ?Can you think of a way to skip that only when we can be > sure its safe? Maybe as simple as counting the references to it? I don't think so, the exception can be referenced in an unknown number of local variables (themselves potentially referenced by tracebacks). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 22:40:20 2008 From: report at bugs.python.org (Adam Olsen) Date: Sun, 22 Jun 2008 20:40:20 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1214165998.6056.81.camel@fsol> Message-ID: Adam Olsen added the comment: On Sun, Jun 22, 2008 at 2:20 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Le dimanche 22 juin 2008 ? 19:57 +0000, Adam Olsen a ?crit : >> That's still O(n). I'm not so easily convinced it's cheap enough. > > O(n) when n will almost never be greater than 5 (and very often equal to > 1 or 2), and when the unit is the cost of a pointer dereference plus the > cost of a pointer comparison, still sounds cheap. We could bench it > anyway. Indeed. >> And for that matter, I'm not convinced it's correct. The inner >> exception's context becomes clobbered when we modify the outer >> exception's traceback. The inner's context should reference the >> traceback as it was at that point. > > Yes, I've just thought about that, it's a bit annoying... We have to > decide what is more annoying: that, or a reference cycle that can delay > deallocation of stuff attached to an exception (including local > variables attached to the tracebacks)? The cycle is only created by broken behaviour. The more I think about it, the more I want to fix it (by not reusing the exception). >> This would all be a lot easier if reraising always created a new >> exception. > > How do you duplicate an instance of an user-defined exception? Using an > equivalent of copy.deepcopy()? It will probably end up much more > expensive than the above-mentioned O(n) search. Passing in e.args is probably sufficient. All this would need to be discussed on python-dev (or python-3000?) though. >> ?Can you think of a way to skip that only when we can be >> sure its safe? Maybe as simple as counting the references to it? > > I don't think so, the exception can be referenced in an unknown number > of local variables (themselves potentially referenced by tracebacks). Can be, or will be? Only the most common behaviour needs to be optimized. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 22:56:09 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 22 Jun 2008 20:56:09 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: Message-ID: <1214168164.6056.94.camel@fsol> Antoine Pitrou added the comment: Le dimanche 22 juin 2008 ? 20:40 +0000, Adam Olsen a ?crit : > > How do you duplicate an instance of an user-defined exception? Using > an > > equivalent of copy.deepcopy()? It will probably end up much more > > expensive than the above-mentioned O(n) search. > > Passing in e.args is probably sufficient. I think it's very optimistic :-) Some exception objects can hold dynamic state which is ?simply not stored in the "args" tuple. See Twisted's Failure objects for an extreme example: http://twistedmatrix.com/trac/browser/trunk/twisted/python/failure.py (yes, it is used an an exception: see "raise self" in the trap() method) > Can be, or will be? Only the most common behaviour needs to be optimized. Well, the "most common behaviour" is a very short context chain, which is already optimized by my reference-avoidance proposal... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 23:53:02 2008 From: report at bugs.python.org (Facundo Batista) Date: Sun, 22 Jun 2008 21:53:02 +0000 Subject: [issue1567948] poplib.py list interface Message-ID: <1214171582.46.0.882730373324.issue1567948@psf.upfronthosting.co.za> Facundo Batista added the comment: Hasan, are you still interested in this or wants to drop this request? Passing almost two years without comments it's no good if you'll be the package maintainer. Thanks! ---------- nosy: +facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 22 23:58:17 2008 From: report at bugs.python.org (Facundo Batista) Date: Sun, 22 Jun 2008 21:58:17 +0000 Subject: [issue678464] Docs don't define sequence-ness very well Message-ID: <1214171897.03.0.39106021518.issue678464@psf.upfronthosting.co.za> Facundo Batista added the comment: Skip, don't you think it's better to raise this kind of generic question in the python-dev list? This should probably lay down here for ever before a discussion raises to decide this. ---------- nosy: +facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 00:07:10 2008 From: report at bugs.python.org (Facundo Batista) Date: Sun, 22 Jun 2008 22:07:10 +0000 Subject: [issue701743] Reloading pseudo modules Message-ID: <1214172430.08.0.402142027086.issue701743@psf.upfronthosting.co.za> Facundo Batista added the comment: Walter, the import mechanisms changed by a big rework from Brett Cannon in the last months. Do you think still have a use case that should be fulfilled? Do you want to update your patch? Thank you! ---------- nosy: +facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 00:21:54 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 22 Jun 2008 22:21:54 +0000 Subject: [issue3051] heapq change breaking compatibility In-Reply-To: <1212755858.43.0.854603033808.issue3051@psf.upfronthosting.co.za> Message-ID: <1214173314.79.0.716986695373.issue3051@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 00:22:10 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 22 Jun 2008 22:22:10 +0000 Subject: [issue3069] Let set.union and set.intersection accept multiple arguments In-Reply-To: <1213052512.78.0.0912293391051.issue3069@psf.upfronthosting.co.za> Message-ID: <1214173330.81.0.82083460894.issue3069@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 00:25:01 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 22 Jun 2008 22:25:01 +0000 Subject: [issue1746088] long.__str__ is quadratic time Message-ID: <1214173501.58.0.781698034557.issue1746088@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Still waiting for the patch. ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 00:29:43 2008 From: report at bugs.python.org (Facundo Batista) Date: Sun, 22 Jun 2008 22:29:43 +0000 Subject: [issue2702] pickling of large recursive structures crashes cPickle In-Reply-To: <1209282789.34.0.562999954252.issue2702@psf.upfronthosting.co.za> Message-ID: <1214173783.53.0.848274180549.issue2702@psf.upfronthosting.co.za> Facundo Batista added the comment: Could you please tell me if this problem arises with this test? ---------- keywords: +patch nosy: +facundobatista Added file: http://bugs.python.org/file10701/test_cpickle.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 00:35:55 2008 From: report at bugs.python.org (Daniel Darabos) Date: Sun, 22 Jun 2008 22:35:55 +0000 Subject: [issue2702] pickling of large recursive structures crashes cPickle In-Reply-To: <1209282789.34.0.562999954252.issue2702@psf.upfronthosting.co.za> Message-ID: <1214174155.57.0.427454621364.issue2702@psf.upfronthosting.co.za> Daniel Darabos added the comment: I have just quickly pasted it into an interpreter. Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> class Node(object): ... pass ... >>> nodes = [Node() for i in range(500)] >>> for n in nodes: ... n.connections = list(nodes) ... n.connections.remove(n) ... >>> import cPickle >>> s = cPickle.dumps( n ) After this line, the interpreter terminated without any further output (no Python exception and no Windows "General Exception" message box either). Is it sufficient, or would you prefer me to run the test properly? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 00:38:11 2008 From: report at bugs.python.org (Facundo Batista) Date: Sun, 22 Jun 2008 22:38:11 +0000 Subject: [issue2702] pickling of large recursive structures crashes cPickle In-Reply-To: <1209282789.34.0.562999954252.issue2702@psf.upfronthosting.co.za> Message-ID: <1214174290.92.0.905322874188.issue2702@psf.upfronthosting.co.za> Facundo Batista added the comment: Daniel, it'd be great, because it does not crash in linux, so I can not test it... and I have a patch to apply (see issue 3165), so I wanted to test it that way. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 00:41:05 2008 From: report at bugs.python.org (Facundo Batista) Date: Sun, 22 Jun 2008 22:41:05 +0000 Subject: [issue775340] OSX 'freeze' bug Message-ID: <1214174464.92.0.804567156092.issue775340@psf.upfronthosting.co.za> Facundo Batista added the comment: Justin, Jack, how this evolved to the newer Python versions? Do you think it's worth it to keep it open? Thank you! ---------- nosy: +facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 00:43:12 2008 From: report at bugs.python.org (Daniel Darabos) Date: Sun, 22 Jun 2008 22:43:12 +0000 Subject: [issue2702] pickling of large recursive structures crashes cPickle In-Reply-To: <1209282789.34.0.562999954252.issue2702@psf.upfronthosting.co.za> Message-ID: <1214174592.78.0.308416998977.issue2702@psf.upfronthosting.co.za> Daniel Darabos added the comment: It works for me as a test case too: test_deep_recursive (__main__.cPickleDeepRecursive) ... ERROR ====================================================================== ERROR: test_deep_recursive (__main__.cPickleDeepRecursive) ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\devel\Python25\Lib\test\test_cpickle.py", line 107, in test_deep_recursive self.assertRaises(RuntimeError, cPickle.dumps, n) File "C:\devel\Python25\lib\unittest.py", line 320, in failUnlessRaises callableObj(*args, **kwargs) KeyError: 13352688 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 00:51:16 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 22 Jun 2008 22:51:16 +0000 Subject: [issue1003935] xrange overflows Message-ID: <1214175076.54.0.162273246882.issue1003935@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This was fixed for Py3.0. No interest was shown in backporting. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 00:54:12 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 22 Jun 2008 22:54:12 +0000 Subject: [issue3172] test macos skipped "unexpected" on linux2 In-Reply-To: <1214175252.59.0.0667405723612.issue3172@psf.upfronthosting.co.za> Message-ID: <1214175252.59.0.0667405723612.issue3172@psf.upfronthosting.co.za> New submission from Jean Brouwers : Test test_macos is reported as an "unexpected skip" on linux2 by Python 2.6b1 make test. 35 tests skipped: ... test_macos test_macostools ... ... 2 skips unexpected on linux2: test_tcl test_macos $ uname -a Linux ... 2.6.9-11.EL #1 Fri May 20 18:17:57 EDT 2005 i686 i686 i386 GNU/Linux $ gcc -v Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man -- infodir=/usr/share/info --enable-shared --enable-threads=posix -- disable-checking --with-system-zlib --enable-__cxa_atexit --disable- libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux Thread model: posix gcc version 3.4.6 20060404 (Red Hat 3.4.6-9) ---------- components: Tests messages: 68593 nosy: MrJean1 severity: normal status: open title: test macos skipped "unexpected" on linux2 type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 01:01:26 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 22 Jun 2008 23:01:26 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214175686.57.0.346190279264.issue3167@psf.upfronthosting.co.za> Jean Brouwers added the comment: Here is that in from 32- and 64-bit Python 2.6b1: > ./python (32-bit) Python 2.6b1 (r26b1:64398, Jun 20 2008, 09:20:49) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import math >>> math.log(float('-inf')) -inf >>> math.log(float('inf')) inf >>> math.log(float('nan')) nan > ./python (64-bit) Python 2.6b1 (r26b1:64398, Jun 19 2008, 20:27:39) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import math >>> math.log(float('-inf')) Traceback (most recent call last): File "", line 1, in ValueError: math domain error >>> math.log(float('inf')) inf >>> math.log(float('nan')) nan Look like a Sun issue, doesn't it? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 01:25:30 2008 From: report at bugs.python.org (Daniel Darabos) Date: Sun, 22 Jun 2008 23:25:30 +0000 Subject: [issue3165] cPickle recursion problem In-Reply-To: <1214082651.25.0.91375820207.issue3165@psf.upfronthosting.co.za> Message-ID: <1214177130.11.0.942031713901.issue3165@psf.upfronthosting.co.za> Daniel Darabos added the comment: Added lines have to come after the "static char..." declarations to comply with C. Unfortunately I am not experienced with building Python on Windows, so I could not really try the patch, sorry. (I can get a cPickle.pyd, but it does not replace the built-in cPickle module.) Anyway, thanks for the patch, I hope it fixes "my" issue (#2702). ---------- nosy: +cyhawk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 01:47:28 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 22 Jun 2008 23:47:28 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1214178448.08.0.464737414598.issue2813@psf.upfronthosting.co.za> Jean Brouwers added the comment: Attached is another patch for file Objects/stringobject.c(relative to Python 2.6b1) which supports the double %f and long double %LF formats. However, %Lf is included only if symbol LDBL_DIG is defined in header file on the underlying platform. This patch also handles the long and size_t flags correctly in the first loop to determine the size of the buffer under ... case 'd': case 'u': case 'i': case 'x': ... Btw, it does not make sense to handle float since there is not formnat specification for floats. Added file: http://bugs.python.org/file10702/stringobject_format_Lf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 01:50:12 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 22 Jun 2008 23:50:12 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1214178612.82.0.636815345948.issue2813@psf.upfronthosting.co.za> Changes by Jean Brouwers : Removed file: http://bugs.python.org/file10702/stringobject_format_Lf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 01:52:24 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 22 Jun 2008 23:52:24 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1214178744.07.0.444352109809.issue2813@psf.upfronthosting.co.za> Changes by Jean Brouwers : Added file: http://bugs.python.org/file10703/stringobject_format_Lf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 01:58:09 2008 From: report at bugs.python.org (Facundo Batista) Date: Sun, 22 Jun 2008 23:58:09 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1214179088.93.0.0638199860496.issue2813@psf.upfronthosting.co.za> Facundo Batista added the comment: Jean, you can increase *hugely* the possibility of this being accepted if you submit a comprehensive suite test for this. Thanks!! ---------- nosy: +facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 02:19:38 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 00:19:38 +0000 Subject: [issue3085] chapter 17.1.3.5 'Replacing os.popen*' in the Python library reference contains an error In-Reply-To: <1213225286.96.0.994890895881.issue3085@psf.upfronthosting.co.za> Message-ID: <1214180378.14.0.00585097986413.issue3085@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 02:29:36 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 00:29:36 +0000 Subject: [issue3172] test macos skipped "unexpected" on linux2 In-Reply-To: <1214175252.59.0.0667405723612.issue3172@psf.upfronthosting.co.za> Message-ID: <1214180976.38.0.309382215345.issue3172@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This was fixed on the trunk by r64408. ---------- nosy: +benjamin.peterson resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 02:37:01 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 00:37:01 +0000 Subject: [issue1180470] BaseHTTPServer uses deprecated mimetools.Message Message-ID: <1214181421.64.0.633226176089.issue1180470@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Let's save ourselves the trouble... ---------- nosy: +benjamin.peterson resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 02:43:00 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 00:43:00 +0000 Subject: [issue1534607] IndexError: Add bad index to msg Message-ID: <1214181780.47.0.180454686297.issue1534607@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 02:43:19 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 00:43:19 +0000 Subject: [issue1534607] IndexError: Add bad index to msg Message-ID: <1214181799.59.0.163143226687.issue1534607@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 02:44:52 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 00:44:52 +0000 Subject: [issue2683] subprocess.Popen.communicate takes bytes, not str In-Reply-To: <1209063440.61.0.967116488341.issue2683@psf.upfronthosting.co.za> Message-ID: <1214181891.99.0.362517474082.issue2683@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I say docs. ---------- assignee: -> georg.brandl components: +Documentation -Extension Modules nosy: +benjamin.peterson, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 02:46:45 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 00:46:45 +0000 Subject: [issue3161] Missing import for sys in _abcoll In-Reply-To: <1214063755.65.0.272418702742.issue3161@psf.upfronthosting.co.za> Message-ID: <1214182005.41.0.498091821698.issue3161@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 03:04:25 2008 From: report at bugs.python.org (Facundo Batista) Date: Mon, 23 Jun 2008 01:04:25 +0000 Subject: [issue2702] pickling of large recursive structures crashes cPickle In-Reply-To: <1209282789.34.0.562999954252.issue2702@psf.upfronthosting.co.za> Message-ID: <1214183064.77.0.810473654087.issue2702@psf.upfronthosting.co.za> Facundo Batista added the comment: Commited this patch to the test cases, and the patch from #3165 to fix the problem, thank you all! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 03:05:36 2008 From: report at bugs.python.org (Facundo Batista) Date: Mon, 23 Jun 2008 01:05:36 +0000 Subject: [issue3165] cPickle recursion problem In-Reply-To: <1214082651.25.0.91375820207.issue3165@psf.upfronthosting.co.za> Message-ID: <1214183136.23.0.626597702028.issue3165@psf.upfronthosting.co.za> Facundo Batista added the comment: Applied this patch. Daniel, don't know about that "rule"... I didn't get any warning with gcc... Anyway, this fixes the issue of #2702. Thanks cuerty! ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 04:44:54 2008 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 23 Jun 2008 02:44:54 +0000 Subject: [issue3173] external strftime for Python? In-Reply-To: <1214189093.82.0.548435251403.issue3173@psf.upfronthosting.co.za> Message-ID: <1214189093.82.0.548435251403.issue3173@psf.upfronthosting.co.za> New submission from Skip Montanaro : Back in April we had a thread on xmlrpclib's problematic handling of dates before 1900: http://thread.gmane.org/gmane.comp.python.devel/93273/focus=93309 I'm still of the opinion that strftime() is the culprit and xmlrpclib is just an innocent bystander. Guido worried that to correct this we'd have to implement strftime() from scratch. I took a different approach and scouted around for an existing version of strftime() which we could suck into the distribution. I found a modified version of the BSD 4.4 strftime which came with (I see to recall) Tcl. The attached patch is against the py3k svn repo. It passes all tests as far as I can tell. Also, see http://bugs.python.org/issue1777412 which appears to be related. ---------- files: strftime.diff keywords: patch, patch messages: 68603 nosy: skip.montanaro priority: normal severity: normal status: open title: external strftime for Python? versions: Python 3.0 Added file: http://bugs.python.org/file10704/strftime.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 04:47:10 2008 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 23 Jun 2008 02:47:10 +0000 Subject: [issue3173] external strftime for Python? In-Reply-To: <1214189093.82.0.548435251403.issue3173@psf.upfronthosting.co.za> Message-ID: <1214189230.59.0.517159833106.issue3173@psf.upfronthosting.co.za> Skip Montanaro added the comment: Ummm... I think I only modified timemodule.c. datetimemodule.c probably needs a tweak as well. I need to get this off my desk though. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 05:30:13 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 23 Jun 2008 03:30:13 +0000 Subject: [issue3161] Missing import for sys in _abcoll In-Reply-To: <1214063755.65.0.272418702742.issue3161@psf.upfronthosting.co.za> Message-ID: <1214191811.57.0.956792597751.issue3161@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Applied in r64475 . Thanks for the patch. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 05:54:37 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 23 Jun 2008 03:54:37 +0000 Subject: [issue3173] external strftime for Python? In-Reply-To: <1214189093.82.0.548435251403.issue3173@psf.upfronthosting.co.za> Message-ID: <1214193276.97.0.571369434826.issue3173@psf.upfronthosting.co.za> Martin v. L?wis added the comment: So how does it work for non-English locales? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 06:44:01 2008 From: report at bugs.python.org (Senthil) Date: Mon, 23 Jun 2008 04:44:01 +0000 Subject: [issue3142] urllib docs don't match the new modules In-Reply-To: <1213881685.97.0.203143368554.issue3142@psf.upfronthosting.co.za> Message-ID: <1214196240.33.0.133855351383.issue3142@psf.upfronthosting.co.za> Senthil added the comment: Hi Georg, Updated all the required docs and Committed revision 64476. Let me know if any more changes required. Thanks, Senthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 06:45:05 2008 From: report at bugs.python.org (Senthil) Date: Mon, 23 Jun 2008 04:45:05 +0000 Subject: [issue2885] Create the urllib package In-Reply-To: <1210914691.08.0.848288242706.issue2885@psf.upfronthosting.co.za> Message-ID: <1214196305.09.0.352025545708.issue2885@psf.upfronthosting.co.za> Senthil added the comment: - Docs updated. - Still pending: 2to3 updates and Deprecation warnings. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 07:24:41 2008 From: report at bugs.python.org (Jean Brouwers) Date: Mon, 23 Jun 2008 05:24:41 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1214198680.33.0.75721588568.issue2813@psf.upfronthosting.co.za> Jean Brouwers added the comment: Another rev of the patch now including updates to 2 documentation files: Doc/c-api/exceptions.rst and Doc/c-api/string.rst. As before the patch is relative to the source of Python 2.6b1. Where should test cases for the new formats in the PyString_FromFormat* and PyErr_Format functions be added? Added file: http://bugs.python.org/file10705/stringobject_format_Lf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 07:24:58 2008 From: report at bugs.python.org (Jean Brouwers) Date: Mon, 23 Jun 2008 05:24:58 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1214198698.96.0.00864075972691.issue2813@psf.upfronthosting.co.za> Changes by Jean Brouwers : Removed file: http://bugs.python.org/file10703/stringobject_format_Lf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 08:08:32 2008 From: report at bugs.python.org (Jean Brouwers) Date: Mon, 23 Jun 2008 06:08:32 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1214201312.77.0.0897704135415.issue2813@psf.upfronthosting.co.za> Jean Brouwers added the comment: The tests for PyString_FromFormat are in file Modules/_testcapimodule.c. Attached is yet another update of the patch, this one also includes 3 tests for the new %f format specification added to file Modules/_testcapimodule.c. Added file: http://bugs.python.org/file10706/stringobject_format_Lf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 08:08:54 2008 From: report at bugs.python.org (Jean Brouwers) Date: Mon, 23 Jun 2008 06:08:54 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1214201334.97.0.529613493759.issue2813@psf.upfronthosting.co.za> Changes by Jean Brouwers : Removed file: http://bugs.python.org/file10705/stringobject_format_Lf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 08:16:05 2008 From: report at bugs.python.org (Adam Olsen) Date: Mon, 23 Jun 2008 06:16:05 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1214168164.6056.94.camel@fsol> Message-ID: Adam Olsen added the comment: On Sun, Jun 22, 2008 at 2:56 PM, Antoine Pitrou wrote: > Le dimanche 22 juin 2008 ? 20:40 +0000, Adam Olsen a ?crit : >> Passing in e.args is probably sufficient. > > I think it's very optimistic :-) Some exception objects can hold dynamic > state which is ?simply not stored in the "args" tuple. See Twisted's > Failure objects for an extreme example: > http://twistedmatrix.com/trac/browser/trunk/twisted/python/failure.py > > (yes, it is used an an exception: see "raise self" in the trap() method) Failure doesn't have an args tuple and doesn't subclass Exception (or BaseException) - it already needs modification in 3.0. It's heaped full of complexity and implementation details. I wouldn't be surprised if your changes break it in subtle ways too. In short, if forcing Failure to be rewritten is the only consequence of using .args, it's an acceptable tradeoff of not corrupting exception contexts. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 09:08:34 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 23 Jun 2008 07:08:34 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: Message-ID: <1214204902.5922.2.camel@fsol> Antoine Pitrou added the comment: Le lundi 23 juin 2008 ? 06:16 +0000, Adam Olsen a ?crit : > Failure doesn't have an args tuple and doesn't subclass Exception (or > BaseException) - it already needs modification in 3.0. It's heaped > full of complexity and implementation details. I wouldn't be > surprised if your changes break it in subtle ways too. Failure was only an example, I'm sure there are lots of other ones. The point is that the assertion that user-defined exceptions can be safely cloned by cloning their args is wrong, unless you want to put very strong restrictions on how user-defined exceptions can behave. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 09:34:12 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 23 Jun 2008 07:34:12 +0000 Subject: [issue2378] UnboundLocalError when trying to raise exceptions inside execfile In-Reply-To: <1205808945.1.0.883835206976.issue2378@psf.upfronthosting.co.za> Message-ID: <1214206452.45.0.900504236986.issue2378@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The problem seems to have been introduced by r53954. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 09:52:46 2008 From: report at bugs.python.org (Erick Tryzelaar) Date: Mon, 23 Jun 2008 07:52:46 +0000 Subject: [issue3174] 3.0b1 doesn't seem to install on macs In-Reply-To: <1214207562.58.0.0463418278377.issue3174@psf.upfronthosting.co.za> Message-ID: <1214207562.58.0.0463418278377.issue3174@psf.upfronthosting.co.za> New submission from Erick Tryzelaar : Revision r63851 [1] by Benjamin Peterson removed a couple mac scripts, including cachersrc.py. Unfortunately, this script is still referenced in Mac/Makefile.in, so it fails to install on my mac. Anyone have a workaround I could add for packaging this up for macports? [1]: http://svn.python.org/view?rev=63851&view=rev ---------- components: Installation messages: 68614 nosy: erickt severity: normal status: open title: 3.0b1 doesn't seem to install on macs type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 09:56:32 2008 From: report at bugs.python.org (Erick Tryzelaar) Date: Mon, 23 Jun 2008 07:56:32 +0000 Subject: [issue3174] 3.0b1 doesn't seem to install on macs In-Reply-To: <1214207562.58.0.0463418278377.issue3174@psf.upfronthosting.co.za> Message-ID: <1214207791.86.0.121316327932.issue3174@psf.upfronthosting.co.za> Erick Tryzelaar added the comment: I should add the error message: DYLD_FRAMEWORK_PATH=/opt/local/var/macports/build/_Users_Shared_erickt_P rojects_macports_dports.git_lang_python30/work/Python-3.0b1: ../python.exe ./scripts/cachersrc.py -v /opt/local/var/macports/build/_Users_Shared_erickt_Projects_macports_dpo rts.git_lang_python30/work/destroot/opt/local/Library/Frameworks/Python. framework/Versions/3.0/lib/python3.0/plat-mac /opt/local/var/macports/build/_Users_Shared_erickt_Projects_macports_dpo rts.git_lang_python30/work/destroot/opt/local/Library/Frameworks/Python. framework/Versions/3.0/Mac/Tools ../python.exe: can't open file './scripts/cachersrc.py': [Errno 2] No such file or directory make[1]: *** [installmacsubtree] Error 2 make: *** [frameworkinstallmaclib] Error 2 Also, I saw that someone else is having the same problem, so it's not just me: http://groups.google.com/group/python- dev2/browse_thread/thread/65813603fb4d93b9/2585073b7dcb2dbb? lnk=gst&q=cachersrc#2585073b7dcb2dbb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 10:50:25 2008 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Mon, 23 Jun 2008 08:50:25 +0000 Subject: [issue701743] Reloading pseudo modules Message-ID: <1214211024.4.0.652414586939.issue701743@psf.upfronthosting.co.za> Walter D?rwald added the comment: AFAIK reload() is gone in 3.0 anyway, so I don't think this patch is relevant any longer. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 10:54:35 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 23 Jun 2008 08:54:35 +0000 Subject: [issue2378] UnboundLocalError when trying to raise exceptions inside execfile In-Reply-To: <1205808945.1.0.883835206976.issue2378@psf.upfronthosting.co.za> Message-ID: <1214211274.67.0.408446515798.issue2378@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The problem is in PyFrame_LocalsToFast. (As I understand it: "Locals" refers to the locals() dictionary of the frame; "Fast" refers to an optimization where local variables are stored in an array. Each call to locals() or the trace function normalizes data by copying the Fast array into the Locals dictionary; with sys.settrace, the user may modify the locals, so the inverse transformation is done after each call to the trace function) When defining a class, PyFrame_FastToLocals does not copy the free variables from enclosing scopes. This is the goal of r53954 "Do not copy free variables to locals in class namespaces". When executing code in the class body, the sys.settrace function is called with this reduced set of locals(). The problem is that PyFrame_LocalsToFastdoes does not have the same test, and uses the locals() to update (and clear) the free variables as well. I attach a patch that makes PyFrame_LocalsToFast symmetric to PyFrame_FastToLocals: in the case of a class statement, do not update the free variables. ---------- keywords: +patch nosy: +jhylton Added file: http://bugs.python.org/file10707/localstofast.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 11:08:06 2008 From: report at bugs.python.org (Mark Summerfield) Date: Mon, 23 Jun 2008 09:08:06 +0000 Subject: [issue3175] multiprocessing build fails on Fedora 8 and Xubuntu 8 + solution In-Reply-To: <1214212085.7.0.171574365182.issue3175@psf.upfronthosting.co.za> Message-ID: <1214212085.7.0.171574365182.issue3175@psf.upfronthosting.co.za> New submission from Mark Summerfield : I built Python 30b1 from the tarball on Fedora 8 and Xubuntu 8. My only configure switch was --prefix to get a local build. On both systems the only build error I got was: Failed to find the necessary bits to build these modules: _gestalt which shouldn't matter because it is a Mac thing not a Linux thing (and already reported)---there were no other error messages, so no warning that multiprocessing wasn't working. Running make test does _not_ indicate any problem with the multiprocessing module (same output on both systems): 302 tests OK. 21 tests skipped: test_bsddb3 test_cProfile test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses test_kqueue test_normalization test_ossaudiodev test_pep277 test_socketserver test_startfile test_timeout test_urllib2net test_urllibnet test_winreg test_winsound test_xmlrpc_net test_zipfile64 Those skips are all expected on linux2. If I run test_multiprocessing.py manually from the _build_ directory it works fine. But if I use the locally installed Python 3 (soft linked to python3 in my PATH), on both systems I get this: : python3 -V Python 3.0b1 : python3 Lib/test/test_multiprocessing.py Traceback (most recent call last): File "Lib/test/test_multiprocessing.py", line 19, in import multiprocessing.dummy ImportError: No module named multiprocessing.dummy Now given that the tests all pass it seemed to me that the problem was with the build rather than with the module itself, and that led to the solution, which for both systems is the same simple command: cp -R ~/download/Python-3.0b1/Lib/multiprocessing ~/opt/python30b1/lib/python3.0 So it seems that although the shared library is copied correctly from the build directory, what has been forgotten is to copy the multiprocessing directory itself. ---------- components: Build messages: 68618 nosy: mark severity: normal status: open title: multiprocessing build fails on Fedora 8 and Xubuntu 8 + solution versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 11:56:56 2008 From: report at bugs.python.org (Senthil) Date: Mon, 23 Jun 2008 09:56:56 +0000 Subject: [issue3045] Windows online help broken when spaces in TEMP environ In-Reply-To: <1212721889.56.0.323857297959.issue3045@psf.upfronthosting.co.za> Message-ID: <1214215016.47.0.319269443175.issue3045@psf.upfronthosting.co.za> Senthil added the comment: This issue is valid in Python2.5. I verified it on a Windows. The fix suggested Changing: os.system(cmd + ' ' + filename) to os.system('%s "%s"' % (cmd,filename)) in pydoc.tempfilepager also makes sense for fixing this issue. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 12:57:39 2008 From: report at bugs.python.org (Hiweed) Date: Mon, 23 Jun 2008 10:57:39 +0000 Subject: [issue3176] result error for 2/5 and 4/5 In-Reply-To: <1214218656.43.0.217751702107.issue3176@psf.upfronthosting.co.za> Message-ID: <1214218656.43.0.217751702107.issue3176@psf.upfronthosting.co.za> New submission from Hiweed : On IDLE 3.0b1 (Windows XP SP3): - type 2/5 you'll get 0.40000000000000002 instead of 0.4 - type 4/5 you'll get 0.80000000000000004 instead of 0.8 ---------- components: IDLE, Windows messages: 68620 nosy: hiweed severity: normal status: open title: result error for 2/5 and 4/5 type: crash versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 13:02:10 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 23 Jun 2008 11:02:10 +0000 Subject: [issue3176] result error for 2/5 and 4/5 In-Reply-To: <1214218656.43.0.217751702107.issue3176@psf.upfronthosting.co.za> Message-ID: <1214218930.03.0.312130683352.issue3176@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This is normal, and due to the floating point representation of numbers. Please see http://www.python.org/doc/faq/general/#why-are-floating-point-calculations-so-inaccurate ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 13:24:28 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 23 Jun 2008 11:24:28 +0000 Subject: [issue3142] urllib docs don't match the new modules In-Reply-To: <1213881685.97.0.203143368554.issue3142@psf.upfronthosting.co.za> Message-ID: <1214220267.43.0.132675990817.issue3142@psf.upfronthosting.co.za> Georg Brandl added the comment: Only a few things -- I've done them in r64477. This is now done, thanks! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 13:38:25 2008 From: report at bugs.python.org (Young-Ho Cha) Date: Mon, 23 Jun 2008 11:38:25 +0000 Subject: [issue3177] os.startfile implement in posix and MacOSX In-Reply-To: <1214221105.24.0.576717506983.issue3177@psf.upfronthosting.co.za> Message-ID: <1214221105.24.0.576717506983.issue3177@psf.upfronthosting.co.za> New submission from Young-Ho Cha : Currently, os.startfile is implemented in Win32 only, but there are command line tools in Unix and MacOSX that have same behavior. As a result of http://portland.freedesktop.org, unix desktop has command line tool named "xdg-open" (http://portland.freedesktop.org/xdg-utils-1.0/xdg-open.html). And MacOSX has 'open' (http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/open.1.html) command, and it can be used in same condition. ---------- components: Library (Lib) messages: 68623 nosy: ganadist severity: normal status: open title: os.startfile implement in posix and MacOSX type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 14:30:43 2008 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 23 Jun 2008 12:30:43 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214224242.58.0.885192638488.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: Judging by the information at http://docs.sun.com/app/docs/doc/802-1930-03/6i5u95u0i? l=en&a=view&q=matherr this behaviour is intentional. It looks like log(-inf) sets errno = EDOM and returns -inf. An IEEE 754 conforming math library would return NaN instead. I've no idea why the 64-bit build doesn't exhibit this problem. math_1 in Modules/mathmodule.c bases its error reporting primarily on return values, only looking at errno in the case when a finite value is returned. So it doesn't ever take any notice of the EDOM errno value. Unfortunately, changing this would likely cause failures on other machines. GNU libc is all over the place when it comes to setting errno: I recall finding that on one Linux machine, of the three calls atanh(1.), log(0.) and log10(0.), one of these sets errno = EDOM, one sets errno = ERANGE, and one doesn't set errno at all. (All three calls correspond to logarithmic singularities, and should all behave the same way.) One obvious solution is to write a matherr function for use on Solaris, as described on the man page above. Do you think you could have a go at this? ---------- priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 15:01:19 2008 From: report at bugs.python.org (Pyry Pakkanen) Date: Mon, 23 Jun 2008 13:01:19 +0000 Subject: [issue3178] __radd__(self, other) isn't called if self and other are of the same class In-Reply-To: <1214226078.67.0.621506907984.issue3178@psf.upfronthosting.co.za> Message-ID: <1214226078.67.0.621506907984.issue3178@psf.upfronthosting.co.za> New submission from Pyry Pakkanen : >>> class test: ... def __radd__(self,other): ... return '__radd__ called' ... >>> t = test() >>> 1 + t '__radd__ called' >>> t + t Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for +: 'test' and 'test' This applies to all of the reflected operations. ---------- messages: 68625 nosy: Frosburn severity: normal status: open title: __radd__(self,other) isn't called if self and other are of the same class versions: Python 2.5, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 15:37:06 2008 From: report at bugs.python.org (Andrii V. Mishkovskyi) Date: Mon, 23 Jun 2008 13:37:06 +0000 Subject: [issue3178] __radd__(self, other) isn't called if self and other are of the same class In-Reply-To: <1214226078.67.0.621506907984.issue3178@psf.upfronthosting.co.za> Message-ID: <1214228226.28.0.112705870265.issue3178@psf.upfronthosting.co.za> Andrii V. Mishkovskyi added the comment: This is covered in section 3.4.7 of Python Reference Manual: __radd__(self, other) [skipped] These methods are called to implement the binary arithmetic operations (+, -, *, /, %, divmod(), pow(), **, <<, >>, &, ^, |) with reflected (swapped) operands. These functions are only called if the left operand does not support the corresponding operation and the operands are of different types.[3.3] For instance, to evaluate the expression x-y, where y is an instance of a class that has an __rsub__() method, y.__rsub__(x) is called if x.__sub__(y) returns NotImplemented. [3.3] For operands of the same type, it is assumed that if the non-reflected method (such as __add__()) fails the operation is not supported, which is why the reflected method is not called. ---------- nosy: +mishok13 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 15:39:06 2008 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 23 Jun 2008 13:39:06 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214228346.23.0.356907355671.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: On second thoughts, forget about matherr---looks like it's outdated technology. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 16:21:21 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 23 Jun 2008 14:21:21 +0000 Subject: [issue3178] __radd__(self, other) isn't called if self and other are of the same class In-Reply-To: <1214226078.67.0.621506907984.issue3178@psf.upfronthosting.co.za> Message-ID: <1214230881.71.0.293026032467.issue3178@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: As Andrii said, this behaviour is by design. ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 16:42:13 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Mon, 23 Jun 2008 14:42:13 +0000 Subject: [issue3179] cPickle is seriously broken In-Reply-To: <1214232133.4.0.366608731079.issue3179@psf.upfronthosting.co.za> Message-ID: <1214232133.4.0.366608731079.issue3179@psf.upfronthosting.co.za> New submission from Ralf Schmitt : import cPickle res=[] for x in range(1,2000): res.append(dict(doc=x, similar=[])) cPickle.dumps(res) Traceback (most recent call last): File "pi.py", line 10, in cPickle.dumps(res) RuntimeError: maximum recursion depth exceeded svn r64471 seems to cause the problematic behaviour. facundo, you committed that one. ---------- messages: 68629 nosy: facundobatista, schmir severity: normal status: open title: cPickle is seriously broken type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 16:45:34 2008 From: report at bugs.python.org (Andi Albrecht) Date: Mon, 23 Jun 2008 14:45:34 +0000 Subject: [issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header In-Reply-To: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> Message-ID: <1214232334.31.0.177774146664.issue1974@psf.upfronthosting.co.za> Andi Albrecht added the comment: IMO, the best way to resolve this is to use the default continuation whitespace when a Header class is created from a string. But I'm pretty unsure about the default whitespace character. After having a look at a random set of mails in my inbox it seems that in most cases a tab is used for all headers except for the subject (excluding mails sent from Python scripts of course...). I would prefer '\t'; it's allowed and results in a cleaner output - but it won't solve the problem with some email clients which was the starting point for this issue (a short note in the docs should resolve this anyway... ;-) But I wonder if for some reason setting headers from strings intentionally differs from using the Header class? There are some tests that explicitly test both cases and expect different output. In TestLongHeaders it's test_long_unbreakable_lines_with_continuation() test_long_lines_with_different_header(self) test_long_received_header() [continuation_ws set to tab here] So, what I would do is * remove continuation_ws keyword from Generator._write_headers() * make '\t' the default cont. whitespace for headers (Header class) * update test cases and the documentation accordingly Do you think that this is the right way to go? Or would it break too much code outside stdlib if the default ws changes? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 16:53:51 2008 From: report at bugs.python.org (Facundo Batista) Date: Mon, 23 Jun 2008 14:53:51 +0000 Subject: [issue3179] cPickle is seriously broken In-Reply-To: <1214232133.4.0.366608731079.issue3179@psf.upfronthosting.co.za> Message-ID: <1214232831.24.0.0989721668864.issue3179@psf.upfronthosting.co.za> Facundo Batista added the comment: This example works before my patch, exactly! The reason of the patch I applied is that in some cases a Recursion error should be raised, but it didn't happen, causing some serious issues later. I'm putting in copy to cuerty, for him to analyze if this case should have caused Recursion error in the first place, or not. In any case, it's a good example. Ralf, would you mind to generate a test case from this example? Thank you all! ---------- nosy: +cuerty _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 16:56:18 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Mon, 23 Jun 2008 14:56:18 +0000 Subject: [issue3179] cPickle is seriously broken In-Reply-To: <1214232133.4.0.366608731079.issue3179@psf.upfronthosting.co.za> Message-ID: <1214232978.18.0.107141940842.issue3179@psf.upfronthosting.co.za> Ralf Schmitt added the comment: Apparently there are some self->nesting-- calls missing in batch_list and batch_dict. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 16:57:44 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Mon, 23 Jun 2008 14:57:44 +0000 Subject: [issue3179] cPickle is seriously broken In-Reply-To: <1214232133.4.0.366608731079.issue3179@psf.upfronthosting.co.za> Message-ID: <1214233064.19.0.978612703923.issue3179@psf.upfronthosting.co.za> Ralf Schmitt added the comment: Of course it should not raise an RecursionError. for reference: http://bugs.python.org/issue2702 is the original bugreport. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 16:59:25 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 23 Jun 2008 14:59:25 +0000 Subject: [issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header In-Reply-To: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> Message-ID: <1214233165.24.0.989295068485.issue1974@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'm pretty convinced that this stuff is broken and needs serious attention. Unfortunately, I won't have time to address the email package before 2.6 and 3.0 get released. My current work lives at bzr+ssh://pythonbzr at code.python.org/python/users/barry/30email but it hasn't been updated for a while. I highly suggest taking this to the email-sig to see if anybody else has spare cycles to work in this for now. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 17:11:08 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Mon, 23 Jun 2008 15:11:08 +0000 Subject: [issue3179] cPickle is seriously broken In-Reply-To: <1214232133.4.0.366608731079.issue3179@psf.upfronthosting.co.za> Message-ID: <1214233868.93.0.947822822574.issue3179@psf.upfronthosting.co.za> Ralf Schmitt added the comment: here is a test case. I cannot run it however: ~/pydev/trunk/ ./python Lib/test/test_cpickle.py ralf at red ok Traceback (most recent call last): File "Lib/test/test_cpickle.py", line 3, in from test.pickletester import AbstractPickleTests, AbstractPickleModuleTests ImportError: No module named pickletester ??? ---------- keywords: +patch Added file: http://bugs.python.org/file10708/test-3179.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 17:23:15 2008 From: report at bugs.python.org (Raghuram Devarakonda) Date: Mon, 23 Jun 2008 15:23:15 +0000 Subject: [issue2549] shutil: NameError (WindowsError) when moving from ext3 to fat32 under linux In-Reply-To: <1207320258.84.0.0564229805861.issue2549@psf.upfronthosting.co.za> Message-ID: <1214234595.49.0.243517177067.issue2549@psf.upfronthosting.co.za> Raghuram Devarakonda added the comment: This is duplicate of 3134. I posted a patch there. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 18:25:16 2008 From: report at bugs.python.org (Jean Brouwers) Date: Mon, 23 Jun 2008 16:25:16 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214238316.3.0.968011421001.issue3167@psf.upfronthosting.co.za> Jean Brouwers added the comment: Here is a simple test case, demonstrating the issue. #include #include #include int main(int argc, char *argv[]) { printf("%f %d\n", log(-HUGE_VAL), errno); printf("%f %d\n", log( HUGE_VAL), errno); } result is different for 32- and 64-bit > cc -xtarget=native log_inf.c -lm ; a.out -Inf 33 Inf 33 > cc -xtarget=native64 log_inf.c -lm ; a.out -NaN 0 Inf 0 #define EDOM 33 in /usr/include/sys/errno.h _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 18:32:23 2008 From: report at bugs.python.org (Michael Abbott) Date: Mon, 23 Jun 2008 16:32:23 +0000 Subject: [issue3180] Interrupts are lost during readline PyOS_InputHook processing In-Reply-To: <1214238743.53.0.342771827236.issue3180@psf.upfronthosting.co.za> Message-ID: <1214238743.53.0.342771827236.issue3180@psf.upfronthosting.co.za> New submission from Michael Abbott : The (undocumented!) API for PyOS_InputHook has two defects which are addressed in the attached patch (at least when using the readline module): firstly the called hook currently has to guess that input will come on descriptor 0; secondly, any Ctrl-C interrupts encountered during the processing of the input hook are lost. This loss of interrupts can be rather annoying. The attached patch addresses these problems by redefining the API to PyOS_InputHook as int PyOS_InputHook(int file_in); where file_in is the descriptor to monitor (PyOS_InputHook need not return until file_in is ready to read), and the return value is non-zero if and only if processing was interrupted. Testing for interruption is implemented in the HAVE_RL_CALLBACK and HAVE_SELECT branch of Modules/readline.c; other uses retain their original functionality (I believe!). The attached patch was prepared against http://svn.python.org/projects/python/trunk , current at the time of writing. ---------- components: None files: input-hook.patch keywords: patch messages: 68638 nosy: Araneidae severity: normal status: open title: Interrupts are lost during readline PyOS_InputHook processing type: feature request versions: Python 2.6 Added file: http://bugs.python.org/file10709/input-hook.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 18:48:09 2008 From: report at bugs.python.org (Ari Makela) Date: Mon, 23 Jun 2008 16:48:09 +0000 Subject: [issue3181] ConfigParsers are classic classes In-Reply-To: <1214239689.68.0.615869985575.issue3181@psf.upfronthosting.co.za> Message-ID: <1214239689.68.0.615869985575.issue3181@psf.upfronthosting.co.za> New submission from Ari Makela : The base class, ConfigParser.RawConfigParser does not inherit object and therefore it is a classic class. Test script run with my normal python installation: $ /usr/bin/python -V Python 2.5.2 $ /usr/bin/python arska/configparser.py bar And run with uptodate svn checkout with modified ConfigParser.py $ LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/python -V Python 2.6b1+ $ LD_LIBRARY_PATH=/usr/local/lib arska/configparser.py Setting value=bar Getting value=bar bar Platform: Kubuntu 8.04. $ uname -a Linux laphroaig 2.6.24-19-generic #1 SMP Wed Jun 4 15:10:52 UTC 2008 x86_64 GNU/Linux The test script and diff -u as attachments. ---------- components: Library (Lib) files: configparser.diff keywords: patch messages: 68639 nosy: hauva severity: normal status: open title: ConfigParsers are classic classes type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file10710/configparser.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 18:50:07 2008 From: report at bugs.python.org (Ari Makela) Date: Mon, 23 Jun 2008 16:50:07 +0000 Subject: [issue3181] ConfigParsers are classic classes In-Reply-To: <1214239689.68.0.615869985575.issue3181@psf.upfronthosting.co.za> Message-ID: <1214239807.17.0.659793145555.issue3181@psf.upfronthosting.co.za> Changes by Ari Makela : Added file: http://bugs.python.org/file10711/configparser.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 18:50:16 2008 From: report at bugs.python.org (Ari Makela) Date: Mon, 23 Jun 2008 16:50:16 +0000 Subject: [issue3181] ConfigParsers are classic classes In-Reply-To: <1214239689.68.0.615869985575.issue3181@psf.upfronthosting.co.za> Message-ID: <1214239816.79.0.366210851731.issue3181@psf.upfronthosting.co.za> Changes by Ari Makela : Removed file: http://bugs.python.org/file10711/configparser.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 18:51:21 2008 From: report at bugs.python.org (Ari Makela) Date: Mon, 23 Jun 2008 16:51:21 +0000 Subject: [issue3181] ConfigParsers are classic classes In-Reply-To: <1214239689.68.0.615869985575.issue3181@psf.upfronthosting.co.za> Message-ID: <1214239881.24.0.514452017766.issue3181@psf.upfronthosting.co.za> Changes by Ari Makela : Added file: http://bugs.python.org/file10712/configparser.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 19:07:37 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 23 Jun 2008 17:07:37 +0000 Subject: [issue3181] ConfigParsers are classic classes In-Reply-To: <1214239689.68.0.615869985575.issue3181@psf.upfronthosting.co.za> Message-ID: <1214240857.47.0.391544227538.issue3181@psf.upfronthosting.co.za> Georg Brandl added the comment: Why do you think ConfigParser should be a new-style class? ---------- nosy: +georg.brandl resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 19:25:44 2008 From: report at bugs.python.org (Nick Edds) Date: Mon, 23 Jun 2008 17:25:44 +0000 Subject: [issue3182] 2to3 Slight Patch In-Reply-To: <1214241944.19.0.631532213789.issue3182@psf.upfronthosting.co.za> Message-ID: <1214241944.19.0.631532213789.issue3182@psf.upfronthosting.co.za> New submission from Nick Edds : This is a small patch to the 2to3 tool, replacing some calls to isinstance (x,y) with type(x) is y in the file pytree.py. Although there is only a slight performance increase for each time this change is made, the recursive nature of pattern matching means that isinstance was being calling hundreds of thousands of times per file, so overall these minor changes result in a 3-4% speed increase in my limited testing. It currently fails only one test due to line 432 in test_pytree, because I had to rename the type parameter to new_type so I could call type() on something. But with the line in the test file changed, it passes all tests. ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) files: pytree.py messages: 68641 nosy: collinwinter, nedds severity: normal status: open title: 2to3 Slight Patch type: performance versions: Python 2.6 Added file: http://bugs.python.org/file10713/pytree.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 19:44:56 2008 From: report at bugs.python.org (Deron Meranda) Date: Mon, 23 Jun 2008 17:44:56 +0000 Subject: [issue1571841] email module does not complay with RFC 2046: CRLF issue Message-ID: <1214243095.95.0.572231113279.issue1571841@psf.upfronthosting.co.za> Deron Meranda added the comment: Still an issue in 2.5. This lack of conformance to the RFC is can also cause problems when trying to use encrypted or signed email, as those activities may depend on "canonical" line endings. An LF rather than CR+LF can cause the crypto to break in some cases. This appears to be caused by the email package writing to an internal StringIO file using the print statement, where it relies on print outputting the end-of-line character (which will always output a LF). The module should instead write the eol character(s) explicitly. To maintain backwards compatibility, it may be best if the preferred eol character be settable on a per-message basis; which would default to the current non-conforming behavior of LF, but which could be set to CR+LF if strict MIME behavior is desired. ---------- nosy: +dmeranda type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 19:46:26 2008 From: report at bugs.python.org (Jesse Noller) Date: Mon, 23 Jun 2008 17:46:26 +0000 Subject: [issue3175] multiprocessing build fails on Fedora 8 and Xubuntu 8 + solution In-Reply-To: <1214212085.7.0.171574365182.issue3175@psf.upfronthosting.co.za> Message-ID: <1214243186.55.0.228069584614.issue3175@psf.upfronthosting.co.za> Jesse Noller added the comment: This is a duplicate of http://bugs.python.org/issue3150 ---------- assignee: -> jnoller nosy: +jnoller resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 21:38:29 2008 From: report at bugs.python.org (Ralf W. Grosse-Kunstleve) Date: Mon, 23 Jun 2008 19:38:29 +0000 Subject: [issue3183] sha modules & Modules/Setup.dist In-Reply-To: <1214249909.74.0.55822821087.issue3183@psf.upfronthosting.co.za> Message-ID: <1214249909.74.0.55822821087.issue3183@psf.upfronthosting.co.za> New submission from Ralf W. Grosse-Kunstleve : It would be very useful to add two lines to Modules/Setup.dist: Index: Modules/Setup.dist =================================================================== --- Modules/Setup.dist (revision 64489) +++ Modules/Setup.dist (working copy) @@ -249,6 +249,8 @@ # The _sha module implements the SHA checksum algorithm. # (NIST's Secure Hash Algorithm.) #_sha shamodule.c +#_sha256 sha256module.c +#_sha512 sha512module.c # SGI IRIX specific modules -- off by default. Background: - Python built on machine A and distributed to end-users. Machine A happens to have the OpenSSL libraries. - End-user runs our package incl. the pre-built Python on machine B, which happens not to have the OpenSSL libraries, or an incompatible version. - hashlib imports _hashlib, which fails because of the OpenSSL problem. - hashlib tries to fall back to generic sha and md5 modules. I had _sha and md5 enabled in Modules/Setup.dist, but didn't know Python 2.5 needs more. I found this out the hard way. It would be helpful to at least have the extra two comments as suggested above. I think it would be even better to not comment out the md5 and sha modules in the original Python distribution since it just adds about 200k of .o files (Linux). That's very cheap compared to the loss in time if people have to figure out why import hashlib is failing and how to work around the problem. ---------- components: Installation messages: 68644 nosy: rwgk severity: normal status: open title: sha modules & Modules/Setup.dist versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 21:47:40 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 19:47:40 +0000 Subject: [issue3175] multiprocessing build fails on Fedora 8 and Xubuntu 8 + solution In-Reply-To: <1214212085.7.0.171574365182.issue3175@psf.upfronthosting.co.za> Message-ID: <1214250460.76.0.808465849312.issue3175@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 22:09:06 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 20:09:06 +0000 Subject: [issue3174] 3.0b1 doesn't seem to install on macs In-Reply-To: <1214207562.58.0.0463418278377.issue3174@psf.upfronthosting.co.za> Message-ID: <1214251746.61.0.717443963899.issue3174@psf.upfronthosting.co.za> Benjamin Peterson added the comment: If you just remove the reference to cachesrc.py, do you still have adverse effects? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 22:29:50 2008 From: report at bugs.python.org (=?utf-8?q?Manuel_Murad=C3=A1s?=) Date: Mon, 23 Jun 2008 20:29:50 +0000 Subject: [issue449227] rlcompleter add "(" to callables feature Message-ID: <1214252990.53.0.0950717251866.issue449227@psf.upfronthosting.co.za> Manuel Murad?s added the comment: I have also updated the rlcompleter documentation. Here is the complete patch. rlcompleterAndDoc2.6.diff ---------- nosy: +facundobatista Added file: http://bugs.python.org/file10714/rlcompleterAndDoc2.6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 22:50:13 2008 From: report at bugs.python.org (Erick Tryzelaar) Date: Mon, 23 Jun 2008 20:50:13 +0000 Subject: [issue3174] 3.0b1 doesn't seem to install on macs In-Reply-To: <1214251746.61.0.717443963899.issue3174@psf.upfronthosting.co.za> Message-ID: <1ef034530806231350v3b373cabsfbcd850953e22c1b@mail.gmail.com> Erick Tryzelaar added the comment: Hello again, I then have problems with it finding MacOS.py in the BuildApplet.py script: DYLD_FRAMEWORK_PATH=/opt/local/var/macports/build/_Users_Shared_erickt_Projects_macports_dports.git_lang_python30/work/Python-3.0b1: ../python.exe ./scripts/BuildApplet.py \ --destroot "/opt/local/var/macports/build/_Users_Shared_erickt_Projects_macports_dports.git_lang_python30/work/destroot" \ --python /opt/local/Library/Frameworks/Python.framework/Versions/3.0/Resources/Python.app/Contents/MacOS/Python \ --output "/opt/local/var/macports/build/_Users_Shared_erickt_Projects_macports_dports.git_lang_python30/work/destroot/Applications/Python 3.0/Build Applet.app" \ ./scripts/BuildApplet.py Traceback (most recent call last): File "./scripts/BuildApplet.py", line 14, in import MacOS ImportError: No module named MacOS make[1]: *** [install_BuildApplet] Error 1 make: *** [frameworkinstallapps] Error 2 On Mon, Jun 23, 2008 at 1:09 PM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > If you just remove the reference to cachesrc.py, do you still have > adverse effects? > > ---------- > nosy: +benjamin.peterson > > _______________________________________ > Python tracker > > _______________________________________ > ---------- nosy: +idadesub _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 23:26:53 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 21:26:53 +0000 Subject: [issue3174] 3.0b1 doesn't seem to install on macs In-Reply-To: <1214207562.58.0.0463418278377.issue3174@psf.upfronthosting.co.za> Message-ID: <1214256413.04.0.247094171635.issue3174@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Hmm. BuildApplet.py may have to go or some Mac modules may have to reappear. I'm adding Ronald and Brett in to see if they have any comments. Ronald, is it possible to have a Mac install w/o the BuildApplet/cachesrc scripts? ---------- assignee: -> ronaldoussoren nosy: +brett.cannon, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 23:29:16 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 21:29:16 +0000 Subject: [issue3170] test_pydoc has no way to regenerate pristine data In-Reply-To: <1214106427.35.0.304484848957.issue3170@psf.upfronthosting.co.za> Message-ID: <1214256556.4.0.966247454965.issue3170@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Actually, I was wondering if the comparison testing is even worthwhile. All it's really going to tell is if something has changed, not if it's broken. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 23:32:50 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 21:32:50 +0000 Subject: [issue3177] implement os.startfile on posix and MacOSX In-Reply-To: <1214221105.24.0.576717506983.issue3177@psf.upfronthosting.co.za> Message-ID: <1214256770.21.0.0705582877692.issue3177@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Those commands can be easily used through the subprocess module. However, if a patch is provided, it could be accepted. ---------- nosy: +benjamin.peterson priority: -> low title: os.startfile implement in posix and MacOSX -> implement os.startfile on posix and MacOSX versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 23:34:19 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 21:34:19 +0000 Subject: [issue2044] test_sunaudiodev.py converted to unittest In-Reply-To: <1202418415.34.0.91216503558.issue2044@psf.upfronthosting.co.za> Message-ID: <1214256859.69.0.777887370046.issue2044@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm a little nervous about committing anything that hasn't been tested. Can anyone on Sun test this please? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 23:37:10 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 21:37:10 +0000 Subject: [issue2042] test_audioop.py converted to unittest In-Reply-To: <1202414409.05.0.332435353831.issue2042@psf.upfronthosting.co.za> Message-ID: <1214257030.78.0.441990747849.issue2042@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This patch no longer applies cleanly. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 23:38:28 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 21:38:28 +0000 Subject: [issue2024] test_gl.py converted to unittest In-Reply-To: <1202328966.17.0.238328227675.issue2024@psf.upfronthosting.co.za> Message-ID: <1214257108.16.0.452852257456.issue2024@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Unfortunately, I can't easily test this. Can anyone else? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 23:39:20 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 21:39:20 +0000 Subject: [issue2023] test_cd converted to unittest In-Reply-To: <1202326827.71.0.0542752440376.issue2023@psf.upfronthosting.co.za> Message-ID: <1214257159.99.0.300892610356.issue2023@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Unfortunately, I can't easily test this. Can anyone else? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 23 23:39:44 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 21:39:44 +0000 Subject: [issue2022] test_al converted to unittest In-Reply-To: <1202325918.42.0.816019175645.issue2022@psf.upfronthosting.co.za> Message-ID: <1214257184.87.0.907308044739.issue2022@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Unfortunately, I can't easily test this. Can anyone else? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 00:46:24 2008 From: report at bugs.python.org (Facundo Batista) Date: Mon, 23 Jun 2008 22:46:24 +0000 Subject: [issue1567948] poplib.py list interface Message-ID: <1214261184.03.0.504328101327.issue1567948@psf.upfronthosting.co.za> Facundo Batista added the comment: 2008/6/22 Hasan Diwan : > Yea, I guess that since nothing has happened to it in the past 2 years > (as you said), it's probably a good idea to close it. Ok, closing it. Feel free to reopen if interested. Thanks! ---------- resolution: -> postponed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 01:01:56 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 23:01:56 +0000 Subject: [issue1949] test_ntpath.py converted to unittest In-Reply-To: <1201472386.07.0.26140471271.issue1949@psf.upfronthosting.co.za> Message-ID: <1214262115.93.0.966343702467.issue1949@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This patch no longer applies cleanly. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 01:06:36 2008 From: report at bugs.python.org (Chris Withers) Date: Mon, 23 Jun 2008 23:06:36 +0000 Subject: [issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header In-Reply-To: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> Message-ID: <1214262396.47.0.473911533811.issue1974@psf.upfronthosting.co.za> Chris Withers added the comment: Again, in total agreement with Andi *EXCEPT*: Please use ' ' instead of '\t' for the continuation character. It's the \t that gets mis-rendered by Outlook and Thunderbird (at the very least!) and since ' ' is also valid according to the RFC, we make life much easier for ourselves if we just stick to that... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 01:08:16 2008 From: report at bugs.python.org (Facundo Batista) Date: Mon, 23 Jun 2008 23:08:16 +0000 Subject: [issue449227] rlcompleter add "(" to callables feature Message-ID: <1214262496.94.0.789504663758.issue449227@psf.upfronthosting.co.za> Changes by Facundo Batista : ---------- assignee: -> facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 01:08:26 2008 From: report at bugs.python.org (Facundo Batista) Date: Mon, 23 Jun 2008 23:08:26 +0000 Subject: [issue3179] cPickle is seriously broken In-Reply-To: <1214232133.4.0.366608731079.issue3179@psf.upfronthosting.co.za> Message-ID: <1214262506.35.0.89503691606.issue3179@psf.upfronthosting.co.za> Changes by Facundo Batista : ---------- assignee: -> facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 01:13:42 2008 From: report at bugs.python.org (David Gladstein) Date: Mon, 23 Jun 2008 23:13:42 +0000 Subject: [issue3184] The elementtree.ElementTree Module doc is missing In-Reply-To: <1214262821.99.0.303167473736.issue3184@psf.upfronthosting.co.za> Message-ID: <1214262821.99.0.303167473736.issue3184@psf.upfronthosting.co.za> New submission from David Gladstein : The documentation from http://www.effbot.org/zone/pythondoc-elementtree-ElementTree.htm is missing. Without it the module is pretty much impossible to use, unless you know about the effbot pages. ---------- assignee: georg.brandl components: Documentation messages: 68659 nosy: georg.brandl, gladstein severity: normal status: open title: The elementtree.ElementTree Module doc is missing versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 01:41:14 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 23 Jun 2008 23:41:14 +0000 Subject: [issue3184] The elementtree.ElementTree Module doc is missing In-Reply-To: <1214262821.99.0.303167473736.issue3184@psf.upfronthosting.co.za> Message-ID: <1214264474.2.0.459653500131.issue3184@psf.upfronthosting.co.za> Benjamin Peterson added the comment: What do you mean? http://docs.python.org/lib/module-xml.etree.ElementTree.html ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 04:05:39 2008 From: report at bugs.python.org (David Gladstein) Date: Tue, 24 Jun 2008 02:05:39 +0000 Subject: [issue3184] The elementtree.ElementTree Module doc is missing In-Reply-To: <1214262821.99.0.303167473736.issue3184@psf.upfronthosting.co.za> Message-ID: <2D052E231E444C00AC46DE9E6ECC9C91@theorphanage.com> David Gladstein added the comment: an ElementTree instance holds a tree of Element instances which represents the XML tags. Element isn't documented. in the effbot version, there's a page http://www.effbot.org/zone/pythondoc-elementtree-ElementTree.htm#elementtree.ElementTree._ElementInterface-class called The elementtree.ElementTree Module with a section The _ElementInterface Class Despite the _ in the name, it's not an internal, it's the spec for the interface to the Element instances. ----- Original Message ----- From: "Benjamin Peterson" To: Sent: Monday, June 23, 2008 4:41 PM Subject: [issue3184] The elementtree.ElementTree Module doc is missing Benjamin Peterson added the comment: What do you mean? http://docs.python.org/lib/module-xml.etree.ElementTree.html ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 04:12:49 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 24 Jun 2008 02:12:49 +0000 Subject: [issue3184] The elementtree.ElementTree Module doc is missing In-Reply-To: <1214262821.99.0.303167473736.issue3184@psf.upfronthosting.co.za> Message-ID: <1214273569.28.0.960158188544.issue3184@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Ahh, but it is present in the new docs: http://docs.python.org/dev/library/xml.etree.elementtree.html#the-element-interface. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 04:15:38 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 24 Jun 2008 02:15:38 +0000 Subject: [issue3184] The elementtree.ElementTree Module doc is missing In-Reply-To: <1214262821.99.0.303167473736.issue3184@psf.upfronthosting.co.za> Message-ID: <1214273738.35.0.903264699327.issue3184@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 04:20:20 2008 From: report at bugs.python.org (David Gladstein) Date: Tue, 24 Jun 2008 02:20:20 +0000 Subject: [issue3184] The elementtree.ElementTree Module doc is missing In-Reply-To: <1214262821.99.0.303167473736.issue3184@psf.upfronthosting.co.za> Message-ID: <7587EB2FCBE847A4A1AAFFF15AF2E725@theorphanage.com> David Gladstein added the comment: Excellent. ----- Original Message ----- From: "Benjamin Peterson" To: Sent: Monday, June 23, 2008 7:12 PM Subject: [issue3184] The elementtree.ElementTree Module doc is missing Benjamin Peterson added the comment: Ahh, but it is present in the new docs: http://docs.python.org/dev/library/xml.etree.elementtree.html#the-element-interface. _______________________________________ Python tracker _______________________________________ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 04:34:23 2008 From: report at bugs.python.org (Young-Ho Cha) Date: Tue, 24 Jun 2008 02:34:23 +0000 Subject: [issue3177] implement os.startfile on posix and MacOSX In-Reply-To: <1214221105.24.0.576717506983.issue3177@psf.upfronthosting.co.za> Message-ID: <1214274863.7.0.0593990289523.issue3177@psf.upfronthosting.co.za> Young-Ho Cha added the comment: I implemented os.startfile on posix and MacOSX as you said. but it need more work to handle error. ---------- keywords: +patch Added file: http://bugs.python.org/file10715/os_startfile.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 06:33:49 2008 From: report at bugs.python.org (=?utf-8?q?Manuel_Murad=C3=A1s?=) Date: Tue, 24 Jun 2008 04:33:49 +0000 Subject: [issue449227] rlcompleter add "(" to callables feature Message-ID: <1214282029.62.0.630937471752.issue449227@psf.upfronthosting.co.za> Changes by Manuel Murad?s : Removed file: http://bugs.python.org/file10695/rlcompleter2.6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 06:34:02 2008 From: report at bugs.python.org (Andi Albrecht) Date: Tue, 24 Jun 2008 04:34:02 +0000 Subject: [issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header In-Reply-To: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> Message-ID: <1214282041.6.0.991168973019.issue1974@psf.upfronthosting.co.za> Andi Albrecht added the comment: FWIW, I've uploaded a patch to codereview: http://codereview.appspot.com/2407 It uses a space character as Chris suggested. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 07:53:04 2008 From: report at bugs.python.org (Carsten Grohmann) Date: Tue, 24 Jun 2008 05:53:04 +0000 Subject: [issue3185] Documentation of time.time() differs from source documentation In-Reply-To: <1214286784.44.0.321359332465.issue3185@psf.upfronthosting.co.za> Message-ID: <1214286784.44.0.321359332465.issue3185@psf.upfronthosting.co.za> New submission from Carsten Grohmann : The current python documentation of the time module (http://docs.python.org/lib/module-time.html) means that time.time() returns the "seconds since the epoch, in UTC". But in the current source documentation of the time module (http://svn.python.org/view/python/trunk/Modules/timemodule.c?rev=64048&view=markup) is written that "time() -- return current time in seconds since the Epoch". time.time() returns the current local unix seconds during tests on a system using Python 2.5. Please adapt the documentation. Thanks, Carsten ---------- assignee: georg.brandl components: Documentation messages: 68666 nosy: cgrohmann, georg.brandl severity: normal status: open title: Documentation of time.time() differs from source documentation versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 08:14:55 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 24 Jun 2008 06:14:55 +0000 Subject: [issue3185] Documentation of time.time() differs from source documentation In-Reply-To: <1214286784.44.0.321359332465.issue3185@psf.upfronthosting.co.za> Message-ID: <1214288094.96.0.582041711699.issue3185@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I cannot see the difference. The docstring doesn't say "current local time", it says "current time". What do you mean by "current local unix seconds" - that phrase makes no sense. time.time() returns the seoncds since the Epoch, and they must be interpreted in UTC, always. So both documentation texts are correct, and they say the same thing. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 08:51:51 2008 From: report at bugs.python.org (Carsten Grohmann) Date: Tue, 24 Jun 2008 06:51:51 +0000 Subject: [issue3185] Documentation of time.time() differs from source documentation In-Reply-To: <1214286784.44.0.321359332465.issue3185@psf.upfronthosting.co.za> Message-ID: <1214290311.64.0.968455366572.issue3185@psf.upfronthosting.co.za> Carsten Grohmann added the comment: "current local unix seconds" means seconds since the Epoch in local timezone. I've attached a small example to show that is no difference between the time returned by time.localtime() and time.time(). So I assume that time.time() also returns local time and not UTC. >>> time.mktime(time.localtime()) 1214290130.0 >>> time.time() 1214290130.697067 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 08:52:34 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Tue, 24 Jun 2008 06:52:34 +0000 Subject: [issue3179] cPickle is seriously broken In-Reply-To: <1214232133.4.0.366608731079.issue3179@psf.upfronthosting.co.za> Message-ID: <1214290353.98.0.994628099068.issue3179@psf.upfronthosting.co.za> Ralf Schmitt added the comment: the test works as expected (i.e. it fails). The problem I had was that some Bittorrent bencode also installed a test package for me. ====================================================================== ERROR: test_flat_list (__main__.cPickleFlatList) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_cpickle.py", line 113, in test_flat_list cPickle.dumps(lst) RuntimeError: maximum recursion depth exceeded ---------------------------------------------------------------------- Ran 159 tests in 0.457s FAILED (errors=1) Traceback (most recent call last): File "Lib/test/test_cpickle.py", line 128, in test_main() File "Lib/test/test_cpickle.py", line 124, in test_main cPickleFlatList, File "/home/ralf/pydev/trunk/Lib/test/test_support.py", line 714, in run_unittest _run_suite(suite) File "/home/ralf/pydev/trunk/Lib/test/test_support.py", line 697, in _run_suite raise TestFailed(err) test.test_support.TestFailed: Traceback (most recent call last): File "Lib/test/test_cpickle.py", line 113, in test_flat_list cPickle.dumps(lst) RuntimeError: maximum recursion depth exceeded _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 08:53:05 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Tue, 24 Jun 2008 06:53:05 +0000 Subject: [issue3179] cPickle is seriously broken In-Reply-To: <1214232133.4.0.366608731079.issue3179@psf.upfronthosting.co.za> Message-ID: <1214290385.93.0.948123485098.issue3179@psf.upfronthosting.co.za> Ralf Schmitt added the comment: btw. this should be a release blocker. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 09:09:40 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 24 Jun 2008 07:09:40 +0000 Subject: [issue3185] Documentation of time.time() differs from source documentation In-Reply-To: <1214286784.44.0.321359332465.issue3185@psf.upfronthosting.co.za> Message-ID: <1214291380.14.0.334283925081.issue3185@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think you are misinterpreting what you are seeing. time.mktime returns seconds since the Epoch, in UTC, when passed broken-down local time. So that the result is the same as time.time() doesn't mean that time.time() returns "local unix seconds" (there is no such thing), but it means that both time.time() and time.mktime() return seconds since the Epoch, in UTC. Closing as invalid. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 10:55:48 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 24 Jun 2008 08:55:48 +0000 Subject: [issue3186] bin(long) doesn't have a trailing 'L' In-Reply-To: <1214297748.38.0.171793356702.issue3186@psf.upfronthosting.co.za> Message-ID: <1214297748.38.0.171793356702.issue3186@psf.upfronthosting.co.za> New submission from Mark Dickinson : In Python 2.6, for a long n, hex(n) and oct(n) have a trailing 'L', while bin(n) does not: >>> hex(1L) '0x1L' >>> oct(1L) '01L' >>> bin(1L) '0b1' I'm guessing that this is intentional, and that the only reason hex(n) and oct(n) still have a trailing 'L' is backwards compatibility, but I thought I'd better check. ---------- assignee: rhettinger messages: 68672 nosy: marketdickinson, rhettinger severity: normal status: open title: bin(long) doesn't have a trailing 'L' versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 11:48:19 2008 From: report at bugs.python.org (Ari Makela) Date: Tue, 24 Jun 2008 09:48:19 +0000 Subject: [issue3181] ConfigParsers are classic classes In-Reply-To: <1214239689.68.0.615869985575.issue3181@psf.upfronthosting.co.za> Message-ID: <1214300899.07.0.948722389735.issue3181@psf.upfronthosting.co.za> Ari Makela added the comment: New-style classes make object orientated programming considerably more convenient. For example one can use property() instead of __setitem__ et al. There's super(). This is, of course, not a serious problem and one can always implement a composite class which inherits from object and has a configparser as an attribute. This would be a nice improvement and as far as I know completely safe. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 12:28:27 2008 From: report at bugs.python.org (Helmut Jarausch) Date: Tue, 24 Jun 2008 10:28:27 +0000 Subject: [issue3187] os.walk - strange bug In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> New submission from Helmut Jarausch : The script below produces 1664 lines of output before it bails out with Traceback (most recent call last): File "WalkBug.py", line 5, in for Dir, SubDirs, Files in os.walk('/home/jarausch') : File "/usr/local/lib/python3.0/os.py", line 278, in walk for x in walk(path, topdown, onerror, followlinks): File "/usr/local/lib/python3.0/os.py", line 268, in walk if isdir(join(top, name)): File "/usr/local/lib/python3.0/posixpath.py", line 64, in join if b.startswith('/'): TypeError: expected an object with the buffer interface ========================= file WalkBug.py: #!/usr/local/bin/python3.0 import os for Dir, SubDirs, Files in os.walk('/home/jarausch') : print("processing {0:d} files in {1}".format(len(Files),Dir)) ---------- components: Library (Lib) messages: 68674 nosy: HWJ severity: normal status: open title: os.walk - strange bug type: crash versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 12:47:35 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 24 Jun 2008 10:47:35 +0000 Subject: [issue3188] float('infinity') should be valid In-Reply-To: <1214304455.81.0.663476079399.issue3188@psf.upfronthosting.co.za> Message-ID: <1214304455.81.0.663476079399.issue3188@psf.upfronthosting.co.za> New submission from Mark Dickinson : 2.6 adds float('inf') and float('nan') as cross-platform ways to generate infinities and NaNs. The C99 standard (section 7.20.1.3, paragraph 3) specifies that 'infinity' (in any case, with optional preceding sign) should also be a valid input to strtod, and I propose that in Python float('infinity') should correspondingly be valid. Note that the IEEE 754 standard also states that 'inf' and 'infinity' should be valid input string representations of infinity, and Python's decimal module also allows both 'inf' and 'infinity'. A patch is attached. Unless I'm mistaken, this change is simple and unlikely to be controversial. I plan to check it in in a week or two if there's no feedback before then. ---------- assignee: marketdickinson files: infinity.patch keywords: patch messages: 68675 nosy: christian.heimes, marketdickinson severity: normal status: open title: float('infinity') should be valid type: behavior versions: Python 2.6, Python 2.7, Python 3.0 Added file: http://bugs.python.org/file10716/infinity.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 13:21:38 2008 From: report at bugs.python.org (Eric Smith) Date: Tue, 24 Jun 2008 11:21:38 +0000 Subject: [issue3140] str.format("{0:n}") poss. bug with setlocale() In-Reply-To: <1213880533.51.0.166006060243.issue3140@psf.upfronthosting.co.za> Message-ID: <1214306498.67.0.955842193395.issue3140@psf.upfronthosting.co.za> Eric Smith added the comment: Fixed in r64499 (trunk) and r64500 (py3k). I now get: >>> import locale >>> locale.setlocale(locale.LC_ALL, "en_US.UTF-8") 'en_US.UTF-8' >>> for x in (123,1234,12345,123456,1234567,12345678,123456789,1234567890,12345678900): ... print("[{0:>20n}]".format(x)) ... [ 123] [ 1,234] [ 12,345] [ 123,456] [ 1,234,567] [ 12,345,678] [ 123,456,789] [ 1,234,567,890] [ 12,345,678,900] and: >>> for x in (123,1234,12345,123456,1234567,12345678,123456789,1234567890,12345678900): ... print("[{0:>10n}]".format(x)) ... [ 123] [ 1,234] [ 12,345] [ 123,456] [ 1,234,567] [12,345,678] [123,456,789] [1,234,567,890] [12,345,678,900] ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 13:36:12 2008 From: report at bugs.python.org (Virgil Dupras) Date: Tue, 24 Jun 2008 11:36:12 +0000 Subject: [issue3189] Py3k DeprecationWarning in difflib In-Reply-To: <1214307372.86.0.564003200617.issue3189@psf.upfronthosting.co.za> Message-ID: <1214307372.86.0.564003200617.issue3189@psf.upfronthosting.co.za> New submission from Virgil Dupras : When running with the -3 flag, difflib creates DeprecationWarnings. I attach a patch fixing them. There was a note in the code saying "DOES NOT WORK for x in a". However, after my changes, tests still pass, so I removed these notices. If someone knows what this was all about, let me know. ---------- components: Library (Lib) files: difflib_py3k_deprecation.diff keywords: patch messages: 68677 nosy: vdupras severity: normal status: open title: Py3k DeprecationWarning in difflib type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file10717/difflib_py3k_deprecation.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 13:42:46 2008 From: report at bugs.python.org (Virgil Dupras) Date: Tue, 24 Jun 2008 11:42:46 +0000 Subject: [issue3189] Py3k DeprecationWarning in difflib In-Reply-To: <1214307372.86.0.564003200617.issue3189@psf.upfronthosting.co.za> Message-ID: <1214307766.77.0.913872050942.issue3189@psf.upfronthosting.co.za> Virgil Dupras added the comment: It slipped out of my mind that performance was probably important for this module, so I ditched that nested get call and went if an if..else. Added file: http://bugs.python.org/file10718/difflib_py3k_deprecation2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 13:45:35 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 24 Jun 2008 11:45:35 +0000 Subject: [issue3187] os.walk - strange bug In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1214307935.15.0.246233216752.issue3187@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Could you tell us what this 1665th line should be? Maybe the 1665th directory has something special (a filename with spaces or non-ascii chars...) Can you try with an older version of python? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 13:52:19 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 24 Jun 2008 11:52:19 +0000 Subject: [issue3177] implement os.startfile on posix and MacOSX In-Reply-To: <1214221105.24.0.576717506983.issue3177@psf.upfronthosting.co.za> Message-ID: <1214308339.19.0.122644964991.issue3177@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 14:06:52 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 24 Jun 2008 12:06:52 +0000 Subject: [issue3139] bytearrays are not thread safe In-Reply-To: <1213870014.47.0.920261148604.issue3139@psf.upfronthosting.co.za> Message-ID: <1214309212.17.0.7990902967.issue3139@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- title: print is not thread safe -> bytearrays are not thread safe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 14:08:37 2008 From: report at bugs.python.org (Eric Smith) Date: Tue, 24 Jun 2008 12:08:37 +0000 Subject: [issue3186] bin(long) doesn't have a trailing 'L' In-Reply-To: <1214297748.38.0.171793356702.issue3186@psf.upfronthosting.co.za> Message-ID: <1214309317.32.0.550648067335.issue3186@psf.upfronthosting.co.za> Eric Smith added the comment: See http://mail.python.org/pipermail/python-dev/2008-February/077062.html, where Guido endorses my approach to implementing bin() without the trailing L for longs. Note that he also agrees with not adding a __bin__ function, which was implemented in r64424. I disagree with adding __bin__ to 2.6. ---------- components: +Interpreter Core nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 14:17:48 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 24 Jun 2008 12:17:48 +0000 Subject: [issue3186] bin(long) doesn't have a trailing 'L' In-Reply-To: <1214297748.38.0.171793356702.issue3186@psf.upfronthosting.co.za> Message-ID: <1214309868.65.0.376950067955.issue3186@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ah. I missed this. Apologies. Sorry for the noise. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 14:18:44 2008 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 24 Jun 2008 12:18:44 +0000 Subject: [issue3190] Pydoc should ignore __package__ attributes In-Reply-To: <1214309924.87.0.972230589947.issue3190@psf.upfronthosting.co.za> Message-ID: <1214309924.87.0.972230589947.issue3190@psf.upfronthosting.co.za> New submission from Nick Coghlan : Pydoc doesn't display the standard special attributes for packages and modules (__name__, __file__, __path__). It shouldn't display PEP 361's new __package__ attribute either. ---------- assignee: ncoghlan components: Library (Lib) messages: 68682 nosy: ncoghlan priority: normal severity: normal status: open title: Pydoc should ignore __package__ attributes type: behavior versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 14:52:10 2008 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 24 Jun 2008 12:52:10 +0000 Subject: [issue1284316] Win32: Security problem with default installation directory Message-ID: <1214311930.15.0.710734380321.issue1284316@psf.upfronthosting.co.za> Jason R. Coombs added the comment: +1 on using "Program Files" by default. In addition to the points mentioned above, there are other considerations. In 64-bit platforms (Windows XP x64 and Vista 64-bit), programs are segmented by their binary compatibility (C:\Program Files and C:\Program Files (x86)). Installing Python to the proper program directory helps keep it organized as to it's binary compatibility. Additionally, I often run several version of Python side-by-side, and having these clutter my root directory is simply unacceptable. I've been running Python from C:\Program Files for years, and I have encountered problems, even including the recent setuptools bug, but for the most part, these issues have been worked out. I add C:\Program Files\Python and c:\Program Files\Python\Scripts to my path, and things work well. I would think that since only a few issues remain, if Python is moved to the standard location, any remaining issues can be ironed out. ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 15:02:57 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 24 Jun 2008 13:02:57 +0000 Subject: [issue3187] os.walk - strange bug In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1214312577.0.0.989045169107.issue3187@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It's failing because he's giving a string to bytes.startswith when it requires a byte string or such. ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 15:12:53 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 24 Jun 2008 13:12:53 +0000 Subject: [issue3187] os.walk - strange bug In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1214313172.96.0.872229305458.issue3187@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: "he's giving a string"... the user simply called os.walk, which accepts strings AFAIK. We should discover what produced this bytestring. Does listdir() returns a mixed list of strings and bytes? ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 15:21:05 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 24 Jun 2008 13:21:05 +0000 Subject: [issue3187] os.walk - strange bug In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1214313665.58.0.247030602814.issue3187@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It seems the conversion to unicode strings (PyUnicode vs PyBytes) was not complete in os.listdir. See the attached patch. ---------- keywords: +patch Added file: http://bugs.python.org/file10719/oslistdir_string.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 15:21:17 2008 From: report at bugs.python.org (=?utf-8?q?=CE=A7=CF=81=CE=AE=CF=83=CF=84=CE=BF=CF=82_=CE=93=CE=B5=CF=89=CF=81=CE=B3=CE=AF=CE=BF=CF=85_(Christos_Georgiou)?=) Date: Tue, 24 Jun 2008 13:21:17 +0000 Subject: [issue2459] speedup for / while / if with better bytecode In-Reply-To: <1206224909.42.0.227263347483.issue2459@psf.upfronthosting.co.za> Message-ID: <1214313677.06.0.898006232128.issue2459@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: A pointer to previous (minor) research: http://groups.google.com/group/comp.lang.python/browse_frm/thread/72505e3cb6d9cb1a/e486759f06ec4ee5 esp. after Terry Reedy's post ---------- nosy: +tzot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 15:37:49 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 24 Jun 2008 13:37:49 +0000 Subject: [issue3187] os.walk - strange bug In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1214314669.02.0.290468719866.issue3187@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The original problem seems to come from some Unix platform, but this patch only handles two cases: - on win32, when the argument is a bytestring. - on OS/2. And in both cases, the default (utf-8) conversion seems wrong. Something like cp1252 (the ANSI code page for Western Windows) would be more sensible. In the posix part of the function, there is the comment (2003-03-04): /* fall back to the original byte string, as discussed in patch #683592 */ btw, I find the penultimate message of this other thread very pleasant, in the py3k context... I suppose the conclusions would not be the same today. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 15:45:21 2008 From: report at bugs.python.org (Roger Demetrescu) Date: Tue, 24 Jun 2008 13:45:21 +0000 Subject: [issue3143] development docs waste a lot of horizontal space on left nav bar In-Reply-To: <1213894130.5.0.901866798504.issue3143@psf.upfronthosting.co.za> Message-ID: <1214315121.03.0.0358343872124.issue3143@psf.upfronthosting.co.za> Changes by Roger Demetrescu : ---------- nosy: +rdemetrescu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 16:09:34 2008 From: report at bugs.python.org (Helmut Jarausch) Date: Tue, 24 Jun 2008 14:09:34 +0000 Subject: [issue3187] os.walk - strange bug In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1214316574.85.0.748653269957.issue3187@psf.upfronthosting.co.za> Helmut Jarausch added the comment: >> Could you tell us what this 1665th line should be? >> Maybe the 1665th directory has something special (a filename with >> >> spaces or non-ascii chars...) Yes, the next directory contains a filename with an iso-latin1 but non- ascii character >> Can you try with an older version of python? No problems - runs every night here The patch (applied to SVN GMT 13:30) does NOT help. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 17:03:38 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 24 Jun 2008 15:03:38 +0000 Subject: [issue3191] round docstring is inaccurate In-Reply-To: <1214319817.88.0.0731467937099.issue3191@psf.upfronthosting.co.za> Message-ID: <1214319817.88.0.0731467937099.issue3191@psf.upfronthosting.co.za> New submission from Mark Dickinson : In Python 3.0, help(round) gives the following: round(...) round(number[, ndigits]) -> floating point number Round a number to a given precision in decimal digits (default 0 digits). This returns an int when called with one argument, otherwise a float. Precision may be negative. But in Python 3.x, round(x, n) doesn't always return a float; for example, if x is a Decimal or Fraction then round(x, 2) is again a Decimal or Fraction (respectively). ---------- assignee: georg.brandl components: Documentation messages: 68690 nosy: georg.brandl, marketdickinson severity: normal status: open title: round docstring is inaccurate versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 17:47:18 2008 From: report at bugs.python.org (Jean Brouwers) Date: Tue, 24 Jun 2008 15:47:18 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1214322438.81.0.697639565369.issue2813@psf.upfronthosting.co.za> Jean Brouwers added the comment: Here is another patch for PyString_FromFormat* adding support for 'l' and 'z' type specifications for the '%x' format and an optional '#' to prepend '0x' to the hex result. In addition, the '%p' format is handled as '%#x'. Updates for the c-api tests and the documentation for exceptions and string are also included in the patch. Like before, the patch is a forward delta to the files of Python 2.6b1. Added file: http://bugs.python.org/file10720/stringobject_format_xLf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 17:54:33 2008 From: report at bugs.python.org (Collin Winter) Date: Tue, 24 Jun 2008 15:54:33 +0000 Subject: [issue3182] 2to3 Slight Patch In-Reply-To: <1214241944.19.0.631532213789.issue3182@psf.upfronthosting.co.za> Message-ID: <1214322873.35.0.212217055975.issue3182@psf.upfronthosting.co.za> Collin Winter added the comment: I'm not wild about making this change for such a minimal improvement (which I would guess falls within the margin of error), since it will limit extensibility and testability. I think I'd be fine with it if the benefit were >10%, but 3% doesn't sound significant enough. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 17:59:10 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 24 Jun 2008 15:59:10 +0000 Subject: [issue3189] Py3k DeprecationWarning in difflib In-Reply-To: <1214307372.86.0.564003200617.issue3189@psf.upfronthosting.co.za> Message-ID: <1214323150.81.0.822505312868.issue3189@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Applying a minimal version of this patch -- changing has_key() to __contains__(). See r64511. ---------- nosy: +rhettinger resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 18:11:18 2008 From: report at bugs.python.org (Nick Edds) Date: Tue, 24 Jun 2008 16:11:18 +0000 Subject: [issue3182] 2to3 Slight Patch In-Reply-To: <1214241944.19.0.631532213789.issue3182@psf.upfronthosting.co.za> Message-ID: <1214323878.65.0.235530893068.issue3182@psf.upfronthosting.co.za> Nick Edds added the comment: I don't think the improvement falls in margin of error, but maybe I'm wrong. The problem was that even when just run on a single file, isinstance was being called upwards of 100,000 times. I guess it doesn't merit inclusion on its own though, but with other things I'm working on, I think it makes sense. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 19:35:41 2008 From: report at bugs.python.org (Roman Suzi) Date: Tue, 24 Jun 2008 17:35:41 +0000 Subject: [issue449227] rlcompleter add "(" to callables feature Message-ID: <1214328941.73.0.0412815782065.issue449227@psf.upfronthosting.co.za> Roman Suzi added the comment: Thanks for the patch! However, I do not understand if it ever gets included into Python or remains always for those who find it? (I do not believe this small change is somehow PEPable, but how it gets included then?) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 19:56:30 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 24 Jun 2008 17:56:30 +0000 Subject: [issue449227] rlcompleter add "(" to callables feature Message-ID: <1214330190.76.0.163338342726.issue449227@psf.upfronthosting.co.za> Guilherme Polo added the comment: This is nearly good. But I have some notes: you don't need to import operator here, just use the built-in callable; stick to <80 columns; leave a space after a comma. ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 20:42:44 2008 From: report at bugs.python.org (=?utf-8?q?Manuel_Murad=C3=A1s?=) Date: Tue, 24 Jun 2008 18:42:44 +0000 Subject: [issue449227] rlcompleter add "(" to callables feature Message-ID: <1214332964.81.0.707086650675.issue449227@psf.upfronthosting.co.za> Manuel Murad?s added the comment: Guilherme, Thanks a lot for taking some time to review my patch. Here is a new version. Please take another look and tell me what do you think about it. Thanks again Added file: http://bugs.python.org/file10721/rlcompleter2.6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 20:43:07 2008 From: report at bugs.python.org (=?utf-8?q?Manuel_Murad=C3=A1s?=) Date: Tue, 24 Jun 2008 18:43:07 +0000 Subject: [issue449227] rlcompleter add "(" to callables feature Message-ID: <1214332987.83.0.305549787401.issue449227@psf.upfronthosting.co.za> Changes by Manuel Murad?s : Removed file: http://bugs.python.org/file10714/rlcompleterAndDoc2.6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 20:53:08 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 24 Jun 2008 18:53:08 +0000 Subject: [issue449227] rlcompleter add "(" to callables feature In-Reply-To: <1214332964.81.0.707086650675.issue449227@psf.upfronthosting.co.za> Message-ID: Guilherme Polo added the comment: On Tue, Jun 24, 2008 at 3:42 PM, Manuel Murad?s wrote: > > Manuel Murad?s added the comment: > > Guilherme, > Thanks a lot for taking some time to review my patch. > Here is a new version. > > Please take another look and tell me what do you think about it. > Thanks again That is good to be applied now. > > Added file: http://bugs.python.org/file10721/rlcompleter2.6.diff > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 22:17:24 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 24 Jun 2008 20:17:24 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214238316.3.0.968011421001.issue3167@psf.upfronthosting.co.za> Message-ID: <5c6f2a5d0806241317r23103815q669e2b69789af6c6@mail.gmail.com> Mark Dickinson added the comment: On Mon, Jun 23, 2008 at 5:25 PM, Jean Brouwers wrote: > result is different for 32- and 64-bit > > > cc -xtarget=native log_inf.c -lm ; a.out > -Inf 33 > Inf 33 > That 33 for the second log call may just be the propagated errno value from the first call. Could you try setting errno = 0 before each of the printf calls? I'd expect that log(HUGE_VAL) doesn't set errno at all. Mark Added file: http://bugs.python.org/file10722/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Tue Jun 24 22:18:06 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 24 Jun 2008 20:18:06 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214338686.58.0.858617546679.issue3167@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file10722/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 22:45:47 2008 From: report at bugs.python.org (Mike Speciner) Date: Tue, 24 Jun 2008 20:45:47 +0000 Subject: [issue3192] exec(open(filename)) doesn't work In-Reply-To: <1214340347.28.0.744958218652.issue3192@psf.upfronthosting.co.za> Message-ID: <1214340347.28.0.744958218652.issue3192@psf.upfronthosting.co.za> New submission from Mike Speciner : In 2.5, exec(open(filename)), where filename refers to a file with python code, executes the code. In 2.5, open returns an open file, but in 3.0, open returns a stream, and so exec (which wants "a string, file, or code object, not TextIOWrapper") returns an error. exec should probably be able to handle a stream. ---------- components: Interpreter Core messages: 68700 nosy: ms severity: normal status: open title: exec(open(filename)) doesn't work type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 24 23:00:51 2008 From: report at bugs.python.org (Leif Walsh) Date: Tue, 24 Jun 2008 21:00:51 +0000 Subject: [issue3192] exec(open(filename)) doesn't work In-Reply-To: <1214340347.28.0.744958218652.issue3192@psf.upfronthosting.co.za> Message-ID: <1214341251.83.0.242621270819.issue3192@psf.upfronthosting.co.za> Leif Walsh added the comment: There's 'execfile' in Lib/idlelib/PyShell.py...I'm looking for others. There is also a class of functions 'exec*' (and a related class, 'spawn*') in Lib/os.py that claims to do just what you want, but replacing the current process (or, in spawn*'s case, in a new thread). That said, I agree that exec should handle streams, and if you could give me a heads up as to where the code is for exec(), I could try my hand at a patch. ---------- nosy: +leif.walsh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 00:05:44 2008 From: report at bugs.python.org (Mike Speciner) Date: Tue, 24 Jun 2008 22:05:44 +0000 Subject: [issue3192] exec(open(filename)) doesn't work In-Reply-To: <1214341251.83.0.242621270819.issue3192@psf.upfronthosting.co.za> Message-ID: <102AF37FC3CE794DB52B45646265EC960244C795@CORPUSMX30B.corp.emc.com> Mike Speciner added the comment: I'm actually quite new to Python. My current interpreter of choice is PostScript, followed by Matlab, but I've been discouraged from using either one here at EMC. (PostScript because it's obscure, Matlab because it's expensive!) Meanwhile, I'm on a wintel machine, making perusing the Python source tree difficult. So I'm not going to be much help in that regard. By the way, I was told that execfile is gone from python 3. --ms _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 00:08:37 2008 From: report at bugs.python.org (Leif Walsh) Date: Tue, 24 Jun 2008 22:08:37 +0000 Subject: [issue3192] exec(open(filename)) doesn't work In-Reply-To: <102AF37FC3CE794DB52B45646265EC960244C795@CORPUSMX30B.corp.emc.com> Message-ID: Leif Walsh added the comment: On Tue, Jun 24, 2008 at 3:05 PM, Mike Speciner wrote: > By the way, I was told that execfile is gone from python 3. It certainly isn't in the branch I just checked out. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 00:09:19 2008 From: report at bugs.python.org (Leif Walsh) Date: Tue, 24 Jun 2008 22:09:19 +0000 Subject: [issue3192] exec(open(filename)) doesn't work In-Reply-To: Message-ID: Leif Walsh added the comment: (isn't gone, that is) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 00:34:00 2008 From: report at bugs.python.org (Mike Speciner) Date: Tue, 24 Jun 2008 22:34:00 +0000 Subject: [issue3192] exec(open(filename)) doesn't work In-Reply-To: Message-ID: <102AF37FC3CE794DB52B45646265EC960244C7B4@CORPUSMX30B.corp.emc.com> Mike Speciner added the comment: Well, I think I found exec in bltinmodule.c, but execfile isn't in that file. [In the 3.0 tree.] _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 00:37:05 2008 From: report at bugs.python.org (Jean Brouwers) Date: Tue, 24 Jun 2008 22:37:05 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <5c6f2a5d0806241317r23103815q669e2b69789af6c6@mail.gmail.com> Message-ID: <39a48f50806241537h6dfb2a0fh57ad8e798cfc5b58@mail.gmail.com> Jean Brouwers added the comment: Right on! With errno = 0; in between both calls: -Inf 33 Inf 0 /Jean On Tue, Jun 24, 2008 at 1:17 PM, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > On Mon, Jun 23, 2008 at 5:25 PM, Jean Brouwers > wrote: > >> result is different for 32- and 64-bit >> >> > cc -xtarget=native log_inf.c -lm ; a.out >> -Inf 33 >> Inf 33 >> > > That 33 for the second log call may just be the propagated errno value > from the first call. Could you try setting errno = 0 before each of the > printf > calls? I'd expect that log(HUGE_VAL) doesn't set errno at all. > > Mark > > Added file: http://bugs.python.org/file10722/unnamed > > _______________________________________ > Python tracker > > _______________________________________ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 00:46:46 2008 From: report at bugs.python.org (Jean Brouwers) Date: Tue, 24 Jun 2008 22:46:46 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <39a48f50806241537h6dfb2a0fh57ad8e798cfc5b58@mail.gmail.com> Message-ID: <39a48f50806241546l16ea2d7dhc56b256109da0e06@mail.gmail.com> Jean Brouwers added the comment: Mark, Take a look at the SUN forum, there is a (long) answer. /Jean On Tue, Jun 24, 2008 at 3:37 PM, Jean Brouwers wrote: > > Jean Brouwers added the comment: > > Right on! With errno = 0; in between both calls: > > -Inf 33 > Inf 0 > > /Jean > > On Tue, Jun 24, 2008 at 1:17 PM, Mark Dickinson wrote: >> >> Mark Dickinson added the comment: >> >> On Mon, Jun 23, 2008 at 5:25 PM, Jean Brouwers >> wrote: >> >>> result is different for 32- and 64-bit >>> >>> > cc -xtarget=native log_inf.c -lm ; a.out >>> -Inf 33 >>> Inf 33 >>> >> >> That 33 for the second log call may just be the propagated errno value >> from the first call. Could you try setting errno = 0 before each of the >> printf >> calls? I'd expect that log(HUGE_VAL) doesn't set errno at all. >> >> Mark >> >> Added file: http://bugs.python.org/file10722/unnamed >> >> _______________________________________ >> Python tracker >> >> _______________________________________ > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 00:56:25 2008 From: report at bugs.python.org (Leif Walsh) Date: Tue, 24 Jun 2008 22:56:25 +0000 Subject: [issue3192] exec(open(filename)) doesn't work In-Reply-To: <102AF37FC3CE794DB52B45646265EC960244C7B4@CORPUSMX30B.corp.emc.com> Message-ID: Leif Walsh added the comment: execfile is in Lib/idlelib/PyShell.py, and is an instance function, so it's not really standard for regular code, and would also be hard to use correctly. Sorry. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 01:12:07 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 24 Jun 2008 23:12:07 +0000 Subject: [issue1394] simple patch, improving unreachable bytecode removing In-Reply-To: <1194300541.67.0.109986222934.issue1394@psf.upfronthosting.co.za> Message-ID: <1214349127.02.0.590666396615.issue1394@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Recommend rejecting. Too much work for zero performance payoff. ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 01:20:58 2008 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 24 Jun 2008 23:20:58 +0000 Subject: [issue1394] simple patch, improving unreachable bytecode removing In-Reply-To: <1194300541.67.0.109986222934.issue1394@psf.upfronthosting.co.za> Message-ID: <1214349657.98.0.372650740012.issue1394@psf.upfronthosting.co.za> Guido van Rossum added the comment: Rejecting. Too much risk as well, based on experience in the past with supposedly harmless optimizations. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 01:44:24 2008 From: report at bugs.python.org (Peter Dilley) Date: Tue, 24 Jun 2008 23:44:24 +0000 Subject: [issue3193] Python 2.5.2 - Python[2420:613] Error loading / flat namespace error In-Reply-To: <1214351063.94.0.70881873047.issue3193@psf.upfronthosting.co.za> Message-ID: <1214351063.94.0.70881873047.issue3193@psf.upfronthosting.co.za> New submission from Peter Dilley : I have noticed a new crash when using pyglet module after installing the latest Apple security patch/framework for Quicktime, Quicktime Framework 7.5.0. This error is repeatable. This error occurs when the opened window is selected/made active with the mouse pointer. This error occured when using OpenGL. Session below: Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from pyglet.gl import * >>> window = pyglet.window.Window() >>> @window.event ... def on_draw(): ... glClear(GL_COLOR_BUFFER_BIT) ... glLoadIdentity() ... glBegin(GL_TRIANGLES) ... glVertex2f(0, 0) ... glVertex2f(window.width, 0) ... glVertex2f(window.width, window.height) ... glEnd() ... >>> pyglet.app.run() 2008-06-24 20:14:06.232 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.239 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.245 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.249 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.256 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.262 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.268 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.274 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.302 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.308 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.380 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.387 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.394 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.400 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.407 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.413 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.433 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.449 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.456 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.561 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.568 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.575 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.583 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace 2008-06-24 20:14:06.589 Python[2420:613] Error loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder: dlopen(/Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not found: _GetDataHandler Referenced from: /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder Expected in: flat namespace ---------- components: None files: Pyglet 1.1 Beta 2 GL crash after selecting window making active.rtf messages: 68711 nosy: peterdilley severity: normal status: open title: Python 2.5.2 - Python[2420:613] Error loading / flat namespace error type: crash versions: Python 2.5 Added file: http://bugs.python.org/file10723/Pyglet 1.1 Beta 2 GL crash after selecting window making active.rtf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 01:56:15 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 24 Jun 2008 23:56:15 +0000 Subject: [issue3193] Python 2.5.2 - Python[2420:613] Error loading / flat namespace error In-Reply-To: <1214351063.94.0.70881873047.issue3193@psf.upfronthosting.co.za> Message-ID: <1214351775.57.0.00629608076024.issue3193@psf.upfronthosting.co.za> Guilherme Polo added the comment: Neither pyglet nor anything else you installed is part of Python's source, you will have to re-report this at the appropriate place. ---------- nosy: +gpolo resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 02:13:28 2008 From: report at bugs.python.org (Peter Dilley) Date: Wed, 25 Jun 2008 00:13:28 +0000 Subject: [issue3193] Python 2.5.2 - Python In-Reply-To: <1214351775.57.0.00629608076024.issue3193@psf.upfronthosting.co.za> Message-ID: <9362d0f60806241713l6377e6cawfd44e4b72d8637a4@mail.gmail.com> Peter Dilley added the comment: Done at pyglet, Thanks for the update, my first Python error like that, could not determine where the issue was stemming from. My worry was the latest security patching from Apple introduced this bug with the Mac version of Python.org's implementation. Cheers, Peter 2008/6/25 Guilherme Polo : > > Guilherme Polo added the comment: > > Neither pyglet nor anything else you installed is part of Python's > source, you will have to re-report this at the appropriate place. > > ---------- > nosy: +gpolo > resolution: -> invalid > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- title: Python 2.5.2 - Python[2420:613] Error loading / flat namespace error -> Python 2.5.2 - Python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 03:24:13 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 25 Jun 2008 01:24:13 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1214357053.04.0.036374564149.issue3008@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Re-opening for further discussion. -1 on Nick's suggestion to normalize hex output so that nearby floats have nearby reprs. This unnecessarily complicates a simple, straight- forward presentation. In the paper referenced by Terry Reedy, normalized presentations were not used and I've never seen that done anywhere else. IMO, the patch is fine as-is. ---------- status: closed -> open Added file: http://bugs.python.org/file10724/float6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 03:25:30 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 25 Jun 2008 01:25:30 +0000 Subject: [issue3008] Let bin/oct/hex show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1214357130.17.0.355333881271.issue3008@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> gvanrossum nosy: +gvanrossum title: Let bin() show floats -> Let bin/oct/hex show floats _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 04:32:48 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 25 Jun 2008 02:32:48 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1214361168.7.0.87032339994.issue3187@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- title: os.walk - strange bug -> os.listdir can return byte strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 05:25:26 2008 From: report at bugs.python.org (Rafael Zanella) Date: Wed, 25 Jun 2008 03:25:26 +0000 Subject: [issue3194] Demo/loop.c passing "char *" instead of "wchar_t *" In-Reply-To: <1214364326.35.0.217778159942.issue3194@psf.upfronthosting.co.za> Message-ID: <1214364326.35.0.217778159942.issue3194@psf.upfronthosting.co.za> New submission from Rafael Zanella : The Demo/loop.c passes a char pointer (argv[0]) while Py_SetProgramName() now expects a wchar_t pointer. I've attached a patch, the solution on the patch was borrowed, ok stolen, from Python/frozenmain.c ---------- files: loop_c.diff keywords: patch messages: 68715 nosy: zanella severity: normal status: open title: Demo/loop.c passing "char *" instead of "wchar_t *" type: crash versions: Python 3.0 Added file: http://bugs.python.org/file10725/loop_c.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 07:03:31 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 25 Jun 2008 05:03:31 +0000 Subject: [issue3008] Let bin/oct/hex show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1214370211.0.0.140187017986.issue3008@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Updating patch so that the global symbol starts with _Py. Added file: http://bugs.python.org/file10726/float7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 09:57:40 2008 From: report at bugs.python.org (daniel.weyh) Date: Wed, 25 Jun 2008 07:57:40 +0000 Subject: [issue1524] os.system() fails for commands with multiple quoted file names In-Reply-To: <1196367416.9.0.40290581495.issue1524@psf.upfronthosting.co.za> Message-ID: <1214380660.54.0.719781470718.issue1524@psf.upfronthosting.co.za> daniel.weyh added the comment: Got similiar problem. Think it's a thing with the pipe '>'. Try calling the windows-shell (e.g. C:\WINDOWS\system32\cmd.exe) with '/C' and your comman dline after that (in quotes). > subprocess.call(r'C:\WINDOWS\system32\cmd.exe /C "YourCommand > YourOutput"') For me it works when there are now newlines in YourCommand and YourOutput. ---------- nosy: +d4rk1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 10:30:13 2008 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 25 Jun 2008 08:30:13 +0000 Subject: [issue3008] Let bin/oct/hex show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1214382612.93.0.595214141431.issue3008@psf.upfronthosting.co.za> Mark Dickinson added the comment: > -1 on Nick's suggestion to normalize hex output so that nearby floats > have nearby reprs. This unnecessarily complicates a simple, straight- > forward presentation. In the paper referenced by Terry Reedy, > normalized presentations were not used As far as I can tell, that paper *does* use normalized presentations: with the exception of subnormals and zeros, all hex floats have a leading digit of 1. This is the same normalization that Java's toHexString uses, and that C's printf %a format modifier uses on all machines that I've tested (though the C standards don't seem to lay down the law on this). I think this is helpful. For example, on the first page of section 4.1 of the paper Terry Reedy references, the author gives two different results produced by running the same sin() computation on different systems. The results are: -0x1.95b011554d4b5p-1 and -0x1.95b0115490ca6p-1. Looking at these results, it's readily apparent that the error is somewhat less than 1000 ulps. But the current hex() output for these two numbers is: '-0x195b011554d4b5 * 2.0 ** -53' and '-0xcad808aa48653 * 2.0 ** -52' It's much less clear that these numbers are close, or how close they are. I guess I just have a feeling that changes to the least significant bits of a number shouldn't produce big changes in its representation. > and I've never seen that done anywhere else. I'm not sure I've ever seen this *not* done anywhere else. P.S. You should blame me for the normalization comment, not Nick. :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 11:05:54 2008 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 25 Jun 2008 09:05:54 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214384754.77.0.24413070303.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: Nice reply from zal. His conclusion: > The short answer to your question is to use the cc -xlibmieee > option (and not rely on errno in the case of log(-Inf)) if you > would like to see results in the spirit of IEEE 754. It sounds like using the -xlibmieee flag is the way to go. (math_1 is already doing an excellent job of not relying on errno). Could you try compiling with this flag to see whether it fixes the problem? (Opening up the 'configure' file and adding the flag to BASECFLAGS might be the easiest way to do this; there may be easier ways.) If it does, I'll cook up a configure patch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 11:09:16 2008 From: report at bugs.python.org (Pavel Strashkin) Date: Wed, 25 Jun 2008 09:09:16 +0000 Subject: [issue3195] invalid conversion xml.etree.ElementTree.Element object to boolean In-Reply-To: <1214384956.08.0.408285823661.issue3195@psf.upfronthosting.co.za> Message-ID: <1214384956.08.0.408285823661.issue3195@psf.upfronthosting.co.za> New submission from Pavel Strashkin : Python 2.5.2 (r252:60911, May 7 2008, 15:19:09) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from xml.etree.ElementTree import Element >>> e = Element('Test', {'attr' : 'value'}) >>> b = not e >>> print b True Why i'm getting True here instead of False? Because of this i can not do: if not e: # here some logic pass ---------- components: XML messages: 68720 nosy: xaka severity: normal status: open title: invalid conversion xml.etree.ElementTree.Element object to boolean versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 11:30:02 2008 From: report at bugs.python.org (Andrii V. Mishkovskyi) Date: Wed, 25 Jun 2008 09:30:02 +0000 Subject: [issue3195] invalid conversion xml.etree.ElementTree.Element object to boolean In-Reply-To: <1214384956.08.0.408285823661.issue3195@psf.upfronthosting.co.za> Message-ID: <1214386202.79.0.368471797431.issue3195@psf.upfronthosting.co.za> Andrii V. Mishkovskyi added the comment: To quote Python Library Reference, paragraph 3.1: """Any object can be tested for truth value, for use in an if or while condition or as operand of the Boolean operations below. The following values are considered false: [skipped] - instances of user-defined classes, if the class defines a __nonzero__() or __len__() method, when that method returns the integer zero or bool value False. """ And back to python console: In [112]: from xml.etree.ElementTree import Element In [113]: e = Element('foo', {'key': 'value'}) In [114]: len(e) Out[114]: 0 In [115]: not e Out[115]: True This is because Element is just a container and acts more like a list. So, if you actually append items to this list-like structure, you'll get this: In [116]: e.append(Element('bar', {42: 1337})) In [117]: e.append(Element('baz', {'whatever': 'wherever'})) In [118]: len(e) Out[118]: 2 In [119]: not e Out[119]: False In conclusion, this just doesn't look like a bug to me. You could try using "if e is not None" form. ---------- nosy: +mishok13 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 11:32:35 2008 From: report at bugs.python.org (Morten Lied Johansen) Date: Wed, 25 Jun 2008 09:32:35 +0000 Subject: [issue3196] Option in pydoc to show docs from private methods In-Reply-To: <1214386355.64.0.670337337662.issue3196@psf.upfronthosting.co.za> Message-ID: <1214386355.64.0.670337337662.issue3196@psf.upfronthosting.co.za> New submission from Morten Lied Johansen : Currently, running pydoc on a module will show you the documentation on all regular methods, and all special methods (starting and ending in double underscores). Private methods (starting with a single underscore) are not included. Some times, it would be nice to include docs for these methods aswell, and a small change to pydoc.visiblename solves the problem. I've included a patch that adds this behaviour as an option (-i for include private names). The implementation isn't as clean as one would hope for (sets a global flag), but was the best I could come up with in the short time I had available. Feel free to make a better implementation. The patch is against python 2.5. ---------- components: Library (Lib) files: pydoc.privatenames.patch keywords: patch messages: 68722 nosy: mortenlj severity: normal status: open title: Option in pydoc to show docs from private methods type: feature request versions: Python 2.5 Added file: http://bugs.python.org/file10727/pydoc.privatenames.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 12:22:59 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 25 Jun 2008 10:22:59 +0000 Subject: [issue3195] invalid conversion xml.etree.ElementTree.Element object to boolean In-Reply-To: <1214384956.08.0.408285823661.issue3195@psf.upfronthosting.co.za> Message-ID: <1214389379.1.0.758865425692.issue3195@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed, this is not a bug, although it can be misleading. Generally, if you test for None, it is better to write "if x is None", it is at the same time more accurate, more explicit for someone reading your code, and also executes faster than "if not x". ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 13:22:37 2008 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 25 Jun 2008 11:22:37 +0000 Subject: [issue3197] Documentation for fractions module needs work In-Reply-To: <1214392956.96.0.593199677678.issue3197@psf.upfronthosting.co.za> Message-ID: <1214392956.96.0.593199677678.issue3197@psf.upfronthosting.co.za> New submission from Mark Dickinson : The documentation for the fractions module needs some rewriting---it contains minor inaccuracies, outdated statements (e.g. the regex is incomplete), and there are places that could use some clarification (e.g. the description of __round__). I plan to take care of this in the next few days, unless anyone else wants to have a look. I'm making an issue of it so that it doesn't get forgotten. ---------- assignee: marketdickinson components: Documentation messages: 68724 nosy: jyasskin, marketdickinson priority: normal severity: normal status: open title: Documentation for fractions module needs work versions: Python 2.6, Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 14:11:09 2008 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 25 Jun 2008 12:11:09 +0000 Subject: [issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up. In-Reply-To: <1198258890.48.0.235588402123.issue1682@psf.upfronthosting.co.za> Message-ID: <1214395869.8.0.565285745679.issue1682@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'm reopening this to propose a last-minute minor change: Can we remove the trailing 'L' from the numerator and denominator in the repr of a Fraction instance? E.g., >>> x = Fraction('9.876543210') >>> x Fraction(987654321L, 100000000L) >>> x * (1/x) Fraction(1L, 1L) I'd rather see Fraction(987654321, 100000000) and Fraction(1, 1). Does the 'L' serve any useful purpose? ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 14:16:37 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 25 Jun 2008 12:16:37 +0000 Subject: [issue3196] Option in pydoc to show docs from private methods In-Reply-To: <1214386355.64.0.670337337662.issue3196@psf.upfronthosting.co.za> Message-ID: <1214396197.9.0.432585014158.issue3196@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- versions: +Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 14:27:49 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 25 Jun 2008 12:27:49 +0000 Subject: [issue3195] invalid conversion xml.etree.ElementTree.Element object to boolean In-Reply-To: <1214384956.08.0.408285823661.issue3195@psf.upfronthosting.co.za> Message-ID: <1214396869.79.0.201173577198.issue3195@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 14:58:23 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 25 Jun 2008 12:58:23 +0000 Subject: [issue3194] Demo/loop.c passing "char *" instead of "wchar_t *" In-Reply-To: <1214364326.35.0.217778159942.issue3194@psf.upfronthosting.co.za> Message-ID: <1214398703.57.0.617048323115.issue3194@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Martin, you made the changes. Could you look at this, please? ---------- assignee: -> loewis nosy: +benjamin.peterson, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 15:29:02 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 25 Jun 2008 13:29:02 +0000 Subject: [issue678464] Docs don't define sequence-ness very well Message-ID: <1214400542.7.0.990579913843.issue678464@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What is the bug actually? "for k in s" is defined to work on any iterable, not only on sequences. And "iterable" is clearly defined, it's sufficient to check whether s.__iter__ exists or whether iter(s) succeeds... ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 15:33:52 2008 From: report at bugs.python.org (Mark Summerfield) Date: Wed, 25 Jun 2008 13:33:52 +0000 Subject: [issue3198] strings don't seem to roundtrip with repr() In-Reply-To: <1214400831.94.0.306229718194.issue3198@psf.upfronthosting.co.za> Message-ID: <1214400831.94.0.306229718194.issue3198@psf.upfronthosting.co.za> New submission from Mark Summerfield : With 2.5.2 and 30b1 strings don't round trip like numbers do. I guess it has been like this a long time so isn't a bug, but it does seem inconsistent. Both 2.5.2 and 30b1: >>> x = 5 >>> x == int(repr(x)) True >>> x = "Test Text" >>> x == str(repr(x)) False The reason is that an extra set of enclosing quotes are added. ---------- components: Interpreter Core messages: 68728 nosy: mark severity: normal status: open title: strings don't seem to roundtrip with repr() type: behavior versions: Python 2.5, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 15:51:07 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 25 Jun 2008 13:51:07 +0000 Subject: [issue3198] strings don't seem to roundtrip with repr() In-Reply-To: <1214400831.94.0.306229718194.issue3198@psf.upfronthosting.co.za> Message-ID: <1214401867.28.0.955877288978.issue3198@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: repr() is supposed to round-trip with eval() for common types. str() is the function that round-trips with the original type: >>> x = 5 >>> x == int(str(x)) True >>> x = "Test Text" >>> x == str(str(x)) # :-) True ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 16:32:36 2008 From: report at bugs.python.org (John Abel) Date: Wed, 25 Jun 2008 14:32:36 +0000 Subject: [issue3199] 2.6b1 Build Fails On OSX 10.5 In-Reply-To: <1214404356.07.0.352296574281.issue3199@psf.upfronthosting.co.za> Message-ID: <1214404356.07.0.352296574281.issue3199@psf.upfronthosting.co.za> New submission from John Abel : The build process on Leopard fails: cd Mac && make altinstallunixtools DESTDIR="" if [ ! -d "/usr/local/bin" ]; then \ /usr/bin/install -c -d -m 755 "/usr/local/bin" ;\ fi for fn in python2.6 pythonw2.6 idle2.6 \ pydoc2.6 python2.6-config) smtpd2.6.py ;\ do \ ln -fs "/Library/Frameworks/Python.framework/Versions/2.6/bin/${fn}" "/usr/local/bin/${fn}" ;\ done /bin/sh: -c: line 0: syntax error near unexpected token `)' /bin/sh: -c: line 0: `for fn in python2.6 pythonw2.6 idle2.6 pydoc2.6 python2.6-config) smtpd2.6.py ;do ln -fs "/Library/Frameworks/Python.framework/Versions/2.6/bin/${fn}" "/usr/local/bin/${fn}" ;done' make[1]: *** [altinstallunixtools] Error 2 make: *** [frameworkaltinstallunixtools] Error 2 To fix, remove the additional ) following -config on line 116 of Mac/Makefile: pydoc$(VERSION) python$(VERSION)-config) smtpd$(VERSION).py ;\ ---------- components: Build messages: 68730 nosy: johna severity: normal status: open title: 2.6b1 Build Fails On OSX 10.5 versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 17:30:52 2008 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 25 Jun 2008 15:30:52 +0000 Subject: [issue3199] 2.6b1 Build Fails On OSX 10.5 In-Reply-To: <1214404356.07.0.352296574281.issue3199@psf.upfronthosting.co.za> Message-ID: <1214407852.33.0.390449058278.issue3199@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in r64526. Thanks for the report! ---------- nosy: +marketdickinson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 17:57:24 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 25 Jun 2008 15:57:24 +0000 Subject: [issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up. In-Reply-To: <1198258890.48.0.235588402123.issue1682@psf.upfronthosting.co.za> Message-ID: <1214409444.08.0.401249168324.issue1682@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 on removing the L. Also, it would be nice if reduced fractions were restored to ints after the gcd step: >>> Fraction(1*10**18, 3*10**18) Fraction(1L, 3L) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 18:09:20 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 25 Jun 2008 16:09:20 +0000 Subject: [issue3008] Let bin/oct/hex show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1214410160.43.0.313687408859.issue3008@psf.upfronthosting.co.za> Raymond Hettinger added the comment: How would the algorithm need to change to support leading-1 normalization? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 18:09:42 2008 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 25 Jun 2008 16:09:42 +0000 Subject: [issue3197] Documentation for fractions module needs work In-Reply-To: <1214392956.96.0.593199677678.issue3197@psf.upfronthosting.co.za> Message-ID: <1214410182.88.0.572723664496.issue3197@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a proposed new draft of the fractions documentation for 2.6. Apart from wording changes, it: - removes documentation for __floor__, __ceil__ and __round__, since those no longer exist in 2.6 - describes construction from a decimal string; e.g. Fraction('1.23') - gives the acceptable string inputs using BNF rather than via a regex. Jeffrey: does this look reasonable? ---------- keywords: +patch Added file: http://bugs.python.org/file10728/fractions_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 19:20:24 2008 From: report at bugs.python.org (Brett Cannon) Date: Wed, 25 Jun 2008 17:20:24 +0000 Subject: [issue3192] exec(open(filename)) doesn't work In-Reply-To: <1214340347.28.0.744958218652.issue3192@psf.upfronthosting.co.za> Message-ID: <1214414424.68.0.375501020222.issue3192@psf.upfronthosting.co.za> Brett Cannon added the comment: issue 1762972 supercedes this. ---------- nosy: +brett.cannon superseder: -> 'exec' does not accept what 'open' returns _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 19:27:53 2008 From: report at bugs.python.org (Eric Sadit) Date: Wed, 25 Jun 2008 17:27:53 +0000 Subject: [issue3200] Python's crash in heavy multithreading IO operations In-Reply-To: <1214414872.83.0.448936700487.issue3200@psf.upfronthosting.co.za> Message-ID: <1214414872.83.0.448936700487.issue3200@psf.upfronthosting.co.za> New submission from Eric Sadit : Hello, I found a rare bug in heavy multithreading IO operations. The bug arises under a stupid sequence of I/O operations. The sequence is not a normal one, but the real problem is that the Python's interpreter crashes. The correct behavior should be raise an IOError exception (I think). The bug occurs when some thread closes a file or socket whilst other thread tries to read or write from the same socket. The failure it's inside the fileobject.c because tries to read or write the specified data size inside a loop without check in every iteration if the object is closed (it checks only outside the loop). The file object is set to NULL and a SIGSEGV happens. I'm a python developer (in the language, but not developer of the language), so i really don't know anything about the best way to solve this issue, and how the project it's managed. I can develop an script to raise this bug if anyone it's interested in this problem. I'm already owns one, but I don't find it, and the real program that arises the error was rewritten so i don't have it. Cheers Eric Sadit ---------- components: Interpreter Core, Library (Lib) messages: 68736 nosy: sadit severity: normal status: open title: Python's crash in heavy multithreading IO operations type: crash versions: Python 2.3, Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 19:40:43 2008 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 25 Jun 2008 17:40:43 +0000 Subject: [issue3008] Let bin/oct/hex show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1214415643.51.0.170045516618.issue3008@psf.upfronthosting.co.za> Mark Dickinson added the comment: Well, here's some Python code to output C99-style hexadecimal representations of floats. It's not quite the same as Java's output, which also special cases IEEE 754 subnormals (writing them with a fixed exponent of -1022 and a '0' before the point). But then Python doesn't have the luxury of knowing that its floats are IEEE 754 format. The big downside is that the output format has a decimal point in it, so won't be eval-able. Added file: http://bugs.python.org/file10729/hex_float.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 19:44:03 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 25 Jun 2008 17:44:03 +0000 Subject: [issue3200] Python's crash in heavy multithreading IO operations In-Reply-To: <1214414872.83.0.448936700487.issue3200@psf.upfronthosting.co.za> Message-ID: <1214415843.27.0.732402725696.issue3200@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This problem may be a duplicate of issue815646 and issue595601, and was probably corrected with r62195. Can you please check with the new python version 2.6b1 ? ---------- nosy: +amaury.forgeotdarc resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 19:47:45 2008 From: report at bugs.python.org (Peter Fein) Date: Wed, 25 Jun 2008 17:47:45 +0000 Subject: [issue1180] Option to ignore or substitute ~/.pydistutils.cfg In-Reply-To: <1190232008.41.0.541816468426.issue1180@psf.upfronthosting.co.za> Message-ID: <1214416065.22.0.765806510409.issue1180@psf.upfronthosting.co.za> Peter Fein added the comment: Is this going to make the 2.6 release? The lack of this option causes grief on MacPorts. Just wondering if there's anything I could do to move this along, as a cursory reading shows everyone to be happy... ---------- nosy: +pfein _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 19:50:42 2008 From: report at bugs.python.org (Eric Sadit) Date: Wed, 25 Jun 2008 17:50:42 +0000 Subject: [issue3200] Python's crash in heavy multithreading IO operations In-Reply-To: <1214415843.27.0.732402725696.issue3200@psf.upfronthosting.co.za> Message-ID: <25ce188f0806251050o1d9becd3mf3dd15b70457e5a7@mail.gmail.com> Eric Sadit added the comment: Ok, I will try to reproduce it in the python 2.6b1 version, and I report to you the result Saludos On Wed, Jun 25, 2008 at 12:44 PM, Amaury Forgeot d'Arc < report at bugs.python.org> wrote: > > Amaury Forgeot d'Arc added the comment: > > This problem may be a duplicate of issue815646 and issue595601, and was > probably corrected with r62195. > > Can you please check with the new python version 2.6b1 ? > > ---------- > nosy: +amaury.forgeotdarc > resolution: -> out of date > status: open -> pending > > _______________________________________ > Python tracker > > _______________________________________ > Added file: http://bugs.python.org/file10730/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Wed Jun 25 19:52:35 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 25 Jun 2008 17:52:35 +0000 Subject: [issue3008] Let bin/oct/hex show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1214416355.67.0.302953952673.issue3008@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Attaching a patch that includes normalization to a leading 1. Added file: http://bugs.python.org/file10731/float8.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 21:08:32 2008 From: report at bugs.python.org (David) Date: Wed, 25 Jun 2008 19:08:32 +0000 Subject: [issue3087] Clean up Demos and Tools In-Reply-To: <1213238540.5.0.535212077097.issue3087@psf.upfronthosting.co.za> Message-ID: <1214420912.27.0.771707805068.issue3087@psf.upfronthosting.co.za> David added the comment: I will take this one on. I'll download 3.x this weekend and begin. What is the best way to proceed? Post each program as it is changed or a note that no change is required? It can get lengthy if all of the programs are posted here. ---------- nosy: +dwblas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 21:18:49 2008 From: report at bugs.python.org (Eric Vander Weele) Date: Wed, 25 Jun 2008 19:18:49 +0000 Subject: [issue3201] struct.Struct size attribute undocumented In-Reply-To: <1214421529.06.0.941954130673.issue3201@psf.upfronthosting.co.za> Message-ID: <1214421529.06.0.941954130673.issue3201@psf.upfronthosting.co.za> New submission from Eric Vander Weele : The .size attribute of struct.Struct is undocumented on http://docs.python.org/lib/struct-objects.html ---------- assignee: georg.brandl components: Documentation messages: 68743 nosy: ericvw, georg.brandl severity: normal status: open title: struct.Struct size attribute undocumented versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 21:25:13 2008 From: report at bugs.python.org (Facundo Batista) Date: Wed, 25 Jun 2008 19:25:13 +0000 Subject: [issue3165] cPickle recursion problem In-Reply-To: <1214082651.25.0.91375820207.issue3165@psf.upfronthosting.co.za> Message-ID: <1214421913.15.0.416514119855.issue3165@psf.upfronthosting.co.za> Facundo Batista added the comment: I'm reverting this patch, see issue #3179. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 21:25:52 2008 From: report at bugs.python.org (Facundo Batista) Date: Wed, 25 Jun 2008 19:25:52 +0000 Subject: [issue2702] pickling of large recursive structures crashes cPickle In-Reply-To: <1209282789.34.0.562999954252.issue2702@psf.upfronthosting.co.za> Message-ID: <1214421952.13.0.741358929723.issue2702@psf.upfronthosting.co.za> Facundo Batista added the comment: I reverted the patch, because of #3179, so I'm reopening this. Note that I left the test in the suite, but commented out (if you find a patch that solves this, activate the test again). ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 21:27:58 2008 From: report at bugs.python.org (Facundo Batista) Date: Wed, 25 Jun 2008 19:27:58 +0000 Subject: [issue3179] cPickle is seriously broken In-Reply-To: <1214232133.4.0.366608731079.issue3179@psf.upfronthosting.co.za> Message-ID: <1214422078.54.0.769875647287.issue3179@psf.upfronthosting.co.za> Facundo Batista added the comment: I reverted the patch, commented out the previous test, and included this one in the test suite, to never break it again, ;) I hope we now find a solution to the issue #2702. Thank you!! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 21:28:08 2008 From: report at bugs.python.org (Facundo Batista) Date: Wed, 25 Jun 2008 19:28:08 +0000 Subject: [issue3179] cPickle is seriously broken In-Reply-To: <1214232133.4.0.366608731079.issue3179@psf.upfronthosting.co.za> Message-ID: <1214422088.91.0.646658227573.issue3179@psf.upfronthosting.co.za> Changes by Facundo Batista : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 21:32:11 2008 From: report at bugs.python.org (Eric Sadit) Date: Wed, 25 Jun 2008 19:32:11 +0000 Subject: [issue3200] Python's crash in heavy multithreading IO operations In-Reply-To: <1214415843.27.0.732402725696.issue3200@psf.upfronthosting.co.za> Message-ID: <25ce188f0806251232q702ad703jc17650b38f3665f0@mail.gmail.com> Eric Sadit added the comment: Thanks Amaury I run a test script and Python 2.5.2 crashes, but 2.6b1 runs perfectly throwing a ValueError exception (Operation of closed file) in the reader/writer thread and "IOError: close() called during concurrent operation on the same file object" in the closer thread. Python doesn't crash anymore. Cheers Eric Sadit On Wed, Jun 25, 2008 at 12:44 PM, Amaury Forgeot d'Arc < report at bugs.python.org> wrote: > > Amaury Forgeot d'Arc added the comment: > > This problem may be a duplicate of issue815646 and issue595601, and was > probably corrected with r62195. > > Can you please check with the new python version 2.6b1 ? > > ---------- > nosy: +amaury.forgeotdarc > resolution: -> out of date > status: open -> pending > > _______________________________________ > Python tracker > > _______________________________________ > Added file: http://bugs.python.org/file10732/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Wed Jun 25 21:36:31 2008 From: report at bugs.python.org (Eric Sadit) Date: Wed, 25 Jun 2008 19:36:31 +0000 Subject: [issue3200] Python's crash in heavy multithreading IO operations In-Reply-To: <25ce188f0806251232q702ad703jc17650b38f3665f0@mail.gmail.com> Message-ID: <25ce188f0806251236y738cc8d8p238a53f2207ae434@mail.gmail.com> Eric Sadit added the comment: The test script #!/usr/bin/python import sys import thread f = file("o.test","w") buff = " " * 1024 def run(): while 1: try: f.read(100) # f.write(buff) except Exception, e: print >>sys.stderr, "An exception, that's OK, ", repr(e) if __name__ == '__main__': thread.start_new_thread(run, (), {}) while 1: try: On Wed, Jun 25, 2008 at 2:32 PM, Eric Sadit wrote: > > Eric Sadit added the comment: > > Thanks Amaury > > I run a test script and Python 2.5.2 crashes, but 2.6b1 runs perfectly > throwing a ValueError exception (Operation of closed file) > in the reader/writer thread and "IOError: close() called during concurrent > operation on the same file object" in the closer thread. > Python doesn't crash anymore. > > Cheers > > Eric Sadit > > On Wed, Jun 25, 2008 at 12:44 PM, Amaury Forgeot d'Arc < > report at bugs.python.org> wrote: > > > > > Amaury Forgeot d'Arc added the comment: > > > > This problem may be a duplicate of issue815646 and issue595601, and was > > probably corrected with r62195. > > > > Can you please check with the new python version 2.6b1 ? > > > > ---------- > > nosy: +amaury.forgeotdarc > > resolution: -> out of date > > status: open -> pending > > > > _______________________________________ > > Python tracker > > > > _______________________________________ > > > > Added file: http://bugs.python.org/file10732/unnamed > > _______________________________________ > Python tracker > > _______________________________________ > Added file: http://bugs.python.org/file10733/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Wed Jun 25 21:38:39 2008 From: report at bugs.python.org (Eric Sadit) Date: Wed, 25 Jun 2008 19:38:39 +0000 Subject: [issue3200] Python's crash in heavy multithreading IO operations In-Reply-To: <25ce188f0806251236y738cc8d8p238a53f2207ae434@mail.gmail.com> Message-ID: <25ce188f0806251238xf7ed7c2jc772b8f96486e3d2@mail.gmail.com> Eric Sadit added the comment: #!/usr/bin/python import sys import thread f = file("o.test","w") buff = " " * 1024 def run(): while 1: try: f.read(100) # f.write(buff) except Exception, e: print >>sys.stderr, "An exception, that's OK, ", repr(e) if __name__ == '__main__': thread.start_new_thread(run, (), {}) while 1: try: f.close() except Exception, e: print >>sys.stderr, "An exception, main thread ", repr(e) f = file("o.test","w") On Wed, Jun 25, 2008 at 2:36 PM, Eric Sadit T?llez Avila wrote: > The test script > > #!/usr/bin/python > > import sys > import thread > > f = file("o.test","w") > buff = " " * 1024 > def run(): > while 1: > try: > f.read(100) > # > f.write(buff) > > except Exception, e: > print >>sys.stderr, "An exception, that's OK, ", repr(e) > > if __name__ == '__main__': > thread.start_new_thread(run, (), {}) > while 1: > try: > > > On Wed, Jun 25, 2008 at 2:32 PM, Eric Sadit > wrote: > >> >> Eric Sadit added the comment: >> >> >> Thanks Amaury >> >> I run a test script and Python 2.5.2 crashes, but 2.6b1 runs perfectly >> throwing a ValueError exception (Operation of closed file) >> in the reader/writer thread and "IOError: close() called during concurrent >> operation on the same file object" in the closer thread. >> Python doesn't crash anymore. >> >> Cheers >> >> Eric Sadit >> >> On Wed, Jun 25, 2008 at 12:44 PM, Amaury Forgeot d'Arc < >> report at bugs.python.org> wrote: >> >> > >> > Amaury Forgeot d'Arc added the comment: >> > >> > This problem may be a duplicate of issue815646 and issue595601, and was >> > probably corrected with r62195. >> > >> > Can you please check with the new python version 2.6b1 ? >> > >> > ---------- >> > nosy: +amaury.forgeotdarc >> > resolution: -> out of date >> > status: open -> pending >> > >> > _______________________________________ >> > Python tracker >> > >> > _______________________________________ >> > >> >> Added file: http://bugs.python.org/file10732/unnamed >> >> _______________________________________ >> Python tracker >> >> _______________________________________ >> > > Added file: http://bugs.python.org/file10734/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Wed Jun 25 21:42:06 2008 From: report at bugs.python.org (Ori Avtalion) Date: Wed, 25 Jun 2008 19:42:06 +0000 Subject: [issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header In-Reply-To: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> Message-ID: <1214422926.06.0.764906749021.issue1974@psf.upfronthosting.co.za> Ori Avtalion added the comment: I think there's been a little misinterpretation of the standard in the comments above. It's important to note that RFC 2822 basically defines folding as "adding a CRLF before an existing whitespace in the original message". See http://tools.ietf.org/html/rfc2822#section-2.2.3 It does *not* allow prepending folded lines with extra characters that were not in the original message such as '\t' or ' '. This is exactly what _encode_chunks does in header.py: joiner = NL + self._continuation_ws (Note that the email package docs and Header docstring use the word 'prepend' which is reflects the error in the code). With a correct implementation, why would I want to choice of which type of character to line-break on when folding? The whole notion of controlling the value of continuation_ws seems wrong. However, changing the default continuation_ws to ' ', as the patch suggests, will output syntactically correct headers in the majority of cases (due to other bugs that remove trailing whitespace and merge consecutive whitespace into one character). All in all, I agree with the change of the default continuation_ws due to its lucky side-effects, but as Barry hinted, the algorithm needs some serious work to really output valid headers. Some examples of the good and bad behaviors: >>> from email.Header import Header >>> l = ['<%d at dom.ain>' % i for i in range(8)] >>> # this turns out fine >>> Header(' '.join(l), continuation_ws=' ').encode() '<0 at dom.ain> <1 at dom.ain> <2 at dom.ain> <3 at dom.ain> <4 at dom.ain> <5 at dom.ain>\n <6 at dom.ain> <7 at dom.ain>' # This does not fold even though it should >>> Header('\t'.join(l), continuation_ws=' ').encode() '<0 at dom.ain>\t<1 at dom.ain>\t<2 at dom.ain>\t<3 at dom.ain>\t<4 at dom.ain>\t<5 at dom.ain>\t<6 at dom.ain>\t<7 at dom.ain>' # And here the 4-char whitespace is shrinked into one >>> Header(' '.join(l), continuation_ws=' ').encode() '<0 at dom.ain> <1 at dom.ain> <2 at dom.ain> <3 at dom.ain> <4 at dom.ain> <5 at dom.ain>\n <6 at dom.ain> <7 at dom.ain>' ---------- nosy: +salty-horse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 21:51:41 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 25 Jun 2008 19:51:41 +0000 Subject: [issue3087] Clean up Demos and Tools In-Reply-To: <1214420912.27.0.771707805068.issue3087@psf.upfronthosting.co.za> Message-ID: <1afaf6160806251251p56a90e76pb4fbb10c3b61aa18@mail.gmail.com> Benjamin Peterson added the comment: On Wed, Jun 25, 2008 at 2:08 PM, David wrote: > > David added the comment: > > I will take this one on. I'll download 3.x this weekend and begin. > What is the best way to proceed? Post each program as it is changed or a > note that no change is required? It can get lengthy if all of the > programs are posted here. Thanks for volunteering! Make a list of the ones which should go completely (ie demonstrate removed modules and features or are broken beyond repair) and post a patch with changes to the others. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 21:53:28 2008 From: report at bugs.python.org (Justin Mazzola Paluska) Date: Wed, 25 Jun 2008 19:53:28 +0000 Subject: [issue3202] Wish: disable tests in unittest In-Reply-To: <1214423608.55.0.624662877506.issue3202@psf.upfronthosting.co.za> Message-ID: <1214423608.55.0.624662877506.issue3202@psf.upfronthosting.co.za> New submission from Justin Mazzola Paluska : The attached patch (unittest-disable.patch) allows methods in unittest.TestCases to be "disabled". The patch is against Python2.5 from Debian: %python2.5 Python 2.5.2 (r252:60911, Apr 17 2008, 13:15:05) [GCC 4.2.3 (Debian 4.2.3-3)] on linux2 Disabled tests are not run, but are "remembered" in the output of the test program. For example, the attached sample_tests.py has two tests, one of which has been disabled. The output is: %python sample_tests.py .D ---------------------------------------------------------------------- Ran 2 tests in 0.000s OK where the D indicates that a test has been disabled. Disabling tests is useful if you're using a "test first" coding workflow, as some tests may test functionality that hasn't been implemented yet. The failures of these tests (with their noisy tracebacks) makes it harder to concentrate on other, real failures that may be occurring in your tests. ---------- components: Library (Lib) files: unittest-disable.patch keywords: patch messages: 68752 nosy: jmp severity: normal status: open title: Wish: disable tests in unittest versions: Python 2.5 Added file: http://bugs.python.org/file10735/unittest-disable.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 21:53:40 2008 From: report at bugs.python.org (Justin Mazzola Paluska) Date: Wed, 25 Jun 2008 19:53:40 +0000 Subject: [issue3202] Wish: disable tests in unittest In-Reply-To: <1214423608.55.0.624662877506.issue3202@psf.upfronthosting.co.za> Message-ID: <1214423620.58.0.216159952884.issue3202@psf.upfronthosting.co.za> Changes by Justin Mazzola Paluska : Added file: http://bugs.python.org/file10736/sample_tests.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 21:53:46 2008 From: report at bugs.python.org (Justin Mazzola Paluska) Date: Wed, 25 Jun 2008 19:53:46 +0000 Subject: [issue3202] Wish: disable tests in unittest In-Reply-To: <1214423608.55.0.624662877506.issue3202@psf.upfronthosting.co.za> Message-ID: <1214423626.47.0.679041237045.issue3202@psf.upfronthosting.co.za> Changes by Justin Mazzola Paluska : ---------- type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 22:01:48 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 25 Jun 2008 20:01:48 +0000 Subject: [issue3202] Wish: disable tests in unittest In-Reply-To: <1214423608.55.0.624662877506.issue3202@psf.upfronthosting.co.za> Message-ID: <1214424108.65.0.967348613071.issue3202@psf.upfronthosting.co.za> Benjamin Peterson added the comment: If you could convince Python-dev for something like this, I'd gladly implement it. In fact, I'm working implementing this for the Python test suite (It's called skipping). ---------- nosy: +benjamin.peterson priority: -> low versions: +Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 22:07:08 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 25 Jun 2008 20:07:08 +0000 Subject: [issue3201] struct.Struct size attribute undocumented In-Reply-To: <1214421529.06.0.941954130673.issue3201@psf.upfronthosting.co.za> Message-ID: <1214424428.69.0.346216989227.issue3201@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It's documented in the 2.6/3.0 docs: http://docs.python.org/dev/library/struct.html#id1. ---------- nosy: +benjamin.peterson resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 22:29:31 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 25 Jun 2008 20:29:31 +0000 Subject: [issue1180] Option to ignore or substitute ~/.pydistutils.cfg In-Reply-To: <1190232008.41.0.541816468426.issue1180@psf.upfronthosting.co.za> Message-ID: <1214425771.85.0.726925027002.issue1180@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Formally, the beta deadline has passed, so no new features can be admitted. If pje is now happy with the code as it stands (not clear from the last message), I can ask for permission to commit it, anyway. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 22:36:28 2008 From: report at bugs.python.org (Gerard M. Flanagan) Date: Wed, 25 Jun 2008 20:36:28 +0000 Subject: [issue3203] sphinx - table of contents doesn't render correctly (html) In-Reply-To: <1214426188.21.0.172463487619.issue3203@psf.upfronthosting.co.za> Message-ID: <1214426188.21.0.172463487619.issue3203@psf.upfronthosting.co.za> New submission from Gerard M. Flanagan : A TOC tree should render in HTML as a single 'ul', but in certain circumstances it appears as multiple ul's. You can see the effect here: http://docs.python.org/dev/c-api/index.html and in fact in the Sphinx documentation itself: http://sphinx.pocoo.org/contents.html the 'toctree' here is not an individual entity but a vertical series of ul's, each of which has a *single* item (li). You may be able to see the slightly increased space between the ul's which would not be present if these were all the children of a single parent. This should be changed so that pages have a unique 'toc' element because: - it would be easier for css and javascript to manipulate - there may be accessibility issues (eg. non-visual readers may not identify the toc as a single sequence of alternatives) The reason for the current behaviour can be found in the method 'resolve_toctree' of class sphinx.environment.BuildEnvironment, line 863:: newnode = addnodes.compact_paragraph('', '', *tocentries) `tocentries` is a list of `toctrees` [, ,..] each of which will end up as a ul, while a compact_paragraph has no html representation; hence the observed effect. One way to fix this is to replace the above line with the following:: newnode = nodes.bullet_list() for entry in tocentries: for item in entry.children: assert isinstance(item, nodes.list_item) newnode.append(item) (and you can also take the opportunity here to add a unique id:: newnode['ids'].append('toc') ) Note that this new code is a noop if `tocentries` only has one element, at least as far as html is concerned. ---------- assignee: georg.brandl components: Documentation tools (Sphinx) messages: 68756 nosy: georg.brandl, grflanagan severity: normal status: open title: sphinx - table of contents doesn't render correctly (html) type: behavior versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 22:52:47 2008 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 25 Jun 2008 20:52:47 +0000 Subject: [issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up. In-Reply-To: <1198258890.48.0.235588402123.issue1682@psf.upfronthosting.co.za> Message-ID: <1214427167.85.0.0491739346779.issue1682@psf.upfronthosting.co.za> Guido van Rossum added the comment: +1 on removing the trailing L from the repr. +0 on trying to reduce the values to ints; that would be dead-end code since in 3.0 it's a non-issue. And it doesn't solve the problem with repr. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 23:00:15 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 25 Jun 2008 21:00:15 +0000 Subject: [issue3200] Python's crash in heavy multithreading IO operations In-Reply-To: <1214414872.83.0.448936700487.issue3200@psf.upfronthosting.co.za> Message-ID: <1214427615.68.0.23943281574.issue3200@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Closing as "already resolved in the upcoming release" ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 23:41:29 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 25 Jun 2008 21:41:29 +0000 Subject: [issue2702] pickling of large recursive structures crashes cPickle In-Reply-To: <1209282789.34.0.562999954252.issue2702@psf.upfronthosting.co.za> Message-ID: <1214430089.26.0.528313049525.issue2702@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It seems that each self->nesting++ should be balanced with self->nesting--. Attached patch enables all tests and corrects the issue ---------- nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file10737/cpickle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 23:53:49 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 25 Jun 2008 21:53:49 +0000 Subject: [issue2702] pickling of large recursive structures crashes cPickle In-Reply-To: <1209282789.34.0.562999954252.issue2702@psf.upfronthosting.co.za> Message-ID: <1214430829.31.0.236800914967.issue2702@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Another version of the patch, that removes the self->nesting member and uses the Py_EnterRecursiveCall machinery. I prefer it because it takes into account the depth of the current python call stack. Added file: http://bugs.python.org/file10738/cpickle2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 25 23:56:58 2008 From: report at bugs.python.org (Phillip J. Eby) Date: Wed, 25 Jun 2008 21:56:58 +0000 Subject: [issue1180] Option to ignore or substitute ~/.pydistutils.cfg In-Reply-To: <1214425771.85.0.726925027002.issue1180@psf.upfronthosting. co.za> Message-ID: <20080625215639.81E3C3A408E@sparrow.telecommunity.com> Phillip J. Eby added the comment: I'm good with it; the issue with the comment in core.py was my only remaining objection. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 01:33:16 2008 From: report at bugs.python.org (Jean Brouwers) Date: Wed, 25 Jun 2008 23:33:16 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214436796.58.0.696715542611.issue3167@psf.upfronthosting.co.za> Jean Brouwers added the comment: Unless I am doing something wrong, that flag does not fix the problem. #include #include #include int main(int argc, char *argv[]) { errno = 0; printf("%f %d\n", log(-HUGE_VAL), errno); errno = 0; printf("%f %d\n", log( HUGE_VAL), errno); } /* result is different for 32- and 64-bit > rm a.out; cc -xtarget=native -xlibmieee log_inf.c -lm ; a.out -NaN 33 Inf 0 > rm a.out ; cc -xtarget=native64 -xlibmieee log_inf.c -lm ; a.out -NaN 0 Inf 0 #define EDOM 33 in /usr/include/sys/errno.h */ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 01:55:39 2008 From: report at bugs.python.org (Jean Brouwers) Date: Wed, 25 Jun 2008 23:55:39 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214438139.28.0.199853398869.issue3167@psf.upfronthosting.co.za> Jean Brouwers added the comment: Sorry, the flag *does* make a difference. Ignoring errno, the results for 32- and 64-bit do match. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 08:36:31 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 26 Jun 2008 06:36:31 +0000 Subject: [issue2702] pickling of large recursive structures crashes cPickle In-Reply-To: <1209282789.34.0.562999954252.issue2702@psf.upfronthosting.co.za> Message-ID: <1214462191.39.0.820769432224.issue2702@psf.upfronthosting.co.za> Ralf Schmitt added the comment: The tests pass on my machine (64 bit debian testing) with cpickle2.patch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 09:21:01 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Thu, 26 Jun 2008 07:21:01 +0000 Subject: [issue3179] cPickle is seriously broken In-Reply-To: <1214232133.4.0.366608731079.issue3179@psf.upfronthosting.co.za> Message-ID: <1214464861.6.0.604305128795.issue3179@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 09:47:13 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Thu, 26 Jun 2008 07:47:13 +0000 Subject: [issue3147] tests for sys.getsizeof fail on win64 In-Reply-To: <1213915426.19.0.16089164965.issue3147@psf.upfronthosting.co.za> Message-ID: <1214466432.84.0.28309711797.issue3147@psf.upfronthosting.co.za> Robert Schuppenies added the comment: The tests still do not pass on the AMD64 W2k8. Surprisingly, struct.calcsize behaves as expected, but sizeof() on the C level does not. The former seems to assumes long to be 4 byte in size, the latter 8! The tests pass until it comes to a situation where the size of long affects the alignment of the structure end. In this case long and function. long's structure is 'lP PP l H' which gives an expected size of 8+8+16+4+2(+2) = 40 At least this how I think it should be and struct.calcsize does, too. But what seems to be computed is 8+8+16+8+2(+6) = 48. It appears as if sizeof(long) = 8. The same explanation holds true for the failure on the function size which is 'lp PP 9l' and struct.calcsize : 8+8+16+36(+4) = 72 sizeof : 8+8+16+72 = 104 Now I don't know how I should address this problem. It seems to be Windows AMD64 specific, but I found a post [1] which indicates that it's Windows AMD64 on Windows 2K specific. Tests do also fail on the Win64 XP buildbot, but it gets killed before the verbose output is generated. I don't have access to such a platform, so I cannot verify it. It may also be a problem with struct.calcsize on Win64. Any suggestions? [1] http://www.velocityreviews.com/forums/t491385-different-behavior-of-amd64-compiler-14004031041-on-windows-xp-and-2k.html ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 09:58:31 2008 From: report at bugs.python.org (Andrii V. Mishkovskyi) Date: Thu, 26 Jun 2008 07:58:31 +0000 Subject: [issue3204] operator module docs are not updated to 3.0 In-Reply-To: <1214467110.98.0.886196184715.issue3204@psf.upfronthosting.co.za> Message-ID: <1214467110.98.0.886196184715.issue3204@psf.upfronthosting.co.za> New submission from Andrii V. Mishkovskyi : __*slice__() methods of sequence-like objects are removed in Python 3.0, but "operator.rst" has sections on *slice()/__*slice__() functions. Attached patch removes this functions from documentation. ---------- assignee: georg.brandl components: Documentation files: operator.rst.diff keywords: patch messages: 68766 nosy: georg.brandl, mishok13 severity: normal status: open title: operator module docs are not updated to 3.0 versions: Python 3.0 Added file: http://bugs.python.org/file10739/operator.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 10:01:53 2008 From: report at bugs.python.org (Chris Withers) Date: Thu, 26 Jun 2008 08:01:53 +0000 Subject: [issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header In-Reply-To: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> Message-ID: <1214467313.47.0.899995041682.issue1974@psf.upfronthosting.co.za> Chris Withers added the comment: Ori, I do agree with both you and Barry but is there any chance someone could make the one-character change to make the /t a space so we can stop seeing weirdness in common mail clients? Perhaps a separate issue could be raised to refactor this all correctly? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 10:42:57 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 26 Jun 2008 08:42:57 +0000 Subject: [issue3147] tests for sys.getsizeof fail on win64 In-Reply-To: <1213915426.19.0.16089164965.issue3147@psf.upfronthosting.co.za> Message-ID: <1214469777.27.0.607042888929.issue3147@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I can't quite follow your layout of a longint; in debug mode, I think it is - 2P (next/prev) - ssize_t (refcnt) - P (type) - ssize_t (size) - digits Notice that a ssize_t is 64 bits on Win64, so there shouldn't be any longs in the structure on Win64. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 10:58:38 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 26 Jun 2008 08:58:38 +0000 Subject: [issue3192] exec(open(filename)) doesn't work In-Reply-To: <1214340347.28.0.744958218652.issue3192@psf.upfronthosting.co.za> Message-ID: <1214470718.03.0.425670229125.issue3192@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 11:00:32 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 26 Jun 2008 09:00:32 +0000 Subject: [issue3147] tests for sys.getsizeof fail on win64 In-Reply-To: <1213915426.19.0.16089164965.issue3147@psf.upfronthosting.co.za> Message-ID: <1214470832.49.0.534069844242.issue3147@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > long's structure is 'lP PP l H' No, it's a VAR-sized object, and ob_size is a Py_ssize_t, which is best represented as a 'P' as you already did for other types. I suggest 'lP PP P H'. > the function size which is 'lp PP 9l' According to Include/funcobject.h, there are nine PyObject*, the description should end with "9P". I think there are some other inconsistencies. For example, the tests for 'list' should be self.check_sizeof([], size(h + 'PPP')) self.check_sizeof([1, 2, 3], size(h + 'PPP') + 3*self.P) for the same reasons as for the 'long' type (ob_size is a Py_ssize_t), even if the total is the same thanks to alignment. I agree it's very difficult to get it right... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 11:08:21 2008 From: report at bugs.python.org (Michiel de Hoon) Date: Thu, 26 Jun 2008 09:08:21 +0000 Subject: [issue3205] bz2 iterator fails silently on MemoryError In-Reply-To: <1214471301.68.0.267247122126.issue3205@psf.upfronthosting.co.za> Message-ID: <1214471301.68.0.267247122126.issue3205@psf.upfronthosting.co.za> New submission from Michiel de Hoon : PyMem_Malloc is called in the Util_ReadAhead function in bz2module.c. The code checks if PyMem_Malloc returns NULL, but in that case no MemoryError is raised. So, if in the following code: >>> input = bz2.BZ2File("myfile.txt.bz2") >>> for line in input: ... # do something with the line Python runs out of memory during the for-loop, then the for-loop exits without an Exception being raised. To the user, it appears that the end of the myfile.txt.bz2 file was reached and that no error occurred. In the attached patch, I call PyErr_NoMemory() if PyMem_Malloc fails. This then raises the MemoryError exception as appropriate. ---------- components: Extension Modules files: bz2module.c.patch keywords: patch messages: 68770 nosy: mdehoon severity: normal status: open title: bz2 iterator fails silently on MemoryError type: behavior Added file: http://bugs.python.org/file10740/bz2module.c.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 11:53:18 2008 From: report at bugs.python.org (Andrii V. Mishkovskyi) Date: Thu, 26 Jun 2008 09:53:18 +0000 Subject: [issue3206] Multiprocessing Array and sharedctypes.Array error in docs/implementation In-Reply-To: <1214473998.34.0.913565828871.issue3206@psf.upfronthosting.co.za> Message-ID: <1214473998.34.0.913565828871.issue3206@psf.upfronthosting.co.za> New submission from Andrii V. Mishkovskyi : multiprocessing.sharedctypes.Array and multiprocessing.sharedctypes.Value if used according to documentation fail with AssertionError. Python 3.0b1+ (py3k:64518, Jun 25 2008, 12:52:38) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from multiprocessing import sharedctypes >>> sharedctypes.Array('i', 1, lock=True) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.0/multiprocessing/sharedctypes.py", line 88, in Array assert hasattr(lock, 'acquire') AssertionError >>> sharedctypes.Array('i', 1, lock=False) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.0/multiprocessing/sharedctypes.py", line 88, in Array assert hasattr(lock, 'acquire') AssertionError >>> sharedctypes.Array('i', 1, lock=None) > >>> Value('i', lock=True) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.0/multiprocessing/__init__.py", line 246, in Value return Value(typecode_or_type, *args, **kwds) File "/usr/local/lib/python3.0/multiprocessing/sharedctypes.py", line 75, in Value assert hasattr(lock, 'acquire') AssertionError The same goes for multiprocessing.Array and multiprocessing.Value. Comparing code to documentation it's obvious that lock argument can be one of Lock, RLock or None objects (or any object with "acquire" attribute), but not True or False. Also, looking at the code it seems strange to me that 'lock' is a keyword-only argument. Why not use simple default argument "lock=None" for Array() function? Proposed patch tries to address these issues. ---------- components: Library (Lib) messages: 68771 nosy: jnoller, mishok13, roudkerk severity: normal status: open title: Multiprocessing Array and sharedctypes.Array error in docs/implementation versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 11:58:38 2008 From: report at bugs.python.org (Andrii V. Mishkovskyi) Date: Thu, 26 Jun 2008 09:58:38 +0000 Subject: [issue3206] Multiprocessing Array and sharedctypes.Array error in docs/implementation In-Reply-To: <1214473998.34.0.913565828871.issue3206@psf.upfronthosting.co.za> Message-ID: <1214474318.06.0.501372359048.issue3206@psf.upfronthosting.co.za> Changes by Andrii V. Mishkovskyi : ---------- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 12:08:02 2008 From: report at bugs.python.org (Andrii V. Mishkovskyi) Date: Thu, 26 Jun 2008 10:08:02 +0000 Subject: [issue3206] Multiprocessing Array and sharedctypes.Array error in docs/implementation In-Reply-To: <1214473998.34.0.913565828871.issue3206@psf.upfronthosting.co.za> Message-ID: <1214474882.73.0.0752019505256.issue3206@psf.upfronthosting.co.za> Andrii V. Mishkovskyi added the comment: And here is the patch itself. :) ---------- keywords: +patch Added file: http://bugs.python.org/file10741/multiprocessing.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 12:48:30 2008 From: report at bugs.python.org (Peter) Date: Thu, 26 Jun 2008 10:48:30 +0000 Subject: [issue3207] file.write() after file.readline() in mode "r+" In-Reply-To: <1214477310.64.0.211264115228.issue3207@psf.upfronthosting.co.za> Message-ID: <1214477310.64.0.211264115228.issue3207@psf.upfronthosting.co.za> New submission from Peter : Following code: fp = open("delete.me", "r+t") fp.readline() fp.write("New line \n") fp.close() Won't do anything. I mean nor writing to file, nor raising exception. Nothing. I can't find any note about this crap. So, it is the best place for it. P.S. It's my first bug-report and I think I was wrong in filling bug- form. Sorry. ---------- assignee: georg.brandl components: Documentation messages: 68773 nosy: georg.brandl, peterdemin severity: normal status: open title: file.write() after file.readline() in mode "r+" type: performance versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 12:58:13 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 26 Jun 2008 10:58:13 +0000 Subject: [issue3008] Let bin/oct/hex show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1214477893.81.0.775971667353.issue3008@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Add support for non-float floats. Added file: http://bugs.python.org/file10742/float8.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 13:02:46 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 26 Jun 2008 11:02:46 +0000 Subject: [issue3207] file.write() after file.readline() in mode "r+" In-Reply-To: <1214477310.64.0.211264115228.issue3207@psf.upfronthosting.co.za> Message-ID: <1214478166.07.0.049495744412.issue3207@psf.upfronthosting.co.za> Georg Brandl added the comment: Can't reproduce on Linux on 2.6 or 3.0. ---------- assignee: georg.brandl -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 13:08:16 2008 From: report at bugs.python.org (Peter) Date: Thu, 26 Jun 2008 11:08:16 +0000 Subject: [issue3207] file.write() after file.readline() in mode "r+" In-Reply-To: <1214477310.64.0.211264115228.issue3207@psf.upfronthosting.co.za> Message-ID: <1214478496.94.0.688641101624.issue3207@psf.upfronthosting.co.za> Peter added the comment: Sorry. I use Windows XP SP2 with all updates on 26.06.2008 Python 2.5.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 13:48:38 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 26 Jun 2008 11:48:38 +0000 Subject: [issue3207] file.write() after file.readline() in mode "r+" In-Reply-To: <1214477310.64.0.211264115228.issue3207@psf.upfronthosting.co.za> Message-ID: <1214480918.19.0.593696904751.issue3207@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I tried this on windows 2000: >>> # create a file with some text >>> open("delete.me","w").write("some text\n") >>> >>> fp = open("delete.me", "r+t") >>> fp.readline() 'some text\n' >>> fp.write("New line \n") Traceback (most recent call last): File "", line 1, in IOError: [Errno 0] Error On all 2.x versions of python I tried (2.4, 2.5.1, 2.5.2, 2.6b1, some compiled with VS7.1, some with VS8.0) With python3.0, there is no error, and the "New line" is appended at the end of the file. issue1636874 may be related to this one. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 13:56:02 2008 From: report at bugs.python.org (Peter) Date: Thu, 26 Jun 2008 11:56:02 +0000 Subject: [issue3207] file.write() after file.readline() in mode "r+" In-Reply-To: <1214477310.64.0.211264115228.issue3207@psf.upfronthosting.co.za> Message-ID: <1214481362.38.0.0472016086842.issue3207@psf.upfronthosting.co.za> Changes by Peter : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 14:00:00 2008 From: report at bugs.python.org (Peter) Date: Thu, 26 Jun 2008 12:00:00 +0000 Subject: [issue3207] file.write() after file.readline() in mode "r+" In-Reply-To: <1214477310.64.0.211264115228.issue3207@psf.upfronthosting.co.za> Message-ID: <1214481600.67.0.122058244605.issue3207@psf.upfronthosting.co.za> Peter added the comment: Amaury Forgeot d'Arc, your example really raise IOError 0 Thing is that you had 1 string in the file Here is it: >>> open("delete.me", "w").write("first\nsecond\nthird") >>> fp = open("delete.me", "r+t") >>> fp.readline() 'first\n' >>> fp.write("Newbie") >>> fp.close() >>> open("delete.me", "r").read() 'first\nsecond\nthird' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 14:06:09 2008 From: report at bugs.python.org (Hye-Shik Chang) Date: Thu, 26 Jun 2008 12:06:09 +0000 Subject: [issue1276] LookupError: unknown encoding: X-MAC-JAPANESE In-Reply-To: <1192270029.29.0.976742738273.issue1276@psf.upfronthosting.co.za> Message-ID: <1214481969.91.0.279753094573.issue1276@psf.upfronthosting.co.za> Hye-Shik Chang added the comment: Added a patch that implements codecs for CJK Macintosh encodings. I tried to implement that just alike the other existing CJK codecs, but it required many inefficient mapping tables due to their odd mappings (like this: u'ABCDE' <-> 'ab' AND u'ABCD' <-> 'ac'!). So, I decided to implement a general extension codec wrapper that can be easily modified by dictionaries given by Python code. Because all Mac CJK encodings have codecs that implement their base encodings, I just put their difference in Python codec code. The extension mechanism may be reused in customized codecs for in-house applications or legacy encoding supports. The first patch was generated for 2.6 trunk. I'm working on porting it to 3.0. Added file: http://bugs.python.org/file10743/maccjkcodecs-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 14:41:26 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 26 Jun 2008 12:41:26 +0000 Subject: [issue3207] file.write() after file.readline() in mode "r+" In-Reply-To: <1214477310.64.0.211264115228.issue3207@psf.upfronthosting.co.za> Message-ID: <1214484086.6.0.727644375269.issue3207@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Yes, the exact behaviour depends on multiple aspects. You should follow the C library conventions: http://www.cplusplus.com/reference/clibrary/cstdio/fopen.html """ For the modes where both read and writing (or appending) are allowed (those which include a "+" sign), the stream should be flushed (fflush) or repositioned (fseek, fsetpos, rewind) between either a reading operation followed by a writing operation or a writing operation followed by a reading operation. """ In your case, I suggest a call to fp.seek(0, os.SEEK_CUR) before you start writing data. And a fp.flush() after, in case you want to read again. Python 3.0 has a completely new I/O implementation, which may have its own problems, but hopefully the same on all platforms. And it happens to do the right thing in your example. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 14:48:16 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 26 Jun 2008 12:48:16 +0000 Subject: [issue1636874] File Read/Write Flushing Patch Message-ID: <1214484496.91.0.299393458713.issue1636874@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It seems that python3.0 behaves better in this area, specially on Windows. See the examples given in issue3207. And since the 'file' type does not use FILE* anymore, the given workaround is not necessary. ---------- nosy: +amaury.forgeotdarc resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 14:53:08 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 26 Jun 2008 12:53:08 +0000 Subject: [issue3206] Multiprocessing Array and sharedctypes.Array error in docs/implementation In-Reply-To: <1214473998.34.0.913565828871.issue3206@psf.upfronthosting.co.za> Message-ID: <1214484788.06.0.58081561472.issue3206@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: georg.brandl -> jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 15:16:25 2008 From: report at bugs.python.org (Haoyu Bai) Date: Thu, 26 Jun 2008 13:16:25 +0000 Subject: [issue3208] function annotation for builtin and C function In-Reply-To: <1214486185.01.0.390328488498.issue3208@psf.upfronthosting.co.za> Message-ID: <1214486185.01.0.390328488498.issue3208@psf.upfronthosting.co.za> New submission from Haoyu Bai : It is better if the function annotation(PEP 3107) can be supported by built-in function and C function writtin in extension module, just like the __doc__ attribute. ---------- messages: 68783 nosy: bhy severity: normal status: open title: function annotation for builtin and C function type: feature request versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 16:30:44 2008 From: report at bugs.python.org (Michael Schreifels) Date: Thu, 26 Jun 2008 14:30:44 +0000 Subject: [issue3209] Grammar error in UserDict module docs In-Reply-To: <1214490644.18.0.458364716656.issue3209@psf.upfronthosting.co.za> Message-ID: <1214490644.18.0.458364716656.issue3209@psf.upfronthosting.co.za> New submission from Michael Schreifels : The second paragraph of the UserDict module documentation begins with this: "This also module defines a class..." which should be: "This module also defines a class..." (See http://docs.python.org/lib/module-UserDict.html ) ---------- assignee: georg.brandl components: Documentation messages: 68784 nosy: georg.brandl, technel severity: normal status: open title: Grammar error in UserDict module docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 16:45:12 2008 From: report at bugs.python.org (Morten Lied Johansen) Date: Thu, 26 Jun 2008 14:45:12 +0000 Subject: [issue2650] re.escape should not escape underscore In-Reply-To: <1208441650.53.0.945063086485.issue2650@psf.upfronthosting.co.za> Message-ID: <1214491512.86.0.543795928041.issue2650@psf.upfronthosting.co.za> Morten Lied Johansen added the comment: One issue that the current implementation has, which I can't see have been commented on here, is that it kills utf8 characters (and probably every other character encoding that is multi-byte). A ? character in an utf8 encoded string will be represented by two bytes. When passed through re.escape, those two bytes are checked individually, and both are considered non-alphanumeric, and is consequently escaped, breaking the utf8 string into complete gibberish instead. ---------- nosy: +mortenlj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 17:18:39 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 26 Jun 2008 15:18:39 +0000 Subject: [issue2650] re.escape should not escape underscore In-Reply-To: <1208441650.53.0.945063086485.issue2650@psf.upfronthosting.co.za> Message-ID: <1214493519.39.0.824007509472.issue2650@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The escaped regexp is not utf-8 (why should it be?), but it still matches the same bytes in the searched text, which has to be utf-8 encoded anyway: >>> text = u"?t?".encode('utf-8') >>> regexp = u"?".encode('utf-8') >>> re.findall(regexp, text) ['\xc3\xa9', '\xc3\xa9'] >>> escaped_regexp = re.escape(regexp) >>> re.findall(escaped_regexp, text) ['\xc3\xa9', '\xc3\xa9'] ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 17:22:42 2008 From: report at bugs.python.org (Geoffrey Bache) Date: Thu, 26 Jun 2008 15:22:42 +0000 Subject: [issue3210] subprocess.Popen does not release process handles if process cannot be started In-Reply-To: <1214493762.8.0.246296591489.issue3210@psf.upfronthosting.co.za> Message-ID: <1214493762.8.0.246296591489.issue3210@psf.upfronthosting.co.za> New submission from Geoffrey Bache : Run the following code on Windows: import subprocess, os file = open("filename", "w") try: proc = subprocess.Popen("nosuchprogram", stdout=file) except OSError: file.close() os.remove("filename") This produces the following exception: Traceback (most recent call last): File "C:\processown.py", line 10, in os.remove("filename") WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'filename' When the CreateProcess call fails the subprocess module should release the handles it provides. Unfortunately it seems to raise WindowsError before doing this. See also http://groups.google.com/group/comp.lang.python/browse_thread/thread/6157691ea3324779/6274e9f8bc8a71ee?hl=en#6274e9f8bc8a71ee As Tim Golden points out, this can be worked around by doing os.close(file.fileno()) at the end instead of file.close() ---------- components: Extension Modules messages: 68787 nosy: gjb1002 severity: normal status: open title: subprocess.Popen does not release process handles if process cannot be started type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 17:47:09 2008 From: report at bugs.python.org (Facundo Batista) Date: Thu, 26 Jun 2008 15:47:09 +0000 Subject: [issue3122] sys.getsizeof() gives an AttributeError for _sre objects. In-Reply-To: <1213613487.11.0.64218401652.issue3122@psf.upfronthosting.co.za> Message-ID: <1214495229.7.0.701343152007.issue3122@psf.upfronthosting.co.za> Facundo Batista added the comment: Robert, do you have a test suite for the sizeof functionality? If not, you should start one ASAP, ;) This test should be included in that suit... ---------- nosy: +facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 18:01:57 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Thu, 26 Jun 2008 16:01:57 +0000 Subject: [issue3122] sys.getsizeof() gives an AttributeError for _sre objects. In-Reply-To: <1213613487.11.0.64218401652.issue3122@psf.upfronthosting.co.za> Message-ID: <1214496117.27.0.339621471182.issue3122@psf.upfronthosting.co.za> Robert Schuppenies added the comment: What would be a good way to identify *all* possible types? When I started, I included all objects in /Objects, but obviously this is not sufficient. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 18:02:27 2008 From: report at bugs.python.org (Graham Horler) Date: Thu, 26 Jun 2008 16:02:27 +0000 Subject: [issue1774370] Add Tkinter.Checkbutton get() and set(value) Message-ID: <1214496147.0.0.36105157946.issue1774370@psf.upfronthosting.co.za> Graham Horler added the comment: I referred to the man page, as it says this: Command-Line Name:-variable ... Defaults to the name of the button within its parent. When you create a Checkbutton widget without giving a variable=SomeVar, a default variable is created which Tkinter does not give you easy access to. My patch adds easy access to this default variable. This is analogous to being able to use an Entry widget without having to assign SomeVar to textvariable first. Yes it could be a property, but Tkinter.py does not use property anywhere else, and I am stuck with having to support python 2.1. What do you mean by "add it to all the other widgets that play with it"? Thanks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 18:44:30 2008 From: report at bugs.python.org (Jean-Paul Calderone) Date: Thu, 26 Jun 2008 16:44:30 +0000 Subject: [issue3211] warnings.warn_explicit raises SystemError In-Reply-To: <1214498670.25.0.948302654046.issue3211@psf.upfronthosting.co.za> Message-ID: <1214498670.25.0.948302654046.issue3211@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : Python 2.6b1+ (trunk:64531M, Jun 26 2008, 10:40:14) [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import warnings >>> warnings.warn_explicit(None, UserWarning, None, 0, None, {}) None:0: UserWarning: None >>> warnings.warn_explicit(None, UserWarning, None, 0, None, None) Traceback (most recent call last): File "", line 1, in SystemError: Objects/dictobject.c:677: bad argument to internal function >>> ---------- components: Library (Lib) messages: 68791 nosy: exarkun severity: normal status: open title: warnings.warn_explicit raises SystemError versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 18:50:24 2008 From: report at bugs.python.org (Glyph Lefkowitz) Date: Thu, 26 Jun 2008 16:50:24 +0000 Subject: [issue2235] __eq__ / __hash__ check doesn't take inheritance into account In-Reply-To: <1204660164.8.0.960033908954.issue2235@psf.upfronthosting.co.za> Message-ID: <1214499024.14.0.528346231557.issue2235@psf.upfronthosting.co.za> Glyph Lefkowitz added the comment: As barry said, this should have been a release blocker for the first beta... ;-) ---------- nosy: +glyph priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 18:50:57 2008 From: report at bugs.python.org (Andrii V. Mishkovskyi) Date: Thu, 26 Jun 2008 16:50:57 +0000 Subject: [issue3211] warnings.warn_explicit raises SystemError In-Reply-To: <1214498670.25.0.948302654046.issue3211@psf.upfronthosting.co.za> Message-ID: <1214499057.81.0.167456119626.issue3211@psf.upfronthosting.co.za> Andrii V. Mishkovskyi added the comment: Even more, Python 3.0 crashes from following code: Python 3.0b1+ (py3k:64528M, Jun 26 2008, 11:40:20) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from warnings import warn_explicit >>> warn_explicit(None, UserWarning, None, 0, None, None) Traceback (most recent call last): File "", line 1, in SystemError: Objects/dictobject.c:709: bad argument to internal function >>> warn_explicit(None, UserWarning, None, 0, None, {}) Segmentation fault ---------- nosy: +mishok13 type: -> crash versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 18:57:37 2008 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 26 Jun 2008 16:57:37 +0000 Subject: [issue1774370] Add Tkinter.Checkbutton get() and set(value) In-Reply-To: <1214496147.0.0.36105157946.issue1774370@psf.upfronthosting.co.za> Message-ID: Guilherme Polo added the comment: On Thu, Jun 26, 2008 at 1:02 PM, Graham Horler wrote: > > Graham Horler added the comment: >... > When you create a Checkbutton widget without giving a variable=SomeVar, > a default variable is created which Tkinter does not give you easy > access to. I'm aware of that and that is why everywhere I see Checkbutton being used I see a explicit variable being created. > ... > What do you mean by "add it to all the other widgets that play with it"? > I was referring to the other widgets that accepts *variable options. Ideally I would to prefer to never need to instantiate Variable or any of its subclasses, adding methods at the correct places. So what I meant was to add this functionality everywhere it would cause some benefit, not only for Checkbutton. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 18:58:44 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 26 Jun 2008 16:58:44 +0000 Subject: [issue2235] __eq__ / __hash__ check doesn't take inheritance into account In-Reply-To: <1204660164.8.0.960033908954.issue2235@psf.upfronthosting.co.za> Message-ID: <1214499524.86.0.797536898366.issue2235@psf.upfronthosting.co.za> Changes by Ralf Schmitt : ---------- nosy: +schmir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 19:06:12 2008 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 26 Jun 2008 17:06:12 +0000 Subject: [issue2235] __eq__ / __hash__ check doesn't take inheritance into account In-Reply-To: <1204660164.8.0.960033908954.issue2235@psf.upfronthosting.co.za> Message-ID: <1214499972.87.0.113283328221.issue2235@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'm going to have to ask someone else to look at this code. I am too busy with too many things to be able to take on a detailed code review. ---------- assignee: gvanrossum -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 19:26:03 2008 From: report at bugs.python.org (Tim Golden) Date: Thu, 26 Jun 2008 17:26:03 +0000 Subject: [issue3210] subprocess.Popen does not release process handles if process cannot be started In-Reply-To: <1214493762.8.0.246296591489.issue3210@psf.upfronthosting.co.za> Message-ID: <1214501163.62.0.916434448346.issue3210@psf.upfronthosting.co.za> Tim Golden added the comment: The attached file sp-3.py simulates what I think is happening within the subprocess module. Note that the OS handle is duplicated to allow inheritance and then left unclosed on failure. If it is explicitly closed, the file can be removed. There is no hope of closing the file handle since it was local to the __init__ method which failed but was not closed before exit and is now inaccessible. On the surface, the obvious fix would be a try/except block around the CreateProcess call (or its caller) which would then release whatever handles were needed. I'll try to get the time to put a patch together, but it would be useful to have confirmation of my theory. ---------- nosy: +tim.golden Added file: http://bugs.python.org/file10744/sp-3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 20:34:14 2008 From: report at bugs.python.org (Jonas Wagner) Date: Thu, 26 Jun 2008 18:34:14 +0000 Subject: [issue3212] ssl module - should test for a wrong cert In-Reply-To: <1214505254.08.0.113211233471.issue3212@psf.upfronthosting.co.za> Message-ID: <1214505254.08.0.113211233471.issue3212@psf.upfronthosting.co.za> New submission from Jonas Wagner : Currently test_ssl.py only tests for empty or broken certificates. One can break certificate validation in _ssl.c and they still pass. The following patch should fix this. - Jonas ---------- components: Tests files: add_wrong_cert_test.diff keywords: patch messages: 68797 nosy: janssen, jonas.wagner severity: normal status: open title: ssl module - should test for a wrong cert type: feature request versions: Python 2.6 Added file: http://bugs.python.org/file10745/add_wrong_cert_test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 20:54:16 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 26 Jun 2008 18:54:16 +0000 Subject: [issue3209] Grammar error in UserDict module docs In-Reply-To: <1214490644.18.0.458364716656.issue3209@psf.upfronthosting.co.za> Message-ID: <1214506456.35.0.110505571379.issue3209@psf.upfronthosting.co.za> Georg Brandl added the comment: Already fixed in SVN. Thanks! ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 21:00:20 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 26 Jun 2008 19:00:20 +0000 Subject: [issue3204] operator module docs are not updated to 3.0 In-Reply-To: <1214467110.98.0.886196184715.issue3204@psf.upfronthosting.co.za> Message-ID: <1214506820.82.0.190585297109.issue3204@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, committed as r64536. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 21:17:38 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 26 Jun 2008 19:17:38 +0000 Subject: [issue3211] warnings.warn_explicit raises SystemError In-Reply-To: <1214498670.25.0.948302654046.issue3211@psf.upfronthosting.co.za> Message-ID: <1214507858.34.0.53330973665.issue3211@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 21:48:42 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 26 Jun 2008 19:48:42 +0000 Subject: [issue3211] warnings.warn_explicit raises SystemError In-Reply-To: <1214498670.25.0.948302654046.issue3211@psf.upfronthosting.co.za> Message-ID: <1214509722.68.0.942417145662.issue3211@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 22:50:40 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 26 Jun 2008 20:50:40 +0000 Subject: [issue2512] decide what to do with gettext API In-Reply-To: <1206828512.7.0.626832335532.issue2512@psf.upfronthosting.co.za> Message-ID: <1214513440.5.0.6041860431.issue2512@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is something that should definitely happen before beta 2. ---------- priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 23:10:43 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 26 Jun 2008 21:10:43 +0000 Subject: [issue3122] sys.getsizeof() gives an AttributeError for _sre objects. In-Reply-To: <1213613487.11.0.64218401652.issue3122@psf.upfronthosting.co.za> Message-ID: <1214514635.08.0.529734145251.issue3122@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think it would be better to give a TypeError rather than an AttributeError for objects that don't support __sizeof__ as per other special methods. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 23:40:53 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Thu, 26 Jun 2008 21:40:53 +0000 Subject: [issue3122] sys.getsizeof() gives an AttributeError for _sre objects. In-Reply-To: <1213613487.11.0.64218401652.issue3122@psf.upfronthosting.co.za> Message-ID: <1214516453.08.0.427762313202.issue3122@psf.upfronthosting.co.za> Robert Schuppenies added the comment: The attribute error is caused by pattern_getattr, which tries to find __sizeof__, fails and then sets the error message. I don't know if casting the error is the right thing to do. Actually, sys.getsizeof() should work on any type. Another suggestion was a that sys.getsizeof allows one optional argument for a default size. If the default argument is provided, sys.getsizeof will not throw an exception (if the __sizeof__ method is missing or for any other error), but instead return the given default size. Still, an agreement on the right error message is needed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 26 23:59:56 2008 From: report at bugs.python.org (Graham Horler) Date: Thu, 26 Jun 2008 21:59:56 +0000 Subject: [issue1774370] Add Tkinter.Checkbutton get() and set(value) Message-ID: <1214517596.03.0.279480697623.issue1774370@psf.upfronthosting.co.za> Graham Horler added the comment: > I'm aware of that and that is why everywhere I see Checkbutton > being used I see a explicit variable being created. Absolutely the reason for this patch, to get rid of unnecessary code. What's not to like? > I was referring to the other widgets that accepts *variable options. > ... add this functionality everywhere it would cause some > benefit, not only for Checkbutton. I'm all for that, just could not find another widget that created an inaccessible default variable. Suggestions welcome. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 00:09:36 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 26 Jun 2008 22:09:36 +0000 Subject: [issue3122] sys.getsizeof() gives an AttributeError for _sre objects. In-Reply-To: <1213613487.11.0.64218401652.issue3122@psf.upfronthosting.co.za> Message-ID: <1214518176.81.0.454257762399.issue3122@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I wondered why getsizeof fails for _sre.SRE_Pattern objects when it succeeds for _socket.socket or struct.Struct. It turns out that _sre.SRE_Pattern defines the tp_getattr slot, and this prevents attribute lookup from searching the base class (object). This is a pity, because the base implementation (which use tp_basicsize) does the right thing for many objects. So I borrowed some code from the __format__ method, and here is a patch. Now classes are not handled specially any more; the distinction is between old-style instances, and all other objects. All tests pass, but I may have missed something important... ---------- nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file10746/sizeof.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 00:24:30 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 26 Jun 2008 22:24:30 +0000 Subject: [issue3122] sys.getsizeof() gives an AttributeError for _sre objects. In-Reply-To: <1213613487.11.0.64218401652.issue3122@psf.upfronthosting.co.za> Message-ID: <1214519070.41.0.289726902195.issue3122@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Robert, looking at your patch for the _sre module, I noticed that MatchObject.__sizeof__ includes the sizeof of one of its member (regs: a tuple of (begin, end) pairs). Why this one and not the others? I thought the rule (if there is a rule) was to include the used memory for members that are *not* python objects. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 00:43:17 2008 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 26 Jun 2008 22:43:17 +0000 Subject: [issue1774370] Add Tkinter.Checkbutton get() and set(value) In-Reply-To: <1214517596.03.0.279480697623.issue1774370@psf.upfronthosting.co.za> Message-ID: Guilherme Polo added the comment: > Graham Horler added the comment: > >> I'm aware of that and that is why everywhere I see Checkbutton >> being used I see a explicit variable being created. > > Absolutely the reason for this patch, to get rid of unnecessary code. > What's not to like? You are not getting my point here. What I'm trying to say is: if you are going to add such code to make it easier to get/set the variable option value then you better add it to every other widget that supports a variable option, or a textvariable (*variable in general). This would make things uniform, you would never need to create a Variable instance yourself. What I would really hate to see is a widget that acts like a Variable was created for me, so I can access/set its value, and others that have the same option but doesn't allow me that. And, finally, being explicit is not a bad thing. > >> I was referring to the other widgets that accepts *variable options. >> ... add this functionality everywhere it would cause some >> benefit, not only for Checkbutton. > > I'm all for that, just could not find another widget that created an > inaccessible default variable. Suggestions welcome. > Radiobutton for example ? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 00:53:05 2008 From: report at bugs.python.org (Bill Janssen) Date: Thu, 26 Jun 2008 22:53:05 +0000 Subject: [issue3212] ssl module - should test for a wrong cert In-Reply-To: <1214505254.08.0.113211233471.issue3212@psf.upfronthosting.co.za> Message-ID: <4b3e516a0806261553k4c919d6fo364cf250f7e8c48e@mail.gmail.com> Bill Janssen added the comment: OK, good idea. I'll put it in. Bill On Thu, Jun 26, 2008 at 11:34 AM, Jonas Wagner wrote: > > New submission from Jonas Wagner : > > Currently test_ssl.py only tests for empty or broken certificates. One > can break certificate validation in _ssl.c and they still pass. > > The following patch should fix this. > > - Jonas > > ---------- > components: Tests > files: add_wrong_cert_test.diff > keywords: patch > messages: 68797 > nosy: janssen, jonas.wagner > severity: normal > status: open > title: ssl module - should test for a wrong cert > type: feature request > versions: Python 2.6 > Added file: http://bugs.python.org/file10745/add_wrong_cert_test.diff > > _______________________________________ > Python tracker > > _______________________________________ > Added file: http://bugs.python.org/file10747/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Fri Jun 27 01:17:45 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 26 Jun 2008 23:17:45 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1213637497.57.0.0550109069119.issue3125@psf.upfronthosting.co.za> Message-ID: <1214522265.58.0.291490746725.issue3125@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Jesse: ping? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 01:34:48 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 26 Jun 2008 23:34:48 +0000 Subject: [issue3211] warnings.warn_explicit raises SystemError In-Reply-To: <1214498670.25.0.948302654046.issue3211@psf.upfronthosting.co.za> Message-ID: <1214523288.56.0.0951375636663.issue3211@psf.upfronthosting.co.za> Brett Cannon added the comment: I have a fix in the works; just waiting for the test suite to finish. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 01:40:21 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 26 Jun 2008 23:40:21 +0000 Subject: [issue3125] test_multiprocessing causes test_ctypes to fail In-Reply-To: <1214522265.58.0.291490746725.issue3125@psf.upfronthosting.co.za> Message-ID: <6A989758-6958-40E7-A4DB-0D61C9BF615F@gmail.com> Jesse Noller added the comment: Sorry - I've been sick and overly busy this week, the mp issues are on my asap pile On Jun 26, 2008, at 7:17 PM, Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > Jesse: ping? > > _______________________________________ > Python tracker > > _______________________________________ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 02:11:29 2008 From: report at bugs.python.org (Hans Ulrich Niedermann) Date: Fri, 27 Jun 2008 00:11:29 +0000 Subject: [issue3213] "pydoc -p" should listen to [::] if IPv6 is supported In-Reply-To: <1214525489.78.0.574038651579.issue3213@psf.upfronthosting.co.za> Message-ID: <1214525489.78.0.574038651579.issue3213@psf.upfronthosting.co.za> New submission from Hans Ulrich Niedermann : According to "pydoc --help", pydoc -p Start an HTTP server on the given port on the local machine. The IP address pydoc binds to is not specified, thus I would expect it to either bind to the local address or to the wildcard address. Current behaviour of "pydoc -p 1234" is to bind to the IPv4-only address 0.0.0.0:1234. On a IPv4/IPv6 dual-stack machine, I would expect pydoc to listen to either both 127.0.0.1:1234 and [::1]:, or just [::]: ([::] also catches accesses to IPv4 addresses such as 127.0.0.1). Then access to the pydoc webserver is available both via IPv4 (e.g. http://127.0.0.1:1234/) and IPv6 (e.g. http://[::1]:1234/), and in both cases via http://localhost:1234/ regardless whether localhost is resolved via IPv6 or IPv4. Trivial patch attached (tested on Linux x86 machine with local IPv6 networking). ---------- components: Library (Lib) files: python-pydoc-p-ipv6.patch keywords: patch messages: 68811 nosy: ndim severity: normal status: open title: "pydoc -p" should listen to [::] if IPv6 is supported type: behavior versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file10748/python-pydoc-p-ipv6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 02:40:47 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 27 Jun 2008 00:40:47 +0000 Subject: [issue3211] warnings.warn_explicit raises SystemError In-Reply-To: <1214498670.25.0.948302654046.issue3211@psf.upfronthosting.co.za> Message-ID: <1214527247.12.0.418480670588.issue3211@psf.upfronthosting.co.za> Brett Cannon added the comment: Fixed in r64549 for 2.6. Currently testing the merge for 3.0. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 02:55:17 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 27 Jun 2008 00:55:17 +0000 Subject: [issue3211] warnings.warn_explicit raises SystemError In-Reply-To: <1214498670.25.0.948302654046.issue3211@psf.upfronthosting.co.za> Message-ID: <1214528117.03.0.663221728913.issue3211@psf.upfronthosting.co.za> Brett Cannon added the comment: r64552 has the 3.0 fix. Thanks for the report gentleman! ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 07:08:28 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 27 Jun 2008 05:08:28 +0000 Subject: [issue3213] "pydoc -p" should listen to [::] if IPv6 is supported In-Reply-To: <1214525489.78.0.574038651579.issue3213@psf.upfronthosting.co.za> Message-ID: <1214543307.71.0.62738822955.issue3213@psf.upfronthosting.co.za> Martin v. L?wis added the comment: That will break on systems where AF_INET6 doesn't default to dual-stacked sockets and mapped v4 addresses (e.g. Windows); to make it work correctly, you'll also have to disable the IPV6_V6ONLY option, which then breaks on systems which don't implement that option (e.g. Windows XP). ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 07:11:00 2008 From: report at bugs.python.org (Paddy McCarthy) Date: Fri, 27 Jun 2008 05:11:00 +0000 Subject: [issue3214] Suggest change to glossary explanation: "Duck Typing" In-Reply-To: <1214543459.76.0.157400708153.issue3214@psf.upfronthosting.co.za> Message-ID: <1214543459.76.0.157400708153.issue3214@psf.upfronthosting.co.za> New submission from Paddy McCarthy : The official glossary entry here: http://docs.python.org/tut/node18.html#l2h-46 says: " duck-typing Pythonic programming style that determines an object's type by inspection of its method or attribute signature rather than by explicit relationship to some type object ("If it looks like a duck and quacks like a duck, it must be a duck.") By emphasizing interfaces rather than specific types, well-designed code improves its flexibility by allowing polymorphic substitution. Duck-typing avoids tests using type() or isinstance(). Instead, it typically employs hasattr() tests or EAFP programming. " I think it is should be changed to delete the use of hasattr and just rely on EAFP as in the second example here: http://en.wikipedia.org/wiki/Python_syntax_and_semantics#Exceptions The text would then read: " duck-typing Pythonic programming style that determines an object's type by inspection of its method or attribute signature rather than by explicit relationship to some type object ("If it looks like a duck and quacks like a duck, it must be a duck.") By emphasizing interfaces rather than specific types, well-designed code improves its flexibility by allowing polymorphic substitution. Duck-typing avoids tests using type(), hasattr() or isinstance(). Instead, it typically employs an EAFP style of programming. " The reason is that a hasattr test only tests for an attribute name. If it is present and say the method signature is wrong, then its the excecution of the code using the attribute that will find that out so it is redundant. Best to use EAFP for Duck typing as we trust you know what it is you are doing. - Paddy. ---------- assignee: georg.brandl components: Documentation messages: 68815 nosy: georg.brandl, paddy3118 severity: normal status: open title: Suggest change to glossary explanation: "Duck Typing" type: feature request versions: Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 07:42:38 2008 From: report at bugs.python.org (Hye-Shik Chang) Date: Fri, 27 Jun 2008 05:42:38 +0000 Subject: [issue1276] LookupError: unknown encoding: X-MAC-JAPANESE In-Reply-To: <1192270029.29.0.976742738273.issue1276@psf.upfronthosting.co.za> Message-ID: <1214545358.08.0.069442172672.issue1276@psf.upfronthosting.co.za> Changes by Hye-Shik Chang : Added file: http://bugs.python.org/file10749/maccjkcodecs-1-py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 07:44:27 2008 From: report at bugs.python.org (zouguangxian) Date: Fri, 27 Jun 2008 05:44:27 +0000 Subject: [issue993766] bdist_dumb and --relative on Windows fails Message-ID: <1214545467.54.0.0229958574954.issue993766@psf.upfronthosting.co.za> zouguangxian added the comment: I encounter the same problem of Mark Hammond. I check the code in repository, the ensure_relative function in python25 is: def ensure_relative (path): """Take the full path 'path', and make it a relative path so it can be the second argument to os.path.join(). """ drive, path = os.path.splitdrive(path) if sys.platform == 'mac': return os.sep + path else: if path[0:1] == os.sep: path = drive + path[1:] return path I also checked python24, and didn't find the code which described by Patrice LACOUTURE in msg60533 (view). ---------- nosy: +weck _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 08:56:45 2008 From: report at bugs.python.org (Geoffrey Bache) Date: Fri, 27 Jun 2008 06:56:45 +0000 Subject: [issue3210] subprocess.Popen does not release process handles if process cannot be started In-Reply-To: <1214493762.8.0.246296591489.issue3210@psf.upfronthosting.co.za> Message-ID: <1214549805.05.0.411042279118.issue3210@psf.upfronthosting.co.za> Geoffrey Bache added the comment: A note on workarounds, the garbage collector seems to release the handles when the function exits, so removing the file in a caller works for me. However Tim's proposed fix with os.close didn't do so. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 09:12:15 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Fri, 27 Jun 2008 07:12:15 +0000 Subject: [issue3122] sys.getsizeof() gives an AttributeError for _sre objects. In-Reply-To: <1213613487.11.0.64218401652.issue3122@psf.upfronthosting.co.za> Message-ID: <1214550735.19.0.465039873317.issue3122@psf.upfronthosting.co.za> Robert Schuppenies added the comment: You are right, the rule is to not include referenced objects. But, and this has been rather informal up to now, I handled transparently cached information as something that is added to the memory used by an object (see unicode.defenc). The same I applied to MatchObject.regs. The rational being that the user cannot know wether the match positions are cached or not. What do you think? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 09:52:25 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 27 Jun 2008 07:52:25 +0000 Subject: [issue3122] sys.getsizeof() gives an AttributeError for _sre objects. In-Reply-To: <1213613487.11.0.64218401652.issue3122@psf.upfronthosting.co.za> Message-ID: <1214553144.99.0.570546183127.issue3122@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I don't understand the relation between "the member is cached" and "it counts in the object's sizeof". What does "cached" mean? Does 'self.x = 3' create a cached member? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 11:05:39 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Fri, 27 Jun 2008 09:05:39 +0000 Subject: [issue3122] sys.getsizeof() gives an AttributeError for _sre objects. In-Reply-To: <1213613487.11.0.64218401652.issue3122@psf.upfronthosting.co.za> Message-ID: <1214557539.48.0.656616714887.issue3122@psf.upfronthosting.co.za> Robert Schuppenies added the comment: I was refering to the fact that something on the C level is cached without the Python user ever noticing that it wasn't there before. Caching itself is no criteria, but allocating memory without giving the user a chance to find out should be (in this context). Maybe I am missing something here, but calling match.regs creates a tuple which is not there before, but cannot be removed afterwards. This is why I handled it separately. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 11:49:03 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 27 Jun 2008 09:49:03 +0000 Subject: [issue3122] sys.getsizeof() gives an AttributeError for _sre objects. In-Reply-To: <1213613487.11.0.64218401652.issue3122@psf.upfronthosting.co.za> Message-ID: <1214560143.47.0.740606010668.issue3122@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > Caching itself is no criteria, but allocating memory without giving > the user a chance to find out should be (in this context). > ... calling match.regs creates a > tuple which is not there before, but cannot be removed > afterwards. This is why I handled it separately. Well, so why only include the tuple, and not objects inside the tuple? They may also count in allocated memory (not often: small numbers are shared) Does the same criteria apply to function.func_defaults and function.doc members? Both can be None, sizeof(None) would be added twice. Would you say the same for property members? class C(object): def setx(self): self.__x = 42 x = property(lambda self: self.__x) the value is not there before you call o.setx(), and cannot be removed afterwards. IMO, the criteria (to decide whether a container should include a particular PyObject member in its sizeof) should not include the way the member is created, or who created it, but only the current layout in memory. For example: can other objects hold references to this member, does it appear in gc.objects... And I propose this simple algorithm: do not include any referenced PyObject :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 12:21:04 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 27 Jun 2008 10:21:04 +0000 Subject: [issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up. In-Reply-To: <1198258890.48.0.235588402123.issue1682@psf.upfronthosting.co.za> Message-ID: <1214562064.53.0.488799725782.issue1682@psf.upfronthosting.co.za> Mark Dickinson added the comment: Trailing 'L's removed in r64557. A couple more minor issues: (1) fractions.gcd is exported but not documented. I'll add some documentation for it, unless anyone feels that it shouldn't have been exported in the first place. If so, please speak up! (2) The Fraction constructor is a little more lenient than it ought to be. For example: >>> Fraction('1.23', 1) Fraction(123, 100) I think this should really be a TypeError: a second argument to the constructor should only be permitted when the first argument is an integer. However, it seems fairly harmless, so I'm inclined to just leave this as it is and not mess with it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 12:26:42 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 27 Jun 2008 10:26:42 +0000 Subject: [issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up. In-Reply-To: <1198258890.48.0.235588402123.issue1682@psf.upfronthosting.co.za> Message-ID: <1214562402.55.0.491932116878.issue1682@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hmm. I don't much like this, though: >>> Fraction('1.23', 1.0) Fraction(123, 100) >>> Fraction('1.23', 1+0j) Fraction(123, 100) I'd say these should definitely be TypeErrors. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 13:16:52 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 27 Jun 2008 11:16:52 +0000 Subject: [issue3197] Documentation for fractions module needs work In-Reply-To: <1214392956.96.0.593199677678.issue3197@psf.upfronthosting.co.za> Message-ID: <1214565412.12.0.0210780445789.issue3197@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's an updated doc patch; it fixes an indentation issue in the previous patch, and adds documentation for the exported gcd function. Added file: http://bugs.python.org/file10750/fractions_doc2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 13:25:17 2008 From: report at bugs.python.org (Martijn Pieters) Date: Fri, 27 Jun 2008 11:25:17 +0000 Subject: [issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails Message-ID: <1214565917.03.0.338182263359.issue1424152@psf.upfronthosting.co.za> Martijn Pieters added the comment: I've created a python 2.4 compatible distribution of the python 2.5 urllib2 and httplib modules with the patch attached to this issue. This has proven especially useful in zc.buildout or other setuptools environments: http://pypi.python.org/pypi/httpsproxy_urllib2 ---------- nosy: +mjpieters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 14:22:10 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Fri, 27 Jun 2008 12:22:10 +0000 Subject: [issue3122] sys.getsizeof() gives an AttributeError for _sre objects. In-Reply-To: <1213613487.11.0.64218401652.issue3122@psf.upfronthosting.co.za> Message-ID: <1214569330.21.0.524085785884.issue3122@psf.upfronthosting.co.za> Robert Schuppenies added the comment: Okay, I get the point. With including unicode.defenc I already included a referenced object which was ruled out in the first place. And this for a good reason. What bugs me, though, is that this leaves out a potentially significant amount of memory. I know that this is already the case for shared objects (e.g. the above mentioned numbers) or malloc overhead, but adding yet another exception bothers me. On the other hand, since it's hidden behind the C API, I don't know how to address this problem. Maybe just give it some text in the documentation is sufficient. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 15:14:02 2008 From: report at bugs.python.org (Craig Holmquist) Date: Fri, 27 Jun 2008 13:14:02 +0000 Subject: [issue3215] Can't import sqlite3 in Python 2.6b1 In-Reply-To: <1214572442.55.0.146238509349.issue3215@psf.upfronthosting.co.za> Message-ID: <1214572442.55.0.146238509349.issue3215@psf.upfronthosting.co.za> New submission from Craig Holmquist : This is observed on Windows XP; I don't know if it affects other platforms. Trying to import sqlite3 gives this error: >>> import sqlite3 Traceback (most recent call last): File "", line 1, in import sqlite3 File "C:\Python26\Lib\sqlite3\__init__.py", line 24, in from dbapi2 import * File "C:\Python26\lib\sqlite3\dbapi2.py", line 27, in from _sqlite3 import * ImportError: DLL load failed: The specified module could not be found. A look at the dependencies for _sqlite3.pyd shows that it's trying to link to a file called sqlite3.pyd, which doesn't exist. Renaming sqlite3.dll to sqlite3.pyd doesn't work either, because then "import sqlite3" causes Python to try to import that file as a Python module (instead of C:\Python26\Lib\sqlite3\__init__.py). In Python 2.5.2, the _sqlite3.pyd module correctly links to sqlite3.dll. If there's already an issue regarding this I couldn't find it. ---------- components: Extension Modules, Windows messages: 68827 nosy: craigneuro severity: normal status: open title: Can't import sqlite3 in Python 2.6b1 type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 15:23:20 2008 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 27 Jun 2008 13:23:20 +0000 Subject: [issue2235] __eq__ / __hash__ check doesn't take inheritance into account In-Reply-To: <1204660164.8.0.960033908954.issue2235@psf.upfronthosting.co.za> Message-ID: <1214573000.21.0.825449673517.issue2235@psf.upfronthosting.co.za> Nick Coghlan added the comment: Amaury's patch doesn't currently remove the new-in-2.6 code that turns "tp_hash = NULL" at the C level into "__hash__ = None" at the Python level. I suspect that will prove to be a problem (and may be the cause of Django's woes, if I remember Glyph's python-dev posts correctly). I also don't believe the new TPSLOT entries should be necessary - we should be able to just revert all of this tp_hash related code to match the 2.5 implementation, and then see if we can find a way to emit the Py3k warning when __cmp__ or __eq__ are overridden without overriding __hash__ without breaking any existing code (if we can't, we may have to figure out a way to get 2to3 to check for it). P.S. you'd think I would have learnt by now not to try to make sense of typeobject.c when I'm tired ;) ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 16:00:16 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 27 Jun 2008 14:00:16 +0000 Subject: [issue3214] Suggest change to glossary explanation: "Duck Typing" In-Reply-To: <1214543459.76.0.157400708153.issue3214@psf.upfronthosting.co.za> Message-ID: <1214575216.88.0.325792783468.issue3214@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Georg, you may also want to amend this entry for ABCs. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 16:17:36 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 27 Jun 2008 14:17:36 +0000 Subject: [issue3215] Can't import sqlite3 in Python 2.6b1 In-Reply-To: <1214572442.55.0.146238509349.issue3215@psf.upfronthosting.co.za> Message-ID: <1214576256.3.0.26971550068.issue3215@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Confirmed here. As a workaround, you may rename sqlite3.dll to SQLITE3.pyd, with some uppercase letters: the dll loader won't care, but the python import does check for case consistency. There is a problem in PCBuild/sqlite3.vcproj, which is supposed to build sqlite3.dll: "OutputFile" is defined to a name ending with ".dll" for Relase and Debug builds, but not for the PGInstrument and PGUpdate builds: this property is inherited from pyd.vcprops, which defines a name ending with ".pyd". Of course, the distribution is a PGUpdate build... Martin, I suspect that you already corrected this in your distribution workspace, but the _sqlite3.pyd file was not rebuilt: >dir c:\python26\DLLs\*sqlite3* [...] 2008-06-19 13:56 247,296 sqlite3.dll 2008-06-19 13:53 40,960 _sqlite3.pyd The .dll is newer that the .pyd, when the project dependencies are in the other direction. ---------- assignee: -> loewis nosy: +amaury.forgeotdarc, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 16:37:50 2008 From: report at bugs.python.org (Sjoerd Mullender) Date: Fri, 27 Jun 2008 14:37:50 +0000 Subject: [issue3216] errors in msilib documentation In-Reply-To: <1214577470.61.0.590067451474.issue3216@psf.upfronthosting.co.za> Message-ID: <1214577470.61.0.590067451474.issue3216@psf.upfronthosting.co.za> New submission from Sjoerd Mullender : There are several errors in the msilib documentation. I'm sure I haven't found them all, but here are some: - add_data is documented to have two arguments. In reality it has three. - Execute on a View object is documented to have an optional argument. In reality it has a single required argument whose value may be None. - When I click on any of the references to Microsoft documentation, I get a page in Japanese. This is possibly more due to Microsoft than anything else (the links do contain en-us so it is a tad surprising). - There is extremely little information on how to actually use the module. ---------- assignee: georg.brandl components: Documentation messages: 68831 nosy: georg.brandl, sjoerd severity: normal status: open title: errors in msilib documentation versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 18:14:34 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 27 Jun 2008 16:14:34 +0000 Subject: [issue3217] make text is broken In-Reply-To: <1214583274.28.0.668624284342.issue3217@psf.upfronthosting.co.za> Message-ID: <1214583274.28.0.668624284342.issue3217@psf.upfronthosting.co.za> New submission from Benjamin Peterson : Traceback (most recent call last): File "/temp/python/trunk/Doc/tools/sphinx/__init__.py", line 135, in main app.builder.build_update() File "/temp/python/trunk/Doc/tools/sphinx/builder.py", line 199, in build_update 'out of date' % len(to_build)) File "/temp/python/trunk/Doc/tools/sphinx/builder.py", line 238, in build self.write(docnames, updated_docnames, method) File "/temp/python/trunk/Doc/tools/sphinx/builder.py", line 274, in write self.write_doc(docname, doctree) File "/temp/python/trunk/Doc/tools/sphinx/builder.py", line 1116, in write_doc self.writer.write(doctree, destination) File "/temp/python/trunk/Doc/tools/docutils/writers/__init__.py", line 78, in write self.translate() File "/temp/python/trunk/Doc/tools/sphinx/textwriter.py", line 33, in translate self.document.walkabout(visitor) File "/temp/python/trunk/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/temp/python/trunk/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/temp/python/trunk/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/temp/python/trunk/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/temp/python/trunk/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/temp/python/trunk/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/temp/python/trunk/Doc/tools/docutils/nodes.py", line 159, in walkabout child.walkabout(visitor) File "/temp/python/trunk/Doc/tools/docutils/nodes.py", line 151, in walkabout visitor.dispatch_visit(self) File "/temp/python/trunk/Doc/tools/docutils/nodes.py", line 1502, in dispatch_visit return method(node) File "/temp/python/trunk/Doc/tools/sphinx/textwriter.py", line 598, in unknown_visit raise NotImplementedError("Unknown node: " + node.__class__.__name__) NotImplementedError: Unknown node: subscript ---------- assignee: georg.brandl components: Documentation tools (Sphinx) messages: 68832 nosy: benjamin.peterson, georg.brandl severity: normal status: open title: make text is broken versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 18:34:50 2008 From: report at bugs.python.org (Jeffrey Yasskin) Date: Fri, 27 Jun 2008 16:34:50 +0000 Subject: [issue3197] Documentation for fractions module needs work In-Reply-To: <1214392956.96.0.593199677678.issue3197@psf.upfronthosting.co.za> Message-ID: <1214584490.11.0.616131787101.issue3197@psf.upfronthosting.co.za> Jeffrey Yasskin added the comment: > [sign] integer '.' [fraction] | [sign] ['.'] fraction Shouldn't make the second '.' optional or this will match plain numerators too. Otherwise, looks good. Thanks for fixing this! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 19:04:07 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 27 Jun 2008 17:04:07 +0000 Subject: [issue3154] "Quick search" box renders too long on FireFox 3 In-Reply-To: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> Message-ID: <1214586247.14.0.656531204326.issue3154@psf.upfronthosting.co.za> Terry J. Reedy added the comment: It would have been helpful if you had given the url in your message instead of requiring respondents to read a fuzzy image. In any case, there is no gray box on Windows XP with FF3 at any zoom level nor with IE7. I suggest closing this as idiosyncratic. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 19:04:39 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 27 Jun 2008 17:04:39 +0000 Subject: [issue3197] Documentation for fractions module needs work In-Reply-To: <1214392956.96.0.593199677678.issue3197@psf.upfronthosting.co.za> Message-ID: <1214586279.27.0.369054085022.issue3197@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Shouldn't make the second '.' optional or this will match plain > numerators too. Thanks. Fixed, and committed in r64561 (trunk), and r64562 (py3k). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 19:25:18 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 27 Jun 2008 17:25:18 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214587517.97.0.190679197138.issue3167@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Does that mean that both do the right thing or the wrong thing? ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 19:50:32 2008 From: report at bugs.python.org (Jean Brouwers) Date: Fri, 27 Jun 2008 17:50:32 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214589032.16.0.650947851736.issue3167@psf.upfronthosting.co.za> Jean Brouwers added the comment: The 64-bit version did the right thing, all along. The 32-bit result is correct only when compiled with option -xlibmieee. But the latter sets errno value to EDOM and that should be 0, rather remain unmodified. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 19:59:14 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 27 Jun 2008 17:59:14 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214589554.26.0.903798859399.issue3168@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Nasty. Here is the test extracted from test/test_cmath.py import math, cmath test_values = [0.01, 0.1, 0.2, 0.5, 0.9, 0.99] positive = test_values + [1.] + [1./x for x in test_values] for base in [0.5, 2., 10.]: for v in positive: z = cmath.log(v, base) x = math.log(v,base) print(base, v, z, x, z.real-x) On Winxp 3.0b1, |difference| is usually 0.0, else < 2.8e-17 6.6438561897747244 is, for instance, log2(100). It is also the first pair tested: log(.01, base=.5) 0.7124414133982310 is not close to any valid test output. On your system, is cmath64.log totally broken or just for base < 1? ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 20:05:11 2008 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 27 Jun 2008 18:05:11 +0000 Subject: [issue2235] __eq__ / __hash__ check doesn't take inheritance into account In-Reply-To: <1204660164.8.0.960033908954.issue2235@psf.upfronthosting.co.za> Message-ID: <1214589911.25.0.37759524958.issue2235@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks for giving this some time. I think that backwards compatibility should be a higher priority than being able to issue -3 warnings -- if the warnings can't be generated, too bad, we'll just have to document it. (I don't think that checking things at class scope is an easy task in 2to3, though I may be underestimating it.) So, concluding, insofar as the proposal is to revert 2.6 to the 2.5 semantics where it comes to __eq__ and __hash__, I'm okay with that if there's no other way to maintain backwards compatibility, even though my preference would be to still flag this when -3 is specified. (There may be similar backwards compatibility issues caused by stricted arg checking in __new__ and __init__ -- the same remarks apply there.) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 20:19:07 2008 From: report at bugs.python.org (Nick Edds) Date: Fri, 27 Jun 2008 18:19:07 +0000 Subject: [issue3218] 2to3 Fix_imports optimization In-Reply-To: <1214590746.67.0.566923914778.issue3218@psf.upfronthosting.co.za> Message-ID: <1214590746.67.0.566923914778.issue3218@psf.upfronthosting.co.za> New submission from Nick Edds : This is an optimization in pytree.py specifically for the bare_name pattern from fix_imports.py. It also has the isinstance change I previously suggested piggybacked onto it. Because the bare_name pattern is so massive (764 nodes!), it is very slow to call _recursive_matches on it. This fix has a special bare_name_matches fix that uses an iterative matching solution specifically tailored to the bare_name pattern. From preliminary testing, it appears to be roughly 25-30% faster than the previous version of 2to3. If I uncomment the fix_imports test, it fails 6 of them, but they are the same ones failed by the current version of 2to3 and it fails them in the same way, so I think it works. As with my previous isinstance chance, a one line change to test_pytree is required. ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) files: pytree.py messages: 68840 nosy: collinwinter, nedds severity: normal status: open title: 2to3 Fix_imports optimization type: performance Added file: http://bugs.python.org/file10751/pytree.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 20:20:58 2008 From: report at bugs.python.org (Senthil) Date: Fri, 27 Jun 2008 18:20:58 +0000 Subject: [issue754016] urlparse goes wrong with IP:port without scheme Message-ID: <1214590858.84.0.788939617171.issue754016@psf.upfronthosting.co.za> Senthil added the comment: I am attaching the modified patch, which addresses the port issue properly and handles 'http:', 'https:' only URLS. Also included the tests for it. Facundo, I gave sufficient thought on raising an Exception for URLS not staring with '//', and I am -1 for it. As urlparse module is used for handling both absolute URLs as well as relative URLS, this suggestion IMHO, would break the urlparse handling of all relative urls. For e.g, cases which are mentioned in the RFC 1808 (Section 5.1 Normal Examples). The way to inform the users to use '//net_loc' when they want net_loc, would be Docs/Help message (included in the patch) and otherwise urlparse following RFC1808, will treat it as the path. This case may seem absurd when 'www.python.org' is treated as path but perfect for parsing relative urls like just 'a'. More over this makes sense when we have relative urls with parameters and query, for e.g.'g:h','?x' Another way to handle this would be split urlparse into two methods: urlparse.absparse() urlparse.relparse() and let the user decide what he wants to do. I am passing a message to Web-SIG to discuss this further. Irrespective of this, if the patch looks okay for "handling the port issue" for 2.6 with the "Doc/Help message", then we should close this bug and take the discussion further in Web-SIG. (I shall provide the patch for 3.0 as well) Comments Please. Added file: http://bugs.python.org/file10752/issue754016-py26.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 20:21:20 2008 From: report at bugs.python.org (Senthil) Date: Fri, 27 Jun 2008 18:21:20 +0000 Subject: [issue754016] urlparse goes wrong with IP:port without scheme Message-ID: <1214590880.27.0.454235201474.issue754016@psf.upfronthosting.co.za> Changes by Senthil : Removed file: http://bugs.python.org/file10570/issue754016.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 20:47:39 2008 From: report at bugs.python.org (Miki Tebeka) Date: Fri, 27 Jun 2008 18:47:39 +0000 Subject: [issue3154] "Quick search" box renders too long on FireFox 3 In-Reply-To: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> Message-ID: <1214592459.24.0.843925869426.issue3154@psf.upfronthosting.co.za> Miki Tebeka added the comment: I see the big search box on http://docs.python.org/dev/. The "gray box" is just me highlighting the problematic area in the picture, not in the actual web site. Sorry I wasn't clear about that. My settings is FF3 on Untuntu 8.04 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 20:51:09 2008 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 27 Jun 2008 18:51:09 +0000 Subject: [issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up. In-Reply-To: <1198258890.48.0.235588402123.issue1682@psf.upfronthosting.co.za> Message-ID: <1214592669.33.0.763786794991.issue1682@psf.upfronthosting.co.za> Guido van Rossum added the comment: I think it's okay to accept Fraction('1.23', 1) -- if only because rejecting it means changing the default for the 2nd arg to None and that would slow it down again. I agree that if the type of the 2nd arg isn't int or long it should be rejected. That should not slow down the common path (two ints). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 20:58:24 2008 From: report at bugs.python.org (Miki Tebeka) Date: Fri, 27 Jun 2008 18:58:24 +0000 Subject: [issue3154] "Quick search" box renders too long on FireFox 3 In-Reply-To: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> Message-ID: <1214593104.86.0.886599143999.issue3154@psf.upfronthosting.co.za> Miki Tebeka added the comment: Changing the default font in FF to 14 points seems to fix the problem (my default is 22). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 21:13:25 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 27 Jun 2008 19:13:25 +0000 Subject: [issue3112] implement PEP 3134 exception reporting In-Reply-To: <1213475446.58.0.529901834278.issue3112@psf.upfronthosting.co.za> Message-ID: <1214594005.14.0.468360111499.issue3112@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is the final patch. Features: - cleanup of internal APIs - standardize traceback indentation (source lines are prefixed with 4 spaces) - break cycles along the context chain (a synthetic benchmark with a 6-level deep context chain shows a very moderate slowdown of 10-15%) Added file: http://bugs.python.org/file10753/exc_reporting.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 21:15:27 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 27 Jun 2008 19:15:27 +0000 Subject: [issue3154] "Quick search" box renders too long on FireFox 3 In-Reply-To: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> Message-ID: <1214594127.2.0.957681856088.issue3154@psf.upfronthosting.co.za> Benjamin Peterson added the comment: In that case, I think we can only advise to change the font size and/or make a Firefox bug report. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 21:17:46 2008 From: report at bugs.python.org (ganges master) Date: Fri, 27 Jun 2008 19:17:46 +0000 Subject: [issue3219] repeated keyword arguments In-Reply-To: <1214594266.45.0.948323179256.issue3219@psf.upfronthosting.co.za> Message-ID: <1214594266.45.0.948323179256.issue3219@psf.upfronthosting.co.za> New submission from ganges master : under python 2.5 (and possibly 2.6 beta), the following code runs successfully: >>> def f(**kwargs): ... print kwargs ... >>> f(a=5,b=7,a=8) {'a': 8, 'b': 7} while in python 2.4, it fails as expected (complaining that "a" is given twice") http://mail.python.org/pipermail/python-dev/2008-June/080782.html ---------- components: Interpreter Core messages: 68847 nosy: gangesmaster severity: normal status: open title: repeated keyword arguments type: behavior versions: Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 21:35:25 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 27 Jun 2008 19:35:25 +0000 Subject: [issue3219] repeated keyword arguments In-Reply-To: <1214594266.45.0.948323179256.issue3219@psf.upfronthosting.co.za> Message-ID: <1214595325.42.0.331280187567.issue3219@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 21:47:12 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 27 Jun 2008 19:47:12 +0000 Subject: [issue3220] Improve Bytes and Byte Array Methods doc In-Reply-To: <1214596032.47.0.841255812222.issue3220@psf.upfronthosting.co.za> Message-ID: <1214596032.47.0.841255812222.issue3220@psf.upfronthosting.co.za> New submission from Terry J. Reedy : Lib Ref/Built-in Types/Sequence Types/Bytes and Byte Array Methods The following set/frozenset and dict sections repeat (and for dicts, expands upon) the constructor interface from the Built-in Functions section. The sequence type sections do not. There should as least be a reference back. "For the constructor interface, see xxx" Similarly there is no mention here of the difference between bytes and bytearray, as there is below for the difference between set and frozenset. I think there should be here, in this section, even though there is back in Built-in Functions. (Sets/frozenset have the opposite problem in that Built-in Functions makes no mention that one is mutable and the other is not. I also think just one word for each should be added there too.) "The bytes and bytearray types have an additional class method: bytes.fromhex(string) " should be followed by "bytearray.fromhex(string)" and "This bytes class method returns a bytes object," changed to "These class methods return a bytes or bytearray object," I don't think the line 'Example:' is needed. A thread today on the Py3 lists again brought up the issue that just as bytes can be created by either a literal or class call, they could be represented on output by either, with possible confusion. Guido responded > Only if you didn't know that b'' is an alternative to bytes(). The b'' > notation is so much more compact and so much more helpful that I > really don't want to go back to it. We will somehow have to deal with > this through education and documentation. I suggest adding at the end: "Just as a bytes objects can be constructed either with a literal or a class constructor call, they could be represented on output either by a literal or class constructor call. The literal was chosen as being shorter, generally more useful, and consistent with how other classes are displayed. Similarly, the display of bytearrays uses the corresponding bytes literal. If you want to see the bytes of either class as integers, use tuple. >>> a, b = b'abc', bytes((1,2,3)) >>> a,b (b'abc', b'\x01\x02\x03') >>> tuple(a), tuple(b) ((97, 98, 99), (1, 2, 3)) >>> c = bytearray(a) >>> c, tuple(c) (bytearray(b'abc'), (97, 98, 99)) " ---------- assignee: georg.brandl components: Documentation messages: 68848 nosy: georg.brandl, tjreedy severity: normal status: open title: Improve Bytes and Byte Array Methods doc versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 22:19:12 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 27 Jun 2008 20:19:12 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214597951.99.0.462264806188.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: Jean, Could you try the attached patch and see if it fixes the problem? And I'd welcome comments from others on the patch---I'm not much of an autoconf hacker. ---------- keywords: +patch Added file: http://bugs.python.org/file10754/issue3167.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 22:36:21 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 27 Jun 2008 20:36:21 +0000 Subject: [issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up. In-Reply-To: <1198258890.48.0.235588402123.issue1682@psf.upfronthosting.co.za> Message-ID: <1214598980.98.0.893113944916.issue1682@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I agree that if the type of the 2nd arg isn't int or long it should be > rejected. That should not slow down the common path (two ints). Sounds good. Some care might be needed to avoid invalidating Fraction(n, d) where n and d are instances of numbers.Integral but not of type int or long. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 22:42:26 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 27 Jun 2008 20:42:26 +0000 Subject: [issue3219] repeated keyword arguments In-Reply-To: <1214594266.45.0.948323179256.issue3219@psf.upfronthosting.co.za> Message-ID: <1214599346.54.0.613972136389.issue3219@psf.upfronthosting.co.za> Benjamin Peterson added the comment: The attached patch gives a SyntaxError. ---------- keywords: +patch nosy: +benjamin.peterson priority: -> critical Added file: http://bugs.python.org/file10755/repeated_kwargs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 22:44:53 2008 From: report at bugs.python.org (Mike Speciner) Date: Fri, 27 Jun 2008 20:44:53 +0000 Subject: [issue3222] inf*inf gives inf, but inf**2 gives overflow error In-Reply-To: <1214599493.01.0.661310273111.issue3222@psf.upfronthosting.co.za> Message-ID: <1214599493.01.0.661310273111.issue3222@psf.upfronthosting.co.za> New submission from Mike Speciner : Tried this on wintel 32-bit (3.0b1 (r30b1:64403M, Jun 19 2008, 14:56:09) [MSC v.1500 32 bit (Intel)] ---------- messages: 68853 nosy: ms severity: normal status: open title: inf*inf gives inf, but inf**2 gives overflow error type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 22:45:05 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 27 Jun 2008 20:45:05 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214599505.32.0.856942341016.issue3168@psf.upfronthosting.co.za> Mark Dickinson added the comment: This one's quite baffling. Jean, can you confirm whether cmath.log(0.01, 0.5) and cmath.log(100., 2.0) give the correct answer or not? They should both give (6.6438561897747244-0j) (the sign on the imaginary part might turn out as + instead of -; that's okay.) ---------- priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 23:01:09 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 27 Jun 2008 21:01:09 +0000 Subject: [issue3223] py3k warn on use of frame.f_exc* In-Reply-To: <1214600469.72.0.692863353975.issue3223@psf.upfronthosting.co.za> Message-ID: <1214600469.72.0.692863353975.issue3223@psf.upfronthosting.co.za> New submission from Benjamin Peterson : f_exc_value and friends are no longer available in 3.0 and should get a Py3k warning on use. ---------- keywords: easy messages: 68855 nosy: benjamin.peterson priority: high severity: normal status: open title: py3k warn on use of frame.f_exc* type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 23:02:50 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 27 Jun 2008 21:02:50 +0000 Subject: [issue3221] SystemError: Parent module 'foo' not loaded on import statement In-Reply-To: <1214598929.49.0.609710487655.issue3221@psf.upfronthosting.co.za> Message-ID: <1214600570.61.0.283103969628.issue3221@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> twouters nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 23:04:03 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 27 Jun 2008 21:04:03 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1214600643.77.0.717757944439.issue3088@psf.upfronthosting.co.za> Mark Dickinson added the comment: test_multiprocessing is also still hanging for me, perhaps 30% of the times I run the test suite. When running the test by itself it seems to pass much more often, but not always. I just got the following output (on OS X 10.5.3/Intel). There was a hang at test_get; after around half-an-hour I hit Ctrl-C. Macintosh-3:trunk dickinsm$ ./python.exe Lib/test/test_multiprocessing.py test_array (__main__.WithProcessesTestArray) ... ok test_getobj_getlock_obj (__main__.WithProcessesTestArray) ... ok test_rawarray (__main__.WithProcessesTestArray) ... ok test_notify (__main__.WithProcessesTestCondition) ... ok test_notify_all (__main__.WithProcessesTestCondition) ... ok test_timeout (__main__.WithProcessesTestCondition) ... ok test_connection (__main__.WithProcessesTestConnection) ... ok test_duplex_false (__main__.WithProcessesTestConnection) ... ok test_sendbytes (__main__.WithProcessesTestConnection) ... ok test_spawn_close (__main__.WithProcessesTestConnection) ... ok test_event (__main__.WithProcessesTestEvent) ... ok test_finalize (__main__.WithProcessesTestFinalize) ... ok test_heap (__main__.WithProcessesTestHeap) ... ok test_import (__main__.WithProcessesTestImportStar) ... ok test_lock (__main__.WithProcessesTestLock) ... ok test_rlock (__main__.WithProcessesTestLock) ... ok test_enable_logging (__main__.WithProcessesTestLogging) ... ok test_level (__main__.WithProcessesTestLogging) ... ok test_active_children (__main__.WithProcessesTestProcess) ... ok test_cpu_count (__main__.WithProcessesTestProcess) ... ok test_current (__main__.WithProcessesTestProcess) ... ok test_process (__main__.WithProcessesTestProcess) ... ok test_recursion (__main__.WithProcessesTestProcess) ... ok test_terminate (__main__.WithProcessesTestProcess) ... ok test_fork (__main__.WithProcessesTestQueue) ... ok test_get (__main__.WithProcessesTestQueue) ... ^CTraceback (most recent call last): File "Lib/test/test_multiprocessing.py", line 1799, in main() File "Lib/test/test_multiprocessing.py", line 1796, in main test_main(unittest.TextTestRunner(verbosity=2).run) File "Lib/test/test_multiprocessing.py", line 1786, in test_main run(suite) File "/Users/dickinsm/python_source/trunk/Lib/unittest.py", line 743, in run test(result) File "/Users/dickinsm/python_source/trunk/Lib/unittest.py", line 454, in __call__ return self.run(*args, **kwds) File "/Users/dickinsm/python_source/trunk/Lib/unittest.py", line 450, in run test(result) File "/Users/dickinsm/python_source/trunk/Lib/unittest.py", line 454, in __call__ return self.run(*args, **kwds) File "/Users/dickinsm/python_source/trunk/Lib/unittest.py", line 450, in run test(result) File "/Users/dickinsm/python_source/trunk/Lib/unittest.py", line 293, in __call__ return self.run(*args, **kwds) File "/Users/dickinsm/python_source/trunk/Lib/unittest.py", line 272, in run testMethod() File "Lib/test/test_multiprocessing.py", line 415, in test_get parent_can_continue.wait() File "/Users/dickinsm/python_source/trunk/Lib/multiprocessing/synchronize.py" , line 292, in wait self._cond.wait(timeout) File "/Users/dickinsm/python_source/trunk/Lib/multiprocessing/synchronize.py" , line 201, in wait self._wait_semaphore.acquire(True, timeout) KeyboardInterrupt [50284 refs] Macintosh-3:trunk dickinsm$ ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 23:04:53 2008 From: report at bugs.python.org (Miki Tebeka) Date: Fri, 27 Jun 2008 21:04:53 +0000 Subject: [issue3154] "Quick search" box renders too long on FireFox 3 In-Reply-To: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> Message-ID: <1214600693.12.0.960354208261.issue3154@psf.upfronthosting.co.za> Miki Tebeka added the comment: When someone reports a problem in a web site, one of the worst answers is "it's a browser bug - we're not going to fix it". I agree this should be moved to a lower priority, but closing it is a bad decision IMO. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 23:06:41 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 27 Jun 2008 21:06:41 +0000 Subject: [issue3154] "Quick search" box renders too long on FireFox 3 In-Reply-To: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> Message-ID: <1214600801.1.0.946927800294.issue3154@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 22:35:29 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Fri, 27 Jun 2008 20:35:29 +0000 Subject: [issue3221] SystemError: Parent module 'foo' not loaded on import statement In-Reply-To: <1214598929.49.0.609710487655.issue3221@psf.upfronthosting.co.za> Message-ID: <1214598929.49.0.609710487655.issue3221@psf.upfronthosting.co.za> New submission from Ralf Schmitt : The following short program work in python 2.5, but does die with a SystemError in python2.6: ~/ cat t.py #! /usr/bin/env python res = dict(__package__='foo') exec "from os import path" in res ~/ python2.5 t.py ~/ python2.6 t.py Traceback (most recent call last): File "t.py", line 4, in exec "from os import path" in res File "", line 1, in SystemError: Parent module 'foo' not loaded I think this has been introduced with svn revision 42649 (http://hgpy.de/py/trunk/rev/54c72e1678d68ebbf274) Part of the diff reads: modules = PyImport_GetModuleDict(); parent = PyDict_GetItemString(modules, buf); if (parent == NULL) - parent = Py_None; + PyErr_Format(PyExc_SystemError, + "Parent module '%.200s' not loaded", buf); return parent; /* We expect, but can't guarantee, if parent != None, that: ---------- messages: 68850 nosy: schmir severity: normal status: open title: SystemError: Parent module 'foo' not loaded on import statement type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 23:40:53 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 27 Jun 2008 21:40:53 +0000 Subject: [issue3222] inf*inf gives inf, but inf**2 gives overflow error In-Reply-To: <1214599493.01.0.661310273111.issue3222@psf.upfronthosting.co.za> Message-ID: <1214602853.17.0.220922771088.issue3222@psf.upfronthosting.co.za> Mark Dickinson added the comment: This is a known problem, that's unlikely to change unless there's a serious overhaul of Python's floating point. The warning at the end of the math module documentation should probably be taken to apply equally to all the built-in floating-point operations: """The math module consists mostly of thin wrappers around the platform C math library functions. Behavior in exceptional cases is loosely specified by the C standards, and Python inherits much of its math- function error-reporting behavior from the platform C implementation. As a result, the specific exceptions raised in error cases (and even whether some arguments are considered to be exceptional at all) are not defined in any useful cross-platform or cross-release way. For example, whether math.log(0) returns -Inf or raises ValueError or OverflowError isn't defined, and in cases where math.log(0) raises OverflowError, math.log(0L) may raise ValueError instead.""" Or, as Tim Peters is fond of saying: """All Python behavior in the presence of infinities, NaNs, and signed zeroes is a platform-dependent accident, mostly inherited from that all C89 behavior in the presence of infinities, NaNs, and signed zeroes is a platform-dependent crapshoot.""" ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 23:50:33 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 27 Jun 2008 21:50:33 +0000 Subject: [issue3154] "Quick search" box renders too long on FireFox 3 In-Reply-To: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> Message-ID: <1214603432.98.0.865224159723.issue3154@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Running FF3.0 on Windows it looks fine at various font sizes. Maybe this is unique to the Ubuntu build. Also, I looked at the style sheet and didn't see anything odd. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 27 23:57:23 2008 From: report at bugs.python.org (Nick Edds) Date: Fri, 27 Jun 2008 21:57:23 +0000 Subject: [issue3218] 2to3 Fix_imports optimization In-Reply-To: <1214590746.67.0.566923914778.issue3218@psf.upfronthosting.co.za> Message-ID: <1214603843.1.0.0928097784639.issue3218@psf.upfronthosting.co.za> Nick Edds added the comment: Here are the changes we talked about to fix_imports.py which remove the functionality for members. This causes a substantial performance boost, as fix_imports was the main bottleneck for 2to3. Added file: http://bugs.python.org/file10756/fix_imports.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 00:22:48 2008 From: report at bugs.python.org (nfl) Date: Fri, 27 Jun 2008 22:22:48 +0000 Subject: [issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails Message-ID: <1214605368.56.0.268847437951.issue1424152@psf.upfronthosting.co.za> nfl added the comment: Hi, looks like the attached patch only works if I use urllib2.ProxyHandler({'https' : proxy}) at the start, but not when I use request.set_proxy(proxy, 'https') per request. I tested with Python 2.5.1 on Win32. ---------- nosy: +nfl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 00:49:17 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 27 Jun 2008 22:49:17 +0000 Subject: [issue3215] Can't import sqlite3 in Python 2.6b1 In-Reply-To: <1214572442.55.0.146238509349.issue3215@psf.upfronthosting.co.za> Message-ID: <1214606957.94.0.458321655291.issue3215@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 00:57:27 2008 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 27 Jun 2008 22:57:27 +0000 Subject: [issue3219] repeated keyword arguments In-Reply-To: <1214594266.45.0.948323179256.issue3219@psf.upfronthosting.co.za> Message-ID: <1214607447.29.0.389324368134.issue3219@psf.upfronthosting.co.za> Guido van Rossum added the comment: Don't do this for 2.5 please. ---------- nosy: +gvanrossum versions: +Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 01:09:30 2008 From: report at bugs.python.org (Christopher Li) Date: Fri, 27 Jun 2008 23:09:30 +0000 Subject: [issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails In-Reply-To: <1214605368.56.0.268847437951.issue1424152@psf.upfronthosting.co.za> Message-ID: <70318cbf0806271609h2018076ci299307b929772836@mail.gmail.com> Christopher Li added the comment: Hi NL, Can you please try this patch on top of the original patch? Thanks Chris --- .pc/fix-up/urllib2.py 2008-02-06 01:13:10.000000000 -0800 +++ urllib2.py 2008-06-27 15:45:34.000000000 -0700 @@ -253,7 +253,7 @@ class Request: return self.__r_host def set_proxy(self, host, type): - if self.type == 'https' and not self._tunnel_host: + if self.get_type() == 'https' and not self._tunnel_host: self._tunnel_host = self.host else: self.type = type On Fri, Jun 27, 2008 at 3:22 PM, nfl wrote: > > nfl added the comment: > > Hi, > > looks like the attached patch only works if I use > urllib2.ProxyHandler({'https' : proxy}) at the start, but not when I use > request.set_proxy(proxy, 'https') per request. I tested with Python > 2.5.1 on Win32. > > ---------- > nosy: +nfl > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 01:44:04 2008 From: report at bugs.python.org (Jean Brouwers) Date: Fri, 27 Jun 2008 23:44:04 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214610243.98.0.0188036624652.issue3168@psf.upfronthosting.co.za> Jean Brouwers added the comment: 3 different Python 2.6b1 builds: 1) 64-bit Python 2.6b1 on Solaris 10 built with SUN C (no -xlibmieee): Python 2.6b1 (r26b1:64398, Jun 19 2008, 20:27:39) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import cmath >>> cmath.log(0.01, 0.5) (0.71244141339823108+2.0556715512777863j) >>> cmath.log(100.0, 2.0) (0.71244151439608006-2.0556716794852954j) 2) 32-bit Python 2.6b1 on Solaris 10 built with SUN C -xlibmieee: Python 2.6b1 (r26b1:64398, Jun 24 2008, 13:50:09) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import cmath >>> cmath.log(0.01, 0.5) (6.6438561897747244-0j) >>> cmath.log(100.0, 2.0) (6.6438561897747253+0j) 3) 32-bit Python 2.6b1 on MacOS X 10.4.11 (Intel): Python 2.6b1 (r26b1:64398, Jun 23 2008, 18:36:08) [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import cmath >>> cmath.log(0.01, 0.5) (6.6438561897747244-0j) >>> cmath.log(100.0, 2.0) (6.6438561897747253+0j) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 02:37:24 2008 From: report at bugs.python.org (Adam Olsen) Date: Sat, 28 Jun 2008 00:37:24 +0000 Subject: [issue3154] "Quick search" box renders too long on FireFox 3 In-Reply-To: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> Message-ID: <1214613444.03.0.959538860751.issue3154@psf.upfronthosting.co.za> Adam Olsen added the comment: I've checked it again, using the font preferences rather than the zoom setting, and I can reproduce the problem. Part of the problem stems from using pixels to set the margin, rather than ems (or whatever the text box is based on). However, although the margin (at least visually) scales up evenly, the fonts themselves do not. Arguably this is a defect in Firefox, or maybe even the HTML specs themselves. Additionally, that only seems to control the visual margin. I've yet to figure out what controls the layout (such as wrapping the Go button). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 02:56:18 2008 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 28 Jun 2008 00:56:18 +0000 Subject: [issue2235] __eq__ / __hash__ check doesn't take inheritance into account In-Reply-To: <1204660164.8.0.960033908954.issue2235@psf.upfronthosting.co.za> Message-ID: <1214614577.88.0.705120804235.issue2235@psf.upfronthosting.co.za> Nick Coghlan added the comment: The _new__/__init__ stuff showed up on my diff as well (obviously) - that seemed to be doing a pretty good job of maintaining backwards compatibility. I'll dig into this further today and tomorrow - I'll probably start by reverting the relevant code back to exactly what is in 2.5, and then see how far I can get with adding the warning code back in while still keeping jek's test case working correctly. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 03:02:45 2008 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 28 Jun 2008 01:02:45 +0000 Subject: [issue2235] __eq__ / __hash__ check doesn't take inheritance into account In-Reply-To: <1204660164.8.0.960033908954.issue2235@psf.upfronthosting.co.za> Message-ID: <1214614965.48.0.519029343955.issue2235@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 03:08:28 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 28 Jun 2008 01:08:28 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214615308.91.0.187378984607.issue3167@psf.upfronthosting.co.za> Jean Brouwers added the comment: The patch does not work. The -xlibmieee flag is included in the cc command lines, like cc -c -xtarget=native -xlibmieee -DNDEBUG -xO5 -I. .... However, the resulting build produces to wrong result: Python 2.6b1 (r26b1:64398, Jun 27 2008, 18:04:19) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import math >>> math.log(float('-inf')) -inf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 06:01:58 2008 From: report at bugs.python.org (Chris AtLee) Date: Sat, 28 Jun 2008 04:01:58 +0000 Subject: [issue3224] Small typo in 2.6 what's new In-Reply-To: <1214625718.52.0.484421456661.issue3224@psf.upfronthosting.co.za> Message-ID: <1214625718.52.0.484421456661.issue3224@psf.upfronthosting.co.za> New submission from Chris AtLee : Index: Doc/whatsnew/2.6.rst =================================================================== --- Doc/whatsnew/2.6.rst (revision 64571) +++ Doc/whatsnew/2.6.rst (working copy) @@ -1284,7 +1284,7 @@ Here are all of the changes that Python 2.6 makes to the core Python language. * The :func:`hasattr` function was catching and ignoring all errors, - under the assumption that they meant a :meth:`__getattr__` method has + under the assumption that they meant a :meth:`__getattr__` method was failing somewhere and the return value of :func:`hasattr` would therefore be ``False``. This logic shouldn't be applied to :exc:`KeyboardInterrupt` and :exc:`SystemExit`, however; Python 2.6 will ---------- assignee: georg.brandl components: Documentation messages: 68868 nosy: catlee, georg.brandl severity: normal status: open title: Small typo in 2.6 what's new versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 09:06:58 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 07:06:58 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214636818.44.0.263281400998.issue3168@psf.upfronthosting.co.za> Mark Dickinson added the comment: More curious and more curious... I assume that cmath.log(100.0) and cmath.log(2.0) return the right things? (Both answers should have zero imaginary part.) Might this be some optimization bug? Can you turn off all optimizations and see what happens? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 10:51:54 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 08:51:54 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214643114.84.0.487487335684.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: > However, the resulting build produces to wrong result: Darn. That's probably because the linker needs the extra flag as well. Here's a revised patch for you to try. (You might need to do an "svn up" before it applies cleanly...) Added file: http://bugs.python.org/file10757/issue3167.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 10:52:01 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 08:52:01 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214643121.11.0.841793970117.issue3167@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file10754/issue3167.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 11:37:15 2008 From: report at bugs.python.org (Philip Dorrell) Date: Sat, 28 Jun 2008 09:37:15 +0000 Subject: [issue900744] catch invalid chunk length in httplib read routine Message-ID: <1214645835.72.0.101418911304.issue900744@psf.upfronthosting.co.za> Philip Dorrell added the comment: I have raised a "bug" 125 for boto ( http://code.google.com/p/boto/issues/detail?id=125 ) in relation to this problem, because if httplib.py is not fixed in Python 2.5, then any code calling httplib.py has to work around it by handling a ValueError exception when it occurs. With regard to the fix in Python 2.6, and reading through the httplib.py source, I conclude: * IncompleteRead(value) means something like "we were expecting to read X bytes but actually there aren't any more, and so far we have read *value*". * This meaning does not quite describe the error which this issue is about, which really needs its own separate exception class, e.g. InvalidHttpResponseChunkSize(value, badSize) meaning "we were expecting to read the size of the next chunk, but *badSize* is not a valid number, and so far we have read *value*) ---------- nosy: +pdorrell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 12:05:34 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 28 Jun 2008 10:05:34 +0000 Subject: [issue3174] 3.0b1 doesn't seem to install on macs In-Reply-To: <1214207562.58.0.0463418278377.issue3174@psf.upfronthosting.co.za> Message-ID: <1214647534.75.0.59768756207.issue3174@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Unassigning because I don't have time to work on this. The call to cachrsrc.py could probably be just removed from the Makefiles, this is a script that works with MacOS resource files and if the Mac-specific modules have been removed those are all gone as well. There's probably another issue though: the build procedure for IDLE.app uses some mac-specific modules as well. The easiest way to fix that is to recreate those modules in Mac/Tools (or another suitable directory) and not install them. As I said, I don't have time to work on Python 3.0 issues at all. ---------- assignee: ronaldoussoren -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 13:30:19 2008 From: report at bugs.python.org (kai zhu) Date: Sat, 28 Jun 2008 11:30:19 +0000 Subject: [issue3225] backport python 3.0 language functionality to python 2.5 by adding 8 opcodes to ceval.c In-Reply-To: <1214652619.02.0.198443521566.issue3225@psf.upfronthosting.co.za> Message-ID: <1214652619.02.0.198443521566.issue3225@psf.upfronthosting.co.za> New submission from kai zhu : this patch touches only Python/ceval.c. 1. the only existing thing it modifies is PyEval_EvalFrameEx (adds 8 extra cases for the new 3.0 opcodes, doesn't mess w/ any of the existing ones, or anything else as a matter of fact) 2. that, plus it defines (the new opcodes) #define SET_ADD 17 #define STORE_MAP 54 #define STORE_LOCALS 69 #define LOAD_BUILD_CLASS 34 #define MAKE_BYTES 35 #define POP_EXCEPT 36 #define UNPACK_EX 94 #define BUILD_SET 109 and some backported vars & helper functions only 2 contiguous areas of ceval.c is patched (1. & 2. - areas are delimited by the comments '// py3k') this simple patch seems sufficient in theory to allow the interpreter to natively execute most of 3.0's language syntax (nonlocal, print, extended unpacking... have been tested to work) *the one exception being pep3102 - keyword-only arguments i wrote 2 small scripts which gives an interactive function 'compile_py3k' similar to __builtin__.compile except it works only for 3.0 syntax. it doesn't actually compile, but rather cheats by querying it to a python 3.0 server via pipe io. here is an interactive demonstration of my script: example demonstrating pep3132 extended unpacking syntax: a,b,*c = 1,2,3,4 Python 2.5.2 (r252:60911, Jun 27 2008, 21:19:51) [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import py3to2 py3to2 server restarting with io: (4, 5) py3to2 server: Python 3.0b1 (r30b1:64395, Jun 24 2008, 21:53:55) py3to2 server: [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2 py3to2 server: Type "help", "copyright", "credits" or "license" for more information. py3to2 server: >>> src = "a,b,*c = 1,2,3,4" >>> codeobject = py3to2.compile_py3k(src,"","exec") 1 0 LOAD_CONST 5 ((1, 2, 3, 4)) 3 UNPACK_EX_py3k 2 6 STORE_NAME 0 (a) 9 STORE_NAME 1 (b) 12 STORE_NAME 2 (c) 15 LOAD_CONST 4 (None) 18 RETURN_VALUE >>> exec(codeobject); print "a=%s, b=%s, c=%s"%(a,b,c) a=1, b=2, c=[3, 4] >>> u can go c http://pypi.python.org/pypi?name=py3to2&version=20080628&:action=display for more info anyway, i think it would b a great boost for python 3.0 (which i think is very cool) if developers can test/develop it under the robust 2.5 environment. this patch plus some scripts could go a long way in making that happen ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) files: ceval.c messages: 68873 nosy: collinwinter, kaizhu severity: normal status: open title: backport python 3.0 language functionality to python 2.5 by adding 8 opcodes to ceval.c type: feature request versions: Python 2.5 Added file: http://bugs.python.org/file10758/ceval.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 13:40:45 2008 From: report at bugs.python.org (kai zhu) Date: Sat, 28 Jun 2008 11:40:45 +0000 Subject: [issue3225] backport python 3.0 language functionality to python 2.5 by adding 8 opcodes to ceval.c In-Reply-To: <1214652619.02.0.198443521566.issue3225@psf.upfronthosting.co.za> Message-ID: <1214653245.61.0.438647383568.issue3225@psf.upfronthosting.co.za> Changes by kai zhu : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 14:03:15 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 28 Jun 2008 12:03:15 +0000 Subject: [issue3225] backport python 3.0 language functionality to python 2.5 by adding 8 opcodes to ceval.c In-Reply-To: <1214652619.02.0.198443521566.issue3225@psf.upfronthosting.co.za> Message-ID: <1214654595.23.0.00452756195459.issue3225@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Sorry, but adding new feature into the 2.5.3 release (or any later 2.5 release) is unacceptable; the feature list of 2.5 was frozen in 2006 (when the first beta release of 2.5 was made). Thus, I'm rejecting the patch. ---------- nosy: +loewis resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 15:15:42 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 28 Jun 2008 13:15:42 +0000 Subject: [issue3174] 3.0b1 doesn't seem to install on macs In-Reply-To: <1214207562.58.0.0463418278377.issue3174@psf.upfronthosting.co.za> Message-ID: <1214658942.4.0.762748064554.issue3174@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> benjamin.peterson priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 15:18:42 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 28 Jun 2008 13:18:42 +0000 Subject: [issue3224] Small typo in 2.6 what's new In-Reply-To: <1214625718.52.0.484421456661.issue3224@psf.upfronthosting.co.za> Message-ID: <1214659122.08.0.569529036638.issue3224@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks. Fixed in r64572. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 17:05:35 2008 From: report at bugs.python.org (James Dominy) Date: Sat, 28 Jun 2008 15:05:35 +0000 Subject: [issue1503502] Pdb doesn't call flush on its stdout file descriptor Message-ID: <1214665535.67.0.963381095052.issue1503502@psf.upfronthosting.co.za> James Dominy added the comment: I've been working on a patch that allows pdb when run as a script to split it's output such that the program being debugged uses a specified tty for stdin/stdout, and leave the pdb.py IO on the original stdin/stdout. I think perhaps these efforts should be merged. Certainly your suggested patch would make my work much easier. ---------- nosy: +sirlark _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 17:16:14 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 28 Jun 2008 15:16:14 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1214666174.63.0.820972794207.issue3088@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I think I narrowed the problem to a race condition in *subclasses* of threading.local: In threadmodule.c::local_getattro, there is a chance that self->dict is changed before PyObject_GenericGetAttr is called. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 18:39:39 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 28 Jun 2008 16:39:39 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214671179.01.0.470994205679.issue3167@psf.upfronthosting.co.za> Jean Brouwers added the comment: Keep in mind also, these Python builds are compiled with the SUN compilers, i.e. the ./configure command line includes --without-gcc. If we do change the CC- and LINKFLAGS, those changes should only apply in that particular case. Using -xlibmieee in 3 places, BASECFLAGS, LDFLAGS and LDSHARED and without optimization produces the following for 32-bit: Python 2.6b1 (r26b1:64398, Jun 28 2008, 10:31:27) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import cmath >>> cmath.log(100.0) (4.6051701859880918+0j) >>> cmath.log(2.0) (0.69314718055994529+0j) >>> cmath.log(100.0, 2.0) (6.6438561897747253+0j) >>> import math >>> math.log(float('-inf')) Traceback (most recent call last): File "", line 1, in ValueError: math domain error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 18:45:32 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 28 Jun 2008 16:45:32 +0000 Subject: [issue3226] can't install on OSX 10.4 In-Reply-To: <1214671532.34.0.878967964042.issue3226@psf.upfronthosting.co.za> Message-ID: <1214671532.34.0.878967964042.issue3226@psf.upfronthosting.co.za> New submission from Benjamin Peterson : Mac/Makefile.in uses the arch command which doesn't have the ability to run a given architecture in 10.4 like it does in 10.5. Hence, the install fails. ---------- assignee: ronaldoussoren messages: 68879 nosy: benjamin.peterson, ronaldoussoren priority: release blocker severity: normal status: open title: can't install on OSX 10.4 versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 18:48:13 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 28 Jun 2008 16:48:13 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214671693.21.0.716349752486.issue3167@psf.upfronthosting.co.za> Jean Brouwers added the comment: The 32-but results are the same when built with -xO5. Python 2.6b1 (r26b1:64398, Jun 28 2008, 10:43:53) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import cmath >>> cmath.log(100.0) (4.6051701859880918+0j) >>> cmath.log(2.0) (0.69314718055994529+0j) >>> cmath.log(100.0, 2.0) (6.6438561897747253+0j) >>> import math >>> math.log(float('-inf')) Traceback (most recent call last): File "", line 1, in ValueError: math domain error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 18:51:20 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 28 Jun 2008 16:51:20 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214671879.95.0.628816021115.issue3168@psf.upfronthosting.co.za> Jean Brouwers added the comment: For 32-bit, see the latest posts at . _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 19:00:50 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 17:00:50 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214672450.21.0.527331457826.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Keep in mind also, these Python builds are compiled with the SUN > compilers, i.e. the ./configure command line includes --without-gcc. > If we do change the CC- and LINKFLAGS, those changes should only apply > in that particular case. Right. That's the purpose of the 'if's and 'case' tests in the configure patch. The test "$CC"=cc should exclude these changes from being applied when the C compiler is gcc. Do you happen to know which versions of Solaris support the -xlibmieee flag? Is it new in Solaris 10? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 19:04:26 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 17:04:26 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214672666.3.0.27028126477.issue3168@psf.upfronthosting.co.za> Mark Dickinson added the comment: What about cmath.log(100.0) and cmath.log(2.0) on 64-bit? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 19:08:48 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 28 Jun 2008 17:08:48 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214672928.26.0.864373992358.issue3168@psf.upfronthosting.co.za> Jean Brouwers added the comment: Here are the 64-bit results. First with -xO5: Python 2.6b1 (r26b1:64398, Jun 28 2008, 10:57:27) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import cmath >>> cmath.log(100.0) (4.6051701859880918+0j) >>> cmath.log(2.0) (0.69314718055994529+0j) >>> cmath.log(100.0, 2.0) (0.71244151439608006-2.0556716794852954j) >>> import math >>> math.log(float('-inf')) Traceback (most recent call last): File "", line 1, in ValueError: math domain error This is 64-bit with -xO0: Python 2.6b1 (r26b1:64398, Jun 28 2008, 11:02:57) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import cmath >>> cmath.log(100.0) (4.6051701859880918+0j) >>> cmath.log(2.0) (0.69314718055994529+0j) >>> cmath.log(100.0, 2.0) (6.6438561897747253+0j) >>> import math >>> math.log(float('-inf')) Traceback (most recent call last): File "", line 1, in ValueError: math domain error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 19:13:25 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 28 Jun 2008 17:13:25 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214673205.48.0.495262388049.issue3167@psf.upfronthosting.co.za> Jean Brouwers added the comment: The SUN compiler versions > cc -V cc: Sun C 5.8 2005/10/13 usage: cc [ options] files. Use 'cc -flags' for details > CC -V CC: Sun C++ 5.8 2005/10/13 Both define the following symbols: #define __SUNPRO_C 0x580 #define __SunOS_5_10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 19:17:05 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 17:17:05 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214673425.76.0.574255113937.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: Okay, here's a third version of the patch. Same as before, except that it makes sure that LDFLAGS are included in LDSHARED. Jean, does this patch fix the problem with math.log on 32-bit? If so, I'll check it in. Added file: http://bugs.python.org/file10759/issue3167.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 19:17:13 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 17:17:13 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214673433.66.0.297889522845.issue3167@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file10757/issue3167.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 19:20:00 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 28 Jun 2008 17:20:00 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214673600.06.0.737554078883.issue3168@psf.upfronthosting.co.za> Jean Brouwers added the comment: Forgot to mention, both 64-bit builds above includes -xlibmieee in the BASECFLAGS and LDFLAGS ./configure symbols (not LDSHARED!). The complete .configure command line was (with OPT adjusted accordingly): env CCSHARED="-KPIC" LDSHARED="cc -xtarget=native64 -G" LDFLAGS="- xlibmieee -xtarget=native64" CC="cc" CPP="cc -xtarget=native64 -E" BASECFLAGS="-xtarget=native64 -xlibmieee" CFLAGS="-xtarget=native64" CXX="CC -xtarget=native64" OPT="-xO5" ./configure --enable-shared -- without-gcc --disable-ipv6 --prefix=.... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 19:22:40 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 28 Jun 2008 17:22:40 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214673760.08.0.517190486292.issue3167@psf.upfronthosting.co.za> Jean Brouwers added the comment: Sorry, my previous post was wrong. The LDSHARED symbol did NOT include - xlibmieee. Only the BASECFLAGS and the LDFLAGS. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 19:26:16 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 17:26:16 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214673976.37.0.266619460014.issue3168@psf.upfronthosting.co.za> Mark Dickinson added the comment: This looks a lot like a compiler bug, then. Do you agree? I guess the next step would be to try to extract a smallest failing example from the Python code, and report the bug to Sun. It might first be interesting to insert some printfs in cmath_log to see where things go wrong (cmath_log does 2 log computations and a complex division; any of these 3 operations might be doing something strange. Of course, it's always possible that the compiler bug goes away when the printfs are added.) But at this point I'm going to claim that this bug isn't Python's fault, and suggest that this issue should be closed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 19:38:11 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 17:38:11 +0000 Subject: [issue3222] inf*inf gives inf, but inf**2 gives overflow error In-Reply-To: <1214599493.01.0.661310273111.issue3222@psf.upfronthosting.co.za> Message-ID: <1214674691.73.0.897738012444.issue3222@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing as 'won't fix'. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 20:21:55 2008 From: report at bugs.python.org (Joe P. Cool) Date: Sat, 28 Jun 2008 18:21:55 +0000 Subject: [issue3227] os.environ.clear has no effect on child processes In-Reply-To: <1214677315.57.0.385885068786.issue3227@psf.upfronthosting.co.za> Message-ID: <1214677315.57.0.385885068786.issue3227@psf.upfronthosting.co.za> New submission from Joe P. Cool : If I call os.environ.clear in a python program child processes still see the cleared entries. But when I iterate over the keys like so names = os.environ.keys() for k in names: del os.environ[k] then the entries are also deleted for the child processes. Where is the difference? Is this a bug? (Observed in Python 2.5.2) -- Joe ---------- components: Library (Lib) messages: 68891 nosy: joe.p.cool severity: normal status: open title: os.environ.clear has no effect on child processes versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 20:42:04 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 28 Jun 2008 18:42:04 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214678524.04.0.445289926189.issue3167@psf.upfronthosting.co.za> Jean Brouwers added the comment: I applied your patch to freshly updated configure and configure.in files and ran ./configure --without-gcc on Solaris. The resulting Makefile has empty BASECFLAGS and LDFLAGS. Here is the snippet: .... # Compiler options OPT= -DNDEBUG -O BASECFLAGS= CFLAGS= $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS) # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to # be able to build extension modules using the directories specified in the # environment variables CPPFLAGS= -I. -IInclude -I$(srcdir)/Include LDFLAGS= LDLAST= SGI_ABI= CCSHARED= -Kpic LINKFORSHARED= # Extra C flags added for building the interpreter object files. CFLAGSFORSHARED= # C flags used for building the interpreter object files PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE .... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 21:03:53 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 19:03:53 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214679833.12.0.145266742931.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: Sorry---my bad. I missed out the $ac_sys_release bit. Patch updated again. Jean, could you please give it one more try? Added file: http://bugs.python.org/file10760/issue3167.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 21:04:02 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 19:04:02 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214679842.39.0.506608698026.issue3167@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file10759/issue3167.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 21:14:44 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 28 Jun 2008 19:14:44 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214680484.92.0.0250126529826.issue3168@psf.upfronthosting.co.za> Jean Brouwers added the comment: This is pretty bizarre, take a look at the following, 64-bit Pyhon 2.6b1 -xO5. Python 2.6b1 (r26b1:64398, Jun 28 2008, 12:50:06) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import math >>> math.log(100.0, 2.0) 6.6438561897747253 >>> math.log(100.0) / math.log(2.0) 6.6438561897747253 >>> import cmath >>> cmath.log(100.0, 2.0) (0.71244151439608006-2.0556716794852954j) >>> cmath.log(complex(100.0, 0), complex(2.0, 0)) (0.71244151439608006-2.0556716794852954j) >>> cmath.log(2.0) (0.69314718055994529+0j) >>> cmath.log(100.0) (4.6051701859880918+0j) >>> cmath.log(100.0) / cmath.log(2.0) (6.6438561897747253+0j) There is only an issue with cmath.log(100.0, 2.0) but not with cmath.log(100.0) / cmath.log(2.0). That seems to indicate that the c_quot function may be the root cause of the problem. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 21:20:20 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Jun 2008 19:20:20 +0000 Subject: [issue2650] re.escape should not escape underscore In-Reply-To: <1208441650.53.0.945063086485.issue2650@psf.upfronthosting.co.za> Message-ID: <1214680820.57.0.134323815411.issue2650@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The escaped regexp is not utf-8 (why should it be?) I suppose it is annoying if you want to print the escaped regexp for debugging purposes. Anyway, I suppose someone should really decide if improving re.escape is worth it, and if not, close the bug. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 21:23:40 2008 From: report at bugs.python.org (Piotr Lewandowski) Date: Sat, 28 Jun 2008 19:23:40 +0000 Subject: [issue3228] mailbox.mbox creates files with execute bit set In-Reply-To: <1214681019.85.0.805710619223.issue3228@psf.upfronthosting.co.za> Message-ID: <1214681019.85.0.805710619223.issue3228@psf.upfronthosting.co.za> New submission from Piotr Lewandowski : #v+ $ umask 0077 $ stat /tmp/foobar stat: cannot stat `/tmp/foobar': No such file or directory $ python -c "from mailbox import mbox; m=mbox('/tmp/foobar', create=True); m.add(''); m.close()" $ stat -c '%A' /tmp/foobar -rwx------ #v- Bug is probably present in _create_carefully() function in mailbox.py. os.open() takes mode argument (which defaults to 0777) but it's not supplied there. #v+ $ grep -A2 'def _create_carefully' /usr/lib/python2.5/mailbox.py def _create_carefully(path): """Create a file if it doesn't exist and open for reading and writing.""" fd = os.open(path, os.O_CREAT | os.O_EXCL | os.O_RDWR) #v- ---------- components: Library (Lib) messages: 68896 nosy: pl severity: normal status: open title: mailbox.mbox creates files with execute bit set type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 21:33:41 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Jun 2008 19:33:41 +0000 Subject: [issue3092] Wrong unicode size detection in pybench In-Reply-To: <1213300200.75.0.77296570553.issue3092@psf.upfronthosting.co.za> Message-ID: <1214681621.82.0.787752734583.issue3092@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > You're right: probably not. Would be great to have the test on the > Py2.x version as well - to see the difference in performance. I'm not following you, what test are you talking about? The patch is only about reporting of the Python build characteristics, it does not (AFAIK) change anything to how or what tests are run. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 21:36:54 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Jun 2008 19:36:54 +0000 Subject: [issue3081] Py_(X)SETREF macros In-Reply-To: <1213211633.2.0.340935924246.issue3081@psf.upfronthosting.co.za> Message-ID: <1214681814.74.0.410093993937.issue3081@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This new patch avoids using temporary variables named "new", it also adopts the "do { ... } while (0)" idiom for definition of the macros. Added file: http://bugs.python.org/file10761/py_setref.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 21:38:21 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 28 Jun 2008 19:38:21 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214681901.07.0.992173686979.issue3168@psf.upfronthosting.co.za> Jean Brouwers added the comment: Trying to isolate and duplicate the problem with c_quot isn't quite working. See the attached c_quot.c file and the results at the end. Added file: http://bugs.python.org/file10762/c_quot.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 21:39:57 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 19:39:57 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214681997.31.0.89470506424.issue3168@psf.upfronthosting.co.za> Mark Dickinson added the comment: Could you try the attached patch, and see what output you get from cmath.log(100., 2.)? (On 64-bit, of course.) ---------- keywords: +patch Added file: http://bugs.python.org/file10763/issue3168.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 21:40:36 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Jun 2008 19:40:36 +0000 Subject: [issue2834] re.IGNORECASE not Unicode-ready In-Reply-To: <1210581845.07.0.550614143529.issue2834@psf.upfronthosting.co.za> Message-ID: <1214682036.11.0.213063971619.issue2834@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Same here, re.LOCALE doesn't circumvent the problem. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 21:43:59 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 19:43:59 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214682239.7.0.680167833182.issue3168@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Trying to isolate and duplicate the problem with c_quot isn't quite > working. See the attached c_quot.c file and the results at the end. I'd expect that you'd need both the cmath_log and the c_quot functions, probably in separate files that are compiled independently and then linked together. It looks like it's somehow the combination of these two that's causing a problem. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 21:53:36 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sat, 28 Jun 2008 19:53:36 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214682816.92.0.894654527748.issue3167@psf.upfronthosting.co.za> Jean Brouwers added the comment: Yep, that one works. As before, using ./configure --without-gcc ... .... BASECFLAGS= -xlibmieee CFLAGS= $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS) # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to # be able to build extension modules using the directories specified in the # environment variables CPPFLAGS= -I. -IInclude -I$(srcdir)/Include LDFLAGS= -xlibmieee .... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 22:12:00 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 28 Jun 2008 20:12:00 +0000 Subject: [issue3081] Py_(X)SETREF macros In-Reply-To: <1213211633.2.0.340935924246.issue3081@psf.upfronthosting.co.za> Message-ID: <1214683920.0.0.448485902593.issue3081@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -1 on the new macros. The mnemonic doesn't work for me and the example code fragments are to my eyes less readable than before. These add to the learning curve for reading and writing C extensions and provide nearly zero benefits. Assigning from an INCREF feels weird. It is somewhat at odds with our coding style where we tend to stick with dirt simple C, trying to put operations on different lines rather than combining too many step in a single line. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 22:27:24 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Jun 2008 20:27:24 +0000 Subject: [issue2834] re.IGNORECASE not Unicode-ready In-Reply-To: <1210581845.07.0.550614143529.issue2834@psf.upfronthosting.co.za> Message-ID: <1214684844.73.0.533760513068.issue2834@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Uh, actually, it works if you specify re.UNICODE. If you don't, the getlower() function in _sre.c falls back to the plain ASCII algorithm. >>> pat = re.compile('?', re.IGNORECASE | re.UNICODE) >>> pat.match('?') <_sre.SRE_Match object at 0xb7c66c28> >>> pat.match('?') <_sre.SRE_Match object at 0xb7c66cd0> I wonder if re.UNICODE shouldn't be the default in Py3k, at least when the pattern is a string and not a bytes object. There may also be a re.ASCII flag for those cases where people want to fallback to the old behaviour. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 22:31:54 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Jun 2008 20:31:54 +0000 Subject: [issue3081] Py_(X)SETREF macros In-Reply-To: <1214683920.0.0.448485902593.issue3081@psf.upfronthosting.co.za> Message-ID: <1214685111.6074.20.camel@fsol> Antoine Pitrou added the comment: Le samedi 28 juin 2008 ? 20:12 +0000, Raymond Hettinger a ?crit : > Raymond Hettinger added the comment: > > -1 on the new macros. The mnemonic doesn't work for me and the example > code fragments are to my eyes less readable than before. These add to > the learning curve for reading and writing C extensions and provide > nearly zero benefits. They might not be ideal, but I think they can be helpful to avoid writing incorrect code out of laziness. There is already Py_CLEAR with similar purposes. > Assigning from an INCREF feels weird. It is somewhat at odds with our > coding style where we tend to stick with dirt simple C, trying to put > operations on different lines rather than combining too many step in a > single line. Ok. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 22:44:15 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 20:44:15 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214685855.35.0.696248075583.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: Add comment to patch. Added file: http://bugs.python.org/file10764/issue3167.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 22:44:22 2008 From: report at bugs.python.org (Martina Oefelein) Date: Sat, 28 Jun 2008 20:44:22 +0000 Subject: [issue3229] Language reference, class definitions: missing text in "Programmer's note" In-Reply-To: <1214685862.01.0.416464861432.issue3229@psf.upfronthosting.co.za> Message-ID: <1214685862.01.0.416464861432.issue3229@psf.upfronthosting.co.za> New submission from Martina Oefelein : In the language reference, compound statements, class definitions: """ Programmer?s note: Variables defined in the class definition are class can be set in a method with self.name = value. """ This sentence doesn't is not even grammatically valid. It seems that there is something missing after "are class". See: http://docs.python.org/dev/3.0/reference/compound_stmts.html#class- definitions In 2.5, the corresponding text is: """ Programmer's note: Variables defined in the class definition are class variables; they are shared by all instances. To define instance variables, they must be given a value in the __init__() method or in another method. """ ---------- assignee: georg.brandl components: Documentation messages: 68908 nosy: georg.brandl, oefe severity: normal status: open title: Language reference, class definitions: missing text in "Programmer's note" versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 22:44:22 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 20:44:22 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214685862.81.0.362021766812.issue3167@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file10760/issue3167.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 22:48:22 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 28 Jun 2008 20:48:22 +0000 Subject: [issue3227] os.environ.clear has no effect on child processes In-Reply-To: <1214677315.57.0.385885068786.issue3227@psf.upfronthosting.co.za> Message-ID: <1214686102.89.0.000421479410061.issue3227@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This has been fixed in the upcoming Python 2.6. ---------- nosy: +benjamin.peterson resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 22:51:59 2008 From: report at bugs.python.org (Morten Lied Johansen) Date: Sat, 28 Jun 2008 20:51:59 +0000 Subject: [issue2650] re.escape should not escape underscore In-Reply-To: <1208441650.53.0.945063086485.issue2650@psf.upfronthosting.co.za> Message-ID: <1214686319.93.0.360117004902.issue2650@psf.upfronthosting.co.za> Morten Lied Johansen added the comment: In my particular case, we were passing the regex on to a database which has regex support syntactically equal to Python, so it seemed natural to use re.escape to make sure we weren't matching against the pattern we really wanted. The documentation of re.escape also states that it will only escape non- alphanumeric characters, which is apparently only true if you are using a single byte encoding (ie. not utf-8, or any other encoding using more than a single byte per character). At the very least, that's probably worth mentioning in the docs. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 22:56:08 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 28 Jun 2008 20:56:08 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214686568.88.0.111092233361.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: Martin, Do you have a moment to do a sanity check on the attached patch? The aim of the patch is to add the -xlibmieee flag when compiling and linking on Solaris using Sun's compiler rather than gcc. Jean Brouwers has confirmed that the patch fixes the test_math failure on this platform. I'm not very sure of myself when it comes to messing with autoconf, so I'd like someone else to look this over before it gets committed. If you don't have time right now, please do just assign it back to me. ---------- assignee: marketdickinson -> loewis nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 23:12:24 2008 From: report at bugs.python.org (Jakub Wilk) Date: Sat, 28 Jun 2008 21:12:24 +0000 Subject: [issue3228] mailbox.mbox creates files with execute bit set In-Reply-To: <1214681019.85.0.805710619223.issue3228@psf.upfronthosting.co.za> Message-ID: <1214687544.7.0.818865304901.issue3228@psf.upfronthosting.co.za> Changes by Jakub Wilk : ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 23:24:20 2008 From: report at bugs.python.org (Bill Janssen) Date: Sat, 28 Jun 2008 21:24:20 +0000 Subject: [issue3212] ssl module - should test for a wrong cert In-Reply-To: <1214505254.08.0.113211233471.issue3212@psf.upfronthosting.co.za> Message-ID: <1214688260.17.0.500005327716.issue3212@psf.upfronthosting.co.za> Bill Janssen added the comment: I've added this into my patch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 23:31:04 2008 From: report at bugs.python.org (Bill Janssen) Date: Sat, 28 Jun 2008 21:31:04 +0000 Subject: [issue3162] ssl.SSLSocket implements methods that are overriden by socket.socket.__init__ and methods with incorrect names. In-Reply-To: <1214068420.92.0.41617535069.issue3162@psf.upfronthosting.co.za> Message-ID: <1214688664.19.0.117280384541.issue3162@psf.upfronthosting.co.za> Bill Janssen added the comment: Thanks for pointing this out. I've got a patch for the overrides and the misnamings already. We don't have implementations for recvfrom_into, or recv_into. If you'd care to create a patch for that, it would help. ---------- assignee: -> janssen nosy: +janssen resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 23:31:47 2008 From: report at bugs.python.org (Martina Oefelein) Date: Sat, 28 Jun 2008 21:31:47 +0000 Subject: [issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE? In-Reply-To: <1214688707.09.0.872875806221.issue3230@psf.upfronthosting.co.za> Message-ID: <1214688707.09.0.872875806221.issue3230@psf.upfronthosting.co.za> New submission from Martina Oefelein : The first use of PySet_GET_SIZE in dict_fromkeys (file dictobject.c) is applied to a PyDictObject. These seem to work by chance, as the PyDictObject and PySetObject have very similar structure so that it does not matter if you cast a PyDictObject* to a PySetObject*. But if their structure ever diverges, this would cause unpredictable behaviour. Thus, this use of PySet_GET_SIZE should probably be replaced with a call of PyDict_Size. (There are two more calls to PySet_GET_SIZE resp. _PySet_NextEntry in the same function, but these are OK as they actually apply to a set.) ---------- components: Interpreter Core messages: 68914 nosy: oefe severity: normal status: open title: dictobject.c: inappropriate use of PySet_GET_SIZE? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 23:34:37 2008 From: report at bugs.python.org (Martina Oefelein) Date: Sat, 28 Jun 2008 21:34:37 +0000 Subject: [issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE? In-Reply-To: <1214688707.09.0.872875806221.issue3230@psf.upfronthosting.co.za> Message-ID: <1214688877.14.0.718939232717.issue3230@psf.upfronthosting.co.za> Changes by Martina Oefelein : ---------- versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 23:35:58 2008 From: report at bugs.python.org (Bill Janssen) Date: Sat, 28 Jun 2008 21:35:58 +0000 Subject: [issue2973] _ssl compiler warnings In-Reply-To: <1211822122.76.0.619319801709.issue2973@psf.upfronthosting.co.za> Message-ID: <1214688958.47.0.508374711862.issue2973@psf.upfronthosting.co.za> Bill Janssen added the comment: Any progress here? I haven't yet found a formulation which suppresses the warning on all platforms. I'm guessing there will have to be some kind of cpp test #if SOMEFEATURE #define D2I_PARAMETER_2_TYPE unsigned char * #else #define D2I_PARAMETER_2_TYPE const unsigned char * #endif ---------- nosy: +janssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 23:45:24 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 28 Jun 2008 21:45:24 +0000 Subject: [issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE? In-Reply-To: <1214688707.09.0.872875806221.issue3230@psf.upfronthosting.co.za> Message-ID: <1214689524.53.0.866261112493.issue3230@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 23:49:13 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 28 Jun 2008 21:49:13 +0000 Subject: [issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE? In-Reply-To: <1214688707.09.0.872875806221.issue3230@psf.upfronthosting.co.za> Message-ID: <1214689753.87.0.938830574099.issue3230@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Will get this fixed-up. ---------- priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 28 23:58:49 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 28 Jun 2008 21:58:49 +0000 Subject: [issue2973] _ssl compiler warnings In-Reply-To: <1211822122.76.0.619319801709.issue2973@psf.upfronthosting.co.za> Message-ID: <1214690329.66.0.984443993488.issue2973@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Yes, although I have no idea what that feature may be... (sigh) Oh well, it's a wish. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 00:02:12 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 28 Jun 2008 22:02:12 +0000 Subject: [issue3226] can't install on OSX 10.4 In-Reply-To: <1214671532.34.0.878967964042.issue3226@psf.upfronthosting.co.za> Message-ID: <1214690532.08.0.395105998166.issue3226@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- versions: -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 00:04:52 2008 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 28 Jun 2008 22:04:52 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214690692.5.0.883522587961.issue3167@psf.upfronthosting.co.za> Skip Montanaro added the comment: Dunno about Sun's compiler, but I get test errors on Solaris 10 using gcc 4.2: ====================================================================== FAIL: test_specific_values (test.test_cmath.CMathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tuba/skipm/src/python-svn/trunk/Lib/test/test_cmath.py", line 338, in test_specific_values self.fail('OverflowError not raised in test %s' % test_str) AssertionError: OverflowError not raised in test exp0052: exp(complex(710.0, 1.5)) ---------------------------------------------------------------------- Ran 11 tests in 0.067s FAILED (failures=1) test test_cmath failed -- Traceback (most recent call last): File "/home/tuba/skipm/src/python-svn/trunk/Lib/test/test_cmath.py", line 338, in test_specific_values self.fail('OverflowError not raised in test %s' % test_str) AssertionError: OverflowError not raised in test exp0052: exp(complex(710.0, 1.5)) ====================================================================== FAIL: testLog (test.test_math.MathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tuba/skipm/src/python-svn/trunk/Lib/test/test_math.py", line 419, in testLog self.assertRaises(ValueError, math.log, NINF) AssertionError: ValueError not raised ====================================================================== FAIL: testLog10 (test.test_math.MathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tuba/skipm/src/python-svn/trunk/Lib/test/test_math.py", line 441, in testLog10 self.assertRaises(ValueError, math.log10, NINF) AssertionError: ValueError not raised ---------- nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 00:17:20 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 28 Jun 2008 22:17:20 +0000 Subject: [issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE? In-Reply-To: <1214688707.09.0.872875806221.issue3230@psf.upfronthosting.co.za> Message-ID: <1214691440.47.0.666736286765.issue3230@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed. See r64577 Thanks for the report. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 00:20:00 2008 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 28 Jun 2008 22:20:00 +0000 Subject: [issue2834] re.IGNORECASE not Unicode-ready In-Reply-To: <1210581845.07.0.550614143529.issue2834@psf.upfronthosting.co.za> Message-ID: <1214691600.46.0.810070981521.issue2834@psf.upfronthosting.co.za> Guido van Rossum added the comment: Sounds like re.UNICODE should be on by default when the pattern is a str instance. Also (per mailing list discussion) we should probably only allow matching bytes when the pattern is bytes, and matching str when the pattern is str. Finally, is there a use case of re.LOCALE any more? I'm thinking not. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 00:22:52 2008 From: report at bugs.python.org (Bill Janssen) Date: Sat, 28 Jun 2008 22:22:52 +0000 Subject: [issue3162] ssl.SSLSocket implements methods that are overriden by socket.socket.__init__ and methods with incorrect names. In-Reply-To: <1214068420.92.0.41617535069.issue3162@psf.upfronthosting.co.za> Message-ID: <1214691772.47.0.404646098583.issue3162@psf.upfronthosting.co.za> Bill Janssen added the comment: I've committed the patch which I have for 2.6. Still need renamings for 3.0, and implementations of recvfrom_into and recv_into. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 00:35:40 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Jun 2008 22:35:40 +0000 Subject: [issue2834] re.IGNORECASE not Unicode-ready In-Reply-To: <1214691600.46.0.810070981521.issue2834@psf.upfronthosting.co.za> Message-ID: <1214692537.6074.29.camel@fsol> Antoine Pitrou added the comment: Le samedi 28 juin 2008 ? 22:20 +0000, Guido van Rossum a ?crit : > Finally, is there a use case of re.LOCALE any more? I'm thinking not. It's used for locale-specific case matching in the non-unicode case. But it looks to me like a bad practice and we could probably remove it. 'C' >>> re.match('?'.encode('latin1'), '?'.encode('latin1'), re.IGNORECASE) >>> re.match('?'.encode('latin1'), '?'.encode('latin1'), re.IGNORECASE |re.LOCALE) >>> locale.setlocale(locale.LC_CTYPE, 'fr_FR.ISO-8859-1') 'fr_FR.ISO-8859-1' >>> re.match('?'.encode('latin1'), '?'.encode('latin1'), re.IGNORECASE) >>> re.match('?'.encode('latin1'), '?'.encode('latin1'), re.IGNORECASE | re.LOCALE) <_sre.SRE_Match object at 0xb7b9ac28> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 01:05:32 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 28 Jun 2008 23:05:32 +0000 Subject: [issue3229] Language reference, class definitions: missing text in "Programmer's note" In-Reply-To: <1214685862.01.0.416464861432.issue3229@psf.upfronthosting.co.za> Message-ID: <1214694332.11.0.0995088559183.issue3229@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks fixed in r64581. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 01:06:22 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 28 Jun 2008 23:06:22 +0000 Subject: [issue2042] test_audioop.py converted to unittest In-Reply-To: <1202414409.05.0.332435353831.issue2042@psf.upfronthosting.co.za> Message-ID: <1214694382.3.0.275192516369.issue2042@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks! Committed in r64582. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 01:11:56 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Jun 2008 23:11:56 +0000 Subject: [issue3231] re.compile fails with some bytes patterns In-Reply-To: <1214694715.96.0.79941845541.issue3231@psf.upfronthosting.co.za> Message-ID: <1214694715.96.0.79941845541.issue3231@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Some patterns can be compiled in str form but not in bytes form. This was overlooked because the test suite wasn't correctly adapted for py3k: >>> re.compile('[\\1]') <_sre.SRE_Pattern object at 0xb7be1410> >>> re.compile('\\09') <_sre.SRE_Pattern object at 0xb7c4f2f0> >>> re.compile('\\n') <_sre.SRE_Pattern object at 0xb7be1f50> but: >>> re.compile(b'[\\1]') Traceback (most recent call last): File "", line 1, in File "/home/antoine/py3k/reunicode/Lib/re.py", line 188, in compile return _compile(pattern, flags) File "/home/antoine/py3k/reunicode/Lib/re.py", line 240, in _compile p = sre_compile.compile(pattern, flags) File "/home/antoine/py3k/reunicode/Lib/sre_compile.py", line 497, in compile p = sre_parse.parse(p, flags) File "/home/antoine/py3k/reunicode/Lib/sre_parse.py", line 685, in parse p = _parse_sub(source, pattern, 0) File "/home/antoine/py3k/reunicode/Lib/sre_parse.py", line 320, in _parse_sub itemsappend(_parse(source, state)) File "/home/antoine/py3k/reunicode/Lib/sre_parse.py", line 409, in _parse this = sourceget() File "/home/antoine/py3k/reunicode/Lib/sre_parse.py", line 215, in get self.__next() File "/home/antoine/py3k/reunicode/Lib/sre_parse.py", line 204, in __next char = char + c TypeError: Can't convert 'int' object to str implicitly >>> re.compile(b'\\09') Traceback (most recent call last): File "", line 1, in File "/home/antoine/py3k/reunicode/Lib/re.py", line 188, in compile return _compile(pattern, flags) File "/home/antoine/py3k/reunicode/Lib/re.py", line 240, in _compile p = sre_compile.compile(pattern, flags) File "/home/antoine/py3k/reunicode/Lib/sre_compile.py", line 497, in compile p = sre_parse.parse(p, flags) File "/home/antoine/py3k/reunicode/Lib/sre_parse.py", line 678, in parse source = Tokenizer(str) File "/home/antoine/py3k/reunicode/Lib/sre_parse.py", line 187, in __init__ self.__next() File "/home/antoine/py3k/reunicode/Lib/sre_parse.py", line 204, in __next char = char + c TypeError: Can't convert 'int' object to str implicitly >>> re.compile(b'\\n') Traceback (most recent call last): File "", line 1, in File "/home/antoine/py3k/reunicode/Lib/re.py", line 188, in compile return _compile(pattern, flags) File "/home/antoine/py3k/reunicode/Lib/re.py", line 240, in _compile p = sre_compile.compile(pattern, flags) File "/home/antoine/py3k/reunicode/Lib/sre_compile.py", line 497, in compile p = sre_parse.parse(p, flags) File "/home/antoine/py3k/reunicode/Lib/sre_parse.py", line 678, in parse source = Tokenizer(str) File "/home/antoine/py3k/reunicode/Lib/sre_parse.py", line 187, in __init__ self.__next() File "/home/antoine/py3k/reunicode/Lib/sre_parse.py", line 204, in __next char = char + c TypeError: Can't convert 'int' object to str implicitly ---------- components: Regular Expressions messages: 68925 nosy: pitrou severity: normal status: open title: re.compile fails with some bytes patterns type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 01:12:28 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 28 Jun 2008 23:12:28 +0000 Subject: [issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE? In-Reply-To: <1214688707.09.0.872875806221.issue3230@psf.upfronthosting.co.za> Message-ID: <1214694748.88.0.32682586142.issue3230@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I still see another instance of PySet_GET_SIZE on line 1274. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 01:25:23 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 28 Jun 2008 23:25:23 +0000 Subject: [issue3231] re.compile fails with some bytes patterns In-Reply-To: <1214694715.96.0.79941845541.issue3231@psf.upfronthosting.co.za> Message-ID: <1214695523.01.0.0612846178997.issue3231@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch fixing both the bug and the test suite. ---------- keywords: +patch Added file: http://bugs.python.org/file10765/rebytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 01:31:51 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 28 Jun 2008 23:31:51 +0000 Subject: [issue3230] dictobject.c: inappropriate use of PySet_GET_SIZE? In-Reply-To: <1214688707.09.0.872875806221.issue3230@psf.upfronthosting.co.za> Message-ID: <1214695911.11.0.969028722433.issue3230@psf.upfronthosting.co.za> Raymond Hettinger added the comment: That one is technically okay because "seq" really is a set. But I'm okay with you changing it anyway. It would be nice to see Py_SIZE used everywhere in preference to the type specific versions of the same macro. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 01:41:28 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 28 Jun 2008 23:41:28 +0000 Subject: [issue3088] test_multiprocessing hangs on OS X 10.5.3 In-Reply-To: <1213246124.39.0.216094705029.issue3088@psf.upfronthosting.co.za> Message-ID: <1214696488.1.0.0775359456322.issue3088@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: After 4 hours spent with the debugger I think I have an explanation and a correction of one of the problems. Note that this only affects the "Manager" tests. - The threading.local type overrides getattr and setattr: on every call, it fetches a dictionary stored in the current ThreadState, and installs it in its self->dict member, allowing the regular PyObject_Generic[Get|Set]Attr functions to actually work on thread-local data. - Of course, for this to work the GIL must not be released in any way between the moment self->dict is set, until object's dictionary is retrieved inside PyObject_Generic[Get|Set]Attr. This condition makes the code a bit fragile. With current 2.6b1, there is no path in PyObject_Generic[Get|Set]Attr that releases the GIL before the dict is retrieved - no decref, no jump into python code (at least when the attribute name is a string). It's almost a miracle, indeed. - The problem is in threadmodule.c, the paragraph starting at line 285: the first time the local object is accessed, it calls the __init__ method of the threading.local derived class. And this calls python code, and can release the GIL. - The consequences are dramatic: this let the possibility for another thread to start, use the same local object, install its thread-local dict in self->dict, and stop here; the first thread will wake up with the wrong dict... - in the multiprocessing case, a remote call to a synchronization function grabs the wrong channel, and get bogus results... hence the "cannot wait on un-aquired (sic) lock" message. The actual correction is very short: only one "else" to remove... Here is a patch with a test. Added file: http://bugs.python.org/file10766/threadlocal.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 02:03:59 2008 From: report at bugs.python.org (Bill Janssen) Date: Sun, 29 Jun 2008 00:03:59 +0000 Subject: [issue3212] ssl module - should test for a wrong cert In-Reply-To: <1214505254.08.0.113211233471.issue3212@psf.upfronthosting.co.za> Message-ID: <1214697839.79.0.476096136327.issue3212@psf.upfronthosting.co.za> Bill Janssen added the comment: Added this in 2.6, still needs it for 3.x. ---------- versions: +Python 3.0 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 03:03:32 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Jun 2008 01:03:32 +0000 Subject: [issue3232] Wrong str->bytes conversion in Lib/encodings/idna.py In-Reply-To: <1214701412.5.0.118957128053.issue3232@psf.upfronthosting.co.za> Message-ID: <1214701412.5.0.118957128053.issue3232@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Lib/encodings/idna.py claims to do the following when `input` is a string object (lines 183-184, and see comment line 178: "IDNA allows decoding to operate on Unicode strings, too"): # Force to bytes input = bytes(input) This is obviously wrong, lacking an encoding parameter. It doesn't seem to be covered in the test suite, and I don't know what the proper semantics should be, so I leave it to someone else to find a fix. ---------- components: Library (Lib), Unicode messages: 68931 nosy: pitrou severity: normal status: open title: Wrong str->bytes conversion in Lib/encodings/idna.py type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 03:15:30 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Jun 2008 01:15:30 +0000 Subject: [issue2834] re.IGNORECASE not Unicode-ready In-Reply-To: <1210581845.07.0.550614143529.issue2834@psf.upfronthosting.co.za> Message-ID: <1214702129.79.0.740260294924.issue2834@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a preliminary patch which doesn't remove re.LOCALE, but adds TypeError's for mistyped matchings, a ValueError when specifying re.UNICODE with a bytes pattern, and implies re.UNICODE for unicode patterns. The test suite runs fine after a few fixes. It also includes the patch for #3231 ("re.compile fails with some bytes patterns"). ---------- keywords: +patch Added file: http://bugs.python.org/file10767/reunicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 03:19:17 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Jun 2008 01:19:17 +0000 Subject: [issue2834] re.IGNORECASE not Unicode-ready In-Reply-To: <1210581845.07.0.550614143529.issue2834@psf.upfronthosting.co.za> Message-ID: <1214702357.98.0.495716622018.issue2834@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file10767/reunicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 03:19:44 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Jun 2008 01:19:44 +0000 Subject: [issue2834] re.IGNORECASE not Unicode-ready In-Reply-To: <1210581845.07.0.550614143529.issue2834@psf.upfronthosting.co.za> Message-ID: <1214702384.03.0.102216629773.issue2834@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file10768/reunicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 09:56:32 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Jun 2008 07:56:32 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214726192.06.7.83908670898e-06.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: Okay---so committing this would be premature at this point. It looks like the test_math errors are the same problem that Jean found. Skip, does LDFLAGS=-xlibmieee ./configure ... do anything to alleviate the test_math errors? The cmath problems look like a new issue. ---------- assignee: loewis -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 10:08:32 2008 From: report at bugs.python.org (Stefan Sonnenberg-Carstens) Date: Sun, 29 Jun 2008 08:08:32 +0000 Subject: [issue3233] Timestamp stored in ZIP file not correct ? In-Reply-To: <1214726912.22.0.742655032035.issue3233@psf.upfronthosting.co.za> Message-ID: <1214726912.22.0.742655032035.issue3233@psf.upfronthosting.co.za> New submission from Stefan Sonnenberg-Carstens : Given the attached source, I can produce these results: [stefan at localhost ~]$ python ziptest.py Start 10:05:54 ZIP stored mtime: (2008, 6, 29, 10, 5, 54) Original mtime: (2008, 6, 29, 10, 5, 54) Duration 0.00291705131531 Stop 10:05:54 ------------------------------ Start 10:05:55 ZIP stored mtime: (2008, 6, 29, 10, 5, 54) Original mtime: (2008, 6, 29, 10, 5, 55) Duration 0.00302505493164 Stop 10:05:55 ------------------------------ Start 10:05:56 ZIP stored mtime: (2008, 6, 29, 10, 5, 56) Original mtime: (2008, 6, 29, 10, 5, 56) Duration 0.00260186195374 Stop 10:05:56 ------------------------------ Start 10:05:57 ZIP stored mtime: (2008, 6, 29, 10, 5, 56) Original mtime: (2008, 6, 29, 10, 5, 57) Duration 0.00173997879028 Stop 10:05:57 ------------------------------ Start 10:05:58 ZIP stored mtime: (2008, 6, 29, 10, 5, 58) Original mtime: (2008, 6, 29, 10, 5, 58) Duration 0.00218915939331 Stop 10:05:58 ------------------------------ Start 10:05:59 ZIP stored mtime: (2008, 6, 29, 10, 5, 58) Original mtime: (2008, 6, 29, 10, 5, 59) Duration 0.00273489952087 Stop 10:05:59 ------------------------------ Start 10:06:00 ZIP stored mtime: (2008, 6, 29, 10, 6, 0) Original mtime: (2008, 6, 29, 10, 6, 0) Duration 0.00237393379211 Stop 10:06:00 ------------------------------ Start 10:06:01 ZIP stored mtime: (2008, 6, 29, 10, 6, 0) Original mtime: (2008, 6, 29, 10, 6, 1) Duration 0.00279211997986 Stop 10:06:01 ------------------------------ Start 10:06:02 ZIP stored mtime: (2008, 6, 29, 10, 6, 2) Original mtime: (2008, 6, 29, 10, 6, 2) Duration 0.00237607955933 Stop 10:06:02 ------------------------------ Start 10:06:03 ZIP stored mtime: (2008, 6, 29, 10, 6, 2) Original mtime: (2008, 6, 29, 10, 6, 3) Duration 0.0018618106842 Stop 10:06:03 ------------------------------ I also printed the duration to see if it passes from one second to another. It doesn't. The behaviour is the same with ZIP_STORED as storage type. ---------- components: Library (Lib) files: ziptest.py messages: 68934 nosy: pythonmeister severity: normal status: open title: Timestamp stored in ZIP file not correct ? type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10769/ziptest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 10:09:07 2008 From: report at bugs.python.org (Stefan Sonnenberg-Carstens) Date: Sun, 29 Jun 2008 08:09:07 +0000 Subject: [issue3233] Timestamp stored in ZIP file not correct ? In-Reply-To: <1214726912.22.0.742655032035.issue3233@psf.upfronthosting.co.za> Message-ID: <1214726947.5.0.035586690698.issue3233@psf.upfronthosting.co.za> Stefan Sonnenberg-Carstens added the comment: [stefan at localhost ~]$ python -V Python 2.5.1 [stefan at localhost ~]$ uname -a Linux localhost.localdomain 2.6.25.6-55.fc9.i686 #1 SMP Tue Jun 10 16:27:49 EDT 2008 i686 i686 i386 GNU/Linux _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 10:17:29 2008 From: report at bugs.python.org (Stefan Sonnenberg-Carstens) Date: Sun, 29 Jun 2008 08:17:29 +0000 Subject: [issue3233] Timestamp stored in ZIP file not correct ? In-Reply-To: <1214726912.22.0.742655032035.issue3233@psf.upfronthosting.co.za> Message-ID: <1214727449.47.0.904339737616.issue3233@psf.upfronthosting.co.za> Stefan Sonnenberg-Carstens added the comment: I changed the script a bit, so that the txt file is not getting recreated every time. It gives: [stefan at localhost ~]$ python ziptest.py Start 10:15:05 ZIP stored mtime: (2008, 6, 29, 10, 15, 4) Original mtime: (2008, 6, 29, 10, 15, 5) Duration 0.00438690185547 Stop 10:15:05 ------------------------------ Start 10:15:06 ZIP stored mtime: (2008, 6, 29, 10, 15, 4) Original mtime: (2008, 6, 29, 10, 15, 5) Duration 0.00189399719238 Stop 10:15:06 ------------------------------ Start 10:15:07 ZIP stored mtime: (2008, 6, 29, 10, 15, 4) Original mtime: (2008, 6, 29, 10, 15, 5) Duration 0.00167894363403 Stop 10:15:07 ------------------------------ Start 10:15:08 ZIP stored mtime: (2008, 6, 29, 10, 15, 4) Original mtime: (2008, 6, 29, 10, 15, 5) Duration 0.00195598602295 Stop 10:15:08 ------------------------------ Start 10:15:09 ZIP stored mtime: (2008, 6, 29, 10, 15, 4) Original mtime: (2008, 6, 29, 10, 15, 5) Duration 0.0136680603027 Stop 10:15:09 ------------------------------ Start 10:15:10 ZIP stored mtime: (2008, 6, 29, 10, 15, 4) Original mtime: (2008, 6, 29, 10, 15, 5) Duration 0.00206613540649 Stop 10:15:10 ------------------------------ Start 10:15:11 ZIP stored mtime: (2008, 6, 29, 10, 15, 4) Original mtime: (2008, 6, 29, 10, 15, 5) Duration 0.00191879272461 Stop 10:15:11 ------------------------------ Start 10:15:12 ZIP stored mtime: (2008, 6, 29, 10, 15, 4) Original mtime: (2008, 6, 29, 10, 15, 5) Duration 0.00196504592896 Stop 10:15:12 ------------------------------ Start 10:15:13 ZIP stored mtime: (2008, 6, 29, 10, 15, 4) Original mtime: (2008, 6, 29, 10, 15, 5) Duration 0.00182104110718 Stop 10:15:13 ------------------------------ Start 10:15:14 ZIP stored mtime: (2008, 6, 29, 10, 15, 4) Original mtime: (2008, 6, 29, 10, 15, 5) Duration 0.0369889736176 Stop 10:15:14 ------------------------------ Added file: http://bugs.python.org/file10770/ziptest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 10:34:34 2008 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 29 Jun 2008 08:34:34 +0000 Subject: [issue2235] __eq__ / __hash__ check doesn't take inheritance into account In-Reply-To: <1204660164.8.0.960033908954.issue2235@psf.upfronthosting.co.za> Message-ID: <1214728474.72.0.79643113404.issue2235@psf.upfronthosting.co.za> Nick Coghlan added the comment: Well, I think I figured out why the __hash__ changes were backported from Py3k: without them, the existence of object.__hash__ makes the Hashable ABC completely useless (every newstyle class meets it). I see two options here. Option 1 is to revert the changes so __hash__ behave entirely as it did in 2.5 and also delete collections.Hashable from 2.6 (which may break other backported Py3k items). Doesn't seem like a particularly good idea. Option 2 is what I have implemented locally (and will be uploading soon): changing typeobject.c to allow Py_None to be stored in type method slots, and have it convert correctly to None at the Python level. Classes that don't want to inherit the default object.tp_hash implementation can then write "__hash__ = None" or "(hashfunc)Py_None" to block the inheritance. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 10:37:25 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Jun 2008 08:37:25 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214728645.19.0.998432860558.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: > LDFLAGS=-xlibmieee ./configure ... I guess that should probably be: LDFLAGS="-Xlinker -xlibmieee" ./configure _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 10:54:16 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 29 Jun 2008 08:54:16 +0000 Subject: [issue3233] Timestamp stored in ZIP file not correct ? In-Reply-To: <1214726912.22.0.742655032035.issue3233@psf.upfronthosting.co.za> Message-ID: <1214729656.33.0.180797906521.issue3233@psf.upfronthosting.co.za> Martin v. L?wis added the comment: That's a limitation of the zip file format. It uses DOS time stamps, which only support 5 bits for representing seconds. As a consequence, within a minute, ZIP can only store even seconds. If the number of seconds in the minute is odd on the file system, the zipfile module rounds down to the previous even second. Closing as "won't fix". ---------- nosy: +loewis resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 10:55:33 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Jun 2008 08:55:33 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214729733.16.0.912964656896.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: Skip: one more question. What does cmath.exp(710.0 + 1.5j) give instead of the expected OverflowError? Incidentally, the Solaris buildbot seems happy enough at the moment. I wonder what the difference between Skip's machine and the buildbot is. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 10:55:43 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Sun, 29 Jun 2008 08:55:43 +0000 Subject: [issue3147] tests for sys.getsizeof fail on win64 In-Reply-To: <1213915426.19.0.16089164965.issue3147@psf.upfronthosting.co.za> Message-ID: <1214729743.55.0.980181849474.issue3147@psf.upfronthosting.co.za> Robert Schuppenies added the comment: Fixed in r64533. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 11:17:26 2008 From: report at bugs.python.org (Martin Mokrejs) Date: Sun, 29 Jun 2008 09:17:26 +0000 Subject: [issue3234] subprocess.py strips last character when raising an AttributeError In-Reply-To: <1214731045.98.0.584522364195.issue3234@psf.upfronthosting.co.za> Message-ID: <1214731045.98.0.584522364195.issue3234@psf.upfronthosting.co.za> New submission from Martin Mokrejs : I try to get working pipe emulation using Popen. I try to pass StringIO object to p1.stdin of the first process and I got the following: File "/usr/lib/python2.5/subprocess.py", line 587, in __init__ errread, errwrite) = self._get_handles(stdin, stdout, stderr) File "/usr/lib/python2.5/subprocess.py", line 932, in _get_handles p2cread = stdin.fileno() AttributeError: 'cStringIO.StringI' object has no attribute 'fileno' Aside from the fact I would hope that cStringIO could provide self.fileno() I believe the error message should have been: AttributeError: 'cStringIO.StringIO' object has no attribute 'fileno' ---------- components: Library (Lib) messages: 68942 nosy: mmokrejs severity: normal status: open title: subprocess.py strips last character when raising an AttributeError type: crash versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 11:26:14 2008 From: report at bugs.python.org (Martin Mokrejs) Date: Sun, 29 Jun 2008 09:26:14 +0000 Subject: [issue3235] Improve subprocess module usage In-Reply-To: <1214731574.46.0.694544049658.issue3235@psf.upfronthosting.co.za> Message-ID: <1214731574.46.0.694544049658.issue3235@psf.upfronthosting.co.za> New submission from Martin Mokrejs : Although I do appreciate that you try to improve python it is not clear to me from http://docs.python.org/lib/module-subprocess.html: 1. Why the old functions have been deprecated 2. I can pipe together two processes. But how can I use pipe to feed the first process of the two? The example at http://docs.python.org/lib/node535.html is not sufficient. Show how to bind together cat(1) and tr(1). Cat should read from STDIN and pass the same to STDOUT, being read by tr(1). 3. Nowhere is explained what this magic really does: output = p2.communicate()[0] I figured out the result is e.g. a string of '\n' separated lines. What is not clear whether at this very moment the processes get started and whether one can still write on input to them. It seems not, the p1.stdin has to be already populated with data. Thanks. ---------- assignee: georg.brandl components: Documentation messages: 68943 nosy: georg.brandl, mmokrejs severity: normal status: open title: Improve subprocess module usage type: resource usage versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 12:10:07 2008 From: report at bugs.python.org (Martin Mokrejs) Date: Sun, 29 Jun 2008 10:10:07 +0000 Subject: [issue3235] Improve subprocess module usage In-Reply-To: <1214731574.46.0.694544049658.issue3235@psf.upfronthosting.co.za> Message-ID: <1214734206.88.0.742530029964.issue3235@psf.upfronthosting.co.za> Martin Mokrejs added the comment: Please link to http://www.python.org/dev/peps/pep-0324/ from the docs webpage at least. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 12:32:34 2008 From: report at bugs.python.org (Martina Oefelein) Date: Sun, 29 Jun 2008 10:32:34 +0000 Subject: [issue3154] "Quick search" box renders too long on FireFox 3 In-Reply-To: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> Message-ID: <1214735554.1.0.104105135093.issue3154@psf.upfronthosting.co.za> Martina Oefelein added the comment: I can reproduce it with Safari if I enlarge the font size (Cmd +), and it looks like this will happen with *any* browser. Main cause is that the with of the sidebar is set in pixels, while the size of the Quick search box (and the sidebar text as well) scales with the font size. One possible solution would be to set a fixed pixel width for the Quick search box via css. (This wouldn't prevent the sidebar text from overflowing, though, but that usually happens only with *very* large font sizes, as the browsers first try to wrap the text to fit it into the box. Only if individual words won't fit, they overflow.) Another possible solution would be specify the sidebar with in ems. ---------- nosy: +oefe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 12:50:18 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Jun 2008 10:50:18 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1214736618.03.0.865864736822.issue1580@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 13:00:26 2008 From: report at bugs.python.org (Senthil) Date: Sun, 29 Jun 2008 11:00:26 +0000 Subject: [issue600362] relocate cgi.parse_qs() into urlparse Message-ID: <1214737226.56.0.940766771328.issue600362@psf.upfronthosting.co.za> Changes by Senthil : Removed file: http://bugs.python.org/file10496/issue600362.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 13:01:13 2008 From: report at bugs.python.org (Senthil) Date: Sun, 29 Jun 2008 11:01:13 +0000 Subject: [issue600362] relocate cgi.parse_qs() into urlparse Message-ID: <1214737273.01.0.934776429753.issue600362@psf.upfronthosting.co.za> Changes by Senthil : Added file: http://bugs.python.org/file10771/issue600362-py26.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 13:01:39 2008 From: report at bugs.python.org (Senthil) Date: Sun, 29 Jun 2008 11:01:39 +0000 Subject: [issue600362] relocate cgi.parse_qs() into urlparse Message-ID: <1214737299.95.0.581866243369.issue600362@psf.upfronthosting.co.za> Changes by Senthil : Added file: http://bugs.python.org/file10772/issue600362-py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 13:02:53 2008 From: report at bugs.python.org (Senthil) Date: Sun, 29 Jun 2008 11:02:53 +0000 Subject: [issue600362] relocate cgi.parse_qs() into urlparse Message-ID: <1214737373.4.0.648262223101.issue600362@psf.upfronthosting.co.za> Senthil added the comment: - Updated patches for Python 2.6 and Python 3.0 - Moved the tests. - Updated docs. Somebody please review this so that it can checked in. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 13:38:16 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Jun 2008 11:38:16 +0000 Subject: [issue3236] ints contructed from strings don't use the smallint constants In-Reply-To: <1214739495.01.0.514577579612.issue3236@psf.upfronthosting.co.za> Message-ID: <1214739495.01.0.514577579612.issue3236@psf.upfronthosting.co.za> New submission from Antoine Pitrou : The following says it all: >>> 1+1 is 2 True >>> int('2') is 2 False >>> int(b'2') is 2 False ---------- components: Interpreter Core messages: 68947 nosy: pitrou severity: normal status: open title: ints contructed from strings don't use the smallint constants type: resource usage versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 14:25:44 2008 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 29 Jun 2008 12:25:44 +0000 Subject: [issue2235] __eq__ / __hash__ check doesn't take inheritance into account In-Reply-To: <1204660164.8.0.960033908954.issue2235@psf.upfronthosting.co.za> Message-ID: <1214742344.02.0.868685065207.issue2235@psf.upfronthosting.co.za> Nick Coghlan added the comment: Attached patch allows classes to explicitly block inheritance of object.__hash__ by setting the tp_hash slot to Py_None or the __hash__ attribute to None. This is similar to the approach used in Py3k, but allows __hash__ to be inherited by default, with classes explicitly disabling it as appropriate. I'd also suggest forward porting this approach to Py3k as well, and then possibly look at replacing a copied tp_hash slot with Py_None when the inherited tp_hash is object.tp_hash, but tp_cmp or tp_richcompare are different. Added file: http://bugs.python.org/file10773/issue2235_fix_hash_inheritance.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 15:30:53 2008 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 29 Jun 2008 13:30:53 +0000 Subject: [issue2235] __eq__ / __hash__ check doesn't take inheritance into account In-Reply-To: <1204660164.8.0.960033908954.issue2235@psf.upfronthosting.co.za> Message-ID: <1214746253.17.0.227572493796.issue2235@psf.upfronthosting.co.za> Nick Coghlan added the comment: Unassigning for the moment - I'll take a look at adding the Py3k warning back in at some point, but the main thing I would like now is a sanity check from Guido or Barry (or anyone else happy to dig into the guts of typeobject.c) that the basic idea behind my fix is sound. It would be nice to avoid the explicit check for Py_None in PyObject_Compare by getting update_one_slot() to replace the Py_None it encounters in __hash__ with the default slot_tp_hash implementation, but my attempts at doing that have all led to segfaults. (Also, glyph, I'd love to know if my patch helps to clear up Django's issues with 2.6b1) ---------- assignee: ncoghlan -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 15:51:48 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 29 Jun 2008 13:51:48 +0000 Subject: [issue3236] ints contructed from strings don't use the smallint constants In-Reply-To: <1214739495.01.0.514577579612.issue3236@psf.upfronthosting.co.za> Message-ID: <1214747508.21.0.174716118377.issue3236@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I suspect this is because of the transition from PyInt to PyLong: Python 2.6b1+ (trunk:64580M, Jun 28 2008, 18:04:04) [GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> int('2') is 2 True >>> long('2') is 2 False ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 15:56:29 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 29 Jun 2008 13:56:29 +0000 Subject: [issue3234] subprocess.py strips last character when raising an AttributeError In-Reply-To: <1214731045.98.0.584522364195.issue3234@psf.upfronthosting.co.za> Message-ID: <1214747789.88.0.0860528465844.issue3234@psf.upfronthosting.co.za> Benjamin Peterson added the comment: No, the class you are creating with cStringIO.cStringIO is actually called cStringIO.cStringI. ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 17:51:34 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 29 Jun 2008 15:51:34 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214754694.4.0.609434839665.issue3167@psf.upfronthosting.co.za> Jean Brouwers added the comment: For comparison, 64-bit -xO5 Python build: Python 2.6b1 (r26b1:64398, Jun 28 2008, 12:50:06) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import cmath >>> cmath.exp(710.0 + 1.5j) Traceback (most recent call last): File "", line 1, in OverflowError: math range error >>> cmath.log(100,2) (0.71244151439608006-2.0556716794852954j) >>> cmath.log(complex(100,0), complex(2,0)) (0.71244151439608006-2.0556716794852954j) 64-bit -xO0 Python build: Python 2.6b1 (r26b1:64398, Jun 28 2008, 11:02:57) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import cmath >>> cmath.exp(710.0 + 1.5j) Traceback (most recent call last): File "", line 1, in OverflowError: math range error >>> cmath.log(100,2) (6.6438561897747253+0j) >>> cmath.log(complex(100,0), complex(2,0)) (6.6438561897747253+0j) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 18:14:11 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 29 Jun 2008 16:14:11 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214756051.92.0.67701020343.issue3167@psf.upfronthosting.co.za> Jean Brouwers added the comment: What about this case? Should cmath not produce the same result as math: >>> math.log(float('-inf')) Traceback (most recent call last): File "", line 1, in ValueError: math domain error >>> cmath.log(float('-inf')) (inf+3.1415926535897931j) >>> cmath.log(complex(float('-inf'), 0)) (inf+3.1415926535897931j) This occurs in all 32- and 64-bit builds (with -xlibmieee and SUN C) on Solaris 10 (Opteron) and on 32-bit MacOS X 10.4.11 (Intel) built with gcc. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 18:20:21 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Jun 2008 16:20:21 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214756421.8.0.69376016772.issue3167@psf.upfronthosting.co.za> Mark Dickinson added the comment: > What about this case? Should cmath not produce the same result as math: No; this is correct, I think. Note that the cmath.log result has nonzero imaginary part, so can't be represented as a float. Similarly, math.sqrt(-1) is an error, while cmath.sqrt(-1) returns a complex result and doesn't raise any exception. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 18:43:35 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 29 Jun 2008 16:43:35 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214757815.56.0.0840247486621.issue3168@psf.upfronthosting.co.za> Jean Brouwers added the comment: I have not yet been able to duplicate the problem in a smaller test case, but I did stumble into a fix. Changing the following statement in the cmath_log function from if (PyTuple_GET_SIZE(args) == 2) x = c_quot(x, c_log(y)); to if (PyTuple_GET_SIZE(args) == 2) { y = c_log(y); x = c_quot(x, y); } fixes the problem for the 64-bit -xO5 Python build. The result is no the same in all 32- and 64-bit builds with -xO0 and -xO5 on Solaris 10 (Opteron) with SUN C. >>> cmath.log(100, 2) (6.6438561897747253+0j) >>> cmath.log(0.01, 0.5) (6.6438561897747244-0j) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 19:16:10 2008 From: report at bugs.python.org (David) Date: Sun, 29 Jun 2008 17:16:10 +0000 Subject: [issue3235] Improve subprocess module usage In-Reply-To: <1214731574.46.0.694544049658.issue3235@psf.upfronthosting.co.za> Message-ID: <1214759770.63.0.672537544778.issue3235@psf.upfronthosting.co.za> David added the comment: See if Doug Hellman's module of the week helps any http://blog.doughellmann.com/2007/07/pymotw-subprocess.html I plan on asking him if we can include some of his examples in the Python 3000 docs. Subprocess is new enough and gets enough questions on the forums that I think we should be as detailed as possible and include more examples than there are in other doc/tools examples. ---------- nosy: +dwblas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 19:18:13 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 29 Jun 2008 17:18:13 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214759893.29.0.184160394254.issue3168@psf.upfronthosting.co.za> Jean Brouwers added the comment: Attached is a test case which does demonstrate the problem. See the top of that file. I will post this at the SUN C Forum. Added file: http://bugs.python.org/file10774/SunC-64bit-xO5-bug.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 19:18:24 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 29 Jun 2008 17:18:24 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214759904.91.0.333886290873.issue3168@psf.upfronthosting.co.za> Changes by Jean Brouwers : Removed file: http://bugs.python.org/file10762/c_quot.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 19:23:17 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 29 Jun 2008 17:23:17 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214760197.64.0.763894664359.issue3168@psf.upfronthosting.co.za> Changes by Jean Brouwers : Removed file: http://bugs.python.org/file10774/SunC-64bit-xO5-bug.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 19:24:27 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 29 Jun 2008 17:24:27 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214760267.67.0.505054111855.issue3168@psf.upfronthosting.co.za> Jean Brouwers added the comment: File but showing -xO0 thru -xO5 results. Added file: http://bugs.python.org/file10775/SunC-64bit-xO5-bug.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 19:29:09 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 29 Jun 2008 17:29:09 +0000 Subject: [issue3235] Improve subprocess module usage In-Reply-To: <1214731574.46.0.694544049658.issue3235@psf.upfronthosting.co.za> Message-ID: <1214760549.31.0.890839188648.issue3235@psf.upfronthosting.co.za> Martin v. L?wis added the comment: 1. The documentation never gives a rationale for deprecating things. To find out why they are deprecated, you'll typically have to research what checkins to a code base have been made that added the deprecation, and perhaps also ask on mailing lists. For the regular developer, the rationale for deprecation should be irrelevant, as he needs to change his code to drop usage of the deprecated API, anyway. 2. You really need to read all of the documentation, in particular the section that talks about stdin,stdout,stderr in http://docs.python.org/lib/node528.html In the example, stdin is inherited from the parent process. Read the documentation to find out how to send data to the first process. 3. It is not true that this is nowhere explained. http://docs.python.org/lib/node532.html explains precisely what the semantics of communicate is. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 19:43:31 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 29 Jun 2008 17:43:31 +0000 Subject: [issue3236] ints contructed from strings don't use the smallint constants In-Reply-To: <1214739495.01.0.514577579612.issue3236@psf.upfronthosting.co.za> Message-ID: <1214761411.95.0.0747772507398.issue3236@psf.upfronthosting.co.za> Martin v. L?wis added the comment: For the old int type, implementing this was trivial, as the conversion converted into a C long, then called PyInt_FromLong. For long, it's much more tricky, as no C type can be used to store the intermediate result. So instead, PyLong_FromString already allocates a sufficiently-sized long object (based on the number of digits of the input string), and then fills that object. Depending on what precisely the complaint of this report is about, one solution could be to check after the conversion whether the result has only one digit, and if so, whether it is a small integer, and if so, convert it to a long, discard it, and use PyLong_FromLong. If the complaint is that it unnecessarily allocates memory in the first place, I don't think anything should be done about that - the allocation is really necessary. In any case, I think PyLong_FromString should also call long_normalize before returning the result. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 20:09:42 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 29 Jun 2008 18:09:42 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214762982.71.0.755050779115.issue3168@psf.upfronthosting.co.za> Jean Brouwers added the comment: Without changing the cmath_log code, another workaround is to compile Python with optimization level -xO2 or less for 64-bit using Sun C. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 20:19:45 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 29 Jun 2008 18:19:45 +0000 Subject: [issue3237] idlelib3.0 still using xrange In-Reply-To: <1214763585.13.0.0791210177458.issue3237@psf.upfronthosting.co.za> Message-ID: <1214763585.13.0.0791210177458.issue3237@psf.upfronthosting.co.za> New submission from Terry J. Reedy : As reported in the py3 list File "/root/Py3kb1/lib/python3.0/tkinter/__init__.py", line 1409, in __call__ return self.func(*args) File "/root/Py3kb1/lib/python3.0/idlelib/MultiCall.py", line 165, in handler r = l[i](event) File "/root/Py3kb1/lib/python3.0/idlelib/EditorWindow.py", line 292, in home_callback for insertpt in xrange(len(line)): NameError: global name 'xrange' is not defined I verified this on my xp installation. I am curious whether 2to3 missed this or if it has never been run over idlelib (IDLE otherwise works fine as far as I know). ---------- components: IDLE messages: 68962 nosy: tjreedy severity: normal status: open title: idlelib3.0 still using xrange type: crash versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 20:26:45 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 29 Jun 2008 18:26:45 +0000 Subject: [issue3237] idlelib3.0 still using xrange In-Reply-To: <1214763585.13.0.0791210177458.issue3237@psf.upfronthosting.co.za> Message-ID: <1214764005.06.0.321401670623.issue3237@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> kbk nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 21:56:53 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 29 Jun 2008 19:56:53 +0000 Subject: [issue3168] cmath test fails on Solaris 10 In-Reply-To: <1214085277.51.0.978703410568.issue3168@psf.upfronthosting.co.za> Message-ID: <1214769413.85.0.266547886483.issue3168@psf.upfronthosting.co.za> Jean Brouwers added the comment: There is another, perhaps related issue on Solaris. The compiler warns that function finite is implicitly defined. Commenting out this line in pyconfig.h as /* #define HAVE_FINITE 1 */ make that warning go away. If there is no function finite, why is HAVE_FINITE defined at all? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 22:07:07 2008 From: report at bugs.python.org (kai zhu) Date: Sun, 29 Jun 2008 20:07:07 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> Message-ID: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> New submission from kai zhu : this patch touches only Python/ceval.c. 1. the only existing thing it modifies is PyEval_EvalFrameEx (adds 7 extra cases for the new 3.0 opcodes, doesn't mess w/ any of the existing ones, or anything else as a matter of fact) 2. that, plus it defines (the new opcodes) #define SET_ADD 17 #define STORE_LOCALS 69 #define LOAD_BUILD_CLASS 34 // 71 in py3k #define MAKE_BYTES 35 // unused in py3k #define POP_EXCEPT 36 // 89 in py3k #define UNPACK_EX 94 #define BUILD_SET 109 // 104 in py3k and some backported vars & helper functions only 2 contiguous areas of ceval.c is patched (1. & 2. - areas are delimited by the comments '// py3k') this simple patch seems sufficient in theory to allow the interpreter to natively execute most of 3.0's language syntax (nonlocal, print, extended unpacking, ... have been tested to work) *the one exception being pep3102 - keyword-only arguments i wrote 2 small scripts which gives an interactive function 'compile_py3k' similar to __builtin__.compile. its a wrapper function which queries the byte-compiling task to a python 3.0 server via pipe io. example demonstrating pep3132 extended unpacking syntax: a,b,*c = 1,2,3,4 (note the backported 3.0 opcode used in line2 of the disassembly) Python 2.5.2 (r252:60911, Jun 27 2008, 21:19:51) [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import py3to2 py3to2 server restarting with io: (4, 5) py3to2 server: Python 3.0b1 (r30b1:64395, Jun 24 2008, 21:53:55) py3to2 server: [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2 py3to2 server: Type "help", "copyright", "credits" or "license" for more information. py3to2 server: >>> src = "a,b,*c = 1,2,3,4" >>> codeobject = py3to2.compile_py3k(src,"","exec") 1 0 LOAD_CONST 5 ((1, 2, 3, 4)) 3 UNPACK_EX_py3k 2 6 STORE_NAME 0 (a) 9 STORE_NAME 1 (b) 12 STORE_NAME 2 (c) 15 LOAD_CONST 4 (None) 18 RETURN_VALUE >>> exec(codeobject) >>> print a,b,c 1, 2, [3, 4] >>> u can go c http://pypi.python.org/pypi?name=py3to2&version=20080628&:action=display for more info on the script anyway, i think it would b a great boost for python 3.0 (which i think is very cool) if developers can test/develop it under the 2.x environment. this patch plus some scripts to emulated 3k extensions (bytes, bytearray, ...) can go a long way in making 3.0 available for the masses. ps. i've also attempted the reverse (forward-port 2.x opcodes to 3.0), & its a bit more complicated (namely the PRINTxxx opcodes). if there's significant interest in that, i could work on it a bit more, but my current interest is in extending 3.0 functionality to the vast 2.x software base. ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) files: ceval.2.6b1.c messages: 68964 nosy: collinwinter, kaizhu severity: normal status: open title: backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c type: feature request versions: Python 2.6 Added file: http://bugs.python.org/file10776/ceval.2.6b1.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 22:12:03 2008 From: report at bugs.python.org (Aaron Gallagher) Date: Sun, 29 Jun 2008 20:12:03 +0000 Subject: [issue2480] eliminate recursion in pickling In-Reply-To: <1206452686.51.0.217993005172.issue2480@psf.upfronthosting.co.za> Message-ID: <1214770323.14.0.517931954302.issue2480@psf.upfronthosting.co.za> Aaron Gallagher added the comment: I've provided an alternate implementation of this that works with very minimal modification to pickle.py. See issue 3119 for the patch. ---------- nosy: +habnabit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 22:21:08 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Jun 2008 20:21:08 +0000 Subject: [issue2834] re.IGNORECASE not Unicode-ready In-Reply-To: <1210581845.07.0.550614143529.issue2834@psf.upfronthosting.co.za> Message-ID: <1214770868.18.0.883043341272.issue2834@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This new patch also introduces re.ASCII as discussed on the mailing-list. Added file: http://bugs.python.org/file10777/reunicode2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 22:36:39 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Jun 2008 20:36:39 +0000 Subject: [issue2834] re.IGNORECASE not Unicode-ready In-Reply-To: <1210581845.07.0.550614143529.issue2834@psf.upfronthosting.co.za> Message-ID: <1214771799.45.0.921296779475.issue2834@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Improved patch which also detects incompatibilities for "(?u)". Added file: http://bugs.python.org/file10778/reunicode3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 23:17:49 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Jun 2008 21:17:49 +0000 Subject: [issue3236] ints contructed from strings don't use the smallint constants In-Reply-To: <1214761411.95.0.0747772507398.issue3236@psf.upfronthosting.co.za> Message-ID: <1214774265.5934.3.camel@fsol> Antoine Pitrou added the comment: Le dimanche 29 juin 2008 ? 17:43 +0000, Martin v. L?wis a ?crit : > For long, it's much more tricky, as no C type can be used to store the > intermediate result. So instead, PyLong_FromString already allocates a > sufficiently-sized long object (based on the number of digits of the > input string), and then fills that object. > > Depending on what precisely the complaint of this report is about, one > solution could be to check after the conversion whether the result has > only one digit, and if so, whether it is a small integer, and if so, > convert it to a long, discard it, and use PyLong_FromLong. > > If the complaint is that it unnecessarily allocates memory in the first > place, I don't think anything should be done about that - the allocation > is really necessary. The bug entry is just for pointing out a missed optimization opportunity. The first mentioned solution would already be an improvement, although of course it would even be better to skip the intermediary allocation altogether. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 23:28:32 2008 From: report at bugs.python.org (Georgij Kondratjev) Date: Sun, 29 Jun 2008 21:28:32 +0000 Subject: [issue3239] curses/textpad.py incorrectly and redundantly imports ascii In-Reply-To: <1214774912.88.0.531536472348.issue3239@psf.upfronthosting.co.za> Message-ID: <1214774912.88.0.531536472348.issue3239@psf.upfronthosting.co.za> New submission from Georgij Kondratjev : Line 'import curses, ascii' should be replaced with 'import curses' ---------- components: Library (Lib) messages: 68969 nosy: orivej severity: normal status: open title: curses/textpad.py incorrectly and redundantly imports ascii versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 23:34:24 2008 From: report at bugs.python.org (Georgij Kondratjev) Date: Sun, 29 Jun 2008 21:34:24 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1214775264.46.0.850795317269.issue2775@psf.upfronthosting.co.za> Georgij Kondratjev added the comment: Not creating new bug entry because everybody can quickly fix it. In urllib/request.py some instances of URLError are raised with "raise urllib.error.URLError" and this works, buth there are lines with "raise URLError" which produces "NameError: global name 'URLError' is not defined" ---------- nosy: +orivej _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 23:43:05 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 29 Jun 2008 21:43:05 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> Message-ID: <1214775785.43.0.872503533933.issue3238@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The first beta release for 2.6 has been made, so no new features can be accepted here. Deferring this to 2.7. ---------- nosy: +loewis versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 29 23:52:45 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 29 Jun 2008 21:52:45 +0000 Subject: [issue3236] ints contructed from strings don't use the smallint constants In-Reply-To: <1214774265.5934.3.camel@fsol> Message-ID: <4868025D.4040801@v.loewis.de> Martin v. L?wis added the comment: > The bug entry is just for pointing out a missed optimization > opportunity. The first mentioned solution would already be an > improvement, although of course it would even be better to skip the > intermediary allocation altogether. Can you propose an implementation strategy that doesn't create the object, yet still avoids duplication of large chunks of code? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 00:26:40 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 29 Jun 2008 22:26:40 +0000 Subject: [issue3236] ints contructed from strings don't use the smallint constants In-Reply-To: <4868025D.4040801@v.loewis.de> Message-ID: <1214778224.5934.12.camel@fsol> Antoine Pitrou added the comment: Le dimanche 29 juin 2008 ? 21:52 +0000, Martin v. L?wis a ?crit : > Can you propose an implementation strategy that doesn't create the > object, yet still avoids duplication of large chunks of code? If by "duplicating large chunks of code", you mean creating a separate code path for when the calculated number of digits necessary to hold the int is equal to 1, then I don't have an implementation strategy. I was going to say that creating and then immedietaly releasing a long should not be very costly since longs have a freelist, but then I checked and there is no freelist :-) (although there is a patch to add one in #2013) Anyway, the benefit IMO isn't in speeding up the conversion but in avoiding to store new objects in memory when we can re-use the existing singletons. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 00:57:20 2008 From: report at bugs.python.org (Rafael Zanella) Date: Sun, 29 Jun 2008 22:57:20 +0000 Subject: [issue2683] subprocess.Popen.communicate takes bytes, not str In-Reply-To: <1209063440.61.0.967116488341.issue2683@psf.upfronthosting.co.za> Message-ID: <1214780240.41.0.49753871064.issue2683@psf.upfronthosting.co.za> Rafael Zanella added the comment: On subprocess.py the new method communicate() doesn't encode the string: """ _communicate(self, input): ... if isinstance(input, str): input = input.encode() ... """ I've attached a patch that adds the str.encode() call on communicate(). ---------- keywords: +patch nosy: +zanella Added file: http://bugs.python.org/file10779/subprocess_strEncode.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 01:02:09 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 29 Jun 2008 23:02:09 +0000 Subject: [issue2683] subprocess.Popen.communicate takes bytes, not str In-Reply-To: <1209063440.61.0.967116488341.issue2683@psf.upfronthosting.co.za> Message-ID: <1214780529.71.0.688713839635.issue2683@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Hmm. I think it's better to make people explicity encode their string. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 01:37:59 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Jun 2008 23:37:59 +0000 Subject: [issue3008] Let bin/oct/hex show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1214782679.87.0.0835992500343.issue3008@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's some Python code to translate floats to hex strings and back, in case it's useful. Added file: http://bugs.python.org/file10780/hex_float.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 01:38:08 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Jun 2008 23:38:08 +0000 Subject: [issue3008] Let bin/oct/hex show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1214782688.83.0.0671342707167.issue3008@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file10729/hex_float.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 02:10:22 2008 From: report at bugs.python.org (Roger Upole) Date: Mon, 30 Jun 2008 00:10:22 +0000 Subject: [issue3240] IDLE environment corrupts string.letters In-Reply-To: <1214784620.79.0.803163811318.issue3240@psf.upfronthosting.co.za> Message-ID: <1214784620.79.0.803163811318.issue3240@psf.upfronthosting.co.za> New submission from Roger Upole : The problem seems to stem from this line in IOBinding.py: locale.setlocale(locale.LC_CTYPE, "") >From the command prompt: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import string, locale >>> print repr(string.letters) 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' >>> locale.setlocale(locale.LC_CTYPE, "") 'English_United States.1252' >>> print repr(string.letters) 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\x83 \x8a\x8c\x8e\x9a\x9c\x9 e\x9f\xaa\xb5\xba\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9 \xca\xcb\xcc\xcd\xce\xc f\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1 \xe2\xe3\xe 4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5 \xf6\xf8\xf 9\xfa\xfb\xfc\xfd\xfe\xff' >>> ---------- components: IDLE messages: 68977 nosy: rupole severity: normal status: open title: IDLE environment corrupts string.letters versions: Python 2.3, Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 03:03:18 2008 From: report at bugs.python.org (Bill Janssen) Date: Mon, 30 Jun 2008 01:03:18 +0000 Subject: [issue2054] add ftp-tls support to ftplib - RFC 4217 In-Reply-To: <1202523366.93.0.605901116561.issue2054@psf.upfronthosting.co.za> Message-ID: <1214787798.96.0.0434700274062.issue2054@psf.upfronthosting.co.za> Bill Janssen added the comment: The 2.6/3.0 changes are now up-to-date. We could reconsider this problem. My guess is that we still don't quite know what to do. I think the issue is that we need a way to "unwrap" the SSL-secured TCP stream, after it's been used. So we need to expose the SSL shutdown mechanism (already in the _ssl.c module) in the Python code. Something like socket = self.unwrap() which would return a plain socket.socket instance. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 03:06:56 2008 From: report at bugs.python.org (Bill Janssen) Date: Mon, 30 Jun 2008 01:06:56 +0000 Subject: [issue1223] httplib does not handle ssl end of file properly In-Reply-To: <1191199809.02.0.233978380017.issue1223@psf.upfronthosting.co.za> Message-ID: <1214788016.64.0.82231276254.issue1223@psf.upfronthosting.co.za> Bill Janssen added the comment: I believe this is now fixed in the SVN. There's a new parameter on SSLSocket, suppress_ragged_eofs, which allows it to be enabled selectively, but default to True. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 03:07:02 2008 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 30 Jun 2008 01:07:02 +0000 Subject: [issue3167] math test fails on Solaris 10 In-Reply-To: <1214084843.86.0.546906644926.issue3167@psf.upfronthosting.co.za> Message-ID: <1214788022.11.0.575591888453.issue3167@psf.upfronthosting.co.za> Skip Montanaro added the comment: I tried to configure with '-Xlinker -xlibmieee' added to LDFLAGS. Failed miserably. In fact, configure complained that my compiler couldn't create executables, told me to look at config.log for details then logged me out from the machine! It would appear gcc *really* doesn't like that combination: ... configure:2676: checking for C compiler default output file name configure:2703: gcc -I/opt/app/nonc++/ncurses-5.6/include - I/opt/app/nonc++/ncu rses-5.6/include/ncurses -I/opt/app/nonc++/gdbm-1.8/include - I/opt/app/nonc++/re adline-4.3/include -I/opt/app/nonc++/tcl-8.4/include - I/opt/app/nonc++/BerkleyDB -4.3/include -L/opt/app/nonc++/ncurses-5.6/lib -R/opt/app/nonc++/ncurses- 5.6/lib -L/opt/app/nonc++/gdbm-1.8/lib -R/opt/app/nonc++/gdbm-1.8/lib - L/opt/app/nonc++ /readline-4.3/lib -R/opt/app/nonc++/readline-4.3/lib -L/opt/app/nonc++/tcl- 8.4/l ib -R/opt/app/nonc++/tcl-8.4/lib -L/opt/app/nonc++/BerkleyDB-4.3/lib - R/opt/app/ nonc++/BerkleyDB-4.3/lib -Xlinker -xlibmieee conftest.c >&5 /usr/ccs/bin/ld: illegal option -- x usage: ld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VY:?] file(s) [-64] enforce a 64-bit link-edit [-a] create an absolute file [-b] do not do special PIC relocations in a.out [-B direct | nodirect] establish direct bindings, or inhibit direct binding to, the object being created ... Skip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 03:08:43 2008 From: report at bugs.python.org (Facundo Batista) Date: Mon, 30 Jun 2008 01:08:43 +0000 Subject: [issue3239] curses/textpad.py incorrectly and redundantly imports ascii In-Reply-To: <1214774912.88.0.531536472348.issue3239@psf.upfronthosting.co.za> Message-ID: <1214788123.03.0.202477149199.issue3239@psf.upfronthosting.co.za> Facundo Batista added the comment: The ascii module is used all around the file... if you don't import it, how would you use that functionality? ---------- nosy: +facundobatista resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 03:11:03 2008 From: report at bugs.python.org (Bill Janssen) Date: Mon, 30 Jun 2008 01:11:03 +0000 Subject: [issue1291446] SSLObject breaks read semantics Message-ID: <1214788263.42.0.891247619858.issue1291446@psf.upfronthosting.co.za> Changes by Bill Janssen : ---------- assignee: -> janssen nosy: +janssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 03:11:30 2008 From: report at bugs.python.org (Facundo Batista) Date: Mon, 30 Jun 2008 01:11:30 +0000 Subject: [issue2702] pickling of large recursive structures crashes cPickle In-Reply-To: <1209282789.34.0.562999954252.issue2702@psf.upfronthosting.co.za> Message-ID: <1214788290.84.0.156049859542.issue2702@psf.upfronthosting.co.za> Facundo Batista added the comment: Great, Amaury, I applied your second patch... it make all tests pass ok, :) Commited in 64595. Thank you all!! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 03:12:19 2008 From: report at bugs.python.org (Rafael Zanella) Date: Mon, 30 Jun 2008 01:12:19 +0000 Subject: [issue1608818] Sloppy error checking in listdir() for Posix Message-ID: <1214788339.02.0.382248334626.issue1608818@psf.upfronthosting.co.za> Rafael Zanella added the comment: Related/Similar: #3115 ---------- nosy: +zanella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 03:15:13 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 30 Jun 2008 01:15:13 +0000 Subject: [issue3240] IDLE environment corrupts string.letters In-Reply-To: <1214784620.79.0.803163811318.issue3240@psf.upfronthosting.co.za> Message-ID: <1214788513.77.0.992824201174.issue3240@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Why do you think string.letters gets corrupted? AFAICT, it's still correct. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 03:17:59 2008 From: report at bugs.python.org (Rafael Zanella) Date: Mon, 30 Jun 2008 01:17:59 +0000 Subject: [issue2325] isinstance(anything, MetaclassThatDefinesInstancecheck) raises instead of returning False In-Reply-To: <1205772306.86.0.317312162506.issue2325@psf.upfronthosting.co.za> Message-ID: <1214788679.13.0.259530053362.issue2325@psf.upfronthosting.co.za> Rafael Zanella added the comment: So..., could this issue be closed ? ---------- nosy: +zanella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 03:44:36 2008 From: report at bugs.python.org (Rafael Zanella) Date: Mon, 30 Jun 2008 01:44:36 +0000 Subject: [issue2913] idlelib/EditorWindow.py uses xrange() In-Reply-To: <1211197785.96.0.212094869578.issue2913@psf.upfronthosting.co.za> Message-ID: <1214790276.87.0.378638715186.issue2913@psf.upfronthosting.co.za> Rafael Zanella added the comment: xrange has been deprecated on py_3k, so it's a valid one liner. ---------- keywords: +patch nosy: +zanella Added file: http://bugs.python.org/file10781/EditorWindow_-x-range.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 04:42:32 2008 From: report at bugs.python.org (Matias Gonzalez) Date: Mon, 30 Jun 2008 02:42:32 +0000 Subject: [issue2325] isinstance(anything, MetaclassThatDefinesInstancecheck) raises instead of returning False In-Reply-To: <1205772306.86.0.317312162506.issue2325@psf.upfronthosting.co.za> Message-ID: <1214793752.92.0.753735652011.issue2325@psf.upfronthosting.co.za> Matias Gonzalez added the comment: Yes, it should be. I don't have permissions to. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 04:43:27 2008 From: report at bugs.python.org (kai zhu) Date: Mon, 30 Jun 2008 02:43:27 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> Message-ID: <1214793807.91.0.234725892704.issue3238@psf.upfronthosting.co.za> kai zhu added the comment: ok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 05:04:35 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 30 Jun 2008 03:04:35 +0000 Subject: [issue3237] idlelib3.0 still using xrange In-Reply-To: <1214763585.13.0.0791210177458.issue3237@psf.upfronthosting.co.za> Message-ID: <1214795075.88.0.874881534348.issue3237@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> duplicate status: open -> closed superseder: -> idlelib/EditorWindow.py uses xrange() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 05:05:08 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 30 Jun 2008 03:05:08 +0000 Subject: [issue2325] isinstance(anything, MetaclassThatDefinesInstancecheck) raises instead of returning False In-Reply-To: <1205772306.86.0.317312162506.issue2325@psf.upfronthosting.co.za> Message-ID: <1214795108.87.0.758798934268.issue2325@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 06:07:36 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 30 Jun 2008 04:07:36 +0000 Subject: [issue3236] ints contructed from strings don't use the smallint constants In-Reply-To: <1214739495.01.0.514577579612.issue3236@psf.upfronthosting.co.za> Message-ID: <1214798856.11.0.929391698368.issue3236@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is now fixed in r64596. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 06:10:29 2008 From: report at bugs.python.org (Jeffrey Yasskin) Date: Mon, 30 Jun 2008 04:10:29 +0000 Subject: [issue2325] isinstance(anything, MetaclassThatDefinesInstancecheck) raises instead of returning False In-Reply-To: <1205772306.86.0.317312162506.issue2325@psf.upfronthosting.co.za> Message-ID: <1214799029.66.0.387501779067.issue2325@psf.upfronthosting.co.za> Jeffrey Yasskin added the comment: I don't think so. It wouldn't be a bug if I wrote: >>> class Meta(type): ... def __instancecheck__(self, other): ... return True >>> isinstance(3, Meta) ... False but it is a bug that the isinstance call raises an exception. If recent builds no longer raise an exception, then the bug should be closed. You guys also seem to have missed that the examples in PEP 3119 in fact define __instancecheck__ as a normal method on a metaclass (which makes it a classmethod on classes derived from that metaclass) instead of as a classmethod on a metaclass. ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 06:15:47 2008 From: report at bugs.python.org (Jeffrey Yasskin) Date: Mon, 30 Jun 2008 04:15:47 +0000 Subject: [issue3056] Simplify the Integral ABC In-Reply-To: <1212803845.73.0.399511532431.issue3056@psf.upfronthosting.co.za> Message-ID: <1214799347.01.0.477268937463.issue3056@psf.upfronthosting.co.za> Jeffrey Yasskin added the comment: Yeah, I'll take a look. Feel free to bug me if I haven't gotten to it in a couple more days. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 06:49:59 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 30 Jun 2008 04:49:59 +0000 Subject: [issue1622] zipfile hangs on certain zip files In-Reply-To: <1197595878.01.0.706002731675.issue1622@psf.upfronthosting.co.za> Message-ID: <1214801399.86.0.595988647648.issue1622@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 07:56:40 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Mon, 30 Jun 2008 05:56:40 +0000 Subject: [issue3241] warnings module prints garbage In-Reply-To: <1214805400.27.0.0080322986331.issue3241@psf.upfronthosting.co.za> Message-ID: <1214805400.27.0.0080322986331.issue3241@psf.upfronthosting.co.za> New submission from Ralf Schmitt : The warnings module prints garbage when the __file__ points to a binary. This happens e.g. when freezing applications with bbfreeze/py2exe. It's easy to reproduce even without freezing: ~/ python ralf at red ok Python 2.6b1+ (trunk, Jun 30 2008, 07:26:07) [GCC 4.3.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> __file__=sys.executable >>> import md5 /home/ralf/py26/bin/python:1: DeprecationWarning: the md5 module is deprecated; use hashlib instead ELF>@SA at 85Q@@'$@@@@@??@@ @@T?T? ??t?t$z?] (?(?t(?t??  @ @ P?td?N?NS?NSDUDUQ?td/lib64/ld-linux-x86-64.so.2GNUH ?Y???U???=??WG.@ V?????Z3?!$?5?RT&??j?>D?=i?w?RJ?0???'?f???X????5?#?U!??????`q?L@?~???:??? # $ _ ---------- components: Library (Lib) messages: 68992 nosy: schmir severity: normal status: open title: warnings module prints garbage type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 08:04:27 2008 From: report at bugs.python.org (Brodie Rao) Date: Mon, 30 Jun 2008 06:04:27 +0000 Subject: [issue3242] Segfault in PyFile_SoftSpace/PyEval_EvalFrameEx with sys.stdout reassigned In-Reply-To: <1214805867.49.0.786809869075.issue3242@psf.upfronthosting.co.za> Message-ID: <1214805867.49.0.786809869075.issue3242@psf.upfronthosting.co.za> New submission from Brodie Rao : Running the attached script - which reassigns sys.stdout to an object that proxies sys.stdout, and eventually reassigns it back to the original object - using Apple's distribution of Python 2.5.1 on an x86 machine, I get the following crash: Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x000000007d312298 Crashed Thread: 0 Thread 0 Crashed: 0 ??? 0x00025d33 0 + 154931 1 org.python.python 0x001381c1 PyFloat_FromString + 6196 2 org.python.python 0x001381c1 PyFloat_FromString + 6196 3 org.python.python 0x0014cdce _PyTrash_destroy_chain + 89 4 org.python.python 0x00198bd3 PyErr_Clear + 34 5 org.python.python 0x00132938 PyFile_SoftSpace + 117 6 org.python.python 0x0018b273 PyEval_EvalFrameEx + 7497 7 org.python.python 0x0018f45b PyEval_EvalCodeEx + 1638 8 org.python.python 0x0018f548 PyEval_EvalCode + 87 9 org.python.python 0x001a69ec PyErr_Display + 1896 10 org.python.python 0x001a7016 PyRun_FileExFlags + 135 11 org.python.python 0x001a8982 PyRun_SimpleFileExFlags + 421 12 org.python.python 0x001b3c03 Py_Main + 3095 13 org.python.pythonapp 0x00001fca 0x1000 + 4042 During the process of whittling down the script to a test case, I experienced other kinds of crashes, or no crash at all. For each iteration of the script, the outcome was always the same, i.e. never inconsistent between runs. All the various crashes I've encountered: :Assertion failed: (gc->gc.gc_refs != 0), function visit_decref, file Modules /gcmodule.c, line 276. Assertion failed: (pool->ref.count > 0), function PyObject_Free, file Objects /obmalloc.c, line 929. [1] 33289 illegal hardware instruction python crash.py [1] 33352 floating point exception python crash.py [1] 33502 segmentation fault python crash.py [1] 34303 bus error python crash.py Running this on a different machine running Debian Etch Linux x86 using Debian's Python 2.4 distribution, I get the following crash: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1209882400 (LWP 21471)] 0x080b9ffc in PyEval_EvalCodeEx () (gdb) bt #0 0x080b9ffc in PyEval_EvalCodeEx () #1 0x08100b69 in PyClassMethod_New () #2 0x0805ad9c in PyObject_CallFunction () #3 0x08097594 in PyType_Ready () #4 0x080b79bf in PyEval_EvalFrame () #5 0x080ba755 in PyEval_EvalCodeEx () #6 0x08100b69 in PyClassMethod_New () #7 0x0805ad9c in PyObject_CallFunction () #8 0x08097594 in PyType_Ready () #9 0x080b79bf in PyEval_EvalFrame () #10 0x080ba755 in PyEval_EvalCodeEx () #11 0x08100b69 in PyClassMethod_New () #12 0x0805ad9c in PyObject_CallFunction () #13 0x08097594 in PyType_Ready () #14 0x080b79bf in PyEval_EvalFrame () [the same stack trace repeating over and over...] #141 0x08100b69 in PyClassMethod_New () #142 0x0805ad9c in PyObject_CallFunction () #143 0x08097594 in PyType_Ready () #144 0x080b79bf in PyEval_EvalFrame () #145 0x080ba755 in PyEval_EvalCodeEx () #146 0x08100b69 in PyClassMethod_New () #147 0x0805ad9c in PyObject_CallFunction () #148 0x08097594 in PyType_Ready () #149 0x0807e5e9 in PyObject_GetAttrString () #150 0x08064f91 in PyFile_SoftSpace () #151 0x080b6420 in PyEval_EvalFrame () #152 0x080ba755 in PyEval_EvalCodeEx () #153 0x080ba7b9 in PyEval_EvalCode () #154 0x080dd167 in PyRun_FileExFlags () #155 0x080dd364 in PyRun_SimpleFileExFlags () #156 0x08055ba8 in Py_Main () #157 0x08055032 in main () Using Debian's distribution of Python 2.5, I didn't see any crashes. Using the distribution of Python 2.6b1 from python.org on Mac OS X 10.5 (x86), I saw the same crash: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x0000bea0 0x001b7e50 in ?? () (gdb) bt #0 0x001b7e50 in ?? () #1 0x0002bea1 in frame_dealloc (f=0x21db20) at Objects/frameobject.c:417 #2 0x0002bf55 in frame_dealloc (f=0x21f220) at Objects/frameobject.c:425 #3 0x0002bf55 in frame_dealloc (f=0x21f380) at Objects/frameobject.c:425 #4 0x000466db in _PyTrash_destroy_chain () at Objects/object.c:2223 #5 0x000b2dd2 in PyErr_Clear () at Python/errors.c:239 #6 0x00024235 in PyFile_SoftSpace (f=0x3645b0, newflag=0) at Objects/fileobject.c:2141 #7 0x000a11e4 in PyEval_EvalFrameEx (f=0x202f20, throwflag=0) at Python/ceval.c:1622 #8 0x000a45ea in PyEval_EvalCodeEx (co=0x33e968, globals=0x1b7e40, locals=0x1b7e40, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2880 #9 0x000a46f7 in PyEval_EvalCode (co=0x21eddc, globals=0x21eddc, locals=0x21eddc) at Python/ceval.c:495 #10 0x000c99d3 in PyRun_FileExFlags (fp=0xa0125de0, filename=0xbffff0ec "/Users/brodie/Documents/Code/py-crash/crash5.py", start=257, globals=0x1b7e40, locals=0x1b7e40, closeit=1, flags=0xbfffef5c) at Python/pythonrun.c:1300 #11 0x000c9e53 in PyRun_SimpleFileExFlags (fp=, filename=0xbffff0ec "/Users/brodie/Documents/Code/py-crash/crash5.py", closeit=1, flags=0xbfffef5c) at Python/pythonrun.c:896 #12 0x000da844 in Py_Main (argc=1, argv=0xbfffefdc) at Modules/main.c:575 #13 0x00001c3c in _start () #14 0x00001b69 in start () I should note that I reduced the test case as much as I possibly could, and the actual compiled source seems to affect the crash. I.e., if I remove one of the unused imports, it doesn't crash; if I remove the unused function foo(), it doesn't crash; if I change the "height" variable passed to wrap_output(), it doesn't crash; if I remove the reassignment of buf[0] in flush(), it doesn't crash. I'm not sure if these crashes are due to an error in the script, or if the script should even be capable of crashing Python in this manner. ---------- files: crash5.py messages: 68993 nosy: brodierao severity: normal status: open title: Segfault in PyFile_SoftSpace/PyEval_EvalFrameEx with sys.stdout reassigned type: crash Added file: http://bugs.python.org/file10782/crash5.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 08:39:18 2008 From: report at bugs.python.org (Brodie Rao) Date: Mon, 30 Jun 2008 06:39:18 +0000 Subject: [issue3242] Segfault in PyFile_SoftSpace/PyEval_EvalFrameEx with sys.stdout reassigned In-Reply-To: <1214805867.49.0.786809869075.issue3242@psf.upfronthosting.co.za> Message-ID: <1214807958.17.0.82224940957.issue3242@psf.upfronthosting.co.za> Brodie Rao added the comment: Actually, this seems to be a hardware issue, despite the consistency between runs and the duplication on another machine. I think you can ignore/close this bug. Sorry for the noise. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 08:43:47 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Mon, 30 Jun 2008 06:43:47 +0000 Subject: [issue3241] warnings module prints garbage In-Reply-To: <1214805400.27.0.0080322986331.issue3241@psf.upfronthosting.co.za> Message-ID: <1214808227.67.0.145094498751.issue3241@psf.upfronthosting.co.za> Ralf Schmitt added the comment: I just noticed that this also happens with 2.5. I first thought it was a regression, since I've never seen frozen programs print such garbage, it's apparently caused by bbfreeze choosing a dubious __file__ and by 2.6 having much more warnings statements. feel free to close as wontfix. ---------- versions: +Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 08:54:26 2008 From: report at bugs.python.org (Georgij Kondratjev) Date: Mon, 30 Jun 2008 06:54:26 +0000 Subject: [issue3239] curses/textpad.py incorrectly and redundantly imports ascii In-Reply-To: <1214774912.88.0.531536472348.issue3239@psf.upfronthosting.co.za> Message-ID: <1214808865.99.0.60393597533.issue3239@psf.upfronthosting.co.za> Georgij Kondratjev added the comment: Sorry, I didn't not distinguish between curses module ascii and built-in function ascii. "import curses.ascii as ascii" works. Is this a good fix? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 08:55:39 2008 From: report at bugs.python.org (Georgij Kondratjev) Date: Mon, 30 Jun 2008 06:55:39 +0000 Subject: [issue3239] curses/textpad.py incorrectly and redundantly imports ascii In-Reply-To: <1214774912.88.0.531536472348.issue3239@psf.upfronthosting.co.za> Message-ID: <1214808939.23.0.91731090729.issue3239@psf.upfronthosting.co.za> Georgij Kondratjev added the comment: Or is it possible/better to use relative import? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 09:00:32 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 30 Jun 2008 07:00:32 +0000 Subject: [issue3215] Can't import sqlite3 in Python 2.6b1 In-Reply-To: <1214572442.55.0.146238509349.issue3215@psf.upfronthosting.co.za> Message-ID: <1214809232.82.0.106236701964.issue3215@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is now fixed in r64597. I had indeed edited the project file before the release, but couldn't commit, as that would have modified the tag. I had rebuilt sqlite3.dll, but probably forgotten to rebuild _sqlite3.pyd. There are more issues with the PG builds, such as the .lib files not being created in the pgo directory (only in pgi). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 09:02:37 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 30 Jun 2008 07:02:37 +0000 Subject: [issue3241] warnings module prints garbage In-Reply-To: <1214805400.27.0.0080322986331.issue3241@psf.upfronthosting.co.za> Message-ID: <1214809357.29.0.477175923707.issue3241@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon nosy: +brett.cannon resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 10:25:15 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 30 Jun 2008 08:25:15 +0000 Subject: [issue3242] Segfault in PyFile_SoftSpace/PyEval_EvalFrameEx with sys.stdout reassigned In-Reply-To: <1214805867.49.0.786809869075.issue3242@psf.upfronthosting.co.za> Message-ID: <1214814315.86.0.15625478756.issue3242@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 10:26:01 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 30 Jun 2008 08:26:01 +0000 Subject: [issue3240] IDLE environment corrupts string.letters In-Reply-To: <1214784620.79.0.803163811318.issue3240@psf.upfronthosting.co.za> Message-ID: <1214814361.69.0.0303046399756.issue3240@psf.upfronthosting.co.za> Georg Brandl added the comment: Changing the locale changes string.letters -- that is expected behavior. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 10:49:20 2008 From: report at bugs.python.org (=?utf-8?q?Nagy_Ferenc_L=C3=A1szl=C3=B3?=) Date: Mon, 30 Jun 2008 08:49:20 +0000 Subject: [issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails Message-ID: <1214815759.99.0.839974928144.issue1424152@psf.upfronthosting.co.za> Nagy Ferenc L?szl? added the comment: > Can you please try this patch on top of the original patch? It makes an infinite loop: Traceback (most recent call last): File "F:\nfl\proxyhttps\test.py", line 8, in response = urllib2.urlopen(req) File "C:\Python25\lib\urllib2.py", line 121, in urlopen return _opener.open(url, data) File "C:\Python25\lib\urllib2.py", line 377, in open req = meth(req) File "C:\Python25\lib\urllib2.py", line 1037, in do_request_ scheme, sel = splittype(request.get_selector()) File "C:\Python25\lib\urllib2.py", line 253, in get_selector return self.__r_host File "C:\Python25\lib\urllib2.py", line 215, in __getattr__ return getattr(self, attr) File "C:\Python25\lib\urllib2.py", line 215, in __getattr__ return getattr(self, attr) File "C:\Python25\lib\urllib2.py", line 215, in __getattr__ return getattr(self, attr) File "C:\Python25\lib\urllib2.py", line 215, in __getattr__ return getattr(self, attr) File "C:\Python25\lib\urllib2.py", line 215, in __getattr__ return getattr(self, attr) ... The test program was: import urllib2 targeturl = 'https://www.paypal.com/' proxyhost = 'proxy.xxxxxxxx.hu:3128' req = urllib2.Request(targeturl) req.set_proxy(proxyhost, 'https') response = urllib2.urlopen(req) print response.info() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 12:56:09 2008 From: report at bugs.python.org (Sjoerd Mullender) Date: Mon, 30 Jun 2008 10:56:09 +0000 Subject: [issue3216] errors in msilib documentation In-Reply-To: <1214577470.61.0.590067451474.issue3216@psf.upfronthosting.co.za> Message-ID: <1214823369.56.0.671445681405.issue3216@psf.upfronthosting.co.za> Sjoerd Mullender added the comment: Today the links to Microsoft documentation go to English language pages, so that part of the bug report can be skipped. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 13:12:29 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 30 Jun 2008 11:12:29 +0000 Subject: [issue2054] add ftp-tls support to ftplib - RFC 4217 In-Reply-To: <1202523366.93.0.605901116561.issue2054@psf.upfronthosting.co.za> Message-ID: <1214824349.82.0.982203918356.issue2054@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Yes, I think that providing an "unwrap" method for the ssl module would be good, independently from this issue. With that implemented and httplib fixed in the way you were mentioning in this same report I can go on with modifying the ftplib patch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 13:23:43 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Mon, 30 Jun 2008 11:23:43 +0000 Subject: [issue3119] pickle.py is limited by python's call stack In-Reply-To: <1213589185.62.0.660916672679.issue3119@psf.upfronthosting.co.za> Message-ID: <1214825023.59.0.897826433322.issue3119@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 14:06:08 2008 From: report at bugs.python.org (Facundo Batista) Date: Mon, 30 Jun 2008 12:06:08 +0000 Subject: [issue3239] curses/textpad.py incorrectly and redundantly imports ascii In-Reply-To: <1214774912.88.0.531536472348.issue3239@psf.upfronthosting.co.za> Message-ID: <1214827568.53.0.0271605083977.issue3239@psf.upfronthosting.co.za> Facundo Batista added the comment: Ah, I now understand what you mean. The best, IMO, to avoid the confusion in the import and in the usage, is to do: >>> import curses.ascii as curses_ascii Do you care to send a patch? Thank you! ---------- assignee: -> facundobatista resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 14:46:01 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 30 Jun 2008 12:46:01 +0000 Subject: [issue2325] isinstance(anything, MetaclassThatDefinesInstancecheck) raises instead of returning False In-Reply-To: <1205772306.86.0.317312162506.issue2325@psf.upfronthosting.co.za> Message-ID: <1214829961.39.0.179641745007.issue2325@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I think the best is to ignore __instancecheck__ when "cls.__instancecheck__" is returned as an unbound method. In this case, we try "type(cls).__instancecheck__" instead. Here is a patch along this idea. I had to disable a test named "Evil", because in this case isinstance() simply falls back to the original algorithm. I don't know if this is applicable to 3.0: unbound methods don't exist any more. ---------- nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file10783/instancecheck.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 14:47:25 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 30 Jun 2008 12:47:25 +0000 Subject: [issue3092] Wrong unicode size detection in pybench In-Reply-To: <1214681621.82.0.787752734583.issue3092@psf.upfronthosting.co.za> Message-ID: <4868D51C.9040503@egenix.com> Marc-Andre Lemburg added the comment: On 2008-06-28 21:33, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > >> You're right: probably not. Would be great to have the test on the >> Py2.x version as well - to see the difference in performance. > > I'm not following you, what test are you talking about? > The patch is only about reporting of the Python build characteristics, > it does not (AFAIK) change anything to how or what tests are run. Sorry for the confusion. I was thinking of the new test added to the Py3k version of pybench - doesn't have anything to do with the Unicode size detection. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 16:28:45 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 30 Jun 2008 14:28:45 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> Message-ID: <1214836125.38.0.183235775311.issue3238@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Some remarks: - I don't think doing a bulk backport of ceval.c is the right approach. Instead, each functionality should be considered and backported independently, if desired. - Guido already said that 3.0 should be mostly clean from compatibility-related code, so forward-porting 2.x opcodes is out of the question. There's a reason they removed in the first place :-) - Some functionalities shouldn't be backported, e.g. introducing SETUP_EXCEPT was motivated by the different semantics of exception cleanup in py3k, backporting it would probably break some 2.x code. - Compatibility between the two eval loops (2.x and py3k) is probably the tip of the iceberg. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 16:46:20 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 30 Jun 2008 14:46:20 +0000 Subject: [issue3119] pickle.py is limited by python's call stack In-Reply-To: <1213589185.62.0.660916672679.issue3119@psf.upfronthosting.co.za> Message-ID: <1214837180.06.0.10505858634.issue3119@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Interesting. Why do you use a deque? You never seem to prepend or pop from the beginning of it, so using a plain list should be as fast. Also, your patch should add one or several unit tests to enforce the new behaviour. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 18:14:26 2008 From: report at bugs.python.org (Bill Janssen) Date: Mon, 30 Jun 2008 16:14:26 +0000 Subject: [issue2054] add ftp-tls support to ftplib - RFC 4217 In-Reply-To: <1214824349.82.0.982203918356.issue2054@psf.upfronthosting.co.za> Message-ID: <4b3e516a0806300909lf6f4f78m35d8ac3acdd61bc@mail.gmail.com> Bill Janssen added the comment: But httplib is far from fixed. It's a nasty tarball of interdependencies... Bill On Mon, Jun 30, 2008 at 4:12 AM, Giampaolo Rodola' wrote: > > Giampaolo Rodola' added the comment: > > Yes, I think that providing an "unwrap" method for the ssl module would > be good, independently from this issue. > With that implemented and httplib fixed in the way you were mentioning > in this same report I can go on with modifying the ftplib patch. > > _______________________________________ > Python tracker > > _______________________________________ > Added file: http://bugs.python.org/file10784/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Mon Jun 30 18:33:37 2008 From: report at bugs.python.org (Senthil) Date: Mon, 30 Jun 2008 16:33:37 +0000 Subject: [issue1675455] Use getaddrinfo() in urllib2.py for IPv6 support Message-ID: <1214843617.18.0.370407455049.issue1675455@psf.upfronthosting.co.za> Changes by Senthil : ---------- type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 18:42:47 2008 From: report at bugs.python.org (Senthil) Date: Mon, 30 Jun 2008 16:42:47 +0000 Subject: [issue2829] Copy cgi.parse_qs() to urllib.parse In-Reply-To: <1210563460.47.0.22388264935.issue2829@psf.upfronthosting.co.za> Message-ID: <1214844167.11.0.0400612805906.issue2829@psf.upfronthosting.co.za> Senthil added the comment: This is addressed in issue600362. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 18:46:02 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 30 Jun 2008 16:46:02 +0000 Subject: [issue2054] add ftp-tls support to ftplib - RFC 4217 In-Reply-To: <1202523366.93.0.605901116561.issue2054@psf.upfronthosting.co.za> Message-ID: <1214844362.8.0.618397333777.issue2054@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Ok, so let's leave httplib alone. Let's just add the unwrap() method to ssl.SSLSocket so that it could be be possible to go ahead with the current patch. Modifying it consists in just adding a new prot_c method (I could do that). As for the cacerts needed to be passed to FTP_TLS constructor you could do that afterwards. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 18:56:37 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 30 Jun 2008 16:56:37 +0000 Subject: [issue2054] add ftp-tls support to ftplib - RFC 4217 In-Reply-To: <1202523366.93.0.605901116561.issue2054@psf.upfronthosting.co.za> Message-ID: <1214844997.4.0.703694599457.issue2054@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Could what I've just said be an idea? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 18:58:38 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 30 Jun 2008 16:58:38 +0000 Subject: [issue2829] Copy cgi.parse_qs() to urllib.parse In-Reply-To: <1210563460.47.0.22388264935.issue2829@psf.upfronthosting.co.za> Message-ID: <1214845118.7.0.295087629114.issue2829@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> duplicate status: open -> closed superseder: -> relocate cgi.parse_qs() into urlparse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 19:24:11 2008 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 30 Jun 2008 17:24:11 +0000 Subject: [issue3008] Let bin/oct/hex show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1214846650.98.0.612079161634.issue3008@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's an updated Python version of toHex and fromHex; fixes a bug in the previous version of fromHex for hex floats starting with an upper case hex digit. I'm not sure how useful this is, but I thought I might as well post the code. I also have tests for these; to follow. I'd be happy to help out with the C version once the API is decided on; I have far too much time on my hands right now. Though I'm assuming Raymond will beat me to it. Added file: http://bugs.python.org/file10785/hex_float.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 19:24:43 2008 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 30 Jun 2008 17:24:43 +0000 Subject: [issue3008] Let bin/oct/hex show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1214846683.77.0.460571091337.issue3008@psf.upfronthosting.co.za> Mark Dickinson added the comment: ...and the tests for hex_float.py Added file: http://bugs.python.org/file10786/test_hex_float.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 19:41:22 2008 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 30 Jun 2008 17:41:22 +0000 Subject: [issue3008] Let bin/oct/hex show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1214847682.28.0.6468887772.issue3008@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file10780/hex_float.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 20:02:18 2008 From: report at bugs.python.org (Chris AtLee) Date: Mon, 30 Jun 2008 18:02:18 +0000 Subject: [issue3243] Support iterable bodies in httplib In-Reply-To: <1214848938.76.0.928668674728.issue3243@psf.upfronthosting.co.za> Message-ID: <1214848938.76.0.928668674728.issue3243@psf.upfronthosting.co.za> New submission from Chris AtLee : httplib should support requests whose bodies are iterable objects. This would facilitate doing large file uploads via HTTP since you wouldn't have to load the entire file into memory to create the request string. Index: Lib/httplib.py =================================================================== --- Lib/httplib.py (revision 64600) +++ Lib/httplib.py (working copy) @@ -688,7 +688,12 @@ self.__state = _CS_IDLE def send(self, str): - """Send `str' to the server.""" + """Send `str` to the server. + + ``str`` can be a string object, a file-like object that supports + a .read() method, or an iterable object that supports a .next() + method. + """ if self.sock is None: if self.auto_open: self.connect() @@ -710,6 +715,10 @@ while data: self.sock.sendall(data) data=str.read(blocksize) + elif hasattr(str,'next'): + if self.debuglevel > 0: print "sendIng an iterable" + for data in str: + self.sock.sendall(data) else: self.sock.sendall(str) except socket.error, v: ---------- components: Library (Lib) messages: 69014 nosy: catlee severity: normal status: open title: Support iterable bodies in httplib type: feature request versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 20:04:38 2008 From: report at bugs.python.org (Chris AtLee) Date: Mon, 30 Jun 2008 18:04:38 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> New submission from Chris AtLee : The standard library should provide a way to encode data using the standard multipart/form-data encoding. This encoding is required to support file uploads via HTTP POST (or PUT) requests. Ideally file data could be streamed to the remote server if httplib supported iterable request bodies (see issue #3243). Mailing list thread: http://mail.python.org/pipermail/python-dev/2008-June/080783.html ---------- components: Library (Lib) messages: 69015 nosy: catlee severity: normal status: open title: multipart/form-data encoding type: feature request versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 21:24:56 2008 From: report at bugs.python.org (Edward Langley) Date: Mon, 30 Jun 2008 19:24:56 +0000 Subject: [issue3245] Memory leak on OS X In-Reply-To: <1214853896.85.0.513571586109.issue3245@psf.upfronthosting.co.za> Message-ID: <1214853896.85.0.513571586109.issue3245@psf.upfronthosting.co.za> New submission from Edward Langley : On OS X 10.5.3 the default python has a mild memory leak. sample session: % python -S Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin >>> % leaks Python Process 2357: 572 nodes malloced for 1031 KB Process 2357: 1 leak for 16 total leaked bytes. ... ---------- components: Macintosh messages: 69016 nosy: fiddlerwoaroof severity: normal status: open title: Memory leak on OS X type: performance versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 22:16:29 2008 From: report at bugs.python.org (ric) Date: Mon, 30 Jun 2008 20:16:29 +0000 Subject: [issue3246] configure: WARNING: sys/socket.h: present but cannot be compiled In-Reply-To: <1214856989.0.0.383145145027.issue3246@psf.upfronthosting.co.za> Message-ID: <1214856989.0.0.383145145027.issue3246@psf.upfronthosting.co.za> New submission from ric : Building Python 2.5.2 on Solaris9, receive error: checking sys/socket.h presence... yes configure: WARNING: sys/socket.h: present but cannot be compiled configure: WARNING: sys/socket.h: check for missing prerequisite headers? configure: WARNING: sys/socket.h: see the Autoconf documentation configure: WARNING: sys/socket.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/socket.h: proceeding with the preprocessor's result configure: WARNING: sys/socket.h: in the future, the compiler will take precedence configure: WARNING: ## ------------------------------------------------ ## configure: WARNING: ## Report this to http://www.python.org/python-bugs ## configure: WARNING: ## ------------------------------------------------ ## checking for sys/socket.h... yes ---------- components: Build messages: 69017 nosy: rrochele severity: normal status: open title: configure: WARNING: sys/socket.h: present but cannot be compiled type: compile error versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 23:20:47 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 30 Jun 2008 21:20:47 +0000 Subject: [issue2013] Long object free list optimization In-Reply-To: <1202180868.04.0.23342807926.issue2013@psf.upfronthosting.co.za> Message-ID: <1214860847.91.0.25023446563.issue2013@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Gregory, your patch probably deserves checking in, it doesn't seem to me there is any concern preventing you to do that. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 23:21:33 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 30 Jun 2008 21:21:33 +0000 Subject: [issue2862] cleanup of freelist management In-Reply-To: <1210859181.3.0.311974356319.issue2862@psf.upfronthosting.co.za> Message-ID: <1214860893.27.0.349903759526.issue2862@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I agree with this patch and will commit it later this weekend if I hear > no objections. Gregory, it seems there has been no objection on the ML :-) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 30 23:37:38 2008 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 30 Jun 2008 21:37:38 +0000 Subject: [issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up. In-Reply-To: <1198258890.48.0.235588402123.issue1682@psf.upfronthosting.co.za> Message-ID: <1214861857.95.0.566473532158.issue1682@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I agree that if the type of the 2nd arg isn't int or long it should be > rejected. That should not slow down the common path (two ints). I'm having second thoughts about this; it doesn't seem worth adding an extra check that has to be applied every time a Fraction is created from a string (or another Rational instance). The condition being checked for (a denominator equal to 1, but not of type int or long) is unlikely to occur in practice, and fairly harmless even if it does occur. So I'm thinking that PBP says leave it alone. _______________________________________ Python tracker _______________________________________